@agent-native/core 0.88.0 → 0.90.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1638) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +82 -2
  3. package/corpus/core/docs/content/agent-native-toolkit.mdx +87 -146
  4. package/corpus/core/docs/content/cloneable-saas.mdx +19 -19
  5. package/corpus/core/docs/content/components.mdx +16 -4
  6. package/corpus/core/docs/content/data-programs.mdx +329 -0
  7. package/corpus/core/docs/content/deployment.mdx +9 -9
  8. package/corpus/core/docs/content/extensions.mdx +8 -7
  9. package/corpus/core/docs/content/generative-ui.mdx +5 -3
  10. package/corpus/core/docs/content/key-concepts.mdx +6 -9
  11. package/corpus/core/docs/content/locales/ar-SA/agent-native-toolkit.mdx +100 -70
  12. package/corpus/core/docs/content/locales/ar-SA/cloneable-saas.mdx +19 -19
  13. package/corpus/core/docs/content/locales/ar-SA/components.mdx +12 -2
  14. package/corpus/core/docs/content/locales/ar-SA/data-programs.mdx +329 -0
  15. package/corpus/core/docs/content/locales/ar-SA/deployment.mdx +8 -9
  16. package/corpus/core/docs/content/locales/ar-SA/extensions.mdx +6 -4
  17. package/corpus/core/docs/content/locales/ar-SA/key-concepts.mdx +7 -9
  18. package/corpus/core/docs/content/locales/ar-SA/real-time-collaboration.mdx +9 -10
  19. package/corpus/core/docs/content/locales/de-DE/agent-native-toolkit.mdx +100 -74
  20. package/corpus/core/docs/content/locales/de-DE/cloneable-saas.mdx +19 -19
  21. package/corpus/core/docs/content/locales/de-DE/components.mdx +12 -2
  22. package/corpus/core/docs/content/locales/de-DE/data-programs.mdx +329 -0
  23. package/corpus/core/docs/content/locales/de-DE/deployment.mdx +8 -9
  24. package/corpus/core/docs/content/locales/de-DE/extensions.mdx +6 -4
  25. package/corpus/core/docs/content/locales/de-DE/key-concepts.mdx +8 -10
  26. package/corpus/core/docs/content/locales/de-DE/real-time-collaboration.mdx +9 -10
  27. package/corpus/core/docs/content/locales/es-ES/agent-native-toolkit.mdx +100 -74
  28. package/corpus/core/docs/content/locales/es-ES/cloneable-saas.mdx +19 -19
  29. package/corpus/core/docs/content/locales/es-ES/components.mdx +12 -2
  30. package/corpus/core/docs/content/locales/es-ES/data-programs.mdx +329 -0
  31. package/corpus/core/docs/content/locales/es-ES/deployment.mdx +8 -9
  32. package/corpus/core/docs/content/locales/es-ES/extensions.mdx +6 -4
  33. package/corpus/core/docs/content/locales/es-ES/key-concepts.mdx +8 -10
  34. package/corpus/core/docs/content/locales/es-ES/real-time-collaboration.mdx +9 -10
  35. package/corpus/core/docs/content/locales/fr-FR/agent-native-toolkit.mdx +100 -76
  36. package/corpus/core/docs/content/locales/fr-FR/cloneable-saas.mdx +19 -19
  37. package/corpus/core/docs/content/locales/fr-FR/components.mdx +12 -2
  38. package/corpus/core/docs/content/locales/fr-FR/data-programs.mdx +329 -0
  39. package/corpus/core/docs/content/locales/fr-FR/deployment.mdx +8 -9
  40. package/corpus/core/docs/content/locales/fr-FR/extensions.mdx +6 -4
  41. package/corpus/core/docs/content/locales/fr-FR/key-concepts.mdx +8 -10
  42. package/corpus/core/docs/content/locales/fr-FR/real-time-collaboration.mdx +9 -10
  43. package/corpus/core/docs/content/locales/hi-IN/agent-native-toolkit.mdx +100 -71
  44. package/corpus/core/docs/content/locales/hi-IN/cloneable-saas.mdx +19 -19
  45. package/corpus/core/docs/content/locales/hi-IN/components.mdx +20 -10
  46. package/corpus/core/docs/content/locales/hi-IN/data-programs.mdx +329 -0
  47. package/corpus/core/docs/content/locales/hi-IN/deployment.mdx +8 -9
  48. package/corpus/core/docs/content/locales/hi-IN/extensions.mdx +6 -4
  49. package/corpus/core/docs/content/locales/hi-IN/key-concepts.mdx +8 -10
  50. package/corpus/core/docs/content/locales/hi-IN/real-time-collaboration.mdx +9 -10
  51. package/corpus/core/docs/content/locales/ja-JP/agent-native-toolkit.mdx +100 -64
  52. package/corpus/core/docs/content/locales/ja-JP/cloneable-saas.mdx +19 -19
  53. package/corpus/core/docs/content/locales/ja-JP/components.mdx +12 -2
  54. package/corpus/core/docs/content/locales/ja-JP/data-programs.mdx +329 -0
  55. package/corpus/core/docs/content/locales/ja-JP/deployment.mdx +8 -9
  56. package/corpus/core/docs/content/locales/ja-JP/extensions.mdx +6 -4
  57. package/corpus/core/docs/content/locales/ja-JP/key-concepts.mdx +9 -11
  58. package/corpus/core/docs/content/locales/ja-JP/real-time-collaboration.mdx +9 -10
  59. package/corpus/core/docs/content/locales/ko-KR/agent-native-toolkit.mdx +100 -60
  60. package/corpus/core/docs/content/locales/ko-KR/cloneable-saas.mdx +19 -19
  61. package/corpus/core/docs/content/locales/ko-KR/components.mdx +20 -10
  62. package/corpus/core/docs/content/locales/ko-KR/data-programs.mdx +329 -0
  63. package/corpus/core/docs/content/locales/ko-KR/deployment.mdx +8 -9
  64. package/corpus/core/docs/content/locales/ko-KR/extensions.mdx +16 -14
  65. package/corpus/core/docs/content/locales/ko-KR/key-concepts.mdx +9 -11
  66. package/corpus/core/docs/content/locales/ko-KR/real-time-collaboration.mdx +9 -10
  67. package/corpus/core/docs/content/locales/pt-BR/agent-native-toolkit.mdx +100 -74
  68. package/corpus/core/docs/content/locales/pt-BR/cloneable-saas.mdx +19 -19
  69. package/corpus/core/docs/content/locales/pt-BR/components.mdx +12 -2
  70. package/corpus/core/docs/content/locales/pt-BR/data-programs.mdx +329 -0
  71. package/corpus/core/docs/content/locales/pt-BR/deployment.mdx +8 -9
  72. package/corpus/core/docs/content/locales/pt-BR/extensions.mdx +6 -4
  73. package/corpus/core/docs/content/locales/pt-BR/key-concepts.mdx +8 -11
  74. package/corpus/core/docs/content/locales/pt-BR/real-time-collaboration.mdx +9 -10
  75. package/corpus/core/docs/content/locales/zh-CN/agent-native-toolkit.mdx +100 -58
  76. package/corpus/core/docs/content/locales/zh-CN/cloneable-saas.mdx +19 -19
  77. package/corpus/core/docs/content/locales/zh-CN/components.mdx +20 -10
  78. package/corpus/core/docs/content/locales/zh-CN/data-programs.mdx +329 -0
  79. package/corpus/core/docs/content/locales/zh-CN/deployment.mdx +7 -9
  80. package/corpus/core/docs/content/locales/zh-CN/extensions.mdx +16 -14
  81. package/corpus/core/docs/content/locales/zh-CN/key-concepts.mdx +7 -11
  82. package/corpus/core/docs/content/locales/zh-CN/real-time-collaboration.mdx +10 -11
  83. package/corpus/core/docs/content/locales/zh-TW/agent-native-toolkit.mdx +100 -58
  84. package/corpus/core/docs/content/locales/zh-TW/cloneable-saas.mdx +19 -19
  85. package/corpus/core/docs/content/locales/zh-TW/components.mdx +20 -10
  86. package/corpus/core/docs/content/locales/zh-TW/data-programs.mdx +329 -0
  87. package/corpus/core/docs/content/locales/zh-TW/deployment.mdx +7 -9
  88. package/corpus/core/docs/content/locales/zh-TW/extensions.mdx +16 -14
  89. package/corpus/core/docs/content/locales/zh-TW/key-concepts.mdx +7 -11
  90. package/corpus/core/docs/content/locales/zh-TW/real-time-collaboration.mdx +10 -11
  91. package/corpus/core/docs/content/real-time-collaboration.mdx +10 -11
  92. package/corpus/core/docs/content/toolkit-app-adapters.mdx +46 -0
  93. package/corpus/core/docs/content/toolkit-collaboration-ui.mdx +48 -0
  94. package/corpus/core/docs/content/toolkit-sharing-ui.mdx +33 -0
  95. package/corpus/core/docs/content/toolkit-shell-hooks.mdx +27 -0
  96. package/corpus/core/docs/content/toolkit-ui.mdx +69 -0
  97. package/corpus/core/package.json +5 -1
  98. package/corpus/core/src/agent/durable-background.ts +53 -0
  99. package/corpus/core/src/agent/engine/ai-sdk-engine.ts +7 -1
  100. package/corpus/core/src/agent/engine/anthropic-engine.ts +29 -1
  101. package/corpus/core/src/agent/engine/builder-engine.ts +1 -0
  102. package/corpus/core/src/agent/engine/output-tokens.ts +26 -13
  103. package/corpus/core/src/agent/engine/registry.ts +45 -26
  104. package/corpus/core/src/agent/engine/translate-ai-sdk.ts +56 -7
  105. package/corpus/core/src/agent/engine/translate-anthropic.ts +43 -1
  106. package/corpus/core/src/agent/engine/types.ts +16 -0
  107. package/corpus/core/src/agent/model-config.ts +100 -0
  108. package/corpus/core/src/agent/production-agent.ts +492 -241
  109. package/corpus/core/src/agent/runtime-context.ts +50 -12
  110. package/corpus/core/src/agent/tool-result-images.ts +178 -0
  111. package/corpus/core/src/brand-kit/fig/index.ts +8 -4
  112. package/corpus/core/src/client/AgentPanel.tsx +88 -31
  113. package/corpus/core/src/client/AssistantChat.tsx +95 -46
  114. package/corpus/core/src/client/KeepTabOpenNotice.tsx +176 -0
  115. package/corpus/core/src/client/MultiTabAssistantChat.tsx +7 -0
  116. package/corpus/core/src/client/RunStuckBanner.tsx +13 -1
  117. package/corpus/core/src/client/chat/run-recovery.tsx +7 -1
  118. package/corpus/core/src/client/clipboard.ts +17 -13
  119. package/corpus/core/src/client/components/AgentPresenceChip.tsx +4 -69
  120. package/corpus/core/src/client/components/LiveCursorOverlay.tsx +5 -240
  121. package/corpus/core/src/client/components/PresenceBar.tsx +4 -346
  122. package/corpus/core/src/client/components/RecentEditHighlights.tsx +4 -219
  123. package/corpus/core/src/client/components/RemoteSelectionRings.tsx +5 -220
  124. package/corpus/core/src/client/composer/TiptapComposer.tsx +94 -38
  125. package/corpus/core/src/client/db-admin/SqlEditor.tsx +13 -3
  126. package/corpus/core/src/client/dynamic-suggestions.ts +6 -1
  127. package/corpus/core/src/client/extensions/ExtensionViewer.tsx +0 -14
  128. package/corpus/core/src/client/extensions/ExtensionsListPage.tsx +29 -30
  129. package/corpus/core/src/client/extensions/ExtensionsSidebarSection.tsx +2 -1
  130. package/corpus/core/src/client/host-bridge.ts +29 -8
  131. package/corpus/core/src/client/i18n.tsx +7 -1
  132. package/corpus/core/src/client/index.ts +5 -0
  133. package/corpus/core/src/client/resources/McpIntegrationDialog.tsx +34 -69
  134. package/corpus/core/src/client/rich-markdown-editor/SharedRichEditor.tsx +4 -0
  135. package/corpus/core/src/client/rich-markdown-editor/useCollabReconcile.ts +7 -1
  136. package/corpus/core/src/client/settings/SettingsPanel.tsx +409 -230
  137. package/corpus/core/src/client/settings/SettingsTabsPage.tsx +5 -7
  138. package/corpus/core/src/client/settings/index.ts +5 -1
  139. package/corpus/core/src/client/sharing/VisibilityBadge.tsx +4 -37
  140. package/corpus/core/src/client/use-run-stuck-detection.ts +10 -1
  141. package/corpus/core/src/coding-tools/run-code.ts +473 -74
  142. package/corpus/core/src/coding-tools/sandbox/background.ts +406 -0
  143. package/corpus/core/src/coding-tools/sandbox/executions-store.ts +517 -0
  144. package/corpus/core/src/coding-tools/sandbox/index.ts +53 -13
  145. package/corpus/core/src/coding-tools/sandbox/local-child-process-adapter.ts +61 -4
  146. package/corpus/core/src/collab/client.ts +870 -562
  147. package/corpus/core/src/collab/presence.ts +12 -23
  148. package/corpus/core/src/collab/recent-edits.ts +13 -32
  149. package/corpus/core/src/data-programs/actions.ts +335 -0
  150. package/corpus/core/src/data-programs/contract.ts +284 -0
  151. package/corpus/core/src/data-programs/execute.ts +693 -0
  152. package/corpus/core/src/data-programs/index.ts +72 -0
  153. package/corpus/core/src/data-programs/schema.ts +148 -0
  154. package/corpus/core/src/data-programs/store.ts +755 -0
  155. package/corpus/core/src/deploy/build.ts +34 -0
  156. package/corpus/core/src/extensions/actions.ts +2 -2
  157. package/corpus/core/src/file-upload/builder.ts +11 -0
  158. package/corpus/core/src/integrations/webhook-handler.ts +27 -8
  159. package/corpus/core/src/local-artifacts/index.ts +1 -1
  160. package/corpus/core/src/localization/default-messages.ts +1 -2
  161. package/corpus/core/src/mcp-client/index.ts +29 -0
  162. package/corpus/core/src/onboarding/default-steps.ts +5 -2
  163. package/corpus/core/src/resources/store.ts +34 -3
  164. package/corpus/core/src/scripts/agent-engines/list-agent-engines.ts +4 -8
  165. package/corpus/core/src/scripts/agent-engines/test-agent-engine.ts +9 -2
  166. package/corpus/core/src/scripts/db/tool-mode.ts +2 -2
  167. package/corpus/core/src/scripts/resources/migrate-learnings.ts +9 -13
  168. package/corpus/core/src/server/agent-chat-plugin.ts +154 -62
  169. package/corpus/core/src/server/agent-discovery.ts +67 -7
  170. package/corpus/core/src/server/auth.ts +90 -3
  171. package/corpus/core/src/server/builder-design-systems.ts +2 -2
  172. package/corpus/core/src/server/core-routes-plugin.ts +119 -22
  173. package/corpus/core/src/server/credential-provider.ts +28 -8
  174. package/corpus/core/src/server/csrf.ts +3 -0
  175. package/corpus/core/src/server/oauth-helpers.ts +11 -1
  176. package/corpus/core/src/server/onboarding-html.ts +80 -48
  177. package/corpus/core/src/server/prompts/shared-rules.ts +2 -2
  178. package/corpus/core/src/server/transcribe-voice.ts +93 -9
  179. package/corpus/core/src/styles/agent-native.css +57 -45
  180. package/corpus/core/src/templates/default/.agents/skills/actions/SKILL.md +55 -0
  181. package/corpus/core/src/templates/default/AGENTS.md +11 -14
  182. package/corpus/core/src/templates/default/actions/navigate.ts +1 -1
  183. package/corpus/core/src/templates/default/app/i18n/ar-SA.ts +0 -1
  184. package/corpus/core/src/templates/default/app/i18n/de-DE.ts +0 -1
  185. package/corpus/core/src/templates/default/app/i18n/en-US.ts +0 -1
  186. package/corpus/core/src/templates/default/app/i18n/es-ES.ts +0 -1
  187. package/corpus/core/src/templates/default/app/i18n/fr-FR.ts +0 -1
  188. package/corpus/core/src/templates/default/app/i18n/hi-IN.ts +0 -1
  189. package/corpus/core/src/templates/default/app/i18n/ja-JP.ts +0 -1
  190. package/corpus/core/src/templates/default/app/i18n/ko-KR.ts +0 -1
  191. package/corpus/core/src/templates/default/app/i18n/pt-BR.ts +0 -1
  192. package/corpus/core/src/templates/default/app/i18n/zh-CN.ts +0 -1
  193. package/corpus/core/src/templates/default/app/i18n/zh-TW.ts +0 -1
  194. package/corpus/core/src/templates/default/app/routes/settings.tsx +22 -33
  195. package/corpus/core/src/templates/headless/.agents/skills/agent-native-docs/SKILL.md +20 -7
  196. package/corpus/core/src/templates/headless/AGENTS.md +9 -6
  197. package/corpus/core/src/templates/workspace-core/.agents/skills/actions/SKILL.md +55 -0
  198. package/corpus/core/src/templates/workspace-core/.agents/skills/data-programs/SKILL.md +128 -0
  199. package/corpus/core/src/templates/workspace-core/.agents/skills/harness-agents/SKILL.md +10 -4
  200. package/corpus/core/src/vite/agents-bundle-plugin.ts +26 -1
  201. package/corpus/core/src/vite/client.ts +12 -0
  202. package/corpus/templates/analytics/.agents/skills/actions/SKILL.md +55 -0
  203. package/corpus/templates/analytics/.agents/skills/analysis-workspace/SKILL.md +8 -0
  204. package/corpus/templates/analytics/.agents/skills/data-programs/SKILL.md +348 -0
  205. package/corpus/templates/analytics/.agents/skills/provider-api/SKILL.md +10 -0
  206. package/corpus/templates/analytics/AGENTS.md +31 -32
  207. package/corpus/templates/analytics/actions/dashboard-mutation-api.ts +1 -1
  208. package/corpus/templates/analytics/actions/delete-data-source-credentials.ts +32 -0
  209. package/corpus/templates/analytics/actions/ensure-risk-meeting-dashboard.ts +247 -0
  210. package/corpus/templates/analytics/actions/update-data-source-credentials.ts +123 -0
  211. package/corpus/templates/analytics/app/components/InlineMetric.tsx +2 -2
  212. package/corpus/templates/analytics/app/components/dashboard/CumulativeNetChart.tsx +2 -7
  213. package/corpus/templates/analytics/app/components/dashboard/DataTable.tsx +11 -16
  214. package/corpus/templates/analytics/app/components/dashboard/DateRangePicker.tsx +1 -2
  215. package/corpus/templates/analytics/app/components/dashboard/MetricCard.tsx +2 -7
  216. package/corpus/templates/analytics/app/components/dashboard/RecentActivity.tsx +3 -6
  217. package/corpus/templates/analytics/app/components/dashboard/RevenueChart.tsx +1 -6
  218. package/corpus/templates/analytics/app/components/dashboard/RevenueComparisonChart.tsx +2 -7
  219. package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +11 -15
  220. package/corpus/templates/analytics/app/components/dashboard/StatsCard.tsx +1 -7
  221. package/corpus/templates/analytics/app/components/dashboard/TimeSeriesChart.tsx +2 -7
  222. package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +16 -16
  223. package/corpus/templates/analytics/app/components/layout/Header.tsx +2 -2
  224. package/corpus/templates/analytics/app/components/layout/HeaderActions.tsx +2 -1
  225. package/corpus/templates/analytics/app/components/layout/Layout.tsx +2 -2
  226. package/corpus/templates/analytics/app/components/layout/MobileNav.tsx +33 -17
  227. package/corpus/templates/analytics/app/components/layout/NewAnalysisDialog.tsx +6 -6
  228. package/corpus/templates/analytics/app/components/layout/NewDashboardDialog.tsx +4 -3
  229. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +119 -68
  230. package/corpus/templates/analytics/app/components/ui/alert-dialog.tsx +1 -0
  231. package/corpus/templates/analytics/app/components/ui/alert.tsx +1 -0
  232. package/corpus/templates/analytics/app/components/ui/avatar.tsx +1 -0
  233. package/corpus/templates/analytics/app/components/ui/badge.tsx +1 -0
  234. package/corpus/templates/analytics/app/components/ui/button.tsx +1 -0
  235. package/corpus/templates/analytics/app/components/ui/calendar.tsx +1 -1
  236. package/corpus/templates/analytics/app/components/ui/card.tsx +1 -0
  237. package/corpus/templates/analytics/app/components/ui/checkbox.tsx +1 -0
  238. package/corpus/templates/analytics/app/components/ui/collapsible.tsx +1 -0
  239. package/corpus/templates/analytics/app/components/ui/command.tsx +1 -0
  240. package/corpus/templates/analytics/app/components/ui/date-picker.tsx +1 -0
  241. package/corpus/templates/analytics/app/components/ui/dialog.tsx +1 -0
  242. package/corpus/templates/analytics/app/components/ui/dropdown-menu.tsx +1 -0
  243. package/corpus/templates/analytics/app/components/ui/input.tsx +1 -0
  244. package/corpus/templates/analytics/app/components/ui/label.tsx +1 -0
  245. package/corpus/templates/analytics/app/components/ui/popover.tsx +1 -0
  246. package/corpus/templates/analytics/app/components/ui/progress.tsx +1 -0
  247. package/corpus/templates/analytics/app/components/ui/select.tsx +1 -0
  248. package/corpus/templates/analytics/app/components/ui/sheet.tsx +1 -0
  249. package/corpus/templates/analytics/app/components/ui/skeleton.tsx +1 -0
  250. package/corpus/templates/analytics/app/components/ui/sonner.tsx +1 -0
  251. package/corpus/templates/analytics/app/components/ui/spinner.tsx +1 -0
  252. package/corpus/templates/analytics/app/components/ui/switch.tsx +1 -0
  253. package/corpus/templates/analytics/app/components/ui/table.tsx +1 -0
  254. package/corpus/templates/analytics/app/components/ui/tabs.tsx +1 -0
  255. package/corpus/templates/analytics/app/components/ui/textarea.tsx +1 -0
  256. package/corpus/templates/analytics/app/components/ui/toaster.tsx +1 -0
  257. package/corpus/templates/analytics/app/components/ui/toggle-group.tsx +1 -0
  258. package/corpus/templates/analytics/app/components/ui/toolkit-provider.tsx +12 -0
  259. package/corpus/templates/analytics/app/components/ui/tooltip.tsx +1 -0
  260. package/corpus/templates/analytics/app/global.css +26 -3
  261. package/corpus/templates/analytics/app/i18n/zh-TW.ts +27 -4
  262. package/corpus/templates/analytics/app/i18n-data.ts +277 -42
  263. package/corpus/templates/analytics/app/pages/Agents.tsx +19 -19
  264. package/corpus/templates/analytics/app/pages/DataDictionary.tsx +21 -21
  265. package/corpus/templates/analytics/app/pages/DataSources.tsx +31 -54
  266. package/corpus/templates/analytics/app/pages/NotFound.tsx +2 -1
  267. package/corpus/templates/analytics/app/pages/Placeholder.tsx +2 -1
  268. package/corpus/templates/analytics/app/pages/Settings.tsx +19 -37
  269. package/corpus/templates/analytics/app/pages/adhoc/DashboardSkeleton.tsx +3 -2
  270. package/corpus/templates/analytics/app/pages/adhoc/_shared/KpiChart.tsx +8 -13
  271. package/corpus/templates/analytics/app/pages/adhoc/_shared/components/DateRangeInput.tsx +1 -2
  272. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/ChartTypePicker.tsx +2 -4
  273. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/DateRangePicker.tsx +1 -2
  274. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/EventCombobox.tsx +7 -7
  275. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/EventPanel.tsx +2 -1
  276. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/EventRow.tsx +2 -1
  277. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/ExplorerChart.tsx +3 -8
  278. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/FilterBuilder.tsx +5 -4
  279. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/GroupByPicker.tsx +2 -1
  280. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/PropertyCombobox.tsx +7 -7
  281. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/PropertyValueCombobox.tsx +7 -7
  282. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/SqlPreview.tsx +1 -1
  283. package/corpus/templates/analytics/app/pages/adhoc/explorer/index.tsx +16 -16
  284. package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/ChartCard.tsx +16 -21
  285. package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +32 -32
  286. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/DashboardFilterBar.tsx +14 -14
  287. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/EmailReportDialog.tsx +14 -13
  288. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +200 -52
  289. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +23 -28
  290. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/ViewSqlPopover.tsx +13 -12
  291. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/ViewsMenu.tsx +15 -15
  292. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +32 -36
  293. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/types.ts +2 -1
  294. package/corpus/templates/analytics/app/pages/analyses/AnalysesList.tsx +8 -7
  295. package/corpus/templates/analytics/app/pages/analyses/AnalysisDetail.tsx +19 -19
  296. package/corpus/templates/analytics/app/pages/analyses/LegacyFusionAnalysis.tsx +11 -15
  297. package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +14 -14
  298. package/corpus/templates/analytics/app/pages/sessions/SessionDevToolsPanel.tsx +7 -12
  299. package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +12 -12
  300. package/corpus/templates/analytics/app/pages/settings/AlertRulesSettingsCard.tsx +25 -25
  301. package/corpus/templates/analytics/app/root.tsx +22 -19
  302. package/corpus/templates/analytics/app/routes/catalog.tsx +8 -8
  303. package/corpus/templates/analytics/changelog/2026-07-06-dashboard-lists-and-headers-stay-compact.md +6 -0
  304. package/corpus/templates/analytics/changelog/2026-07-06-dashboards-can-now-chart-data-programs-saved-server-side-scr.md +6 -0
  305. package/corpus/templates/analytics/changelog/2026-07-06-extension-pages-and-mobile-headers-now-share-one-background-shade.md +6 -0
  306. package/corpus/templates/analytics/changelog/2026-07-06-mobile-chat-header-is-more-compact-and-the-menu-button-opens-navigation.md +5 -0
  307. package/corpus/templates/analytics/learnings.defaults.md +36 -0
  308. package/corpus/templates/analytics/seeds/data-programs/risk-meeting-cohort.js +254 -0
  309. package/corpus/templates/analytics/seeds/data-programs/risk-meeting-pylon-early-warning.js +184 -0
  310. package/corpus/templates/analytics/server/handlers/sql-query.ts +1 -1
  311. package/corpus/templates/analytics/server/lib/dashboard-panel-query.ts +109 -1
  312. package/corpus/templates/assets/.agents/skills/actions/SKILL.md +55 -0
  313. package/corpus/templates/assets/app/components/create/RecentDraftsSection.tsx +3 -2
  314. package/corpus/templates/assets/app/components/generation/GenerationResults.tsx +16 -10
  315. package/corpus/templates/assets/app/components/layout/Header.tsx +1 -1
  316. package/corpus/templates/assets/app/components/layout/PageShell.tsx +4 -4
  317. package/corpus/templates/assets/app/components/layout/Sidebar.tsx +12 -12
  318. package/corpus/templates/assets/app/components/library/CreateLibraryDialog.tsx +8 -8
  319. package/corpus/templates/assets/app/components/library/EditLibraryDialog.tsx +7 -7
  320. package/corpus/templates/assets/app/components/library/LibraryCard.tsx +8 -8
  321. package/corpus/templates/assets/app/components/library/LibraryPresetGrid.tsx +3 -2
  322. package/corpus/templates/assets/app/components/ui/alert-dialog.tsx +1 -0
  323. package/corpus/templates/assets/app/components/ui/badge.tsx +1 -0
  324. package/corpus/templates/assets/app/components/ui/button.tsx +1 -0
  325. package/corpus/templates/assets/app/components/ui/card.tsx +1 -0
  326. package/corpus/templates/assets/app/components/ui/checkbox.tsx +1 -0
  327. package/corpus/templates/assets/app/components/ui/dialog.tsx +1 -0
  328. package/corpus/templates/assets/app/components/ui/dropdown-menu.tsx +1 -0
  329. package/corpus/templates/assets/app/components/ui/input.tsx +1 -0
  330. package/corpus/templates/assets/app/components/ui/label.tsx +1 -0
  331. package/corpus/templates/assets/app/components/ui/popover.tsx +1 -0
  332. package/corpus/templates/assets/app/components/ui/select.tsx +1 -0
  333. package/corpus/templates/assets/app/components/ui/separator.tsx +1 -0
  334. package/corpus/templates/assets/app/components/ui/sheet.tsx +1 -0
  335. package/corpus/templates/assets/app/components/ui/skeleton.tsx +1 -0
  336. package/corpus/templates/assets/app/components/ui/sonner.tsx +1 -0
  337. package/corpus/templates/assets/app/components/ui/spinner.tsx +1 -0
  338. package/corpus/templates/assets/app/components/ui/tabs.tsx +1 -0
  339. package/corpus/templates/assets/app/components/ui/toolkit-provider.tsx +12 -0
  340. package/corpus/templates/assets/app/components/ui/tooltip.tsx +1 -0
  341. package/corpus/templates/assets/app/global.css +1 -0
  342. package/corpus/templates/assets/app/root.tsx +12 -9
  343. package/corpus/templates/assets/app/routes/asset.$id.tsx +19 -19
  344. package/corpus/templates/assets/app/routes/audit.tsx +15 -14
  345. package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +49 -54
  346. package/corpus/templates/assets/app/routes/library.tsx +31 -31
  347. package/corpus/templates/assets/app/routes/settings.tsx +21 -35
  348. package/corpus/templates/assets/changelog/2026-07-06-mobile-layouts-no-longer-stack-two-top-headers.md +5 -0
  349. package/corpus/templates/brain/.agents/skills/actions/SKILL.md +55 -0
  350. package/corpus/templates/brain/.agents/skills/ask-across-everything/SKILL.md +6 -1
  351. package/corpus/templates/brain/.agents/skills/brain/SKILL.md +63 -5
  352. package/corpus/templates/brain/.agents/skills/ingestion-and-connectors/SKILL.md +112 -0
  353. package/corpus/templates/brain/AGENTS.md +93 -8
  354. package/corpus/templates/brain/app/components/brain/CanonicalPreviewSheet.tsx +6 -5
  355. package/corpus/templates/brain/app/components/brain/Surface.tsx +3 -8
  356. package/corpus/templates/brain/app/components/layout/Layout.tsx +7 -7
  357. package/corpus/templates/brain/app/components/layout/Sidebar.tsx +6 -6
  358. package/corpus/templates/brain/app/components/ui/badge.tsx +1 -0
  359. package/corpus/templates/brain/app/components/ui/button.tsx +1 -0
  360. package/corpus/templates/brain/app/components/ui/card.tsx +1 -0
  361. package/corpus/templates/brain/app/components/ui/input.tsx +1 -0
  362. package/corpus/templates/brain/app/components/ui/label.tsx +1 -0
  363. package/corpus/templates/brain/app/components/ui/progress.tsx +1 -0
  364. package/corpus/templates/brain/app/components/ui/select.tsx +1 -0
  365. package/corpus/templates/brain/app/components/ui/separator.tsx +1 -0
  366. package/corpus/templates/brain/app/components/ui/sheet.tsx +1 -0
  367. package/corpus/templates/brain/app/components/ui/skeleton.tsx +1 -0
  368. package/corpus/templates/brain/app/components/ui/switch.tsx +1 -0
  369. package/corpus/templates/brain/app/components/ui/table.tsx +1 -0
  370. package/corpus/templates/brain/app/components/ui/textarea.tsx +1 -0
  371. package/corpus/templates/brain/app/components/ui/toolkit-provider.tsx +12 -0
  372. package/corpus/templates/brain/app/components/ui/tooltip.tsx +1 -0
  373. package/corpus/templates/brain/app/global.css +1 -0
  374. package/corpus/templates/brain/app/hooks/use-distillation-bridge.ts +9 -4
  375. package/corpus/templates/brain/app/root.tsx +11 -8
  376. package/corpus/templates/brain/app/routes/knowledge.tsx +19 -19
  377. package/corpus/templates/brain/app/routes/ops.tsx +18 -18
  378. package/corpus/templates/brain/app/routes/review.tsx +22 -27
  379. package/corpus/templates/brain/app/routes/search.tsx +20 -20
  380. package/corpus/templates/brain/app/routes/settings.tsx +25 -40
  381. package/corpus/templates/brain/app/routes/sources.tsx +23 -23
  382. package/corpus/templates/calendar/.agents/skills/actions/SKILL.md +55 -0
  383. package/corpus/templates/calendar/actions/find-a-time.ts +29 -16
  384. package/corpus/templates/calendar/actions/list-bookings.ts +33 -2
  385. package/corpus/templates/calendar/actions/list-events.ts +34 -8
  386. package/corpus/templates/calendar/actions/update-calendar-visual-preferences.ts +105 -34
  387. package/corpus/templates/calendar/app/components/ThemeToggle.tsx +5 -5
  388. package/corpus/templates/calendar/app/components/TimezoneCombobox.tsx +6 -6
  389. package/corpus/templates/calendar/app/components/booking/BookingConfirmation.tsx +2 -1
  390. package/corpus/templates/calendar/app/components/booking/BookingForm.tsx +9 -8
  391. package/corpus/templates/calendar/app/components/booking/DatePicker.tsx +2 -2
  392. package/corpus/templates/calendar/app/components/booking/TimeSlotPicker.tsx +3 -2
  393. package/corpus/templates/calendar/app/components/calendar/AddCalendarDialog.tsx +10 -15
  394. package/corpus/templates/calendar/app/components/calendar/AttendeeAutocomplete.tsx +6 -6
  395. package/corpus/templates/calendar/app/components/calendar/CommandPalette.tsx +73 -3
  396. package/corpus/templates/calendar/app/components/calendar/CreateEventDialog.tsx +27 -27
  397. package/corpus/templates/calendar/app/components/calendar/DayView.tsx +553 -267
  398. package/corpus/templates/calendar/app/components/calendar/DeleteEventDialog.tsx +9 -12
  399. package/corpus/templates/calendar/app/components/calendar/EventAttendeesSection.tsx +10 -13
  400. package/corpus/templates/calendar/app/components/calendar/EventDetailPanel.tsx +7 -7
  401. package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +21 -21
  402. package/corpus/templates/calendar/app/components/calendar/EventDialog.tsx +11 -11
  403. package/corpus/templates/calendar/app/components/calendar/EventOptionControls.tsx +9 -9
  404. package/corpus/templates/calendar/app/components/calendar/FindTimePanel.tsx +9 -9
  405. package/corpus/templates/calendar/app/components/calendar/GoogleConnectBanner.tsx +6 -6
  406. package/corpus/templates/calendar/app/components/calendar/GoogleSetupWizard.tsx +3 -3
  407. package/corpus/templates/calendar/app/components/calendar/GoogleSyncButton.tsx +1 -1
  408. package/corpus/templates/calendar/app/components/calendar/GuestNotificationDialog.tsx +8 -10
  409. package/corpus/templates/calendar/app/components/calendar/IntegrationsSidebar.tsx +12 -12
  410. package/corpus/templates/calendar/app/components/calendar/KeyboardShortcutsHelp.tsx +2 -2
  411. package/corpus/templates/calendar/app/components/calendar/MonthView.tsx +93 -41
  412. package/corpus/templates/calendar/app/components/calendar/PeopleSearchDialog.tsx +6 -6
  413. package/corpus/templates/calendar/app/components/calendar/WeekView.tsx +530 -299
  414. package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +229 -134
  415. package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +135 -108
  416. package/corpus/templates/calendar/app/components/ui/alert-dialog.tsx +1 -0
  417. package/corpus/templates/calendar/app/components/ui/badge.tsx +1 -0
  418. package/corpus/templates/calendar/app/components/ui/button.tsx +1 -0
  419. package/corpus/templates/calendar/app/components/ui/card.tsx +1 -0
  420. package/corpus/templates/calendar/app/components/ui/checkbox.tsx +1 -0
  421. package/corpus/templates/calendar/app/components/ui/collapsible.tsx +1 -0
  422. package/corpus/templates/calendar/app/components/ui/command.tsx +1 -0
  423. package/corpus/templates/calendar/app/components/ui/dialog.tsx +1 -0
  424. package/corpus/templates/calendar/app/components/ui/dropdown-menu.tsx +1 -0
  425. package/corpus/templates/calendar/app/components/ui/input.tsx +1 -0
  426. package/corpus/templates/calendar/app/components/ui/label.tsx +1 -0
  427. package/corpus/templates/calendar/app/components/ui/popover.tsx +1 -0
  428. package/corpus/templates/calendar/app/components/ui/radio-group.tsx +1 -0
  429. package/corpus/templates/calendar/app/components/ui/select.tsx +1 -0
  430. package/corpus/templates/calendar/app/components/ui/separator.tsx +1 -0
  431. package/corpus/templates/calendar/app/components/ui/skeleton.tsx +1 -0
  432. package/corpus/templates/calendar/app/components/ui/spinner.tsx +1 -0
  433. package/corpus/templates/calendar/app/components/ui/switch.tsx +1 -0
  434. package/corpus/templates/calendar/app/components/ui/table.tsx +1 -0
  435. package/corpus/templates/calendar/app/components/ui/tabs.tsx +1 -0
  436. package/corpus/templates/calendar/app/components/ui/textarea.tsx +1 -0
  437. package/corpus/templates/calendar/app/components/ui/toolkit-provider.tsx +12 -0
  438. package/corpus/templates/calendar/app/components/ui/tooltip.tsx +1 -0
  439. package/corpus/templates/calendar/app/global.css +1 -0
  440. package/corpus/templates/calendar/app/hooks/use-event-drag.ts +63 -9
  441. package/corpus/templates/calendar/app/hooks/use-google-auth.ts +15 -27
  442. package/corpus/templates/calendar/app/hooks/use-grid-create-drag.ts +254 -0
  443. package/corpus/templates/calendar/app/hooks/use-mobile.ts +1 -0
  444. package/corpus/templates/calendar/app/hooks/use-view-preferences.ts +287 -21
  445. package/corpus/templates/calendar/app/hooks/use-zoom-auth.ts +56 -19
  446. package/corpus/templates/calendar/app/i18n/zh-TW.ts +3 -0
  447. package/corpus/templates/calendar/app/i18n-data.ts +31 -0
  448. package/corpus/templates/calendar/app/lib/event-colors.ts +29 -8
  449. package/corpus/templates/calendar/app/pages/AvailabilitySettings.tsx +11 -11
  450. package/corpus/templates/calendar/app/pages/BookingLinksPage.tsx +45 -50
  451. package/corpus/templates/calendar/app/pages/BookingPage.tsx +2 -2
  452. package/corpus/templates/calendar/app/pages/BookingsList.tsx +12 -12
  453. package/corpus/templates/calendar/app/pages/CalendarView.tsx +438 -271
  454. package/corpus/templates/calendar/app/pages/ManageBookingPage.tsx +13 -13
  455. package/corpus/templates/calendar/app/pages/Settings.tsx +15 -29
  456. package/corpus/templates/calendar/app/root.tsx +19 -15
  457. package/corpus/templates/calendar/app/routes/event.tsx +2 -2
  458. package/corpus/templates/calendar/changelog/2026-07-06-calendar-now-loads-view-preferences-much-more-efficiently.md +6 -0
  459. package/corpus/templates/calendar/changelog/2026-07-06-connected-calendars-keep-their-own-color-when-you-customize-.md +6 -0
  460. package/corpus/templates/calendar/changelog/2026-07-06-create-events-from-the-command-menu-with-natural-phrases-lik.md +6 -0
  461. package/corpus/templates/calendar/changelog/2026-07-06-drag-across-empty-week-or-day-slots-to-create-an-event-with-.md +6 -0
  462. package/corpus/templates/calendar/changelog/2026-07-06-dragging-and-resizing-events-is-much-smoother-especially-on-.md +6 -0
  463. package/corpus/templates/calendar/changelog/2026-07-06-each-connected-google-account-can-now-have-its-own-calendar-.md +6 -0
  464. package/corpus/templates/calendar/changelog/2026-07-06-events-spanning-multiple-days-now-show-on-every-day-they-cov.md +6 -0
  465. package/corpus/templates/calendar/changelog/2026-07-06-google-calendar-now-finishes-connecting-correctly-after-sign.md +6 -0
  466. package/corpus/templates/calendar/changelog/2026-07-06-public-booking-pages-respond-faster.md +6 -0
  467. package/corpus/templates/calendar/changelog/2026-07-06-the-app-header-no-longer-shows-the-global-notifications-bell.md +6 -0
  468. package/corpus/templates/calendar/package.json +1 -0
  469. package/corpus/templates/calendar/server/handlers/bookings.ts +46 -52
  470. package/corpus/templates/calendar/server/handlers/google-auth.ts +21 -5
  471. package/corpus/templates/calendar/server/lib/google-calendar.ts +32 -3
  472. package/corpus/templates/calendar/shared/calendar-view-preferences.ts +66 -2
  473. package/corpus/templates/chat/.agents/skills/actions/SKILL.md +55 -0
  474. package/corpus/templates/chat/app/components/layout/Layout.tsx +6 -6
  475. package/corpus/templates/chat/app/components/layout/Sidebar.tsx +12 -12
  476. package/corpus/templates/chat/app/components/ui/button.tsx +1 -0
  477. package/corpus/templates/chat/app/components/ui/card.tsx +1 -0
  478. package/corpus/templates/chat/app/components/ui/dropdown-menu.tsx +1 -0
  479. package/corpus/templates/chat/app/components/ui/input.tsx +1 -0
  480. package/corpus/templates/chat/app/components/ui/label.tsx +1 -0
  481. package/corpus/templates/chat/app/components/ui/sheet.tsx +1 -0
  482. package/corpus/templates/chat/app/components/ui/toolkit-provider.tsx +12 -0
  483. package/corpus/templates/chat/app/components/ui/tooltip.tsx +1 -0
  484. package/corpus/templates/chat/app/global.css +1 -0
  485. package/corpus/templates/chat/app/root.tsx +7 -4
  486. package/corpus/templates/chat/app/routes/settings.tsx +6 -21
  487. package/corpus/templates/clips/.agents/skills/actions/SKILL.md +55 -0
  488. package/corpus/templates/clips/.agents/skills/video-sharing/SKILL.md +18 -4
  489. package/corpus/templates/clips/.env.example +8 -0
  490. package/corpus/templates/clips/actions/accept-invite.ts +3 -0
  491. package/corpus/templates/clips/actions/add-recording-to-space.ts +55 -27
  492. package/corpus/templates/clips/actions/add-vocabulary-term.ts +3 -1
  493. package/corpus/templates/clips/actions/archive-recording.ts +5 -12
  494. package/corpus/templates/clips/actions/cleanup-transcript.ts +5 -4
  495. package/corpus/templates/clips/actions/clear-edits.ts +42 -29
  496. package/corpus/templates/clips/actions/create-meeting.ts +87 -40
  497. package/corpus/templates/clips/actions/create-recording.ts +6 -3
  498. package/corpus/templates/clips/actions/delete-meeting.ts +25 -0
  499. package/corpus/templates/clips/actions/delete-recording-permanent.ts +3 -0
  500. package/corpus/templates/clips/actions/disconnect-calendar.ts +10 -4
  501. package/corpus/templates/clips/actions/export-insights-csv.ts +28 -8
  502. package/corpus/templates/clips/actions/finalize-meeting.ts +106 -33
  503. package/corpus/templates/clips/actions/finalize-recording.ts +201 -3
  504. package/corpus/templates/clips/actions/get-organization-insights.ts +51 -7
  505. package/corpus/templates/clips/actions/import-loom-recording.ts +17 -0
  506. package/corpus/templates/clips/actions/lib/audio-only-transcription.ts +18 -1
  507. package/corpus/templates/clips/actions/lib/create-recording-schema.ts +7 -1
  508. package/corpus/templates/clips/actions/lib/ensure-seekable-video.ts +16 -0
  509. package/corpus/templates/clips/actions/list-clip-views.ts +60 -0
  510. package/corpus/templates/clips/actions/regenerate-summary.ts +10 -0
  511. package/corpus/templates/clips/actions/remove-vocabulary-term.ts +59 -0
  512. package/corpus/templates/clips/actions/request-transcript.ts +170 -25
  513. package/corpus/templates/clips/actions/restore-recording.ts +5 -12
  514. package/corpus/templates/clips/actions/save-browser-transcript.ts +13 -2
  515. package/corpus/templates/clips/actions/set-chapters.ts +6 -15
  516. package/corpus/templates/clips/actions/set-thumbnail.ts +77 -36
  517. package/corpus/templates/clips/actions/split-recording.ts +49 -35
  518. package/corpus/templates/clips/actions/stitch-recordings.ts +7 -4
  519. package/corpus/templates/clips/actions/stop-meeting-recording.ts +15 -1
  520. package/corpus/templates/clips/actions/sync-calendars.ts +10 -108
  521. package/corpus/templates/clips/actions/trash-recording.ts +43 -14
  522. package/corpus/templates/clips/actions/trim-recording.ts +48 -27
  523. package/corpus/templates/clips/actions/undo-edit.ts +49 -37
  524. package/corpus/templates/clips/app/components/capture-install-options.tsx +6 -6
  525. package/corpus/templates/clips/app/components/dictate/vocabulary-section.tsx +208 -0
  526. package/corpus/templates/clips/app/components/editable-recording-title.tsx +2 -2
  527. package/corpus/templates/clips/app/components/editor/chapters-editor.tsx +7 -7
  528. package/corpus/templates/clips/app/components/editor/editor-toolbar.tsx +26 -26
  529. package/corpus/templates/clips/app/components/editor/split-button.tsx +5 -4
  530. package/corpus/templates/clips/app/components/editor/stitch-manager.tsx +9 -9
  531. package/corpus/templates/clips/app/components/editor/thumbnail-picker.tsx +11 -16
  532. package/corpus/templates/clips/app/components/editor/timeline.tsx +3 -3
  533. package/corpus/templates/clips/app/components/editor/transcript-editor.tsx +5 -5
  534. package/corpus/templates/clips/app/components/library/bulk-action-toolbar.tsx +4 -4
  535. package/corpus/templates/clips/app/components/library/create-space-dialog.tsx +8 -8
  536. package/corpus/templates/clips/app/components/library/empty-state.tsx +2 -1
  537. package/corpus/templates/clips/app/components/library/folder-tree.tsx +14 -14
  538. package/corpus/templates/clips/app/components/library/library-grid.tsx +24 -98
  539. package/corpus/templates/clips/app/components/library/library-layout.tsx +18 -19
  540. package/corpus/templates/clips/app/components/library/organization-switcher.tsx +11 -11
  541. package/corpus/templates/clips/app/components/library/recording-card.tsx +44 -50
  542. package/corpus/templates/clips/app/components/library/search-bar.tsx +5 -5
  543. package/corpus/templates/clips/app/components/library/sort-menu.tsx +4 -3
  544. package/corpus/templates/clips/app/components/library/tag-input.tsx +4 -4
  545. package/corpus/templates/clips/app/components/meetings/attendee-stack.tsx +2 -6
  546. package/corpus/templates/clips/app/components/meetings/auto-record-prompt.tsx +1 -1
  547. package/corpus/templates/clips/app/components/meetings/bullet-link.tsx +4 -4
  548. package/corpus/templates/clips/app/components/meetings/canvas-editor.tsx +5 -5
  549. package/corpus/templates/clips/app/components/meetings/meeting-card.tsx +3 -3
  550. package/corpus/templates/clips/app/components/meetings/quick-ask-sidebar.tsx +17 -9
  551. package/corpus/templates/clips/app/components/meetings/share-meeting-dialog.tsx +6 -11
  552. package/corpus/templates/clips/app/components/meetings/transcript-bubbles.tsx +215 -21
  553. package/corpus/templates/clips/app/components/player/access-password-prompt.tsx +3 -2
  554. package/corpus/templates/clips/app/components/player/comments-panel.tsx +14 -14
  555. package/corpus/templates/clips/app/components/player/delete-recording-menu.tsx +7 -6
  556. package/corpus/templates/clips/app/components/player/insights-panel.tsx +18 -6
  557. package/corpus/templates/clips/app/components/player/player-controls.tsx +42 -36
  558. package/corpus/templates/clips/app/components/player/reactions-tray.tsx +4 -4
  559. package/corpus/templates/clips/app/components/player/settings-panel.tsx +13 -12
  560. package/corpus/templates/clips/app/components/player/share-dialog.tsx +80 -49
  561. package/corpus/templates/clips/app/components/player/sign-in-prompt-dialog.tsx +3 -2
  562. package/corpus/templates/clips/app/components/player/timestamped-comment-button.tsx +2 -2
  563. package/corpus/templates/clips/app/components/player/transcript-panel.tsx +7 -7
  564. package/corpus/templates/clips/app/components/player/video-player.tsx +182 -15
  565. package/corpus/templates/clips/app/components/recorder/camera-visualizer.tsx +1 -1
  566. package/corpus/templates/clips/app/components/recorder/microphone-visualizer.tsx +1 -1
  567. package/corpus/templates/clips/app/components/recorder/pre-record-panel.tsx +49 -36
  568. package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +285 -24
  569. package/corpus/templates/clips/app/components/recorder/recording-toolbar.tsx +6 -5
  570. package/corpus/templates/clips/app/components/recorder/storage-setup-card.tsx +7 -6
  571. package/corpus/templates/clips/app/components/sharing/share-ui.tsx +10 -10
  572. package/corpus/templates/clips/app/components/sharing/viewed-by-popover.tsx +132 -0
  573. package/corpus/templates/clips/app/components/ui/alert-dialog.tsx +1 -0
  574. package/corpus/templates/clips/app/components/ui/avatar.tsx +1 -0
  575. package/corpus/templates/clips/app/components/ui/badge.tsx +1 -0
  576. package/corpus/templates/clips/app/components/ui/button.tsx +1 -0
  577. package/corpus/templates/clips/app/components/ui/card.tsx +1 -0
  578. package/corpus/templates/clips/app/components/ui/checkbox.tsx +1 -0
  579. package/corpus/templates/clips/app/components/ui/collapsible.tsx +1 -0
  580. package/corpus/templates/clips/app/components/ui/context-menu.tsx +1 -0
  581. package/corpus/templates/clips/app/components/ui/dialog.tsx +1 -0
  582. package/corpus/templates/clips/app/components/ui/dropdown-menu.tsx +1 -0
  583. package/corpus/templates/clips/app/components/ui/input.tsx +1 -0
  584. package/corpus/templates/clips/app/components/ui/label.tsx +1 -0
  585. package/corpus/templates/clips/app/components/ui/popover.tsx +1 -0
  586. package/corpus/templates/clips/app/components/ui/scroll-area.tsx +1 -0
  587. package/corpus/templates/clips/app/components/ui/select.tsx +1 -0
  588. package/corpus/templates/clips/app/components/ui/separator.tsx +1 -0
  589. package/corpus/templates/clips/app/components/ui/sheet.tsx +1 -0
  590. package/corpus/templates/clips/app/components/ui/skeleton.tsx +1 -0
  591. package/corpus/templates/clips/app/components/ui/slider.tsx +1 -0
  592. package/corpus/templates/clips/app/components/ui/sonner.tsx +1 -0
  593. package/corpus/templates/clips/app/components/ui/spinner.tsx +1 -0
  594. package/corpus/templates/clips/app/components/ui/switch.tsx +1 -0
  595. package/corpus/templates/clips/app/components/ui/table.tsx +1 -0
  596. package/corpus/templates/clips/app/components/ui/tabs.tsx +1 -0
  597. package/corpus/templates/clips/app/components/ui/textarea.tsx +1 -0
  598. package/corpus/templates/clips/app/components/ui/toolkit-provider.tsx +12 -0
  599. package/corpus/templates/clips/app/components/ui/tooltip.tsx +1 -0
  600. package/corpus/templates/clips/app/components/workspace/branding-editor.tsx +5 -9
  601. package/corpus/templates/clips/app/components/workspace/insights-hub.tsx +9 -19
  602. package/corpus/templates/clips/app/components/workspace/invite-dialog.tsx +10 -9
  603. package/corpus/templates/clips/app/components/workspace/members-list.tsx +11 -10
  604. package/corpus/templates/clips/app/components/workspace/notifications-list.tsx +2 -1
  605. package/corpus/templates/clips/app/components/workspace/top-creators-table.tsx +3 -2
  606. package/corpus/templates/clips/app/components/workspace/top-videos-table.tsx +3 -2
  607. package/corpus/templates/clips/app/global.css +1 -0
  608. package/corpus/templates/clips/app/hooks/use-desktop-promo.ts +2 -1
  609. package/corpus/templates/clips/app/hooks/use-mobile.ts +1 -0
  610. package/corpus/templates/clips/app/hooks/use-player-shortcuts.ts +14 -10
  611. package/corpus/templates/clips/app/hooks/use-view-tracking.ts +14 -0
  612. package/corpus/templates/clips/app/i18n/ar-SA.ts +56 -0
  613. package/corpus/templates/clips/app/i18n/de-DE.ts +53 -0
  614. package/corpus/templates/clips/app/i18n/en-US.ts +52 -0
  615. package/corpus/templates/clips/app/i18n/es-ES.ts +53 -0
  616. package/corpus/templates/clips/app/i18n/fr-FR.ts +53 -0
  617. package/corpus/templates/clips/app/i18n/hi-IN.ts +52 -0
  618. package/corpus/templates/clips/app/i18n/ja-JP.ts +53 -0
  619. package/corpus/templates/clips/app/i18n/ko-KR.ts +52 -0
  620. package/corpus/templates/clips/app/i18n/pt-BR.ts +53 -0
  621. package/corpus/templates/clips/app/i18n/zh-CN.ts +51 -0
  622. package/corpus/templates/clips/app/i18n/zh-TW.ts +51 -0
  623. package/corpus/templates/clips/app/lib/recorder-preferences.ts +4 -0
  624. package/corpus/templates/clips/app/lib/timestamp-mapping.ts +5 -0
  625. package/corpus/templates/clips/app/root.tsx +26 -23
  626. package/corpus/templates/clips/app/routes/_app.dictate.tsx +39 -23
  627. package/corpus/templates/clips/app/routes/_app.meetings.$meetingId.tsx +134 -39
  628. package/corpus/templates/clips/app/routes/_app.meetings._index.tsx +20 -20
  629. package/corpus/templates/clips/app/routes/_app.notifications.tsx +3 -3
  630. package/corpus/templates/clips/app/routes/_app.settings._index.tsx +92 -60
  631. package/corpus/templates/clips/app/routes/_app.settings.organization.tsx +8 -13
  632. package/corpus/templates/clips/app/routes/_app.spaces._index.tsx +1 -1
  633. package/corpus/templates/clips/app/routes/_app.trash.tsx +96 -31
  634. package/corpus/templates/clips/app/routes/bug-report.done.tsx +1 -1
  635. package/corpus/templates/clips/app/routes/bug-report.tsx +11 -11
  636. package/corpus/templates/clips/app/routes/download.tsx +2 -2
  637. package/corpus/templates/clips/app/routes/embed.$shareId.tsx +2 -1
  638. package/corpus/templates/clips/app/routes/invite.$token.tsx +8 -13
  639. package/corpus/templates/clips/app/routes/r.$recordingId.tsx +263 -251
  640. package/corpus/templates/clips/app/routes/record.tsx +28 -10
  641. package/corpus/templates/clips/app/routes/share.$shareId.tsx +51 -29
  642. package/corpus/templates/clips/app/routes/share.meeting.$meetingId.tsx +71 -16
  643. package/corpus/templates/clips/changelog/2026-07-05-mobile-clip-pages-use-a-tighter-viewer-layout-with-inline-ac.md +6 -0
  644. package/corpus/templates/clips/changelog/2026-07-06-ai-setup-now-switches-to-your-saved-provider-key-and-uses-fa.md +6 -0
  645. package/corpus/templates/clips/changelog/2026-07-06-browsers-that-can-t-play-a-clip-s-video-format-now-see-a-cle.md +6 -0
  646. package/corpus/templates/clips/changelog/2026-07-06-calendar-connections-no-longer-ask-you-to-reconnect-after-te.md +6 -0
  647. package/corpus/templates/clips/changelog/2026-07-06-chrome-extension-recordings-keep-your-selected-microphone.md +6 -0
  648. package/corpus/templates/clips/changelog/2026-07-06-clip-recordings-now-use-streaming-uploads-by-default.md +6 -0
  649. package/corpus/templates/clips/changelog/2026-07-06-clip-titles-in-the-library-grid-now-open-the-clip-instead-of.md +6 -0
  650. package/corpus/templates/clips/changelog/2026-07-06-desktop-countdown-now-dims-the-screen-before-recording.md +5 -0
  651. package/corpus/templates/clips/changelog/2026-07-06-desktop-popover-no-longer-drops-bluetooth-headphones-into-call-quality-mode.md +6 -0
  652. package/corpus/templates/clips/changelog/2026-07-06-desktop-recorder-now-refreshes-cameras-and-mics-when-the-pop.md +6 -0
  653. package/corpus/templates/clips/changelog/2026-07-06-desktop-recordings-keep-microphone-volume-clear-while-recor.md +5 -0
  654. package/corpus/templates/clips/changelog/2026-07-06-desktop-recordings-no-longer-get-stuck-optimizing-when-scree.md +6 -0
  655. package/corpus/templates/clips/changelog/2026-07-06-dictation-history-from-the-desktop-app-now-appears-in-the-di.md +6 -0
  656. package/corpus/templates/clips/changelog/2026-07-06-dictation-no-longer-overwrites-your-clipboard-and-messaging-.md +6 -0
  657. package/corpus/templates/clips/changelog/2026-07-06-double-tap-your-dictation-key-for-hands-free-dictation-tap-a.md +6 -0
  658. package/corpus/templates/clips/changelog/2026-07-06-fixed-desktop-recordings-sometimes-uploading-without-audio-a.md +6 -0
  659. package/corpus/templates/clips/changelog/2026-07-06-fixed-desktop-recordings-that-could-get-stuck-uploading-and-.md +6 -0
  660. package/corpus/templates/clips/changelog/2026-07-06-fixed-recordings-sometimes-capturing-from-the-wrong-micropho.md +6 -0
  661. package/corpus/templates/clips/changelog/2026-07-06-hands-free-dictation-and-meeting-cleanup-recover-more-reliab.md +6 -0
  662. package/corpus/templates/clips/changelog/2026-07-06-live-meetings-show-time-remaining-and-you-can-end-a-meeting-.md +6 -0
  663. package/corpus/templates/clips/changelog/2026-07-06-manage-your-personal-dictation-dictionary-from-the-dictate-t.md +6 -0
  664. package/corpus/templates/clips/changelog/2026-07-06-meetings-interrupted-by-quitting-or-crashing-now-close-out-c.md +6 -0
  665. package/corpus/templates/clips/changelog/2026-07-06-mic-only-desktop-recordings-now-use-the-selected-microphone-.md +6 -0
  666. package/corpus/templates/clips/changelog/2026-07-06-paste-your-last-dictation-anytime-with-cmd-ctrl-v-or-from-th.md +6 -0
  667. package/corpus/templates/clips/changelog/2026-07-06-press-esc-to-cancel-a-dictation-in-progress.md +6 -0
  668. package/corpus/templates/clips/changelog/2026-07-06-recordings-whose-video-file-contains-no-audio-track-no-longe.md +6 -0
  669. package/corpus/templates/clips/changelog/2026-07-06-search-inside-meeting-transcripts.md +6 -0
  670. package/corpus/templates/clips/changelog/2026-07-06-see-who-viewed-your-shared-clips-and-when-click-the-view-cou.md +6 -0
  671. package/corpus/templates/clips/changelog/2026-07-06-share-links-for-agents-now-appear-as-soon-as-the-share-menu-.md +6 -0
  672. package/corpus/templates/clips/changelog/2026-07-06-share-popovers-now-stay-above-video-playback-controls.md +6 -0
  673. package/corpus/templates/clips/changelog/2026-07-06-shared-clip-pages-now-recover-automatically-from-transient-v.md +6 -0
  674. package/corpus/templates/clips/changelog/2026-07-06-the-desktop-app-now-walks-you-through-permissions-on-first-l.md +6 -0
  675. package/corpus/templates/clips/changelog/2026-07-06-transcript-cleanup-preferences-now-save-per-user.md +6 -0
  676. package/corpus/templates/clips/changelog/2026-07-06-transcripts-now-retry-automatically-after-transient-failures.md +6 -0
  677. package/corpus/templates/clips/changelog/2026-07-06-video-compression-now-runs-in-the-background-without-blocking.md +6 -0
  678. package/corpus/templates/clips/changelog/2026-07-07-native-microphone-recordings-now-reduce-steady-background-noise.md +6 -0
  679. package/corpus/templates/clips/changelog/2026-07-07-recording-transcripts-now-line-up-with-the-video-start-afte.md +6 -0
  680. package/corpus/templates/clips/chrome-extension/public/manifest.json +1 -1
  681. package/corpus/templates/clips/chrome-extension/src/background.ts +141 -48
  682. package/corpus/templates/clips/chrome-extension/src/offscreen.ts +383 -59
  683. package/corpus/templates/clips/chrome-extension/src/overlay.ts +51 -10
  684. package/corpus/templates/clips/chrome-extension/src/popup.ts +57 -6
  685. package/corpus/templates/clips/desktop/package.json +1 -1
  686. package/corpus/templates/clips/desktop/scripts/sign-macos-local.ts +67 -0
  687. package/corpus/templates/clips/desktop/src/app.tsx +38 -13
  688. package/corpus/templates/clips/desktop/src/components/SourceRow.tsx +1 -0
  689. package/corpus/templates/clips/desktop/src/hooks/useMediaDevices.ts +88 -28
  690. package/corpus/templates/clips/desktop/src/hooks/useMeetingTranscription.ts +165 -55
  691. package/corpus/templates/clips/desktop/src/hooks/useMicMeter.ts +35 -10
  692. package/corpus/templates/clips/desktop/src/lib/backtrack.ts +12 -0
  693. package/corpus/templates/clips/desktop/src/lib/media-capture-constraints.ts +129 -34
  694. package/corpus/templates/clips/desktop/src/lib/media-device-selection.ts +157 -0
  695. package/corpus/templates/clips/desktop/src/lib/permissions.ts +2 -0
  696. package/corpus/templates/clips/desktop/src/lib/recorder.ts +109 -47
  697. package/corpus/templates/clips/desktop/src/lib/transcription-capture.ts +22 -2
  698. package/corpus/templates/clips/desktop/src/lib/transcription-engine.ts +29 -1
  699. package/corpus/templates/clips/desktop/src/lib/updater.ts +6 -0
  700. package/corpus/templates/clips/desktop/src/lib/voice-dictation.ts +372 -31
  701. package/corpus/templates/clips/desktop/src/overlays/finalizing.tsx +90 -0
  702. package/corpus/templates/clips/desktop/src/overlays/flow-bar.tsx +4 -6
  703. package/corpus/templates/clips/desktop/src/overlays/onboarding.tsx +214 -9
  704. package/corpus/templates/clips/desktop/src/overlays/recording-pill.tsx +37 -52
  705. package/corpus/templates/clips/desktop/src/styles.css +1 -1
  706. package/corpus/templates/clips/desktop/src-tauri/Cargo.toml +7 -0
  707. package/corpus/templates/clips/desktop/src-tauri/src/clips/mod.rs +371 -43
  708. package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +79 -0
  709. package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +1418 -260
  710. package/corpus/templates/clips/desktop/src-tauri/src/native_speech.rs +188 -44
  711. package/corpus/templates/clips/desktop/src-tauri/src/shortcuts.rs +197 -8
  712. package/corpus/templates/clips/desktop/src-tauri/src/silence_detector.rs +64 -8
  713. package/corpus/templates/clips/desktop/src-tauri/src/state.rs +3 -2
  714. package/corpus/templates/clips/desktop/src-tauri/src/system_audio.rs +10 -0
  715. package/corpus/templates/clips/desktop/src-tauri/src/tray.rs +29 -8
  716. package/corpus/templates/clips/desktop/src-tauri/src/whisper_speech.rs +136 -13
  717. package/corpus/templates/clips/desktop/vite.config.ts +3 -0
  718. package/corpus/templates/clips/package.json +1 -1
  719. package/corpus/templates/clips/server/db/schema.ts +26 -0
  720. package/corpus/templates/clips/server/jobs/builder-media-compression.ts +41 -0
  721. package/corpus/templates/clips/server/jobs/stale-meeting-sweeper.ts +294 -0
  722. package/corpus/templates/clips/server/lib/builder-media-compression.ts +976 -0
  723. package/corpus/templates/clips/server/lib/calendar-event-meetings.ts +107 -56
  724. package/corpus/templates/clips/server/lib/env-flags.ts +4 -0
  725. package/corpus/templates/clips/server/lib/google-calendar-client.ts +8 -1
  726. package/corpus/templates/clips/server/lib/media-worker.ts +153 -0
  727. package/corpus/templates/clips/server/lib/s3-upload-provider.ts +58 -17
  728. package/corpus/templates/clips/server/lib/streaming-upload-mode.ts +17 -5
  729. package/corpus/templates/clips/server/lib/video-remux.ts +90 -0
  730. package/corpus/templates/clips/server/plugins/calendar-jobs.ts +4 -0
  731. package/corpus/templates/clips/server/plugins/db.ts +196 -0
  732. package/corpus/templates/clips/server/register-secrets.ts +78 -0
  733. package/corpus/templates/clips/server/routes/_agent-native/clips/user-prefs.get.ts +15 -0
  734. package/corpus/templates/clips/server/routes/_agent-native/clips/user-prefs.put.ts +27 -0
  735. package/corpus/templates/clips/server/routes/api/media-worker/callback.post.ts +88 -0
  736. package/corpus/templates/clips/server/routes/api/public-recording.get.ts +87 -7
  737. package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/abort.post.ts +7 -0
  738. package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/chunk.post.ts +35 -10
  739. package/corpus/templates/clips/server/routes/api/video/[recordingId].get.ts +24 -42
  740. package/corpus/templates/clips/server/routes/api/view-event.post.ts +29 -1
  741. package/corpus/templates/clips/shared/media-device-selection.ts +157 -0
  742. package/corpus/templates/clips/shared/media-worker-contract.ts +146 -0
  743. package/corpus/templates/content/.agents/skills/actions/SKILL.md +55 -0
  744. package/corpus/templates/content/.agents/skills/notion-integration/SKILL.md +67 -2
  745. package/corpus/templates/content/AGENTS.md +22 -14
  746. package/corpus/templates/content/actions/_local-file-documents.ts +90 -1
  747. package/corpus/templates/content/actions/_notion-action-utils.ts +6 -2
  748. package/corpus/templates/content/actions/delete-document.ts +8 -0
  749. package/corpus/templates/content/actions/remove-local-file-source.ts +100 -0
  750. package/corpus/templates/content/actions/sync-notion-comments.ts +174 -20
  751. package/corpus/templates/content/actions/update-document.ts +91 -5
  752. package/corpus/templates/content/app/blocks/SourceComponentBlock.tsx +31 -3
  753. package/corpus/templates/content/app/blocks/contentBlockRegistry.tsx +4 -4
  754. package/corpus/templates/content/app/components/EmptyState.tsx +1 -1
  755. package/corpus/templates/content/app/components/ThemeToggle.tsx +6 -6
  756. package/corpus/templates/content/app/components/editor/BubbleToolbar.tsx +5 -5
  757. package/corpus/templates/content/app/components/editor/CommentsSidebar.tsx +5 -5
  758. package/corpus/templates/content/app/components/editor/ContentReferencePreview.tsx +1 -1
  759. package/corpus/templates/content/app/components/editor/DocumentDatabase.tsx +10 -14630
  760. package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +72 -51
  761. package/corpus/templates/content/app/components/editor/DocumentEditorSkeleton.tsx +36 -0
  762. package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +29 -29
  763. package/corpus/templates/content/app/components/editor/DocumentToolbar.tsx +29 -44
  764. package/corpus/templates/content/app/components/editor/EmojiPicker.tsx +5 -4
  765. package/corpus/templates/content/app/components/editor/LinkHoverPreview.tsx +5 -4
  766. package/corpus/templates/content/app/components/editor/NotionConflictBanner.tsx +1 -1
  767. package/corpus/templates/content/app/components/editor/NotionSyncBar.tsx +2 -2
  768. package/corpus/templates/content/app/components/editor/SlashCommandMenu.tsx +5 -5
  769. package/corpus/templates/content/app/components/editor/TableHoverControls.tsx +13 -13
  770. package/corpus/templates/content/app/components/editor/VersionHistoryPanel.tsx +10 -10
  771. package/corpus/templates/content/app/components/editor/VisualEditor.tsx +24 -7
  772. package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +2856 -8389
  773. package/corpus/templates/content/app/components/editor/database/navigation-state.ts +36 -1
  774. package/corpus/templates/content/app/components/editor/database/settings.tsx +3224 -0
  775. package/corpus/templates/content/app/components/editor/database/shared.tsx +19 -19
  776. package/corpus/templates/content/app/components/editor/database/text.ts +23 -0
  777. package/corpus/templates/content/app/components/editor/database-sources/BuilderSourceReviewDialog.tsx +9 -8
  778. package/corpus/templates/content/app/components/editor/extensions/AudioBlock.tsx +19 -18
  779. package/corpus/templates/content/app/components/editor/extensions/ImageBlock.tsx +21 -20
  780. package/corpus/templates/content/app/components/editor/extensions/LocalMdxComponentNode.tsx +8 -8
  781. package/corpus/templates/content/app/components/editor/extensions/NotionExtensions.tsx +9 -0
  782. package/corpus/templates/content/app/components/editor/extensions/VideoBlock.tsx +19 -18
  783. package/corpus/templates/content/app/components/layout/Header.tsx +1 -5
  784. package/corpus/templates/content/app/components/layout/Layout.tsx +25 -8
  785. package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +203 -55
  786. package/corpus/templates/content/app/components/sidebar/DocumentTreeItem.tsx +22 -22
  787. package/corpus/templates/content/app/components/sidebar/NotionButton.tsx +11 -11
  788. package/corpus/templates/content/app/components/sidebar/document-sidebar-sections.ts +109 -1
  789. package/corpus/templates/content/app/components/ui/alert-dialog.tsx +1 -0
  790. package/corpus/templates/content/app/components/ui/button.tsx +1 -0
  791. package/corpus/templates/content/app/components/ui/dialog.tsx +1 -0
  792. package/corpus/templates/content/app/components/ui/dropdown-menu.tsx +1 -0
  793. package/corpus/templates/content/app/components/ui/input.tsx +1 -0
  794. package/corpus/templates/content/app/components/ui/label.tsx +1 -0
  795. package/corpus/templates/content/app/components/ui/popover.tsx +1 -0
  796. package/corpus/templates/content/app/components/ui/separator.tsx +1 -0
  797. package/corpus/templates/content/app/components/ui/sheet.tsx +1 -0
  798. package/corpus/templates/content/app/components/ui/skeleton.tsx +1 -0
  799. package/corpus/templates/content/app/components/ui/sonner.tsx +1 -0
  800. package/corpus/templates/content/app/components/ui/spinner.tsx +1 -0
  801. package/corpus/templates/content/app/components/ui/table.tsx +1 -0
  802. package/corpus/templates/content/app/components/ui/toaster.tsx +1 -0
  803. package/corpus/templates/content/app/components/ui/toolkit-provider.tsx +12 -0
  804. package/corpus/templates/content/app/components/ui/tooltip.tsx +1 -0
  805. package/corpus/templates/content/app/global.css +1 -0
  806. package/corpus/templates/content/app/hooks/use-documents.ts +89 -37
  807. package/corpus/templates/content/app/hooks/use-mobile.ts +1 -0
  808. package/corpus/templates/content/app/hooks/use-notion.ts +73 -5
  809. package/corpus/templates/content/app/i18n/zh-TW.ts +14 -0
  810. package/corpus/templates/content/app/i18n-data.ts +153 -0
  811. package/corpus/templates/content/app/root.tsx +35 -29
  812. package/corpus/templates/content/app/routes/_app._index.tsx +1 -1
  813. package/corpus/templates/content/app/routes/_app.local-files.tsx +268 -81
  814. package/corpus/templates/content/app/routes/_app.settings.tsx +4 -21
  815. package/corpus/templates/content/changelog/2026-07-01-builder-source-components-show-preservation-and-review-states.md +6 -0
  816. package/corpus/templates/content/changelog/2026-07-06-document-headers-and-page-bodies-now-share-one-background-shade.md +6 -0
  817. package/corpus/templates/content/changelog/2026-07-06-export-submenus-stay-visible-outside-the-page-actions-menu.md +6 -0
  818. package/corpus/templates/content/changelog/2026-07-06-fixed-collaborative-documents-reapplying-content-before-save.md +6 -0
  819. package/corpus/templates/content/changelog/2026-07-06-local-files-now-remember-sidebar-collapse-state-and-include-.md +6 -0
  820. package/corpus/templates/content/changelog/2026-07-06-notion-comment-sync-now-preserves-threads-replies-stay-attac.md +6 -0
  821. package/corpus/templates/content/changelog/2026-07-06-notion-sync-is-far-more-reliable-auto-sync-no-longer-overwri.md +6 -0
  822. package/corpus/templates/content/changelog/2026-07-06-opening-pages-now-highlights-the-sidebar-item-and-shows-the-.md +6 -0
  823. package/corpus/templates/content/changelog/2026-07-06-presence-markers-in-the-editor-are-now-compact-instead-of-co.md +6 -0
  824. package/corpus/templates/content/changelog/2026-07-06-sidebar-collapse-now-keeps-the-same-background-shade-as-the-.md +6 -0
  825. package/corpus/templates/content/changelog/2026-07-06-the-content-header-no-longer-shows-the-global-notifications-.md +6 -0
  826. package/corpus/templates/content/parity/matrix.md +24 -24
  827. package/corpus/templates/content/parity/matrix.ts +7 -3
  828. package/corpus/templates/content/server/db/schema.ts +15 -0
  829. package/corpus/templates/content/server/lib/notion-sync.ts +481 -39
  830. package/corpus/templates/content/server/lib/notion.ts +212 -48
  831. package/corpus/templates/content/server/plugins/db.ts +20 -0
  832. package/corpus/templates/content/server/routes/api/documents/[id]/notion/resolve.post.ts +14 -2
  833. package/corpus/templates/content/server/routes/api/notion/callback.get.ts +54 -6
  834. package/corpus/templates/content/shared/builder-mdx.ts +68 -12
  835. package/corpus/templates/content/shared/builder-source-component-registry.ts +177 -0
  836. package/corpus/templates/content/shared/nfm.ts +459 -66
  837. package/corpus/templates/content/shared/source-component-block.ts +72 -6
  838. package/corpus/templates/content/vite.config.ts +17 -1
  839. package/corpus/templates/design/.agents/skills/actions/SKILL.md +55 -0
  840. package/corpus/templates/design/.agents/skills/design-generation/SKILL.md +21 -12
  841. package/corpus/templates/design/AGENTS.md +3 -2
  842. package/corpus/templates/design/actions/import-design-source.ts +8 -58
  843. package/corpus/templates/design/actions/run-design-audit.ts +127 -1
  844. package/corpus/templates/design/actions/take-design-screenshot.ts +673 -0
  845. package/corpus/templates/design/app/components/ThemeToggle.tsx +6 -6
  846. package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +11 -11
  847. package/corpus/templates/design/app/components/design/DesignEditorSkeleton.tsx +2 -2
  848. package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +16 -21
  849. package/corpus/templates/design/app/components/design/DesignImportPanel.tsx +6 -97
  850. package/corpus/templates/design/app/components/design/DrawOverlay.tsx +7 -7
  851. package/corpus/templates/design/app/components/design/EditPanel.tsx +30 -30
  852. package/corpus/templates/design/app/components/design/FusionAppBanner.tsx +9 -8
  853. package/corpus/templates/design/app/components/design/LayersPanel.tsx +14 -14
  854. package/corpus/templates/design/app/components/design/LocalhostWriteConsentDialog.tsx +6 -5
  855. package/corpus/templates/design/app/components/design/MotionDock.tsx +15 -15
  856. package/corpus/templates/design/app/components/design/QuestionFlow.tsx +3 -3
  857. package/corpus/templates/design/app/components/design/ReviewPanel.tsx +3 -3
  858. package/corpus/templates/design/app/components/design/StatesPanel.tsx +13 -13
  859. package/corpus/templates/design/app/components/design/TokensPanel.tsx +14 -14
  860. package/corpus/templates/design/app/components/design/TweaksPanel.tsx +6 -6
  861. package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +39 -9
  862. package/corpus/templates/design/app/components/design/code-workbench/ActivityBar.tsx +3 -3
  863. package/corpus/templates/design/app/components/design/code-workbench/SideBar.tsx +4 -7
  864. package/corpus/templates/design/app/components/design/code-workbench/editor/EditorTabs.tsx +6 -6
  865. package/corpus/templates/design/app/components/design/code-workbench/editor/MonacoHost.tsx +2 -1
  866. package/corpus/templates/design/app/components/design/code-workbench/explorer/FileTree.tsx +17 -17
  867. package/corpus/templates/design/app/components/design/code-workbench/search/SearchView.tsx +6 -6
  868. package/corpus/templates/design/app/components/design/inspector/AlignmentMatrix.tsx +3 -3
  869. package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +7 -7
  870. package/corpus/templates/design/app/components/design/inspector/ConstraintsWidget.tsx +3 -3
  871. package/corpus/templates/design/app/components/design/inspector/DesignColorPicker.tsx +18 -18
  872. package/corpus/templates/design/app/components/design/inspector/ExportSettingsPanel.tsx +6 -6
  873. package/corpus/templates/design/app/components/design/inspector/ImageFillControls.tsx +6 -6
  874. package/corpus/templates/design/app/components/design/inspector/InspectorAiActions.tsx +7 -7
  875. package/corpus/templates/design/app/components/design/inspector/ScrubInput.tsx +7 -7
  876. package/corpus/templates/design/app/components/design/inspector/ShaderControls.tsx +14 -14
  877. package/corpus/templates/design/app/components/design/inspector/ShaderEffectRow.tsx +9 -9
  878. package/corpus/templates/design/app/components/design/inspector/ShaderFillsPanel.tsx +6 -6
  879. package/corpus/templates/design/app/components/design-system/DesignSystemCard.tsx +3 -2
  880. package/corpus/templates/design/app/components/editor/PromptDialog.tsx +15 -18
  881. package/corpus/templates/design/app/components/layout/Header.tsx +2 -2
  882. package/corpus/templates/design/app/components/layout/Sidebar.tsx +5 -5
  883. package/corpus/templates/design/app/components/ui/alert-dialog.tsx +1 -0
  884. package/corpus/templates/design/app/components/ui/avatar.tsx +1 -0
  885. package/corpus/templates/design/app/components/ui/badge.tsx +1 -0
  886. package/corpus/templates/design/app/components/ui/button.tsx +1 -0
  887. package/corpus/templates/design/app/components/ui/card.tsx +1 -0
  888. package/corpus/templates/design/app/components/ui/checkbox.tsx +1 -0
  889. package/corpus/templates/design/app/components/ui/collapsible.tsx +1 -0
  890. package/corpus/templates/design/app/components/ui/context-menu.tsx +1 -0
  891. package/corpus/templates/design/app/components/ui/dialog.tsx +1 -0
  892. package/corpus/templates/design/app/components/ui/dropdown-menu.tsx +1 -0
  893. package/corpus/templates/design/app/components/ui/input.tsx +1 -0
  894. package/corpus/templates/design/app/components/ui/label.tsx +1 -0
  895. package/corpus/templates/design/app/components/ui/popover.tsx +1 -0
  896. package/corpus/templates/design/app/components/ui/select.tsx +1 -0
  897. package/corpus/templates/design/app/components/ui/separator.tsx +1 -0
  898. package/corpus/templates/design/app/components/ui/sheet.tsx +1 -0
  899. package/corpus/templates/design/app/components/ui/skeleton.tsx +1 -0
  900. package/corpus/templates/design/app/components/ui/slider.tsx +1 -0
  901. package/corpus/templates/design/app/components/ui/sonner.tsx +1 -0
  902. package/corpus/templates/design/app/components/ui/spinner.tsx +1 -0
  903. package/corpus/templates/design/app/components/ui/switch.tsx +1 -0
  904. package/corpus/templates/design/app/components/ui/tabs.tsx +1 -0
  905. package/corpus/templates/design/app/components/ui/textarea.tsx +1 -0
  906. package/corpus/templates/design/app/components/ui/toolkit-provider.tsx +12 -0
  907. package/corpus/templates/design/app/components/ui/tooltip.tsx +1 -0
  908. package/corpus/templates/design/app/components/visual-editor/CanvasCommentPins.tsx +7 -7
  909. package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +7 -7
  910. package/corpus/templates/design/app/components/visual-editor/SaveStatusIndicator.tsx +3 -3
  911. package/corpus/templates/design/app/global.css +1 -0
  912. package/corpus/templates/design/app/i18n/zh-TW.ts +3 -4
  913. package/corpus/templates/design/app/i18n-data.ts +38 -35
  914. package/corpus/templates/design/app/pages/DesignEditor.tsx +47 -51
  915. package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +6 -6
  916. package/corpus/templates/design/app/pages/DesignSystems.tsx +31 -31
  917. package/corpus/templates/design/app/pages/Index.tsx +25 -29
  918. package/corpus/templates/design/app/pages/NotFound.tsx +2 -1
  919. package/corpus/templates/design/app/pages/Present.tsx +2 -1
  920. package/corpus/templates/design/app/pages/VisualEdit.tsx +2 -1
  921. package/corpus/templates/design/app/root.tsx +7 -4
  922. package/corpus/templates/design/app/routes/settings.tsx +22 -49
  923. package/corpus/templates/design/changelog/2026-07-05-code-sidebar-tabs-now-use-a-quieter-active-highlight-that-ma.md +6 -0
  924. package/corpus/templates/design/changelog/2026-07-06-fig-files-now-stay-on-the-builder-indexing-path-through-desi.md +6 -0
  925. package/corpus/templates/design/changelog/2026-07-06-mobile-layouts-no-longer-stack-two-top-headers.md +5 -0
  926. package/corpus/templates/design/changelog/2026-07-06-the-design-agent-now-visually-reviews-rendered-screenshots-o.md +6 -0
  927. package/corpus/templates/design/server/handlers/import-design-file.ts +4 -43
  928. package/corpus/templates/design/server/handlers/index-design-system-with-builder.ts +2 -2
  929. package/corpus/templates/design/server/lib/visible-clipboard-html.ts +32 -0
  930. package/corpus/templates/design/shared/design-review.ts +1 -0
  931. package/corpus/templates/dispatch/.agents/skills/actions/SKILL.md +55 -0
  932. package/corpus/templates/dispatch/actions/list-staged-datasets.ts +3 -0
  933. package/corpus/templates/dispatch/app/routes/settings.tsx +3 -17
  934. package/corpus/templates/forms/.agents/skills/actions/SKILL.md +55 -0
  935. package/corpus/templates/forms/app/components/CloudUpgrade.tsx +10 -10
  936. package/corpus/templates/forms/app/components/ThemeToggle.tsx +5 -5
  937. package/corpus/templates/forms/app/components/builder/FieldPropertiesPanel.tsx +11 -10
  938. package/corpus/templates/forms/app/components/builder/FieldRenderer.tsx +10 -13
  939. package/corpus/templates/forms/app/components/layout/Sidebar.tsx +17 -17
  940. package/corpus/templates/forms/app/components/ui/alert-dialog.tsx +1 -0
  941. package/corpus/templates/forms/app/components/ui/badge.tsx +1 -0
  942. package/corpus/templates/forms/app/components/ui/button.tsx +1 -0
  943. package/corpus/templates/forms/app/components/ui/calendar.tsx +1 -1
  944. package/corpus/templates/forms/app/components/ui/card.tsx +1 -0
  945. package/corpus/templates/forms/app/components/ui/checkbox.tsx +1 -0
  946. package/corpus/templates/forms/app/components/ui/command.tsx +1 -1
  947. package/corpus/templates/forms/app/components/ui/dialog.tsx +1 -0
  948. package/corpus/templates/forms/app/components/ui/dropdown-menu.tsx +1 -0
  949. package/corpus/templates/forms/app/components/ui/input.tsx +1 -0
  950. package/corpus/templates/forms/app/components/ui/label.tsx +1 -0
  951. package/corpus/templates/forms/app/components/ui/popover.tsx +1 -0
  952. package/corpus/templates/forms/app/components/ui/radio-group.tsx +1 -0
  953. package/corpus/templates/forms/app/components/ui/scroll-area.tsx +1 -0
  954. package/corpus/templates/forms/app/components/ui/select.tsx +1 -0
  955. package/corpus/templates/forms/app/components/ui/separator.tsx +1 -0
  956. package/corpus/templates/forms/app/components/ui/skeleton.tsx +1 -0
  957. package/corpus/templates/forms/app/components/ui/slider.tsx +1 -0
  958. package/corpus/templates/forms/app/components/ui/switch.tsx +1 -0
  959. package/corpus/templates/forms/app/components/ui/table.tsx +1 -0
  960. package/corpus/templates/forms/app/components/ui/tabs.tsx +1 -0
  961. package/corpus/templates/forms/app/components/ui/textarea.tsx +1 -0
  962. package/corpus/templates/forms/app/components/ui/toolkit-provider.tsx +12 -0
  963. package/corpus/templates/forms/app/components/ui/tooltip.tsx +1 -0
  964. package/corpus/templates/forms/app/global.css +1 -0
  965. package/corpus/templates/forms/app/hooks/use-mobile.ts +1 -0
  966. package/corpus/templates/forms/app/hooks/use-navigation-state.ts +0 -1
  967. package/corpus/templates/forms/app/pages/FormBuilderPage.tsx +24 -26
  968. package/corpus/templates/forms/app/pages/FormFillPage.tsx +2 -2
  969. package/corpus/templates/forms/app/pages/FormsListPage.tsx +21 -21
  970. package/corpus/templates/forms/app/pages/ResponseInsightsPage.tsx +11 -11
  971. package/corpus/templates/forms/app/pages/ResponsesPage.tsx +4 -4
  972. package/corpus/templates/forms/app/root.tsx +11 -8
  973. package/corpus/templates/forms/app/routes/_app.settings.tsx +6 -21
  974. package/corpus/templates/forms/app/routes/form-preview.tsx +3 -3
  975. package/corpus/templates/forms/changelog/2026-07-06-the-form-builder-header-no-longer-shows-the-global-notificat.md +6 -0
  976. package/corpus/templates/macros/app/components/AddExerciseDialog.tsx +1 -1
  977. package/corpus/templates/macros/app/components/AddMealDialog.tsx +1 -1
  978. package/corpus/templates/macros/app/components/AddWeightDialog.tsx +1 -1
  979. package/corpus/templates/macros/app/components/DailyProgress.tsx +7 -7
  980. package/corpus/templates/macros/app/components/WeeklyCaloriesChart.tsx +2 -1
  981. package/corpus/templates/macros/app/components/WeightCard.tsx +10 -10
  982. package/corpus/templates/macros/app/components/WeightTracker.tsx +1 -1
  983. package/corpus/templates/macros/app/components/layout/AppLayout.tsx +6 -10
  984. package/corpus/templates/macros/app/components/ui/alert-dialog.tsx +1 -0
  985. package/corpus/templates/macros/app/components/ui/label.tsx +1 -0
  986. package/corpus/templates/macros/app/components/ui/select.tsx +1 -0
  987. package/corpus/templates/macros/app/components/ui/sheet.tsx +1 -0
  988. package/corpus/templates/macros/app/components/ui/skeleton.tsx +1 -0
  989. package/corpus/templates/macros/app/components/ui/sonner.tsx +1 -0
  990. package/corpus/templates/macros/app/components/ui/toolkit-provider.tsx +12 -0
  991. package/corpus/templates/macros/app/components/ui/tooltip.tsx +1 -0
  992. package/corpus/templates/macros/app/global.css +1 -0
  993. package/corpus/templates/macros/app/root.tsx +17 -14
  994. package/corpus/templates/macros/app/routes/_index.tsx +1 -1
  995. package/corpus/templates/macros/app/routes/analytics.tsx +8 -8
  996. package/corpus/templates/macros/app/routes/settings.tsx +4 -19
  997. package/corpus/templates/mail/.agents/skills/actions/SKILL.md +55 -0
  998. package/corpus/templates/mail/.agents/skills/contacts-and-crm/SKILL.md +67 -0
  999. package/corpus/templates/mail/.agents/skills/draft-queue/SKILL.md +35 -1
  1000. package/corpus/templates/mail/.agents/skills/email-drafts/SKILL.md +74 -33
  1001. package/corpus/templates/mail/AGENTS.md +102 -16
  1002. package/corpus/templates/mail/actions/archive-email.ts +67 -11
  1003. package/corpus/templates/mail/actions/manage-snippets.ts +106 -0
  1004. package/corpus/templates/mail/actions/mark-read.ts +45 -11
  1005. package/corpus/templates/mail/actions/send-queued-drafts.ts +77 -42
  1006. package/corpus/templates/mail/actions/star-email.ts +55 -10
  1007. package/corpus/templates/mail/actions/trash-email.ts +48 -9
  1008. package/corpus/templates/mail/app/components/GoogleConnectBanner.tsx +1 -1
  1009. package/corpus/templates/mail/app/components/ThemeToggle.tsx +6 -6
  1010. package/corpus/templates/mail/app/components/agent-engine-picker.tsx +10 -10
  1011. package/corpus/templates/mail/app/components/email/CodeBlockLangPicker.tsx +4 -3
  1012. package/corpus/templates/mail/app/components/email/ComposeBubbleToolbar.tsx +5 -5
  1013. package/corpus/templates/mail/app/components/email/ComposeEditor.tsx +109 -10
  1014. package/corpus/templates/mail/app/components/email/ComposeModal.tsx +44 -19
  1015. package/corpus/templates/mail/app/components/email/ComposeSlashMenu.tsx +139 -17
  1016. package/corpus/templates/mail/app/components/email/EmailList.tsx +522 -314
  1017. package/corpus/templates/mail/app/components/email/EmailListItem.tsx +130 -45
  1018. package/corpus/templates/mail/app/components/email/EmailThread.tsx +9 -9
  1019. package/corpus/templates/mail/app/components/email/InlineReplyComposer.tsx +35 -13
  1020. package/corpus/templates/mail/app/components/email/IntegrationsSidebar.tsx +13 -13
  1021. package/corpus/templates/mail/app/components/email/MobileActionBar.tsx +13 -13
  1022. package/corpus/templates/mail/app/components/email/RecipientInput.tsx +53 -42
  1023. package/corpus/templates/mail/app/components/email/SendLaterButton.tsx +5 -4
  1024. package/corpus/templates/mail/app/components/email/SnoozeModal.tsx +1 -1
  1025. package/corpus/templates/mail/app/components/email/SnoozePopover.tsx +6 -6
  1026. package/corpus/templates/mail/app/components/layout/AppLayout.tsx +19 -23
  1027. package/corpus/templates/mail/app/components/layout/HeaderActions.tsx +12 -4
  1028. package/corpus/templates/mail/app/components/layout/SearchBar.tsx +138 -18
  1029. package/corpus/templates/mail/app/components/settings/GmailFiltersSection.tsx +23 -23
  1030. package/corpus/templates/mail/app/components/settings/SnippetsSection.tsx +303 -0
  1031. package/corpus/templates/mail/app/components/ui/alert-dialog.tsx +1 -0
  1032. package/corpus/templates/mail/app/components/ui/badge.tsx +1 -0
  1033. package/corpus/templates/mail/app/components/ui/button.tsx +1 -0
  1034. package/corpus/templates/mail/app/components/ui/calendar.tsx +1 -1
  1035. package/corpus/templates/mail/app/components/ui/command.tsx +1 -1
  1036. package/corpus/templates/mail/app/components/ui/dialog.tsx +1 -0
  1037. package/corpus/templates/mail/app/components/ui/drawer.tsx +1 -0
  1038. package/corpus/templates/mail/app/components/ui/dropdown-menu.tsx +1 -0
  1039. package/corpus/templates/mail/app/components/ui/popover.tsx +1 -0
  1040. package/corpus/templates/mail/app/components/ui/select.tsx +1 -0
  1041. package/corpus/templates/mail/app/components/ui/skeleton.tsx +1 -0
  1042. package/corpus/templates/mail/app/components/ui/spinner.tsx +1 -0
  1043. package/corpus/templates/mail/app/components/ui/switch.tsx +1 -0
  1044. package/corpus/templates/mail/app/components/ui/toolkit-provider.tsx +12 -0
  1045. package/corpus/templates/mail/app/components/ui/tooltip.tsx +1 -0
  1046. package/corpus/templates/mail/app/global.css +20 -3
  1047. package/corpus/templates/mail/app/hooks/use-emails.ts +187 -0
  1048. package/corpus/templates/mail/app/hooks/use-snippets.ts +103 -0
  1049. package/corpus/templates/mail/app/i18n/ar-SA.ts +17 -0
  1050. package/corpus/templates/mail/app/i18n/de-DE.ts +18 -0
  1051. package/corpus/templates/mail/app/i18n/en-US.ts +17 -0
  1052. package/corpus/templates/mail/app/i18n/es-ES.ts +17 -0
  1053. package/corpus/templates/mail/app/i18n/fr-FR.ts +18 -0
  1054. package/corpus/templates/mail/app/i18n/hi-IN.ts +17 -0
  1055. package/corpus/templates/mail/app/i18n/ja-JP.ts +18 -0
  1056. package/corpus/templates/mail/app/i18n/ko-KR.ts +17 -0
  1057. package/corpus/templates/mail/app/i18n/pt-BR.ts +17 -0
  1058. package/corpus/templates/mail/app/i18n/zh-CN.ts +16 -0
  1059. package/corpus/templates/mail/app/i18n/zh-TW.ts +16 -0
  1060. package/corpus/templates/mail/app/pages/DraftQueuePage.tsx +14 -14
  1061. package/corpus/templates/mail/app/pages/InboxPage.tsx +3 -3
  1062. package/corpus/templates/mail/app/pages/NotFound.tsx +2 -1
  1063. package/corpus/templates/mail/app/pages/SettingsPage.tsx +64 -66
  1064. package/corpus/templates/mail/app/root.tsx +21 -18
  1065. package/corpus/templates/mail/app/routes/_index.tsx +2 -1
  1066. package/corpus/templates/mail/app/routes/email.tsx +2 -2
  1067. package/corpus/templates/mail/changelog/2026-07-06-a-queued-draft-can-no-longer-be-sent-twice-by-simultaneous-s.md +6 -0
  1068. package/corpus/templates/mail/changelog/2026-07-06-bulk-archive-trash-star-and-mark-read-now-complete-in-one-fa.md +6 -0
  1069. package/corpus/templates/mail/changelog/2026-07-06-dark-mode-sidebars-and-notifications-now-use-the-softer-gray.md +6 -0
  1070. package/corpus/templates/mail/changelog/2026-07-06-inbox-automations-pick-up-new-mail-faster.md +6 -0
  1071. package/corpus/templates/mail/changelog/2026-07-06-inbox-lists-stay-fast-as-scheduled-and-snoozed-mail-accumula.md +6 -0
  1072. package/corpus/templates/mail/changelog/2026-07-06-long-inboxes-scroll-smoothly-and-stay-fast-as-more-mail-load.md +6 -0
  1073. package/corpus/templates/mail/changelog/2026-07-06-paste-or-drop-images-straight-into-the-composer-to-send-them.md +6 -0
  1074. package/corpus/templates/mail/changelog/2026-07-06-save-reusable-snippets-and-insert-them-from-the-compose-slas.md +6 -0
  1075. package/corpus/templates/mail/changelog/2026-07-06-scrolling-older-mail-keeps-loading-correctly-when-no-gmail-a.md +6 -0
  1076. package/corpus/templates/mail/changelog/2026-07-06-search-shows-instant-matches-from-already-loaded-mail-while-.md +6 -0
  1077. package/corpus/templates/mail/changelog/2026-07-06-sends-now-fail-with-a-clear-error-instead-of-quietly-missing.md +6 -0
  1078. package/corpus/templates/mail/changelog/2026-07-06-the-mail-header-no-longer-shows-the-global-notifications-bel.md +6 -0
  1079. package/corpus/templates/mail/package.json +1 -0
  1080. package/corpus/templates/mail/server/db/schema.ts +11 -0
  1081. package/corpus/templates/mail/server/handlers/emails.ts +20 -1
  1082. package/corpus/templates/mail/server/lib/automation-engine.ts +53 -25
  1083. package/corpus/templates/mail/server/lib/google-auth.ts +140 -9
  1084. package/corpus/templates/mail/server/lib/jobs.ts +22 -6
  1085. package/corpus/templates/mail/server/lib/outgoing-email.ts +11 -2
  1086. package/corpus/templates/mail/server/lib/queued-drafts.ts +145 -4
  1087. package/corpus/templates/mail/server/plugins/db.ts +29 -0
  1088. package/corpus/templates/plan/.agents/skills/actions/SKILL.md +55 -0
  1089. package/corpus/templates/plan/app/components/editor/PlanDocumentEditor.tsx +42 -3
  1090. package/corpus/templates/plan/app/components/layout/Layout.tsx +5 -4
  1091. package/corpus/templates/plan/app/components/layout/Sidebar.tsx +20 -20
  1092. package/corpus/templates/plan/app/components/plan/CanvasArea.tsx +3 -2
  1093. package/corpus/templates/plan/app/components/plan/DocumentArea.tsx +2 -2
  1094. package/corpus/templates/plan/app/components/plan/GuestModeBanner.tsx +2 -1
  1095. package/corpus/templates/plan/app/components/plan/LocalCodebasePicker.tsx +8 -8
  1096. package/corpus/templates/plan/app/components/plan/PlanContentRenderer.tsx +6 -1
  1097. package/corpus/templates/plan/app/components/plan/PlanImageViewer.tsx +8 -12
  1098. package/corpus/templates/plan/app/components/plan/PlanMarkdownEditor.tsx +6 -1
  1099. package/corpus/templates/plan/app/components/plan/PlanVisualSurface.tsx +3 -3
  1100. package/corpus/templates/plan/app/components/plan/planBlocks.tsx +4 -4
  1101. package/corpus/templates/plan/app/components/plan/wireframe/kit/rough.tsx +61 -27
  1102. package/corpus/templates/plan/app/components/ui/alert-dialog.tsx +1 -0
  1103. package/corpus/templates/plan/app/components/ui/avatar.tsx +1 -0
  1104. package/corpus/templates/plan/app/components/ui/badge.tsx +1 -0
  1105. package/corpus/templates/plan/app/components/ui/button.tsx +1 -0
  1106. package/corpus/templates/plan/app/components/ui/card.tsx +1 -0
  1107. package/corpus/templates/plan/app/components/ui/checkbox.tsx +1 -0
  1108. package/corpus/templates/plan/app/components/ui/collapsible.tsx +1 -0
  1109. package/corpus/templates/plan/app/components/ui/dialog.tsx +1 -0
  1110. package/corpus/templates/plan/app/components/ui/dropdown-menu.tsx +1 -0
  1111. package/corpus/templates/plan/app/components/ui/input.tsx +1 -0
  1112. package/corpus/templates/plan/app/components/ui/label.tsx +1 -0
  1113. package/corpus/templates/plan/app/components/ui/popover.tsx +1 -0
  1114. package/corpus/templates/plan/app/components/ui/scroll-area.tsx +1 -0
  1115. package/corpus/templates/plan/app/components/ui/select.tsx +1 -0
  1116. package/corpus/templates/plan/app/components/ui/separator.tsx +1 -0
  1117. package/corpus/templates/plan/app/components/ui/sheet.tsx +1 -0
  1118. package/corpus/templates/plan/app/components/ui/skeleton.tsx +1 -0
  1119. package/corpus/templates/plan/app/components/ui/sonner.tsx +1 -0
  1120. package/corpus/templates/plan/app/components/ui/spinner.tsx +1 -0
  1121. package/corpus/templates/plan/app/components/ui/textarea.tsx +1 -0
  1122. package/corpus/templates/plan/app/components/ui/toggle-group.tsx +1 -0
  1123. package/corpus/templates/plan/app/components/ui/toolkit-provider.tsx +12 -0
  1124. package/corpus/templates/plan/app/components/ui/tooltip.tsx +1 -0
  1125. package/corpus/templates/plan/app/global.css +13 -0
  1126. package/corpus/templates/plan/app/hooks/use-plan-presence.ts +11 -1
  1127. package/corpus/templates/plan/app/lib/plan-access-prompt.ts +74 -0
  1128. package/corpus/templates/plan/app/lib/plan-annotation-runtime.ts +1435 -0
  1129. package/corpus/templates/plan/app/lib/plan-comment-editor-helpers.ts +142 -0
  1130. package/corpus/templates/plan/app/lib/plan-local-bridge.ts +376 -0
  1131. package/corpus/templates/plan/app/lib/plan-native-anchors.ts +682 -0
  1132. package/corpus/templates/plan/app/pages/PlansPage.tsx +216 -2747
  1133. package/corpus/templates/plan/app/root.tsx +13 -10
  1134. package/corpus/templates/plan/app/routes/_index.tsx +1 -2
  1135. package/corpus/templates/plan/app/routes/local-plans.$slug.tsx +1 -1
  1136. package/corpus/templates/plan/app/routes/plans.$id.tsx +1 -2
  1137. package/corpus/templates/plan/app/routes/plans.tsx +1 -2
  1138. package/corpus/templates/plan/app/routes/recaps.$id.tsx +1 -2
  1139. package/corpus/templates/plan/app/routes/recaps.tsx +1 -2
  1140. package/corpus/templates/plan/app/routes/settings.tsx +7 -21
  1141. package/corpus/templates/plan/changelog/2026-07-05-plan-pages-open-at-the-top-unless-a-shared-link-targets-a-sp.md +6 -0
  1142. package/corpus/templates/plan/changelog/2026-07-06-fixed-collaborative-plan-editing-so-content-no-longer-duplic.md +6 -0
  1143. package/corpus/templates/plan/changelog/2026-07-06-fixed-visual-reports-using-excessive-cpu-while-rendering-ske.md +6 -0
  1144. package/corpus/templates/slides/.agents/skills/actions/SKILL.md +55 -0
  1145. package/corpus/templates/slides/app/components/ThemeToggle.tsx +6 -6
  1146. package/corpus/templates/slides/app/components/comments/SlideCommentsPanel.tsx +5 -5
  1147. package/corpus/templates/slides/app/components/deck/DeckCard.tsx +7 -7
  1148. package/corpus/templates/slides/app/components/deck/ExcalidrawSlide.tsx +2 -1
  1149. package/corpus/templates/slides/app/components/deck/SlideRenderer.tsx +1 -1
  1150. package/corpus/templates/slides/app/components/design-system/DesignSystemCard.tsx +3 -2
  1151. package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +15 -14
  1152. package/corpus/templates/slides/app/components/editor/AnimationsPanel.tsx +7 -7
  1153. package/corpus/templates/slides/app/components/editor/BlockBubbleMenu.tsx +5 -5
  1154. package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +6 -6
  1155. package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +14 -14
  1156. package/corpus/templates/slides/app/components/editor/ExportMenu.tsx +10 -9
  1157. package/corpus/templates/slides/app/components/editor/GenerateSlidesDialog.tsx +6 -5
  1158. package/corpus/templates/slides/app/components/editor/HistoryPanel.tsx +12 -12
  1159. package/corpus/templates/slides/app/components/editor/ImageDropPromptPopover.tsx +4 -3
  1160. package/corpus/templates/slides/app/components/editor/ImageSearchPanel.tsx +5 -4
  1161. package/corpus/templates/slides/app/components/editor/ImportButton.tsx +4 -3
  1162. package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +2 -1
  1163. package/corpus/templates/slides/app/components/editor/ShareDialog.tsx +10 -10
  1164. package/corpus/templates/slides/app/components/editor/SlideBubbleMenu.tsx +10 -10
  1165. package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +6 -6
  1166. package/corpus/templates/slides/app/components/editor/SlideStyleInspector.tsx +2 -1
  1167. package/corpus/templates/slides/app/components/editor/TweaksPanel.tsx +1 -1
  1168. package/corpus/templates/slides/app/components/layout/Header.tsx +2 -2
  1169. package/corpus/templates/slides/app/components/layout/Sidebar.tsx +5 -5
  1170. package/corpus/templates/slides/app/components/ui/alert-dialog.tsx +1 -0
  1171. package/corpus/templates/slides/app/components/ui/button.tsx +1 -0
  1172. package/corpus/templates/slides/app/components/ui/card.tsx +1 -0
  1173. package/corpus/templates/slides/app/components/ui/dialog.tsx +1 -0
  1174. package/corpus/templates/slides/app/components/ui/dropdown-menu.tsx +1 -0
  1175. package/corpus/templates/slides/app/components/ui/input.tsx +1 -0
  1176. package/corpus/templates/slides/app/components/ui/label.tsx +1 -0
  1177. package/corpus/templates/slides/app/components/ui/popover.tsx +1 -0
  1178. package/corpus/templates/slides/app/components/ui/scroll-area.tsx +1 -0
  1179. package/corpus/templates/slides/app/components/ui/select.tsx +1 -0
  1180. package/corpus/templates/slides/app/components/ui/separator.tsx +1 -0
  1181. package/corpus/templates/slides/app/components/ui/sheet.tsx +1 -0
  1182. package/corpus/templates/slides/app/components/ui/skeleton.tsx +1 -0
  1183. package/corpus/templates/slides/app/components/ui/spinner.tsx +1 -0
  1184. package/corpus/templates/slides/app/components/ui/textarea.tsx +1 -0
  1185. package/corpus/templates/slides/app/components/ui/toast.tsx +1 -0
  1186. package/corpus/templates/slides/app/components/ui/toaster.tsx +1 -0
  1187. package/corpus/templates/slides/app/components/ui/toggle-group.tsx +1 -0
  1188. package/corpus/templates/slides/app/components/ui/toolkit-provider.tsx +12 -0
  1189. package/corpus/templates/slides/app/components/ui/tooltip.tsx +1 -0
  1190. package/corpus/templates/slides/app/components/visual-editor/CanvasCommentPins.tsx +6 -6
  1191. package/corpus/templates/slides/app/components/visual-editor/DrawOverlay.tsx +7 -7
  1192. package/corpus/templates/slides/app/global.css +1 -0
  1193. package/corpus/templates/slides/app/hooks/use-toast.ts +1 -0
  1194. package/corpus/templates/slides/app/pages/DeckEditor.tsx +3 -3
  1195. package/corpus/templates/slides/app/pages/DesignSystems.tsx +1 -1
  1196. package/corpus/templates/slides/app/pages/Index.tsx +14 -17
  1197. package/corpus/templates/slides/app/root.tsx +13 -10
  1198. package/corpus/templates/slides/app/routes/settings.tsx +6 -21
  1199. package/corpus/templates/slides/changelog/2026-07-06-mobile-layouts-no-longer-stack-two-top-headers.md +5 -0
  1200. package/corpus/templates/slides/server/handlers/uploads.ts +7 -2
  1201. package/corpus/templates/slides/server/lib/chat-attachments.ts +1 -1
  1202. package/dist/agent/durable-background.d.ts +29 -0
  1203. package/dist/agent/durable-background.d.ts.map +1 -1
  1204. package/dist/agent/durable-background.js +46 -0
  1205. package/dist/agent/durable-background.js.map +1 -1
  1206. package/dist/agent/engine/ai-sdk-engine.d.ts.map +1 -1
  1207. package/dist/agent/engine/ai-sdk-engine.js +7 -2
  1208. package/dist/agent/engine/ai-sdk-engine.js.map +1 -1
  1209. package/dist/agent/engine/anthropic-engine.d.ts.map +1 -1
  1210. package/dist/agent/engine/anthropic-engine.js +28 -2
  1211. package/dist/agent/engine/anthropic-engine.js.map +1 -1
  1212. package/dist/agent/engine/builder-engine.d.ts.map +1 -1
  1213. package/dist/agent/engine/builder-engine.js +1 -1
  1214. package/dist/agent/engine/builder-engine.js.map +1 -1
  1215. package/dist/agent/engine/output-tokens.d.ts +3 -3
  1216. package/dist/agent/engine/output-tokens.d.ts.map +1 -1
  1217. package/dist/agent/engine/output-tokens.js +16 -14
  1218. package/dist/agent/engine/output-tokens.js.map +1 -1
  1219. package/dist/agent/engine/registry.d.ts +3 -3
  1220. package/dist/agent/engine/registry.d.ts.map +1 -1
  1221. package/dist/agent/engine/registry.js +28 -25
  1222. package/dist/agent/engine/registry.js.map +1 -1
  1223. package/dist/agent/engine/translate-ai-sdk.d.ts +14 -2
  1224. package/dist/agent/engine/translate-ai-sdk.d.ts.map +1 -1
  1225. package/dist/agent/engine/translate-ai-sdk.js +33 -18
  1226. package/dist/agent/engine/translate-ai-sdk.js.map +1 -1
  1227. package/dist/agent/engine/translate-anthropic.d.ts.map +1 -1
  1228. package/dist/agent/engine/translate-anthropic.js +42 -1
  1229. package/dist/agent/engine/translate-anthropic.js.map +1 -1
  1230. package/dist/agent/engine/types.d.ts +15 -0
  1231. package/dist/agent/engine/types.d.ts.map +1 -1
  1232. package/dist/agent/engine/types.js.map +1 -1
  1233. package/dist/agent/model-config.d.ts +8 -0
  1234. package/dist/agent/model-config.d.ts.map +1 -1
  1235. package/dist/agent/model-config.js +86 -0
  1236. package/dist/agent/model-config.js.map +1 -1
  1237. package/dist/agent/production-agent.d.ts +91 -5
  1238. package/dist/agent/production-agent.d.ts.map +1 -1
  1239. package/dist/agent/production-agent.js +389 -180
  1240. package/dist/agent/production-agent.js.map +1 -1
  1241. package/dist/agent/runtime-context.d.ts +29 -0
  1242. package/dist/agent/runtime-context.d.ts.map +1 -1
  1243. package/dist/agent/runtime-context.js +40 -11
  1244. package/dist/agent/runtime-context.js.map +1 -1
  1245. package/dist/agent/tool-result-images.d.ts +49 -0
  1246. package/dist/agent/tool-result-images.d.ts.map +1 -0
  1247. package/dist/agent/tool-result-images.js +141 -0
  1248. package/dist/agent/tool-result-images.js.map +1 -0
  1249. package/dist/brand-kit/fig/index.d.ts.map +1 -1
  1250. package/dist/brand-kit/fig/index.js +6 -3
  1251. package/dist/brand-kit/fig/index.js.map +1 -1
  1252. package/dist/client/AgentPanel.d.ts.map +1 -1
  1253. package/dist/client/AgentPanel.js +66 -17
  1254. package/dist/client/AgentPanel.js.map +1 -1
  1255. package/dist/client/AssistantChat.d.ts.map +1 -1
  1256. package/dist/client/AssistantChat.js +72 -40
  1257. package/dist/client/AssistantChat.js.map +1 -1
  1258. package/dist/client/KeepTabOpenNotice.d.ts +55 -0
  1259. package/dist/client/KeepTabOpenNotice.d.ts.map +1 -0
  1260. package/dist/client/KeepTabOpenNotice.js +85 -0
  1261. package/dist/client/KeepTabOpenNotice.js.map +1 -0
  1262. package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
  1263. package/dist/client/MultiTabAssistantChat.js +2 -1
  1264. package/dist/client/MultiTabAssistantChat.js.map +1 -1
  1265. package/dist/client/RunStuckBanner.d.ts +7 -1
  1266. package/dist/client/RunStuckBanner.d.ts.map +1 -1
  1267. package/dist/client/RunStuckBanner.js +7 -2
  1268. package/dist/client/RunStuckBanner.js.map +1 -1
  1269. package/dist/client/chat/run-recovery.d.ts.map +1 -1
  1270. package/dist/client/chat/run-recovery.js +7 -1
  1271. package/dist/client/chat/run-recovery.js.map +1 -1
  1272. package/dist/client/clipboard.d.ts.map +1 -1
  1273. package/dist/client/clipboard.js +5 -6
  1274. package/dist/client/clipboard.js.map +1 -1
  1275. package/dist/client/components/AgentPresenceChip.d.ts +1 -11
  1276. package/dist/client/components/AgentPresenceChip.d.ts.map +1 -1
  1277. package/dist/client/components/AgentPresenceChip.js +1 -41
  1278. package/dist/client/components/AgentPresenceChip.js.map +1 -1
  1279. package/dist/client/components/LiveCursorOverlay.d.ts +1 -44
  1280. package/dist/client/components/LiveCursorOverlay.d.ts.map +1 -1
  1281. package/dist/client/components/LiveCursorOverlay.js +1 -123
  1282. package/dist/client/components/LiveCursorOverlay.js.map +1 -1
  1283. package/dist/client/components/PresenceBar.d.ts +1 -26
  1284. package/dist/client/components/PresenceBar.d.ts.map +1 -1
  1285. package/dist/client/components/PresenceBar.js +1 -164
  1286. package/dist/client/components/PresenceBar.js.map +1 -1
  1287. package/dist/client/components/RecentEditHighlights.d.ts +1 -42
  1288. package/dist/client/components/RecentEditHighlights.d.ts.map +1 -1
  1289. package/dist/client/components/RecentEditHighlights.js +1 -145
  1290. package/dist/client/components/RecentEditHighlights.js.map +1 -1
  1291. package/dist/client/components/RemoteSelectionRings.d.ts +1 -51
  1292. package/dist/client/components/RemoteSelectionRings.d.ts.map +1 -1
  1293. package/dist/client/components/RemoteSelectionRings.js +1 -129
  1294. package/dist/client/components/RemoteSelectionRings.js.map +1 -1
  1295. package/dist/client/composer/TiptapComposer.d.ts +4 -0
  1296. package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
  1297. package/dist/client/composer/TiptapComposer.js +74 -26
  1298. package/dist/client/composer/TiptapComposer.js.map +1 -1
  1299. package/dist/client/db-admin/SqlEditor.d.ts.map +1 -1
  1300. package/dist/client/db-admin/SqlEditor.js +13 -3
  1301. package/dist/client/db-admin/SqlEditor.js.map +1 -1
  1302. package/dist/client/dynamic-suggestions.d.ts.map +1 -1
  1303. package/dist/client/dynamic-suggestions.js +7 -1
  1304. package/dist/client/dynamic-suggestions.js.map +1 -1
  1305. package/dist/client/extensions/ExtensionViewer.d.ts.map +1 -1
  1306. package/dist/client/extensions/ExtensionViewer.js +7 -7
  1307. package/dist/client/extensions/ExtensionViewer.js.map +1 -1
  1308. package/dist/client/extensions/ExtensionsListPage.d.ts.map +1 -1
  1309. package/dist/client/extensions/ExtensionsListPage.js +5 -7
  1310. package/dist/client/extensions/ExtensionsListPage.js.map +1 -1
  1311. package/dist/client/extensions/ExtensionsSidebarSection.d.ts.map +1 -1
  1312. package/dist/client/extensions/ExtensionsSidebarSection.js +1 -1
  1313. package/dist/client/extensions/ExtensionsSidebarSection.js.map +1 -1
  1314. package/dist/client/host-bridge.d.ts +2 -0
  1315. package/dist/client/host-bridge.d.ts.map +1 -1
  1316. package/dist/client/host-bridge.js +26 -10
  1317. package/dist/client/host-bridge.js.map +1 -1
  1318. package/dist/client/i18n.d.ts +1 -0
  1319. package/dist/client/i18n.d.ts.map +1 -1
  1320. package/dist/client/i18n.js +3 -1
  1321. package/dist/client/i18n.js.map +1 -1
  1322. package/dist/client/index.d.ts +2 -1
  1323. package/dist/client/index.d.ts.map +1 -1
  1324. package/dist/client/index.js +2 -1
  1325. package/dist/client/index.js.map +1 -1
  1326. package/dist/client/resources/McpIntegrationDialog.d.ts.map +1 -1
  1327. package/dist/client/resources/McpIntegrationDialog.js +12 -31
  1328. package/dist/client/resources/McpIntegrationDialog.js.map +1 -1
  1329. package/dist/client/rich-markdown-editor/SharedRichEditor.d.ts +3 -1
  1330. package/dist/client/rich-markdown-editor/SharedRichEditor.d.ts.map +1 -1
  1331. package/dist/client/rich-markdown-editor/SharedRichEditor.js +2 -1
  1332. package/dist/client/rich-markdown-editor/SharedRichEditor.js.map +1 -1
  1333. package/dist/client/rich-markdown-editor/useCollabReconcile.d.ts +3 -1
  1334. package/dist/client/rich-markdown-editor/useCollabReconcile.d.ts.map +1 -1
  1335. package/dist/client/rich-markdown-editor/useCollabReconcile.js +6 -2
  1336. package/dist/client/rich-markdown-editor/useCollabReconcile.js.map +1 -1
  1337. package/dist/client/settings/SettingsPanel.d.ts +3 -1
  1338. package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
  1339. package/dist/client/settings/SettingsPanel.js +103 -9
  1340. package/dist/client/settings/SettingsPanel.js.map +1 -1
  1341. package/dist/client/settings/SettingsTabsPage.d.ts.map +1 -1
  1342. package/dist/client/settings/SettingsTabsPage.js +5 -5
  1343. package/dist/client/settings/SettingsTabsPage.js.map +1 -1
  1344. package/dist/client/settings/index.d.ts +1 -1
  1345. package/dist/client/settings/index.d.ts.map +1 -1
  1346. package/dist/client/settings/index.js +1 -1
  1347. package/dist/client/settings/index.js.map +1 -1
  1348. package/dist/client/sharing/VisibilityBadge.d.ts +1 -10
  1349. package/dist/client/sharing/VisibilityBadge.d.ts.map +1 -1
  1350. package/dist/client/sharing/VisibilityBadge.js +1 -18
  1351. package/dist/client/sharing/VisibilityBadge.js.map +1 -1
  1352. package/dist/client/use-run-stuck-detection.d.ts +8 -1
  1353. package/dist/client/use-run-stuck-detection.d.ts.map +1 -1
  1354. package/dist/client/use-run-stuck-detection.js +3 -2
  1355. package/dist/client/use-run-stuck-detection.js.map +1 -1
  1356. package/dist/coding-tools/run-code.d.ts +36 -0
  1357. package/dist/coding-tools/run-code.d.ts.map +1 -1
  1358. package/dist/coding-tools/run-code.js +333 -62
  1359. package/dist/coding-tools/run-code.js.map +1 -1
  1360. package/dist/coding-tools/sandbox/background.d.ts +141 -0
  1361. package/dist/coding-tools/sandbox/background.d.ts.map +1 -0
  1362. package/dist/coding-tools/sandbox/background.js +279 -0
  1363. package/dist/coding-tools/sandbox/background.js.map +1 -0
  1364. package/dist/coding-tools/sandbox/executions-store.d.ts +138 -0
  1365. package/dist/coding-tools/sandbox/executions-store.d.ts.map +1 -0
  1366. package/dist/coding-tools/sandbox/executions-store.js +380 -0
  1367. package/dist/coding-tools/sandbox/executions-store.js.map +1 -0
  1368. package/dist/coding-tools/sandbox/index.d.ts +22 -13
  1369. package/dist/coding-tools/sandbox/index.d.ts.map +1 -1
  1370. package/dist/coding-tools/sandbox/index.js +31 -13
  1371. package/dist/coding-tools/sandbox/index.js.map +1 -1
  1372. package/dist/coding-tools/sandbox/local-child-process-adapter.d.ts.map +1 -1
  1373. package/dist/coding-tools/sandbox/local-child-process-adapter.js +61 -4
  1374. package/dist/coding-tools/sandbox/local-child-process-adapter.js.map +1 -1
  1375. package/dist/collab/awareness.d.ts +2 -2
  1376. package/dist/collab/awareness.d.ts.map +1 -1
  1377. package/dist/collab/client.d.ts +16 -12
  1378. package/dist/collab/client.d.ts.map +1 -1
  1379. package/dist/collab/client.js +744 -496
  1380. package/dist/collab/client.js.map +1 -1
  1381. package/dist/collab/presence.d.ts +2 -20
  1382. package/dist/collab/presence.d.ts.map +1 -1
  1383. package/dist/collab/presence.js +3 -0
  1384. package/dist/collab/presence.js.map +1 -1
  1385. package/dist/collab/recent-edits.d.ts +2 -37
  1386. package/dist/collab/recent-edits.d.ts.map +1 -1
  1387. package/dist/collab/recent-edits.js +2 -9
  1388. package/dist/collab/recent-edits.js.map +1 -1
  1389. package/dist/collab/routes.d.ts +1 -1
  1390. package/dist/data-programs/actions.d.ts +19 -0
  1391. package/dist/data-programs/actions.d.ts.map +1 -0
  1392. package/dist/data-programs/actions.js +279 -0
  1393. package/dist/data-programs/actions.js.map +1 -0
  1394. package/dist/data-programs/contract.d.ts +70 -0
  1395. package/dist/data-programs/contract.d.ts.map +1 -0
  1396. package/dist/data-programs/contract.js +225 -0
  1397. package/dist/data-programs/contract.js.map +1 -0
  1398. package/dist/data-programs/execute.d.ts +96 -0
  1399. package/dist/data-programs/execute.d.ts.map +1 -0
  1400. package/dist/data-programs/execute.js +454 -0
  1401. package/dist/data-programs/execute.js.map +1 -0
  1402. package/dist/data-programs/index.d.ts +11 -0
  1403. package/dist/data-programs/index.d.ts.map +1 -0
  1404. package/dist/data-programs/index.js +11 -0
  1405. package/dist/data-programs/index.js.map +1 -0
  1406. package/dist/data-programs/schema.d.ts +517 -0
  1407. package/dist/data-programs/schema.d.ts.map +1 -0
  1408. package/dist/data-programs/schema.js +138 -0
  1409. package/dist/data-programs/schema.js.map +1 -0
  1410. package/dist/data-programs/store.d.ts +158 -0
  1411. package/dist/data-programs/store.d.ts.map +1 -0
  1412. package/dist/data-programs/store.js +493 -0
  1413. package/dist/data-programs/store.js.map +1 -0
  1414. package/dist/deploy/build.d.ts.map +1 -1
  1415. package/dist/deploy/build.js +34 -0
  1416. package/dist/deploy/build.js.map +1 -1
  1417. package/dist/extensions/actions.js +2 -2
  1418. package/dist/extensions/actions.js.map +1 -1
  1419. package/dist/file-upload/builder.d.ts.map +1 -1
  1420. package/dist/file-upload/builder.js +9 -0
  1421. package/dist/file-upload/builder.js.map +1 -1
  1422. package/dist/integrations/webhook-handler.d.ts.map +1 -1
  1423. package/dist/integrations/webhook-handler.js +21 -10
  1424. package/dist/integrations/webhook-handler.js.map +1 -1
  1425. package/dist/local-artifacts/index.js +1 -1
  1426. package/dist/local-artifacts/index.js.map +1 -1
  1427. package/dist/localization/default-messages.d.ts +0 -1
  1428. package/dist/localization/default-messages.d.ts.map +1 -1
  1429. package/dist/localization/default-messages.js +1 -2
  1430. package/dist/localization/default-messages.js.map +1 -1
  1431. package/dist/mcp-client/index.d.ts +9 -0
  1432. package/dist/mcp-client/index.d.ts.map +1 -1
  1433. package/dist/mcp-client/index.js +23 -0
  1434. package/dist/mcp-client/index.js.map +1 -1
  1435. package/dist/observability/routes.d.ts +5 -5
  1436. package/dist/onboarding/default-steps.d.ts.map +1 -1
  1437. package/dist/onboarding/default-steps.js +2 -2
  1438. package/dist/onboarding/default-steps.js.map +1 -1
  1439. package/dist/progress/routes.d.ts +1 -1
  1440. package/dist/provider-api/corpus-jobs.d.ts +2 -2
  1441. package/dist/resources/store.d.ts.map +1 -1
  1442. package/dist/resources/store.js +35 -3
  1443. package/dist/resources/store.js.map +1 -1
  1444. package/dist/scripts/agent-engines/list-agent-engines.d.ts.map +1 -1
  1445. package/dist/scripts/agent-engines/list-agent-engines.js +4 -8
  1446. package/dist/scripts/agent-engines/list-agent-engines.js.map +1 -1
  1447. package/dist/scripts/agent-engines/test-agent-engine.d.ts.map +1 -1
  1448. package/dist/scripts/agent-engines/test-agent-engine.js +7 -2
  1449. package/dist/scripts/agent-engines/test-agent-engine.js.map +1 -1
  1450. package/dist/scripts/db/tool-mode.js +3 -3
  1451. package/dist/scripts/db/tool-mode.js.map +1 -1
  1452. package/dist/scripts/resources/migrate-learnings.d.ts +5 -1
  1453. package/dist/scripts/resources/migrate-learnings.d.ts.map +1 -1
  1454. package/dist/scripts/resources/migrate-learnings.js +8 -10
  1455. package/dist/scripts/resources/migrate-learnings.js.map +1 -1
  1456. package/dist/secrets/routes.d.ts +9 -9
  1457. package/dist/server/agent-chat-plugin.d.ts +20 -6
  1458. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  1459. package/dist/server/agent-chat-plugin.js +138 -59
  1460. package/dist/server/agent-chat-plugin.js.map +1 -1
  1461. package/dist/server/agent-discovery.d.ts.map +1 -1
  1462. package/dist/server/agent-discovery.js +62 -8
  1463. package/dist/server/agent-discovery.js.map +1 -1
  1464. package/dist/server/auth.d.ts.map +1 -1
  1465. package/dist/server/auth.js +75 -3
  1466. package/dist/server/auth.js.map +1 -1
  1467. package/dist/server/builder-design-systems.js +2 -2
  1468. package/dist/server/builder-design-systems.js.map +1 -1
  1469. package/dist/server/core-routes-plugin.d.ts.map +1 -1
  1470. package/dist/server/core-routes-plugin.js +100 -20
  1471. package/dist/server/core-routes-plugin.js.map +1 -1
  1472. package/dist/server/credential-provider.d.ts +6 -3
  1473. package/dist/server/credential-provider.d.ts.map +1 -1
  1474. package/dist/server/credential-provider.js +25 -8
  1475. package/dist/server/credential-provider.js.map +1 -1
  1476. package/dist/server/csrf.d.ts.map +1 -1
  1477. package/dist/server/csrf.js +3 -0
  1478. package/dist/server/csrf.js.map +1 -1
  1479. package/dist/server/oauth-helpers.d.ts.map +1 -1
  1480. package/dist/server/oauth-helpers.js +9 -1
  1481. package/dist/server/oauth-helpers.js.map +1 -1
  1482. package/dist/server/onboarding-html.d.ts.map +1 -1
  1483. package/dist/server/onboarding-html.js +80 -48
  1484. package/dist/server/onboarding-html.js.map +1 -1
  1485. package/dist/server/prompts/shared-rules.js +2 -2
  1486. package/dist/server/prompts/shared-rules.js.map +1 -1
  1487. package/dist/server/transcribe-voice.d.ts +1 -1
  1488. package/dist/server/transcribe-voice.d.ts.map +1 -1
  1489. package/dist/server/transcribe-voice.js +77 -15
  1490. package/dist/server/transcribe-voice.js.map +1 -1
  1491. package/dist/styles/agent-native.css +57 -45
  1492. package/dist/templates/default/.agents/skills/actions/SKILL.md +55 -0
  1493. package/dist/templates/default/AGENTS.md +11 -14
  1494. package/dist/templates/default/actions/navigate.ts +1 -1
  1495. package/dist/templates/default/app/i18n/ar-SA.ts +0 -1
  1496. package/dist/templates/default/app/i18n/de-DE.ts +0 -1
  1497. package/dist/templates/default/app/i18n/en-US.ts +0 -1
  1498. package/dist/templates/default/app/i18n/es-ES.ts +0 -1
  1499. package/dist/templates/default/app/i18n/fr-FR.ts +0 -1
  1500. package/dist/templates/default/app/i18n/hi-IN.ts +0 -1
  1501. package/dist/templates/default/app/i18n/ja-JP.ts +0 -1
  1502. package/dist/templates/default/app/i18n/ko-KR.ts +0 -1
  1503. package/dist/templates/default/app/i18n/pt-BR.ts +0 -1
  1504. package/dist/templates/default/app/i18n/zh-CN.ts +0 -1
  1505. package/dist/templates/default/app/i18n/zh-TW.ts +0 -1
  1506. package/dist/templates/default/app/routes/settings.tsx +22 -33
  1507. package/dist/templates/headless/.agents/skills/agent-native-docs/SKILL.md +20 -7
  1508. package/dist/templates/headless/AGENTS.md +9 -6
  1509. package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +55 -0
  1510. package/dist/templates/workspace-core/.agents/skills/data-programs/SKILL.md +128 -0
  1511. package/dist/templates/workspace-core/.agents/skills/harness-agents/SKILL.md +10 -4
  1512. package/dist/vite/agents-bundle-plugin.d.ts.map +1 -1
  1513. package/dist/vite/agents-bundle-plugin.js +26 -1
  1514. package/dist/vite/agents-bundle-plugin.js.map +1 -1
  1515. package/dist/vite/client.d.ts.map +1 -1
  1516. package/dist/vite/client.js +11 -0
  1517. package/dist/vite/client.js.map +1 -1
  1518. package/docs/content/agent-native-toolkit.mdx +87 -146
  1519. package/docs/content/cloneable-saas.mdx +19 -19
  1520. package/docs/content/components.mdx +16 -4
  1521. package/docs/content/data-programs.mdx +329 -0
  1522. package/docs/content/deployment.mdx +9 -9
  1523. package/docs/content/extensions.mdx +8 -7
  1524. package/docs/content/generative-ui.mdx +5 -3
  1525. package/docs/content/key-concepts.mdx +6 -9
  1526. package/docs/content/locales/ar-SA/agent-native-toolkit.mdx +100 -70
  1527. package/docs/content/locales/ar-SA/cloneable-saas.mdx +19 -19
  1528. package/docs/content/locales/ar-SA/components.mdx +12 -2
  1529. package/docs/content/locales/ar-SA/data-programs.mdx +329 -0
  1530. package/docs/content/locales/ar-SA/deployment.mdx +8 -9
  1531. package/docs/content/locales/ar-SA/extensions.mdx +6 -4
  1532. package/docs/content/locales/ar-SA/key-concepts.mdx +7 -9
  1533. package/docs/content/locales/ar-SA/real-time-collaboration.mdx +9 -10
  1534. package/docs/content/locales/de-DE/agent-native-toolkit.mdx +100 -74
  1535. package/docs/content/locales/de-DE/cloneable-saas.mdx +19 -19
  1536. package/docs/content/locales/de-DE/components.mdx +12 -2
  1537. package/docs/content/locales/de-DE/data-programs.mdx +329 -0
  1538. package/docs/content/locales/de-DE/deployment.mdx +8 -9
  1539. package/docs/content/locales/de-DE/extensions.mdx +6 -4
  1540. package/docs/content/locales/de-DE/key-concepts.mdx +8 -10
  1541. package/docs/content/locales/de-DE/real-time-collaboration.mdx +9 -10
  1542. package/docs/content/locales/es-ES/agent-native-toolkit.mdx +100 -74
  1543. package/docs/content/locales/es-ES/cloneable-saas.mdx +19 -19
  1544. package/docs/content/locales/es-ES/components.mdx +12 -2
  1545. package/docs/content/locales/es-ES/data-programs.mdx +329 -0
  1546. package/docs/content/locales/es-ES/deployment.mdx +8 -9
  1547. package/docs/content/locales/es-ES/extensions.mdx +6 -4
  1548. package/docs/content/locales/es-ES/key-concepts.mdx +8 -10
  1549. package/docs/content/locales/es-ES/real-time-collaboration.mdx +9 -10
  1550. package/docs/content/locales/fr-FR/agent-native-toolkit.mdx +100 -76
  1551. package/docs/content/locales/fr-FR/cloneable-saas.mdx +19 -19
  1552. package/docs/content/locales/fr-FR/components.mdx +12 -2
  1553. package/docs/content/locales/fr-FR/data-programs.mdx +329 -0
  1554. package/docs/content/locales/fr-FR/deployment.mdx +8 -9
  1555. package/docs/content/locales/fr-FR/extensions.mdx +6 -4
  1556. package/docs/content/locales/fr-FR/key-concepts.mdx +8 -10
  1557. package/docs/content/locales/fr-FR/real-time-collaboration.mdx +9 -10
  1558. package/docs/content/locales/hi-IN/agent-native-toolkit.mdx +100 -71
  1559. package/docs/content/locales/hi-IN/cloneable-saas.mdx +19 -19
  1560. package/docs/content/locales/hi-IN/components.mdx +20 -10
  1561. package/docs/content/locales/hi-IN/data-programs.mdx +329 -0
  1562. package/docs/content/locales/hi-IN/deployment.mdx +8 -9
  1563. package/docs/content/locales/hi-IN/extensions.mdx +6 -4
  1564. package/docs/content/locales/hi-IN/key-concepts.mdx +8 -10
  1565. package/docs/content/locales/hi-IN/real-time-collaboration.mdx +9 -10
  1566. package/docs/content/locales/ja-JP/agent-native-toolkit.mdx +100 -64
  1567. package/docs/content/locales/ja-JP/cloneable-saas.mdx +19 -19
  1568. package/docs/content/locales/ja-JP/components.mdx +12 -2
  1569. package/docs/content/locales/ja-JP/data-programs.mdx +329 -0
  1570. package/docs/content/locales/ja-JP/deployment.mdx +8 -9
  1571. package/docs/content/locales/ja-JP/extensions.mdx +6 -4
  1572. package/docs/content/locales/ja-JP/key-concepts.mdx +9 -11
  1573. package/docs/content/locales/ja-JP/real-time-collaboration.mdx +9 -10
  1574. package/docs/content/locales/ko-KR/agent-native-toolkit.mdx +100 -60
  1575. package/docs/content/locales/ko-KR/cloneable-saas.mdx +19 -19
  1576. package/docs/content/locales/ko-KR/components.mdx +20 -10
  1577. package/docs/content/locales/ko-KR/data-programs.mdx +329 -0
  1578. package/docs/content/locales/ko-KR/deployment.mdx +8 -9
  1579. package/docs/content/locales/ko-KR/extensions.mdx +16 -14
  1580. package/docs/content/locales/ko-KR/key-concepts.mdx +9 -11
  1581. package/docs/content/locales/ko-KR/real-time-collaboration.mdx +9 -10
  1582. package/docs/content/locales/pt-BR/agent-native-toolkit.mdx +100 -74
  1583. package/docs/content/locales/pt-BR/cloneable-saas.mdx +19 -19
  1584. package/docs/content/locales/pt-BR/components.mdx +12 -2
  1585. package/docs/content/locales/pt-BR/data-programs.mdx +329 -0
  1586. package/docs/content/locales/pt-BR/deployment.mdx +8 -9
  1587. package/docs/content/locales/pt-BR/extensions.mdx +6 -4
  1588. package/docs/content/locales/pt-BR/key-concepts.mdx +8 -11
  1589. package/docs/content/locales/pt-BR/real-time-collaboration.mdx +9 -10
  1590. package/docs/content/locales/zh-CN/agent-native-toolkit.mdx +100 -58
  1591. package/docs/content/locales/zh-CN/cloneable-saas.mdx +19 -19
  1592. package/docs/content/locales/zh-CN/components.mdx +20 -10
  1593. package/docs/content/locales/zh-CN/data-programs.mdx +329 -0
  1594. package/docs/content/locales/zh-CN/deployment.mdx +7 -9
  1595. package/docs/content/locales/zh-CN/extensions.mdx +16 -14
  1596. package/docs/content/locales/zh-CN/key-concepts.mdx +7 -11
  1597. package/docs/content/locales/zh-CN/real-time-collaboration.mdx +10 -11
  1598. package/docs/content/locales/zh-TW/agent-native-toolkit.mdx +100 -58
  1599. package/docs/content/locales/zh-TW/cloneable-saas.mdx +19 -19
  1600. package/docs/content/locales/zh-TW/components.mdx +20 -10
  1601. package/docs/content/locales/zh-TW/data-programs.mdx +329 -0
  1602. package/docs/content/locales/zh-TW/deployment.mdx +7 -9
  1603. package/docs/content/locales/zh-TW/extensions.mdx +16 -14
  1604. package/docs/content/locales/zh-TW/key-concepts.mdx +7 -11
  1605. package/docs/content/locales/zh-TW/real-time-collaboration.mdx +10 -11
  1606. package/docs/content/real-time-collaboration.mdx +10 -11
  1607. package/docs/content/toolkit-app-adapters.mdx +46 -0
  1608. package/docs/content/toolkit-collaboration-ui.mdx +48 -0
  1609. package/docs/content/toolkit-sharing-ui.mdx +33 -0
  1610. package/docs/content/toolkit-shell-hooks.mdx +27 -0
  1611. package/docs/content/toolkit-ui.mdx +69 -0
  1612. package/package.json +6 -2
  1613. package/src/templates/default/.agents/skills/actions/SKILL.md +55 -0
  1614. package/src/templates/default/AGENTS.md +11 -14
  1615. package/src/templates/default/actions/navigate.spec.ts +53 -0
  1616. package/src/templates/default/actions/navigate.ts +1 -1
  1617. package/src/templates/default/app/i18n/ar-SA.ts +0 -1
  1618. package/src/templates/default/app/i18n/de-DE.ts +0 -1
  1619. package/src/templates/default/app/i18n/en-US.ts +0 -1
  1620. package/src/templates/default/app/i18n/es-ES.ts +0 -1
  1621. package/src/templates/default/app/i18n/fr-FR.ts +0 -1
  1622. package/src/templates/default/app/i18n/hi-IN.ts +0 -1
  1623. package/src/templates/default/app/i18n/ja-JP.ts +0 -1
  1624. package/src/templates/default/app/i18n/ko-KR.ts +0 -1
  1625. package/src/templates/default/app/i18n/pt-BR.ts +0 -1
  1626. package/src/templates/default/app/i18n/zh-CN.ts +0 -1
  1627. package/src/templates/default/app/i18n/zh-TW.ts +0 -1
  1628. package/src/templates/default/app/routes/settings.tsx +22 -33
  1629. package/src/templates/headless/.agents/skills/agent-native-docs/SKILL.md +20 -7
  1630. package/src/templates/headless/AGENTS.md +9 -6
  1631. package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +55 -0
  1632. package/src/templates/workspace-core/.agents/skills/data-programs/SKILL.md +128 -0
  1633. package/src/templates/workspace-core/.agents/skills/harness-agents/SKILL.md +10 -4
  1634. package/corpus/templates/design/server/lib/figma-import/clipboard.ts +0 -122
  1635. package/corpus/templates/design/server/lib/figma-import/decode.ts +0 -455
  1636. package/corpus/templates/design/server/lib/figma-import/processor.ts +0 -116
  1637. package/corpus/templates/design/server/lib/figma-import/render-html.ts +0 -397
  1638. package/corpus/templates/design/server/lib/figma-import/types.ts +0 -60
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/local-artifacts/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,MAAM,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAsItC,MAAM,aAAa,GAAG,mBAAmB,CAAC;AAC1C,MAAM,cAAc,GAAG,CAAC,mBAAmB,EAAE,wBAAwB,CAAC,CAAC;AACvE,MAAM,kBAAkB,GAAG;IACzB,uBAAuB;IACvB,4BAA4B;CAC7B,CAAC;AACF,MAAM,gCAAgC,GACpC,8CAA8C,CAAC;AACjD,MAAM,qBAAqB,GAAG;IAC5B,YAAY;IACZ,qBAAqB;IACrB,aAAa;IACb,aAAa;IACb,oBAAoB;IACpB,YAAY;IACZ,aAAa;CACd,CAAC;AACF,MAAM,CAAC,MAAM,kCAAkC,GAAG,2BAA2B,CAAC;AAC9E,MAAM,kCAAkC,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;AAC3D,MAAM,6BAA6B,GAAG,IAAI,GAAG,CAAC;IAC5C,WAAW;IACX,mBAAmB;IACnB,iBAAiB;IACjB,WAAW;CACZ,CAAC,CAAC;AACH,MAAM,2BAA2B,GAAG,CAAC,gBAAgB,EAAE,eAAe,CAAC,CAAC;AACxE,MAAM,+BAA+B,GAAG,IAAI,GAAG,CAAC;IAC9C,MAAM;IACN,MAAM;IACN,OAAO;IACP,KAAK;IACL,OAAO;IACP,MAAM;IACN,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;IACL,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;IACN,MAAM;I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a,GAAG,MAAM,yBAAyB,CAAC,OAAO,CAAC,CAAC;IAC/D,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACpD,CAAC;IACD,MAAM,aAAa,GAAG,iCAAiC,CACrD,aAAa,EACb,OAAO,CAAC,IAAI,CACb,CAAC;IACF,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE,CAAC;QACzC,IAAI,CAAC;YACH,+BAA+B,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;YAC7D,MAAM,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;YAC9B,OAAO,GAAG,IAAI,CAAC;QACjB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,SAAS,CAAC,KAAK,CAAC,KAAK,QAAQ;gBAAE,SAAS;YAC5C,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["import crypto from \"node:crypto\";\nimport fsSync from \"node:fs\";\nimport fs from \"node:fs/promises\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\nimport { minimatch } from \"minimatch\";\n\nexport type AgentNativeDataMode = \"database\" | \"local-files\";\n\nexport interface AgentNativeManifestRoot {\n name?: string;\n path: string;\n kind?: string;\n profile?: string;\n extensions?: string[];\n include?: string[];\n hide?: string[];\n}\n\nexport interface AgentNativeManifestApp {\n mode?: AgentNativeDataMode;\n profile?: string;\n roots?: AgentNativeManifestRoot[];\n components?: string | string[];\n extensions?: string | string[];\n hide?: string[];\n}\n\nexport interface AgentNativeManifest {\n version?: number;\n mode?: AgentNativeDataMode;\n apps?: Record<string, AgentNativeManifestApp>;\n}\n\nexport interface LoadedAgentNativeManifest {\n path: string;\n rootDir: string;\n manifest: AgentNativeManifest;\n}\n\nexport interface LocalArtifactAppDefaults {\n mode?: AgentNativeDataMode;\n profile?: string;\n roots: AgentNativeManifestRoot[];\n hide?: string[];\n components?: string | string[];\n extensions?: string | string[];\n}\n\nexport interface LoadAgentNativeManifestOptions {\n cwd?: string;\n manifestPath?: string;\n optional?: boolean;\n}\n\nexport interface ResolveAgentNativeModeOptions extends LoadAgentNativeManifestOptions {\n appId?: string;\n defaults?: Pick<LocalArtifactAppDefaults, \"mode\">;\n}\n\nexport interface LocalArtifactOptions extends LoadAgentNativeManifestOptions {\n appId: string;\n defaults?: LocalArtifactAppDefaults;\n}\n\nexport interface LoadedLocalArtifactRoot {\n name: string;\n path: string;\n absolutePath: string;\n kind?: string;\n profile?: string;\n extensions: string[];\n hide: string[];\n include: string[];\n}\n\nexport interface LoadedLocalArtifactApp {\n appId: string;\n mode: AgentNativeDataMode;\n profile?: string;\n manifestPath: string | null;\n workspaceRoot: string;\n roots: LoadedLocalArtifactRoot[];\n components: string[];\n extensions: string[];\n hide: string[];\n}\n\nexport interface LocalArtifactFileMeta {\n path: string;\n absolutePath: string;\n rootName: string;\n rootPath: string;\n kind?: string;\n profile?: string;\n extension: string;\n contentType: string;\n sizeBytes: number;\n hash: string;\n createdAt: string;\n updatedAt: string;\n mtimeMs: number;\n}\n\nexport interface LocalArtifactFile extends LocalArtifactFileMeta {\n content: string;\n}\n\nexport interface WriteLocalArtifactFileOptions extends LocalArtifactOptions {\n content: string;\n expectedHash?: string | null;\n ifNotExists?: boolean;\n}\n\nexport interface LocalWorkspaceResourceMeta {\n id: string;\n path: string;\n absolutePath: string;\n mimeType: string;\n sizeBytes: number;\n hash: string;\n createdAt: string;\n updatedAt: string;\n mtimeMs: number;\n}\n\nexport interface LocalWorkspaceResourceFile extends LocalWorkspaceResourceMeta {\n content: string;\n}\n\nexport interface LocalWorkspaceResourceOptions extends LoadAgentNativeManifestOptions {}\n\nexport interface WriteLocalWorkspaceResourceOptions extends LocalWorkspaceResourceOptions {\n path: string;\n content: string;\n expectedHash?: string | null;\n ifNotExists?: boolean;\n}\n\nconst MANIFEST_FILE = \"agent-native.json\";\nconst ENV_MODE_NAMES = [\"AGENT_NATIVE_MODE\", \"AGENT_NATIVE_DATA_MODE\"];\nconst ENV_MANIFEST_NAMES = [\n \"AGENT_NATIVE_MANIFEST\",\n \"AGENT_NATIVE_MANIFEST_PATH\",\n];\nconst ALLOW_PRODUCTION_LOCAL_FILES_ENV =\n \"AGENT_NATIVE_ALLOW_LOCAL_FILES_IN_PRODUCTION\";\nconst DEFAULT_HIDE_PATTERNS = [\n \"**/.git/**\",\n \"**/.agent-native/**\",\n \"**/.next/**\",\n \"**/.nuxt/**\",\n \"**/node_modules/**\",\n \"**/dist/**\",\n \"**/build/**\",\n];\nexport const LOCAL_WORKSPACE_RESOURCE_ID_PREFIX = \"local-workspace-resource:\";\nconst LOCAL_WORKSPACE_RESOURCE_MAX_BYTES = 2 * 1024 * 1024;\nconst LOCAL_WORKSPACE_CONTROL_FILES = new Set([\n \"AGENTS.md\",\n \"agent-native.json\",\n \"mcp.config.json\",\n \".mcp.json\",\n]);\nconst LOCAL_WORKSPACE_SKILL_ROOTS = [\".agents/skills\", \".agent/skills\"];\nconst LOCAL_WORKSPACE_TEXT_EXTENSIONS = new Set([\n \".css\",\n \".csv\",\n \".html\",\n \".js\",\n \".json\",\n \".jsx\",\n \".md\",\n \".mdx\",\n \".py\",\n \".sh\",\n \".sql\",\n \".toml\",\n \".ts\",\n \".tsx\",\n \".txt\",\n \".xml\",\n \".yaml\",\n \".yml\",\n]);\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return !!value && typeof value === \"object\" && !Array.isArray(value);\n}\n\nfunction errorCode(error: unknown): string | undefined {\n return isRecord(error) && typeof error.code === \"string\"\n ? error.code\n : undefined;\n}\n\nfunction asStringArray(value: unknown): string[] {\n if (typeof value === \"string\" && value.trim()) return [value.trim()];\n if (!Array.isArray(value)) return [];\n return value.filter((item): item is string => typeof item === \"string\");\n}\n\nfunction normalizeMode(value: unknown): AgentNativeDataMode | undefined {\n if (value === \"database\" || value === \"local-files\") return value;\n return undefined;\n}\n\nfunction normalizeProfile(value: unknown): string | undefined {\n if (typeof value !== \"string\") return undefined;\n const trimmed = value.trim();\n return trimmed || undefined;\n}\n\nfunction normalizeSlash(filePath: string): string {\n return filePath.replace(/\\\\/g, \"/\");\n}\n\nfunction normalizeRelativePath(filePath: string, label = \"path\"): string {\n if (!filePath || typeof filePath !== \"string\") {\n throw new Error(`${label} is required`);\n }\n if (filePath.includes(\"\\0\")) {\n throw new Error(`${label} must not contain null bytes`);\n }\n if (path.isAbsolute(filePath)) {\n throw new Error(`${label} must be relative`);\n }\n const normalized = normalizeSlash(\n path.posix.normalize(normalizeSlash(filePath)),\n );\n if (\n !normalized ||\n normalized === \".\" ||\n normalized.startsWith(\"../\") ||\n normalized === \"..\" ||\n normalized.split(\"/\").some((part) => !part || part === \".\" || part === \"..\")\n ) {\n throw new Error(`${label} must be a safe relative path`);\n }\n return normalized;\n}\n\nfunction extensionOf(filePath: string): string {\n return path.posix.extname(filePath).toLowerCase();\n}\n\nfunction normalizeExtensions(value: unknown): string[] {\n const extensions = asStringArray(value)\n .map((ext) => ext.trim().toLowerCase())\n .filter(Boolean)\n .map((ext) => (ext.startsWith(\".\") ? ext : `.${ext}`));\n return [...new Set(extensions)];\n}\n\nfunction rootNameFromPath(rootPath: string): string {\n return (\n rootPath\n .split(\"/\")\n .filter(Boolean)\n .at(-1)\n ?.replace(/[-_]+/g, \" \")\n .replace(/\\b\\w/g, (char) => char.toUpperCase()) || rootPath\n );\n}\n\nfunction normalizeManifestRoot(value: unknown): AgentNativeManifestRoot | null {\n if (typeof value === \"string\") return { path: value };\n if (!isRecord(value) || typeof value.path !== \"string\") return null;\n return {\n name: typeof value.name === \"string\" ? value.name : undefined,\n path: value.path,\n kind: typeof value.kind === \"string\" ? value.kind : undefined,\n profile: normalizeProfile(value.profile),\n extensions: normalizeExtensions(value.extensions),\n include: asStringArray(value.include),\n hide: asStringArray(value.hide),\n };\n}\n\nfunction normalizeManifestApp(value: unknown): AgentNativeManifestApp {\n if (Array.isArray(value)) {\n return {\n roots: value\n .map(normalizeManifestRoot)\n .filter((root): root is AgentNativeManifestRoot => !!root),\n };\n }\n if (!isRecord(value)) return {};\n const roots = Array.isArray(value.roots)\n ? value.roots\n .map(normalizeManifestRoot)\n .filter((root): root is AgentNativeManifestRoot => !!root)\n : [];\n return {\n mode: normalizeMode(value.mode),\n profile: normalizeProfile(value.profile),\n roots,\n components:\n typeof value.components === \"string\" || Array.isArray(value.components)\n ? asStringArray(value.components)\n : undefined,\n extensions:\n typeof value.extensions === \"string\" || Array.isArray(value.extensions)\n ? asStringArray(value.extensions)\n : undefined,\n hide: asStringArray(value.hide),\n };\n}\n\nfunction normalizeManifest(value: unknown): AgentNativeManifest {\n const record = isRecord(value) ? value : {};\n const appsRecord = isRecord(record.apps) ? record.apps : {};\n const apps: Record<string, AgentNativeManifestApp> = {};\n for (const [appId, appValue] of Object.entries(appsRecord)) {\n apps[appId] = normalizeManifestApp(appValue);\n }\n return {\n version:\n typeof record.version === \"number\" && Number.isFinite(record.version)\n ? record.version\n : undefined,\n mode: normalizeMode(record.mode),\n apps,\n };\n}\n\nfunction firstEnvValue(names: string[]): string | undefined {\n for (const name of names) {\n const value = process.env[name]?.trim();\n if (value) return value;\n }\n return undefined;\n}\n\nfunction envMode(): AgentNativeDataMode | undefined {\n return normalizeMode(firstEnvValue(ENV_MODE_NAMES));\n}\n\nfunction envFlag(name: string): boolean {\n const value = process.env[name]?.trim().toLowerCase();\n return value === \"1\" || value === \"true\" || value === \"yes\" || value === \"on\";\n}\n\nfunction assertLocalFilesRuntimeAllowed(mode: AgentNativeDataMode) {\n if (mode !== \"local-files\") return;\n if (process.env.NODE_ENV !== \"production\") return;\n if (envFlag(ALLOW_PRODUCTION_LOCAL_FILES_ENV)) return;\n throw new Error(\n `Local file mode is only enabled for local development runtimes. Set ${ALLOW_PRODUCTION_LOCAL_FILES_ENV}=true only for a trusted single-tenant local file bridge.`,\n );\n}\n\nfunction envManifestPath(): string | undefined {\n return firstEnvValue(ENV_MANIFEST_NAMES);\n}\n\nexport function findAgentNativeManifest(\n startDir = process.cwd(),\n): string | null {\n let current = path.resolve(startDir);\n for (;;) {\n const candidate = path.join(current, MANIFEST_FILE);\n if (fsSync.existsSync(candidate)) return candidate;\n const parent = path.dirname(current);\n if (parent === current) return null;\n current = parent;\n }\n}\n\nexport async function loadAgentNativeManifest(\n options: LoadAgentNativeManifestOptions = {},\n): Promise<LoadedAgentNativeManifest | null> {\n const manifestPath =\n options.manifestPath ??\n envManifestPath() ??\n findAgentNativeManifest(options.cwd ?? process.cwd());\n\n if (!manifestPath) {\n if (options.optional) return null;\n throw new Error(`Could not find ${MANIFEST_FILE}`);\n }\n\n const resolvedPath = path.resolve(options.cwd ?? process.cwd(), manifestPath);\n try {\n const raw = await fs.readFile(resolvedPath, \"utf8\");\n const parsed = JSON.parse(raw) as unknown;\n return {\n path: resolvedPath,\n rootDir: path.dirname(resolvedPath),\n manifest: normalizeManifest(parsed),\n };\n } catch (error) {\n if (options.optional && errorCode(error) === \"ENOENT\") {\n return null;\n }\n throw error;\n }\n}\n\nexport async function resolveAgentNativeDataMode(\n options: ResolveAgentNativeModeOptions = {},\n): Promise<AgentNativeDataMode> {\n const explicitMode = envMode();\n if (explicitMode) {\n assertLocalFilesRuntimeAllowed(explicitMode);\n return explicitMode;\n }\n\n const loaded = await loadAgentNativeManifest({ ...options, optional: true });\n const appMode = options.appId\n ? loaded?.manifest.apps?.[options.appId]?.mode\n : undefined;\n const mode =\n appMode ?? loaded?.manifest.mode ?? options.defaults?.mode ?? \"database\";\n assertLocalFilesRuntimeAllowed(mode);\n return mode;\n}\n\nexport async function isAgentNativeLocalFileMode(\n options: ResolveAgentNativeModeOptions = {},\n): Promise<boolean> {\n return (await resolveAgentNativeDataMode(options)) === \"local-files\";\n}\n\nfunction mergeAppConfig(\n manifestApp: AgentNativeManifestApp | undefined,\n defaults: LocalArtifactAppDefaults | undefined,\n): AgentNativeManifestApp {\n return {\n mode: manifestApp?.mode ?? defaults?.mode,\n profile: manifestApp?.profile ?? defaults?.profile,\n roots:\n manifestApp?.roots && manifestApp.roots.length > 0\n ? manifestApp.roots\n : (defaults?.roots ?? []),\n components: manifestApp?.components ?? defaults?.components,\n extensions: manifestApp?.extensions ?? defaults?.extensions,\n hide: [...(defaults?.hide ?? []), ...(manifestApp?.hide ?? [])],\n };\n}\n\nfunction resolveInsideWorkspace(workspaceRoot: string, relativePath: string) {\n const safePath = normalizeRelativePath(relativePath);\n const absolutePath = path.resolve(workspaceRoot, safePath);\n const relative = path.relative(workspaceRoot, absolutePath);\n if (\n relative === \"\" ||\n relative.startsWith(\"..\") ||\n path.isAbsolute(relative)\n ) {\n throw new Error(`Path \"${relativePath}\" is outside the workspace`);\n }\n return { safePath, absolutePath };\n}\n\nexport async function getLocalArtifactApp(\n options: LocalArtifactOptions,\n): Promise<LoadedLocalArtifactApp> {\n const loaded = await loadAgentNativeManifest({ ...options, optional: true });\n const workspaceRoot =\n loaded?.rootDir ?? path.resolve(options.cwd ?? process.cwd());\n const manifestApp = loaded?.manifest.apps?.[options.appId];\n const app = mergeAppConfig(manifestApp, options.defaults);\n const mode = await resolveAgentNativeDataMode({\n ...options,\n appId: options.appId,\n defaults: app,\n });\n\n const roots = (app.roots ?? []).map((root) => {\n const { safePath, absolutePath } = resolveInsideWorkspace(\n workspaceRoot,\n root.path,\n );\n const extensions = normalizeExtensions(root.extensions);\n return {\n name: root.name || rootNameFromPath(safePath),\n path: safePath,\n absolutePath,\n kind: root.kind,\n profile: root.profile ?? app.profile,\n extensions,\n hide: [...DEFAULT_HIDE_PATTERNS, ...asStringArray(root.hide)],\n include: asStringArray(root.include),\n };\n });\n\n return {\n appId: options.appId,\n mode,\n profile: app.profile,\n manifestPath: loaded?.path ?? null,\n workspaceRoot,\n roots,\n components: asStringArray(app.components),\n extensions: asStringArray(app.extensions),\n hide: [...DEFAULT_HIDE_PATTERNS, ...asStringArray(app.hide)],\n };\n}\n\nfunction matchesPatterns(filePath: string, patterns: string[]) {\n return patterns.some((pattern) =>\n minimatch(filePath, pattern, { dot: true, nocase: true }),\n );\n}\n\nfunction contentTypeForExtension(extension: string): string {\n if (extension === \".md\") return \"text/markdown\";\n if (extension === \".mdx\") return \"text/mdx\";\n if (extension === \".json\") return \"application/json\";\n if (extension === \".txt\") return \"text/plain\";\n return \"application/octet-stream\";\n}\n\nfunction hashContent(content: string): string {\n return crypto.createHash(\"sha256\").update(content).digest(\"hex\");\n}\n\nconst writeLocks = new Map<string, Promise<void>>();\n\nfunction noFollowOpenFlags(): number {\n return fsSync.constants.O_RDONLY | (fsSync.constants.O_NOFOLLOW ?? 0);\n}\n\nasync function withWriteLock<T>(\n absolutePath: string,\n fn: () => Promise<T>,\n): Promise<T> {\n const previous = writeLocks.get(absolutePath) ?? Promise.resolve();\n let release!: () => void;\n const next = new Promise<void>((resolve) => {\n release = resolve;\n });\n const current = previous.catch(() => {}).then(() => next);\n writeLocks.set(absolutePath, current);\n await previous.catch(() => {});\n try {\n return await fn();\n } finally {\n release();\n if (writeLocks.get(absolutePath) === current) {\n writeLocks.delete(absolutePath);\n }\n }\n}\n\nfunction assertNoSymlinkPathSync(\n root: LoadedLocalArtifactRoot,\n absolutePath: string,\n options: { allowMissingLeaf?: boolean } = {},\n) {\n const relative = path.relative(root.absolutePath, absolutePath);\n const segments = relative.split(path.sep).filter(Boolean);\n let current = root.absolutePath;\n const pathsToCheck = [\n current,\n ...segments.map((segment) => {\n current = path.join(current, segment);\n return current;\n }),\n ];\n\n for (let index = 0; index < pathsToCheck.length; index += 1) {\n const candidate = pathsToCheck[index]!;\n try {\n const stat = fsSync.lstatSync(candidate);\n if (stat.isSymbolicLink()) {\n throw new Error(`Path \"${candidate}\" must not traverse a symlink`);\n }\n if (index < pathsToCheck.length - 1 && !stat.isDirectory()) {\n throw new Error(`Path \"${candidate}\" is not a directory`);\n }\n } catch (error) {\n if (errorCode(error) === \"ENOENT\" && options.allowMissingLeaf) return;\n throw error;\n }\n }\n}\n\nfunction readTextFileWithoutSymlink(\n root: LoadedLocalArtifactRoot,\n absolutePath: string,\n): { content: string; stat: fsSync.Stats } {\n assertNoSymlinkPathSync(root, absolutePath);\n const fd = fsSync.openSync(absolutePath, noFollowOpenFlags());\n try {\n return {\n content: fsSync.readFileSync(fd, \"utf8\"),\n stat: fsSync.fstatSync(fd),\n };\n } finally {\n fsSync.closeSync(fd);\n }\n}\n\nasync function fileMetaForPath(\n root: LoadedLocalArtifactRoot,\n artifactPath: string,\n absolutePath: string,\n contentOverride?: string,\n statOverride?: fsSync.Stats,\n): Promise<LocalArtifactFileMeta> {\n const read =\n contentOverride === undefined\n ? readTextFileWithoutSymlink(root, absolutePath)\n : undefined;\n const content = contentOverride ?? read!.content;\n const stat = statOverride ?? read?.stat ?? (await fs.stat(absolutePath));\n const extension = extensionOf(artifactPath);\n return {\n path: artifactPath,\n absolutePath,\n rootName: root.name,\n rootPath: root.path,\n kind: root.kind,\n profile: root.profile,\n extension,\n contentType: contentTypeForExtension(extension),\n sizeBytes: Buffer.byteLength(content, \"utf8\"),\n hash: hashContent(content),\n createdAt: stat.birthtime.toISOString(),\n updatedAt: stat.mtime.toISOString(),\n mtimeMs: stat.mtimeMs,\n };\n}\n\nfunction rootAllowsPath(root: LoadedLocalArtifactRoot, artifactPath: string) {\n const extension = extensionOf(artifactPath);\n if (root.extensions.length > 0 && !root.extensions.includes(extension)) {\n return false;\n }\n if (matchesPatterns(artifactPath, root.hide)) return false;\n if (root.include.length === 0) return true;\n return matchesPatterns(artifactPath, root.include);\n}\n\nasync function walkRoot(\n root: LoadedLocalArtifactRoot,\n directory = root.absolutePath,\n): Promise<LocalArtifactFileMeta[]> {\n let entries: fsSync.Dirent[];\n try {\n entries = await fs.readdir(directory, { withFileTypes: true });\n } catch (error) {\n if (errorCode(error) === \"ENOENT\") {\n return [];\n }\n throw error;\n }\n\n const files: LocalArtifactFileMeta[] = [];\n for (const entry of entries) {\n const absolutePath = path.join(directory, entry.name);\n const relativeToRoot = normalizeSlash(\n path.relative(root.absolutePath, absolutePath),\n );\n const artifactPath = normalizeSlash(\n path.posix.join(root.path, relativeToRoot),\n );\n if (matchesPatterns(artifactPath, root.hide)) continue;\n\n if (entry.isDirectory()) {\n files.push(...(await walkRoot(root, absolutePath)));\n continue;\n }\n if (!entry.isFile() || !rootAllowsPath(root, artifactPath)) continue;\n files.push(await fileMetaForPath(root, artifactPath, absolutePath));\n }\n return files;\n}\n\nexport async function listLocalArtifactFiles(\n options: LocalArtifactOptions,\n): Promise<LocalArtifactFileMeta[]> {\n const app = await getLocalArtifactApp(options);\n if (app.mode !== \"local-files\") return [];\n\n const files = (await Promise.all(app.roots.map((root) => walkRoot(root))))\n .flat()\n .filter((file) => !matchesPatterns(file.path, app.hide));\n\n return files.sort((a, b) => a.path.localeCompare(b.path));\n}\n\nfunction rootForArtifactPath(\n app: LoadedLocalArtifactApp,\n artifactPath: string,\n): LoadedLocalArtifactRoot {\n const safePath = normalizeRelativePath(artifactPath);\n const root = app.roots.find(\n (candidate) =>\n safePath === candidate.path || safePath.startsWith(`${candidate.path}/`),\n );\n if (!root) {\n throw new Error(`Path \"${artifactPath}\" is not in a configured local root`);\n }\n if (!rootAllowsPath(root, safePath) || matchesPatterns(safePath, app.hide)) {\n throw new Error(`Path \"${artifactPath}\" is not allowed for this app`);\n }\n return root;\n}\n\nasync function resolveArtifactPath(\n app: LoadedLocalArtifactApp,\n artifactPath: string,\n): Promise<{\n root: LoadedLocalArtifactRoot;\n safePath: string;\n absolutePath: string;\n}> {\n const safePath = normalizeRelativePath(artifactPath);\n const root = rootForArtifactPath(app, safePath);\n const absolutePath = path.resolve(app.workspaceRoot, safePath);\n const relative = path.relative(root.absolutePath, absolutePath);\n if (\n relative.startsWith(\"..\") ||\n path.isAbsolute(relative) ||\n relative === \"\"\n ) {\n throw new Error(`Path \"${artifactPath}\" is outside its configured root`);\n }\n return { root, safePath, absolutePath };\n}\n\nasync function assertNoSymlinkPath(\n root: LoadedLocalArtifactRoot,\n absolutePath: string,\n options: { allowMissingLeaf?: boolean } = {},\n) {\n assertNoSymlinkPathSync(root, absolutePath, options);\n}\n\nexport async function readLocalArtifactFile(\n options: LocalArtifactOptions & { path: string },\n): Promise<LocalArtifactFile | null> {\n const app = await getLocalArtifactApp(options);\n if (app.mode !== \"local-files\") return null;\n const { root, safePath, absolutePath } = await resolveArtifactPath(\n app,\n options.path,\n );\n try {\n const { content, stat } = readTextFileWithoutSymlink(root, absolutePath);\n const meta = await fileMetaForPath(\n root,\n safePath,\n absolutePath,\n content,\n stat,\n );\n return { ...meta, content };\n } catch (error) {\n if (errorCode(error) === \"ENOENT\") {\n return null;\n }\n throw error;\n }\n}\n\nexport async function writeLocalArtifactFile(\n options: WriteLocalArtifactFileOptions & { path: string },\n): Promise<LocalArtifactFileMeta> {\n const app = await getLocalArtifactApp(options);\n if (app.mode !== \"local-files\") {\n throw new Error(\"Local file mode is not enabled\");\n }\n const { root, safePath, absolutePath } = await resolveArtifactPath(\n app,\n options.path,\n );\n return withWriteLock(absolutePath, async () => {\n const existing = await readLocalArtifactFile({\n ...options,\n path: safePath,\n });\n if (options.ifNotExists && existing) {\n throw new Error(`File \"${safePath}\" already exists`);\n }\n if (\n options.expectedHash &&\n (!existing || existing.hash !== options.expectedHash)\n ) {\n throw new Error(\n `File \"${safePath}\" changed on disk. Reload before saving again.`,\n );\n }\n\n await assertNoSymlinkPath(root, absolutePath, { allowMissingLeaf: true });\n await fs.mkdir(path.dirname(absolutePath), { recursive: true });\n const tempPath = path.join(\n path.dirname(absolutePath),\n `.${path.basename(absolutePath)}.${process.pid}.${crypto.randomUUID()}.tmp`,\n );\n await fs.writeFile(tempPath, options.content, \"utf8\");\n await fs.rename(tempPath, absolutePath);\n return fileMetaForPath(root, safePath, absolutePath, options.content);\n });\n}\n\nexport async function deleteLocalArtifactFile(\n options: LocalArtifactOptions & { path: string },\n): Promise<boolean> {\n const app = await getLocalArtifactApp(options);\n if (app.mode !== \"local-files\") {\n throw new Error(\"Local file mode is not enabled\");\n }\n const { root, absolutePath } = await resolveArtifactPath(app, options.path);\n try {\n await assertNoSymlinkPath(root, absolutePath);\n await fs.unlink(absolutePath);\n return true;\n } catch (error) {\n if (errorCode(error) === \"ENOENT\") {\n return false;\n }\n throw error;\n }\n}\n\nexport async function ensureLocalArtifactRoot(\n options: LocalArtifactOptions,\n): Promise<LoadedLocalArtifactRoot> {\n const app = await getLocalArtifactApp(options);\n if (app.mode !== \"local-files\") {\n throw new Error(\"Local file mode is not enabled\");\n }\n const root = app.roots[0];\n if (!root) {\n throw new Error(`No local roots configured for app \"${options.appId}\"`);\n }\n await fs.mkdir(root.absolutePath, { recursive: true });\n return root;\n}\n\nexport function createTempWorkspaceDir(prefix = \"agent-native-local-\"): string {\n return fsSync.mkdtempSync(path.join(os.tmpdir(), prefix));\n}\n\nfunction localWorkspaceResourcesEnabled(\n loaded: LoadedAgentNativeManifest | null,\n): boolean {\n const explicitMode = envMode();\n if (explicitMode) {\n assertLocalFilesRuntimeAllowed(explicitMode);\n return explicitMode === \"local-files\";\n }\n const manifest = loaded?.manifest;\n const mode = manifest?.mode;\n if (mode) {\n assertLocalFilesRuntimeAllowed(mode);\n if (mode === \"local-files\") return true;\n }\n return false;\n}\n\nasync function resolveLocalWorkspaceRoot(\n options: LocalWorkspaceResourceOptions = {},\n): Promise<string | null> {\n const loaded = await loadAgentNativeManifest({ ...options, optional: true });\n if (localWorkspaceResourcesEnabled(loaded)) {\n return loaded?.rootDir ?? path.resolve(options.cwd ?? process.cwd());\n }\n return null;\n}\n\nexport async function isLocalWorkspaceResourcesEnabled(\n options: LocalWorkspaceResourceOptions = {},\n): Promise<boolean> {\n return !!(await resolveLocalWorkspaceRoot(options));\n}\n\nexport function localWorkspaceResourceId(resourcePath: string): string {\n const normalized = normalizeSlash(resourcePath).replace(/^\\/+/, \"\");\n return `${LOCAL_WORKSPACE_RESOURCE_ID_PREFIX}${Buffer.from(\n normalized,\n \"utf8\",\n ).toString(\"base64url\")}`;\n}\n\nexport function isLocalWorkspaceResourceId(id: string): boolean {\n return id.startsWith(LOCAL_WORKSPACE_RESOURCE_ID_PREFIX);\n}\n\nexport function localWorkspaceResourcePathFromId(id: string): string | null {\n if (!isLocalWorkspaceResourceId(id)) return null;\n const encoded = id.slice(LOCAL_WORKSPACE_RESOURCE_ID_PREFIX.length);\n try {\n const decoded = Buffer.from(encoded, \"base64url\").toString(\"utf8\");\n return normalizeLocalWorkspaceResourcePath(decoded);\n } catch {\n return null;\n }\n}\n\nfunction mimeTypeForLocalWorkspaceResource(resourcePath: string): string {\n const extension = extensionOf(resourcePath);\n if (extension === \".md\") return \"text/markdown\";\n if (extension === \".mdx\") return \"text/mdx\";\n if (extension === \".json\") return \"application/json\";\n if (extension === \".yaml\" || extension === \".yml\") return \"application/yaml\";\n if (extension === \".toml\") return \"text/toml\";\n if (extension === \".ts\" || extension === \".tsx\") return \"text/typescript\";\n if (extension === \".js\" || extension === \".jsx\") return \"text/javascript\";\n if (extension === \".html\") return \"text/html\";\n if (extension === \".css\") return \"text/css\";\n if (extension === \".xml\") return \"application/xml\";\n if (extension === \".csv\") return \"text/csv\";\n if (extension === \".sql\") return \"text/sql\";\n if (extension === \".sh\") return \"text/x-shellscript\";\n if (extension === \".py\") return \"text/x-python\";\n return \"text/plain\";\n}\n\nfunction isSupportedLocalWorkspaceTextFile(resourcePath: string): boolean {\n return LOCAL_WORKSPACE_TEXT_EXTENSIONS.has(extensionOf(resourcePath));\n}\n\nexport function normalizeLocalWorkspaceResourcePath(resourcePath: string) {\n const safePath = normalizeRelativePath(\n normalizeSlash(resourcePath).replace(/^\\/+/, \"\"),\n \"resource path\",\n );\n if (LOCAL_WORKSPACE_CONTROL_FILES.has(safePath)) return safePath;\n if (safePath.startsWith(\".agents/skills/\")) {\n const relativeSkillPath = normalizeRelativePath(\n safePath.slice(\".agents/skills/\".length),\n \"resource path\",\n );\n return normalizeSlash(path.posix.join(\"skills\", relativeSkillPath));\n }\n if (safePath.startsWith(\".agent/skills/\")) {\n const relativeSkillPath = normalizeRelativePath(\n safePath.slice(\".agent/skills/\".length),\n \"resource path\",\n );\n return normalizeSlash(path.posix.join(\"skills\", relativeSkillPath));\n }\n if (safePath.startsWith(\"skills/\")) return safePath;\n throw new Error(\n `Local workspace resource \"${resourcePath}\" must be AGENTS.md, agent-native.json, mcp.config.json, .mcp.json, or under skills/.`,\n );\n}\n\nexport function canUseLocalWorkspaceResourcePath(\n resourcePath: string,\n): boolean {\n try {\n normalizeLocalWorkspaceResourcePath(resourcePath);\n return true;\n } catch {\n return false;\n }\n}\n\nfunction localWorkspaceResourceAbsolutePath(\n workspaceRoot: string,\n resourcePath: string,\n options: { preferExisting?: boolean } = {},\n): { resourcePath: string; absolutePath: string } {\n const normalized = normalizeLocalWorkspaceResourcePath(resourcePath);\n const safePath = normalizeRelativePath(\n normalizeSlash(resourcePath).replace(/^\\/+/, \"\"),\n \"resource path\",\n );\n let relativePath = normalized;\n if (\n safePath.startsWith(\".agents/skills/\") ||\n safePath.startsWith(\".agent/skills/\")\n ) {\n relativePath = safePath;\n } else if (normalized.startsWith(\"skills/\")) {\n const skillPath = normalized.slice(\"skills/\".length);\n const candidates = LOCAL_WORKSPACE_SKILL_ROOTS.map((root) =>\n normalizeSlash(path.posix.join(root, skillPath)),\n );\n relativePath = candidates[0]!;\n if (options.preferExisting) {\n relativePath =\n candidates.find((candidate) =>\n fsSync.existsSync(path.resolve(workspaceRoot, candidate)),\n ) ?? relativePath;\n }\n }\n const { absolutePath } = resolveInsideWorkspace(workspaceRoot, relativePath);\n return { resourcePath: normalized, absolutePath };\n}\n\nfunction localWorkspaceResourceDeletePaths(\n workspaceRoot: string,\n resourcePath: string,\n): string[] {\n const normalized = normalizeLocalWorkspaceResourcePath(resourcePath);\n const safePath = normalizeRelativePath(\n normalizeSlash(resourcePath).replace(/^\\/+/, \"\"),\n \"resource path\",\n );\n if (\n safePath.startsWith(\".agents/skills/\") ||\n safePath.startsWith(\".agent/skills/\") ||\n !normalized.startsWith(\"skills/\")\n ) {\n const { absolutePath } = localWorkspaceResourceAbsolutePath(\n workspaceRoot,\n resourcePath,\n );\n return [absolutePath];\n }\n\n const skillPath = normalized.slice(\"skills/\".length);\n return LOCAL_WORKSPACE_SKILL_ROOTS.map((root) => {\n const relativePath = normalizeSlash(path.posix.join(root, skillPath));\n return resolveInsideWorkspace(workspaceRoot, relativePath).absolutePath;\n });\n}\n\nfunction assertNoSymlinkAbsolutePathSync(\n workspaceRoot: string,\n absolutePath: string,\n options: { allowMissingLeaf?: boolean } = {},\n) {\n const relative = path.relative(workspaceRoot, absolutePath);\n const segments = relative.split(path.sep).filter(Boolean);\n let current = workspaceRoot;\n const pathsToCheck = [\n current,\n ...segments.map((segment) => {\n current = path.join(current, segment);\n return current;\n }),\n ];\n\n for (let index = 0; index < pathsToCheck.length; index += 1) {\n const candidate = pathsToCheck[index]!;\n try {\n const stat = fsSync.lstatSync(candidate);\n if (stat.isSymbolicLink()) {\n throw new Error(`Path \"${candidate}\" must not traverse a symlink`);\n }\n if (index < pathsToCheck.length - 1 && !stat.isDirectory()) {\n throw new Error(`Path \"${candidate}\" is not a directory`);\n }\n } catch (error) {\n if (errorCode(error) === \"ENOENT\" && options.allowMissingLeaf) return;\n throw error;\n }\n }\n}\n\nfunction readLocalWorkspaceTextFile(\n workspaceRoot: string,\n absolutePath: string,\n): { content: string; stat: fsSync.Stats } {\n assertNoSymlinkAbsolutePathSync(workspaceRoot, absolutePath);\n const fd = fsSync.openSync(absolutePath, noFollowOpenFlags());\n try {\n const stat = fsSync.fstatSync(fd);\n if (!stat.isFile()) {\n throw new Error(`Path \"${absolutePath}\" is not a file`);\n }\n if (stat.size > LOCAL_WORKSPACE_RESOURCE_MAX_BYTES) {\n throw new Error(\n `Local workspace resource \"${absolutePath}\" is too large to load`,\n );\n }\n return {\n content: fsSync.readFileSync(fd, \"utf8\"),\n stat,\n };\n } finally {\n fsSync.closeSync(fd);\n }\n}\n\nfunction localWorkspaceResourceMeta(\n resourcePath: string,\n absolutePath: string,\n content: string,\n stat: fsSync.Stats,\n): LocalWorkspaceResourceMeta {\n return {\n id: localWorkspaceResourceId(resourcePath),\n path: resourcePath,\n absolutePath,\n mimeType: mimeTypeForLocalWorkspaceResource(resourcePath),\n sizeBytes: Buffer.byteLength(content, \"utf8\"),\n hash: hashContent(content),\n createdAt: stat.birthtime.toISOString(),\n updatedAt: stat.mtime.toISOString(),\n mtimeMs: stat.mtimeMs,\n };\n}\n\nasync function maybeLocalWorkspaceResourceMeta(\n workspaceRoot: string,\n resourcePath: string,\n absolutePath: string,\n): Promise<LocalWorkspaceResourceMeta | null> {\n if (!isSupportedLocalWorkspaceTextFile(resourcePath)) return null;\n try {\n const { content, stat } = readLocalWorkspaceTextFile(\n workspaceRoot,\n absolutePath,\n );\n return localWorkspaceResourceMeta(\n resourcePath,\n absolutePath,\n content,\n stat,\n );\n } catch (error) {\n if (errorCode(error) === \"ENOENT\") return null;\n throw error;\n }\n}\n\nasync function walkLocalWorkspaceSkillRoot(\n workspaceRoot: string,\n skillRoot: string,\n seenPaths: Set<string>,\n): Promise<LocalWorkspaceResourceMeta[]> {\n const absoluteRoot = path.join(workspaceRoot, skillRoot);\n try {\n assertNoSymlinkAbsolutePathSync(workspaceRoot, absoluteRoot);\n } catch (error) {\n if (errorCode(error) === \"ENOENT\") return [];\n throw error;\n }\n\n const files: LocalWorkspaceResourceMeta[] = [];\n async function walk(directory: string): Promise<void> {\n let entries: fsSync.Dirent[];\n try {\n entries = await fs.readdir(directory, { withFileTypes: true });\n } catch (error) {\n if (errorCode(error) === \"ENOENT\") return;\n throw error;\n }\n\n for (const entry of entries) {\n if (entry.name === \".DS_Store\") continue;\n const absolutePath = path.join(directory, entry.name);\n const relativeToSkillRoot = normalizeSlash(\n path.relative(absoluteRoot, absolutePath),\n );\n const resourcePath = normalizeSlash(\n path.posix.join(\"skills\", relativeToSkillRoot),\n );\n if (seenPaths.has(resourcePath)) continue;\n if (entry.isDirectory()) {\n await walk(absolutePath);\n continue;\n }\n if (!entry.isFile()) continue;\n const meta = await maybeLocalWorkspaceResourceMeta(\n workspaceRoot,\n resourcePath,\n absolutePath,\n );\n if (!meta) continue;\n seenPaths.add(resourcePath);\n files.push(meta);\n }\n }\n\n await walk(absoluteRoot);\n return files;\n}\n\nexport async function listLocalWorkspaceResources(\n options: LocalWorkspaceResourceOptions = {},\n): Promise<LocalWorkspaceResourceMeta[]> {\n const workspaceRoot = await resolveLocalWorkspaceRoot(options);\n if (!workspaceRoot) return [];\n\n const seenPaths = new Set<string>();\n const resources: LocalWorkspaceResourceMeta[] = [];\n for (const resourcePath of LOCAL_WORKSPACE_CONTROL_FILES) {\n const { absolutePath } = localWorkspaceResourceAbsolutePath(\n workspaceRoot,\n resourcePath,\n );\n const meta = await maybeLocalWorkspaceResourceMeta(\n workspaceRoot,\n resourcePath,\n absolutePath,\n );\n if (!meta) continue;\n seenPaths.add(resourcePath);\n resources.push(meta);\n }\n\n for (const skillRoot of LOCAL_WORKSPACE_SKILL_ROOTS) {\n resources.push(\n ...(await walkLocalWorkspaceSkillRoot(\n workspaceRoot,\n skillRoot,\n seenPaths,\n )),\n );\n }\n\n return resources.sort((a, b) => a.path.localeCompare(b.path));\n}\n\nexport async function readLocalWorkspaceResource(\n options: LocalWorkspaceResourceOptions & { path: string },\n): Promise<LocalWorkspaceResourceFile | null> {\n const workspaceRoot = await resolveLocalWorkspaceRoot(options);\n if (!workspaceRoot) return null;\n const { resourcePath, absolutePath } = localWorkspaceResourceAbsolutePath(\n workspaceRoot,\n options.path,\n { preferExisting: true },\n );\n if (!isSupportedLocalWorkspaceTextFile(resourcePath)) return null;\n try {\n const { content, stat } = readLocalWorkspaceTextFile(\n workspaceRoot,\n absolutePath,\n );\n return {\n ...localWorkspaceResourceMeta(resourcePath, absolutePath, content, stat),\n content,\n };\n } catch (error) {\n if (errorCode(error) === \"ENOENT\") return null;\n throw error;\n }\n}\n\nexport async function writeLocalWorkspaceResource(\n options: WriteLocalWorkspaceResourceOptions,\n): Promise<LocalWorkspaceResourceMeta> {\n const workspaceRoot = await resolveLocalWorkspaceRoot(options);\n if (!workspaceRoot) {\n throw new Error(\"Local file mode is not enabled\");\n }\n const { resourcePath, absolutePath } = localWorkspaceResourceAbsolutePath(\n workspaceRoot,\n options.path,\n { preferExisting: true },\n );\n if (!isSupportedLocalWorkspaceTextFile(resourcePath)) {\n throw new Error(`Local workspace resource \"${resourcePath}\" is not text`);\n }\n return withWriteLock(absolutePath, async () => {\n const existing = await readLocalWorkspaceResource({\n ...options,\n path: resourcePath,\n });\n if (options.ifNotExists && existing) {\n throw new Error(`File \"${resourcePath}\" already exists`);\n }\n if (\n options.expectedHash &&\n (!existing || existing.hash !== options.expectedHash)\n ) {\n throw new Error(\n `File \"${resourcePath}\" changed on disk. Reload before saving again.`,\n );\n }\n\n assertNoSymlinkAbsolutePathSync(workspaceRoot, absolutePath, {\n allowMissingLeaf: true,\n });\n await fs.mkdir(path.dirname(absolutePath), { recursive: true });\n const tempPath = path.join(\n path.dirname(absolutePath),\n `.${path.basename(absolutePath)}.${process.pid}.${crypto.randomUUID()}.tmp`,\n );\n await fs.writeFile(tempPath, options.content, \"utf8\");\n await fs.rename(tempPath, absolutePath);\n const stat = await fs.stat(absolutePath);\n return localWorkspaceResourceMeta(\n resourcePath,\n absolutePath,\n options.content,\n stat,\n );\n });\n}\n\nexport async function deleteLocalWorkspaceResource(\n options: LocalWorkspaceResourceOptions & { path: string },\n): Promise<boolean> {\n const workspaceRoot = await resolveLocalWorkspaceRoot(options);\n if (!workspaceRoot) {\n throw new Error(\"Local file mode is not enabled\");\n }\n const absolutePaths = localWorkspaceResourceDeletePaths(\n workspaceRoot,\n options.path,\n );\n let deleted = false;\n for (const absolutePath of absolutePaths) {\n try {\n assertNoSymlinkAbsolutePathSync(workspaceRoot, absolutePath);\n await fs.unlink(absolutePath);\n deleted = true;\n } catch (error) {\n if (errorCode(error) === \"ENOENT\") continue;\n throw error;\n }\n }\n return deleted;\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,CAAC,gCAAgC,CAAC,CAAC;IACpD,CAAC;IACD,MAAM,aAAa,GAAG,iCAAiC,CACrD,aAAa,EACb,OAAO,CAAC,IAAI,CACb,CAAC;IACF,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE,CAAC;QACzC,IAAI,CAAC;YACH,+BAA+B,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;YAC7D,MAAM,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;YAC9B,OAAO,GAAG,IAAI,CAAC;QACjB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,SAAS,CAAC,KAAK,CAAC,KAAK,QAAQ;gBAAE,SAAS;YAC5C,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["import crypto from \"node:crypto\";\nimport fsSync from \"node:fs\";\nimport fs from \"node:fs/promises\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\nimport { minimatch } from \"minimatch\";\n\nexport type AgentNativeDataMode = \"database\" | \"local-files\";\n\nexport interface AgentNativeManifestRoot {\n name?: string;\n path: string;\n kind?: string;\n profile?: string;\n extensions?: string[];\n include?: string[];\n hide?: string[];\n}\n\nexport interface AgentNativeManifestApp {\n mode?: AgentNativeDataMode;\n profile?: string;\n roots?: AgentNativeManifestRoot[];\n components?: string | string[];\n extensions?: string | string[];\n hide?: string[];\n}\n\nexport interface AgentNativeManifest {\n version?: number;\n mode?: AgentNativeDataMode;\n apps?: Record<string, AgentNativeManifestApp>;\n}\n\nexport interface LoadedAgentNativeManifest {\n path: string;\n rootDir: string;\n manifest: AgentNativeManifest;\n}\n\nexport interface LocalArtifactAppDefaults {\n mode?: AgentNativeDataMode;\n profile?: string;\n roots: AgentNativeManifestRoot[];\n hide?: string[];\n components?: string | string[];\n extensions?: string | string[];\n}\n\nexport interface LoadAgentNativeManifestOptions {\n cwd?: string;\n manifestPath?: string;\n optional?: boolean;\n}\n\nexport interface ResolveAgentNativeModeOptions extends LoadAgentNativeManifestOptions {\n appId?: string;\n defaults?: Pick<LocalArtifactAppDefaults, \"mode\">;\n}\n\nexport interface LocalArtifactOptions extends LoadAgentNativeManifestOptions {\n appId: string;\n defaults?: LocalArtifactAppDefaults;\n}\n\nexport interface LoadedLocalArtifactRoot {\n name: string;\n path: string;\n absolutePath: string;\n kind?: string;\n profile?: string;\n extensions: string[];\n hide: string[];\n include: string[];\n}\n\nexport interface LoadedLocalArtifactApp {\n appId: string;\n mode: AgentNativeDataMode;\n profile?: string;\n manifestPath: string | null;\n workspaceRoot: string;\n roots: LoadedLocalArtifactRoot[];\n components: string[];\n extensions: string[];\n hide: string[];\n}\n\nexport interface LocalArtifactFileMeta {\n path: string;\n absolutePath: string;\n rootName: string;\n rootPath: string;\n kind?: string;\n profile?: string;\n extension: string;\n contentType: string;\n sizeBytes: number;\n hash: string;\n createdAt: string;\n updatedAt: string;\n mtimeMs: number;\n}\n\nexport interface LocalArtifactFile extends LocalArtifactFileMeta {\n content: string;\n}\n\nexport interface WriteLocalArtifactFileOptions extends LocalArtifactOptions {\n content: string;\n expectedHash?: string | null;\n ifNotExists?: boolean;\n}\n\nexport interface LocalWorkspaceResourceMeta {\n id: string;\n path: string;\n absolutePath: string;\n mimeType: string;\n sizeBytes: number;\n hash: string;\n createdAt: string;\n updatedAt: string;\n mtimeMs: number;\n}\n\nexport interface LocalWorkspaceResourceFile extends LocalWorkspaceResourceMeta {\n content: string;\n}\n\nexport interface LocalWorkspaceResourceOptions extends LoadAgentNativeManifestOptions {}\n\nexport interface WriteLocalWorkspaceResourceOptions extends LocalWorkspaceResourceOptions {\n path: string;\n content: string;\n expectedHash?: string | null;\n ifNotExists?: boolean;\n}\n\nconst MANIFEST_FILE = \"agent-native.json\";\nconst ENV_MODE_NAMES = [\"AGENT_NATIVE_MODE\", \"AGENT_NATIVE_DATA_MODE\"];\nconst ENV_MANIFEST_NAMES = [\n \"AGENT_NATIVE_MANIFEST\",\n \"AGENT_NATIVE_MANIFEST_PATH\",\n];\nconst ALLOW_PRODUCTION_LOCAL_FILES_ENV =\n \"AGENT_NATIVE_ALLOW_LOCAL_FILES_IN_PRODUCTION\";\nconst DEFAULT_HIDE_PATTERNS = [\n \"**/.git/**\",\n \"**/.agent-native/**\",\n \"**/.next/**\",\n \"**/.nuxt/**\",\n \"**/node_modules/**\",\n \"**/dist/**\",\n \"**/build/**\",\n];\nexport const LOCAL_WORKSPACE_RESOURCE_ID_PREFIX = \"local-workspace-resource:\";\nconst LOCAL_WORKSPACE_RESOURCE_MAX_BYTES = 2 * 1024 * 1024;\nconst LOCAL_WORKSPACE_CONTROL_FILES = new Set([\n \"AGENTS.md\",\n \"agent-native.json\",\n \"mcp.config.json\",\n \".mcp.json\",\n]);\nconst LOCAL_WORKSPACE_SKILL_ROOTS = [\".agents/skills\", \".agent/skills\"];\nconst LOCAL_WORKSPACE_TEXT_EXTENSIONS = new Set([\n \".css\",\n \".csv\",\n \".html\",\n \".js\",\n \".json\",\n \".jsx\",\n \".md\",\n \".mdx\",\n \".py\",\n \".sh\",\n \".sql\",\n \".toml\",\n \".ts\",\n \".tsx\",\n \".txt\",\n \".xml\",\n \".yaml\",\n \".yml\",\n]);\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return !!value && typeof value === \"object\" && !Array.isArray(value);\n}\n\nfunction errorCode(error: unknown): string | undefined {\n return isRecord(error) && typeof error.code === \"string\"\n ? error.code\n : undefined;\n}\n\nfunction asStringArray(value: unknown): string[] {\n if (typeof value === \"string\" && value.trim()) return [value.trim()];\n if (!Array.isArray(value)) return [];\n return value.filter((item): item is string => typeof item === \"string\");\n}\n\nfunction normalizeMode(value: unknown): AgentNativeDataMode | undefined {\n if (value === \"database\" || value === \"local-files\") return value;\n return undefined;\n}\n\nfunction normalizeProfile(value: unknown): string | undefined {\n if (typeof value !== \"string\") return undefined;\n const trimmed = value.trim();\n return trimmed || undefined;\n}\n\nfunction normalizeSlash(filePath: string): string {\n return filePath.replace(/\\\\/g, \"/\");\n}\n\nfunction normalizeRelativePath(filePath: string, label = \"path\"): string {\n if (!filePath || typeof filePath !== \"string\") {\n throw new Error(`${label} is required`);\n }\n if (filePath.includes(\"\\0\")) {\n throw new Error(`${label} must not contain null bytes`);\n }\n if (path.isAbsolute(filePath)) {\n throw new Error(`${label} must be relative`);\n }\n const normalized = normalizeSlash(\n path.posix.normalize(normalizeSlash(filePath)),\n );\n if (\n !normalized ||\n normalized === \".\" ||\n normalized.startsWith(\"../\") ||\n normalized === \"..\" ||\n normalized.split(\"/\").some((part) => !part || part === \".\" || part === \"..\")\n ) {\n throw new Error(`${label} must be a safe relative path`);\n }\n return normalized;\n}\n\nfunction extensionOf(filePath: string): string {\n return path.posix.extname(filePath).toLowerCase();\n}\n\nfunction normalizeExtensions(value: unknown): string[] {\n const extensions = asStringArray(value)\n .map((ext) => ext.trim().toLowerCase())\n .filter(Boolean)\n .map((ext) => (ext.startsWith(\".\") ? ext : `.${ext}`));\n return [...new Set(extensions)];\n}\n\nfunction rootNameFromPath(rootPath: string): string {\n return (\n rootPath\n .split(\"/\")\n .filter(Boolean)\n .at(-1)\n ?.replace(/[-_]+/g, \" \")\n .replace(/\\b\\w/g, (char) => char.toUpperCase()) || rootPath\n );\n}\n\nfunction normalizeManifestRoot(value: unknown): AgentNativeManifestRoot | null {\n if (typeof value === \"string\") return { path: value };\n if (!isRecord(value) || typeof value.path !== \"string\") return null;\n return {\n name: typeof value.name === \"string\" ? value.name : undefined,\n path: value.path,\n kind: typeof value.kind === \"string\" ? value.kind : undefined,\n profile: normalizeProfile(value.profile),\n extensions: normalizeExtensions(value.extensions),\n include: asStringArray(value.include),\n hide: asStringArray(value.hide),\n };\n}\n\nfunction normalizeManifestApp(value: unknown): AgentNativeManifestApp {\n if (Array.isArray(value)) {\n return {\n roots: value\n .map(normalizeManifestRoot)\n .filter((root): root is AgentNativeManifestRoot => !!root),\n };\n }\n if (!isRecord(value)) return {};\n const roots = Array.isArray(value.roots)\n ? value.roots\n .map(normalizeManifestRoot)\n .filter((root): root is AgentNativeManifestRoot => !!root)\n : [];\n return {\n mode: normalizeMode(value.mode),\n profile: normalizeProfile(value.profile),\n roots,\n components:\n typeof value.components === \"string\" || Array.isArray(value.components)\n ? asStringArray(value.components)\n : undefined,\n extensions:\n typeof value.extensions === \"string\" || Array.isArray(value.extensions)\n ? asStringArray(value.extensions)\n : undefined,\n hide: asStringArray(value.hide),\n };\n}\n\nfunction normalizeManifest(value: unknown): AgentNativeManifest {\n const record = isRecord(value) ? value : {};\n const appsRecord = isRecord(record.apps) ? record.apps : {};\n const apps: Record<string, AgentNativeManifestApp> = {};\n for (const [appId, appValue] of Object.entries(appsRecord)) {\n apps[appId] = normalizeManifestApp(appValue);\n }\n return {\n version:\n typeof record.version === \"number\" && Number.isFinite(record.version)\n ? record.version\n : undefined,\n mode: normalizeMode(record.mode),\n apps,\n };\n}\n\nfunction firstEnvValue(names: string[]): string | undefined {\n for (const name of names) {\n const value = process.env[name]?.trim();\n if (value) return value;\n }\n return undefined;\n}\n\nfunction envMode(): AgentNativeDataMode | undefined {\n return normalizeMode(firstEnvValue(ENV_MODE_NAMES));\n}\n\nfunction envFlag(name: string): boolean {\n const value = process.env[name]?.trim().toLowerCase();\n return value === \"1\" || value === \"true\" || value === \"yes\" || value === \"on\";\n}\n\nfunction assertLocalFilesRuntimeAllowed(mode: AgentNativeDataMode) {\n if (mode !== \"local-files\") return;\n if (process.env.NODE_ENV !== \"production\") return;\n if (envFlag(ALLOW_PRODUCTION_LOCAL_FILES_ENV)) return;\n throw new Error(\n `Local file mode is only enabled for local development runtimes. Set ${ALLOW_PRODUCTION_LOCAL_FILES_ENV}=true only for a trusted single-tenant local file bridge.`,\n );\n}\n\nfunction envManifestPath(): string | undefined {\n return firstEnvValue(ENV_MANIFEST_NAMES);\n}\n\nexport function findAgentNativeManifest(\n startDir = process.cwd(),\n): string | null {\n let current = path.resolve(startDir);\n for (;;) {\n const candidate = path.join(current, MANIFEST_FILE);\n if (fsSync.existsSync(candidate)) return candidate;\n const parent = path.dirname(current);\n if (parent === current) return null;\n current = parent;\n }\n}\n\nexport async function loadAgentNativeManifest(\n options: LoadAgentNativeManifestOptions = {},\n): Promise<LoadedAgentNativeManifest | null> {\n const manifestPath =\n options.manifestPath ??\n envManifestPath() ??\n findAgentNativeManifest(options.cwd ?? process.cwd());\n\n if (!manifestPath) {\n if (options.optional) return null;\n throw new Error(`Could not find ${MANIFEST_FILE}`);\n }\n\n const resolvedPath = path.resolve(options.cwd ?? process.cwd(), manifestPath);\n try {\n const raw = await fs.readFile(resolvedPath, \"utf8\");\n const parsed = JSON.parse(raw) as unknown;\n return {\n path: resolvedPath,\n rootDir: path.dirname(resolvedPath),\n manifest: normalizeManifest(parsed),\n };\n } catch (error) {\n if (options.optional && errorCode(error) === \"ENOENT\") {\n return null;\n }\n throw error;\n }\n}\n\nexport async function resolveAgentNativeDataMode(\n options: ResolveAgentNativeModeOptions = {},\n): Promise<AgentNativeDataMode> {\n const explicitMode = envMode();\n if (explicitMode) {\n assertLocalFilesRuntimeAllowed(explicitMode);\n return explicitMode;\n }\n\n const loaded = await loadAgentNativeManifest({ ...options, optional: true });\n const appMode = options.appId\n ? loaded?.manifest.apps?.[options.appId]?.mode\n : undefined;\n const mode =\n appMode ?? loaded?.manifest.mode ?? options.defaults?.mode ?? \"database\";\n assertLocalFilesRuntimeAllowed(mode);\n return mode;\n}\n\nexport async function isAgentNativeLocalFileMode(\n options: ResolveAgentNativeModeOptions = {},\n): Promise<boolean> {\n return (await resolveAgentNativeDataMode(options)) === \"local-files\";\n}\n\nfunction mergeAppConfig(\n manifestApp: AgentNativeManifestApp | undefined,\n defaults: LocalArtifactAppDefaults | undefined,\n): AgentNativeManifestApp {\n return {\n mode: manifestApp?.mode ?? defaults?.mode,\n profile: manifestApp?.profile ?? defaults?.profile,\n roots:\n manifestApp?.roots !== undefined\n ? manifestApp.roots\n : (defaults?.roots ?? []),\n components: manifestApp?.components ?? defaults?.components,\n extensions: manifestApp?.extensions ?? defaults?.extensions,\n hide: [...(defaults?.hide ?? []), ...(manifestApp?.hide ?? [])],\n };\n}\n\nfunction resolveInsideWorkspace(workspaceRoot: string, relativePath: string) {\n const safePath = normalizeRelativePath(relativePath);\n const absolutePath = path.resolve(workspaceRoot, safePath);\n const relative = path.relative(workspaceRoot, absolutePath);\n if (\n relative === \"\" ||\n relative.startsWith(\"..\") ||\n path.isAbsolute(relative)\n ) {\n throw new Error(`Path \"${relativePath}\" is outside the workspace`);\n }\n return { safePath, absolutePath };\n}\n\nexport async function getLocalArtifactApp(\n options: LocalArtifactOptions,\n): Promise<LoadedLocalArtifactApp> {\n const loaded = await loadAgentNativeManifest({ ...options, optional: true });\n const workspaceRoot =\n loaded?.rootDir ?? path.resolve(options.cwd ?? process.cwd());\n const manifestApp = loaded?.manifest.apps?.[options.appId];\n const app = mergeAppConfig(manifestApp, options.defaults);\n const mode = await resolveAgentNativeDataMode({\n ...options,\n appId: options.appId,\n defaults: app,\n });\n\n const roots = (app.roots ?? []).map((root) => {\n const { safePath, absolutePath } = resolveInsideWorkspace(\n workspaceRoot,\n root.path,\n );\n const extensions = normalizeExtensions(root.extensions);\n return {\n name: root.name || rootNameFromPath(safePath),\n path: safePath,\n absolutePath,\n kind: root.kind,\n profile: root.profile ?? app.profile,\n extensions,\n hide: [...DEFAULT_HIDE_PATTERNS, ...asStringArray(root.hide)],\n include: asStringArray(root.include),\n };\n });\n\n return {\n appId: options.appId,\n mode,\n profile: app.profile,\n manifestPath: loaded?.path ?? null,\n workspaceRoot,\n roots,\n components: asStringArray(app.components),\n extensions: asStringArray(app.extensions),\n hide: [...DEFAULT_HIDE_PATTERNS, ...asStringArray(app.hide)],\n };\n}\n\nfunction matchesPatterns(filePath: string, patterns: string[]) {\n return patterns.some((pattern) =>\n minimatch(filePath, pattern, { dot: true, nocase: true }),\n );\n}\n\nfunction contentTypeForExtension(extension: string): string {\n if (extension === \".md\") return \"text/markdown\";\n if (extension === \".mdx\") return \"text/mdx\";\n if (extension === \".json\") return \"application/json\";\n if (extension === \".txt\") return \"text/plain\";\n return \"application/octet-stream\";\n}\n\nfunction hashContent(content: string): string {\n return crypto.createHash(\"sha256\").update(content).digest(\"hex\");\n}\n\nconst writeLocks = new Map<string, Promise<void>>();\n\nfunction noFollowOpenFlags(): number {\n return fsSync.constants.O_RDONLY | (fsSync.constants.O_NOFOLLOW ?? 0);\n}\n\nasync function withWriteLock<T>(\n absolutePath: string,\n fn: () => Promise<T>,\n): Promise<T> {\n const previous = writeLocks.get(absolutePath) ?? Promise.resolve();\n let release!: () => void;\n const next = new Promise<void>((resolve) => {\n release = resolve;\n });\n const current = previous.catch(() => {}).then(() => next);\n writeLocks.set(absolutePath, current);\n await previous.catch(() => {});\n try {\n return await fn();\n } finally {\n release();\n if (writeLocks.get(absolutePath) === current) {\n writeLocks.delete(absolutePath);\n }\n }\n}\n\nfunction assertNoSymlinkPathSync(\n root: LoadedLocalArtifactRoot,\n absolutePath: string,\n options: { allowMissingLeaf?: boolean } = {},\n) {\n const relative = path.relative(root.absolutePath, absolutePath);\n const segments = relative.split(path.sep).filter(Boolean);\n let current = root.absolutePath;\n const pathsToCheck = [\n current,\n ...segments.map((segment) => {\n current = path.join(current, segment);\n return current;\n }),\n ];\n\n for (let index = 0; index < pathsToCheck.length; index += 1) {\n const candidate = pathsToCheck[index]!;\n try {\n const stat = fsSync.lstatSync(candidate);\n if (stat.isSymbolicLink()) {\n throw new Error(`Path \"${candidate}\" must not traverse a symlink`);\n }\n if (index < pathsToCheck.length - 1 && !stat.isDirectory()) {\n throw new Error(`Path \"${candidate}\" is not a directory`);\n }\n } catch (error) {\n if (errorCode(error) === \"ENOENT\" && options.allowMissingLeaf) return;\n throw error;\n }\n }\n}\n\nfunction readTextFileWithoutSymlink(\n root: LoadedLocalArtifactRoot,\n absolutePath: string,\n): { content: string; stat: fsSync.Stats } {\n assertNoSymlinkPathSync(root, absolutePath);\n const fd = fsSync.openSync(absolutePath, noFollowOpenFlags());\n try {\n return {\n content: fsSync.readFileSync(fd, \"utf8\"),\n stat: fsSync.fstatSync(fd),\n };\n } finally {\n fsSync.closeSync(fd);\n }\n}\n\nasync function fileMetaForPath(\n root: LoadedLocalArtifactRoot,\n artifactPath: string,\n absolutePath: string,\n contentOverride?: string,\n statOverride?: fsSync.Stats,\n): Promise<LocalArtifactFileMeta> {\n const read =\n contentOverride === undefined\n ? readTextFileWithoutSymlink(root, absolutePath)\n : undefined;\n const content = contentOverride ?? read!.content;\n const stat = statOverride ?? read?.stat ?? (await fs.stat(absolutePath));\n const extension = extensionOf(artifactPath);\n return {\n path: artifactPath,\n absolutePath,\n rootName: root.name,\n rootPath: root.path,\n kind: root.kind,\n profile: root.profile,\n extension,\n contentType: contentTypeForExtension(extension),\n sizeBytes: Buffer.byteLength(content, \"utf8\"),\n hash: hashContent(content),\n createdAt: stat.birthtime.toISOString(),\n updatedAt: stat.mtime.toISOString(),\n mtimeMs: stat.mtimeMs,\n };\n}\n\nfunction rootAllowsPath(root: LoadedLocalArtifactRoot, artifactPath: string) {\n const extension = extensionOf(artifactPath);\n if (root.extensions.length > 0 && !root.extensions.includes(extension)) {\n return false;\n }\n if (matchesPatterns(artifactPath, root.hide)) return false;\n if (root.include.length === 0) return true;\n return matchesPatterns(artifactPath, root.include);\n}\n\nasync function walkRoot(\n root: LoadedLocalArtifactRoot,\n directory = root.absolutePath,\n): Promise<LocalArtifactFileMeta[]> {\n let entries: fsSync.Dirent[];\n try {\n entries = await fs.readdir(directory, { withFileTypes: true });\n } catch (error) {\n if (errorCode(error) === \"ENOENT\") {\n return [];\n }\n throw error;\n }\n\n const files: LocalArtifactFileMeta[] = [];\n for (const entry of entries) {\n const absolutePath = path.join(directory, entry.name);\n const relativeToRoot = normalizeSlash(\n path.relative(root.absolutePath, absolutePath),\n );\n const artifactPath = normalizeSlash(\n path.posix.join(root.path, relativeToRoot),\n );\n if (matchesPatterns(artifactPath, root.hide)) continue;\n\n if (entry.isDirectory()) {\n files.push(...(await walkRoot(root, absolutePath)));\n continue;\n }\n if (!entry.isFile() || !rootAllowsPath(root, artifactPath)) continue;\n files.push(await fileMetaForPath(root, artifactPath, absolutePath));\n }\n return files;\n}\n\nexport async function listLocalArtifactFiles(\n options: LocalArtifactOptions,\n): Promise<LocalArtifactFileMeta[]> {\n const app = await getLocalArtifactApp(options);\n if (app.mode !== \"local-files\") return [];\n\n const files = (await Promise.all(app.roots.map((root) => walkRoot(root))))\n .flat()\n .filter((file) => !matchesPatterns(file.path, app.hide));\n\n return files.sort((a, b) => a.path.localeCompare(b.path));\n}\n\nfunction rootForArtifactPath(\n app: LoadedLocalArtifactApp,\n artifactPath: string,\n): LoadedLocalArtifactRoot {\n const safePath = normalizeRelativePath(artifactPath);\n const root = app.roots.find(\n (candidate) =>\n safePath === candidate.path || safePath.startsWith(`${candidate.path}/`),\n );\n if (!root) {\n throw new Error(`Path \"${artifactPath}\" is not in a configured local root`);\n }\n if (!rootAllowsPath(root, safePath) || matchesPatterns(safePath, app.hide)) {\n throw new Error(`Path \"${artifactPath}\" is not allowed for this app`);\n }\n return root;\n}\n\nasync function resolveArtifactPath(\n app: LoadedLocalArtifactApp,\n artifactPath: string,\n): Promise<{\n root: LoadedLocalArtifactRoot;\n safePath: string;\n absolutePath: string;\n}> {\n const safePath = normalizeRelativePath(artifactPath);\n const root = rootForArtifactPath(app, safePath);\n const absolutePath = path.resolve(app.workspaceRoot, safePath);\n const relative = path.relative(root.absolutePath, absolutePath);\n if (\n relative.startsWith(\"..\") ||\n path.isAbsolute(relative) ||\n relative === \"\"\n ) {\n throw new Error(`Path \"${artifactPath}\" is outside its configured root`);\n }\n return { root, safePath, absolutePath };\n}\n\nasync function assertNoSymlinkPath(\n root: LoadedLocalArtifactRoot,\n absolutePath: string,\n options: { allowMissingLeaf?: boolean } = {},\n) {\n assertNoSymlinkPathSync(root, absolutePath, options);\n}\n\nexport async function readLocalArtifactFile(\n options: LocalArtifactOptions & { path: string },\n): Promise<LocalArtifactFile | null> {\n const app = await getLocalArtifactApp(options);\n if (app.mode !== \"local-files\") return null;\n const { root, safePath, absolutePath } = await resolveArtifactPath(\n app,\n options.path,\n );\n try {\n const { content, stat } = readTextFileWithoutSymlink(root, absolutePath);\n const meta = await fileMetaForPath(\n root,\n safePath,\n absolutePath,\n content,\n stat,\n );\n return { ...meta, content };\n } catch (error) {\n if (errorCode(error) === \"ENOENT\") {\n return null;\n }\n throw error;\n }\n}\n\nexport async function writeLocalArtifactFile(\n options: WriteLocalArtifactFileOptions & { path: string },\n): Promise<LocalArtifactFileMeta> {\n const app = await getLocalArtifactApp(options);\n if (app.mode !== \"local-files\") {\n throw new Error(\"Local file mode is not enabled\");\n }\n const { root, safePath, absolutePath } = await resolveArtifactPath(\n app,\n options.path,\n );\n return withWriteLock(absolutePath, async () => {\n const existing = await readLocalArtifactFile({\n ...options,\n path: safePath,\n });\n if (options.ifNotExists && existing) {\n throw new Error(`File \"${safePath}\" already exists`);\n }\n if (\n options.expectedHash &&\n (!existing || existing.hash !== options.expectedHash)\n ) {\n throw new Error(\n `File \"${safePath}\" changed on disk. Reload before saving again.`,\n );\n }\n\n await assertNoSymlinkPath(root, absolutePath, { allowMissingLeaf: true });\n await fs.mkdir(path.dirname(absolutePath), { recursive: true });\n const tempPath = path.join(\n path.dirname(absolutePath),\n `.${path.basename(absolutePath)}.${process.pid}.${crypto.randomUUID()}.tmp`,\n );\n await fs.writeFile(tempPath, options.content, \"utf8\");\n await fs.rename(tempPath, absolutePath);\n return fileMetaForPath(root, safePath, absolutePath, options.content);\n });\n}\n\nexport async function deleteLocalArtifactFile(\n options: LocalArtifactOptions & { path: string },\n): Promise<boolean> {\n const app = await getLocalArtifactApp(options);\n if (app.mode !== \"local-files\") {\n throw new Error(\"Local file mode is not enabled\");\n }\n const { root, absolutePath } = await resolveArtifactPath(app, options.path);\n try {\n await assertNoSymlinkPath(root, absolutePath);\n await fs.unlink(absolutePath);\n return true;\n } catch (error) {\n if (errorCode(error) === \"ENOENT\") {\n return false;\n }\n throw error;\n }\n}\n\nexport async function ensureLocalArtifactRoot(\n options: LocalArtifactOptions,\n): Promise<LoadedLocalArtifactRoot> {\n const app = await getLocalArtifactApp(options);\n if (app.mode !== \"local-files\") {\n throw new Error(\"Local file mode is not enabled\");\n }\n const root = app.roots[0];\n if (!root) {\n throw new Error(`No local roots configured for app \"${options.appId}\"`);\n }\n await fs.mkdir(root.absolutePath, { recursive: true });\n return root;\n}\n\nexport function createTempWorkspaceDir(prefix = \"agent-native-local-\"): string {\n return fsSync.mkdtempSync(path.join(os.tmpdir(), prefix));\n}\n\nfunction localWorkspaceResourcesEnabled(\n loaded: LoadedAgentNativeManifest | null,\n): boolean {\n const explicitMode = envMode();\n if (explicitMode) {\n assertLocalFilesRuntimeAllowed(explicitMode);\n return explicitMode === \"local-files\";\n }\n const manifest = loaded?.manifest;\n const mode = manifest?.mode;\n if (mode) {\n assertLocalFilesRuntimeAllowed(mode);\n if (mode === \"local-files\") return true;\n }\n return false;\n}\n\nasync function resolveLocalWorkspaceRoot(\n options: LocalWorkspaceResourceOptions = {},\n): Promise<string | null> {\n const loaded = await loadAgentNativeManifest({ ...options, optional: true });\n if (localWorkspaceResourcesEnabled(loaded)) {\n return loaded?.rootDir ?? path.resolve(options.cwd ?? process.cwd());\n }\n return null;\n}\n\nexport async function isLocalWorkspaceResourcesEnabled(\n options: LocalWorkspaceResourceOptions = {},\n): Promise<boolean> {\n return !!(await resolveLocalWorkspaceRoot(options));\n}\n\nexport function localWorkspaceResourceId(resourcePath: string): string {\n const normalized = normalizeSlash(resourcePath).replace(/^\\/+/, \"\");\n return `${LOCAL_WORKSPACE_RESOURCE_ID_PREFIX}${Buffer.from(\n normalized,\n \"utf8\",\n ).toString(\"base64url\")}`;\n}\n\nexport function isLocalWorkspaceResourceId(id: string): boolean {\n return id.startsWith(LOCAL_WORKSPACE_RESOURCE_ID_PREFIX);\n}\n\nexport function localWorkspaceResourcePathFromId(id: string): string | null {\n if (!isLocalWorkspaceResourceId(id)) return null;\n const encoded = id.slice(LOCAL_WORKSPACE_RESOURCE_ID_PREFIX.length);\n try {\n const decoded = Buffer.from(encoded, \"base64url\").toString(\"utf8\");\n return normalizeLocalWorkspaceResourcePath(decoded);\n } catch {\n return null;\n }\n}\n\nfunction mimeTypeForLocalWorkspaceResource(resourcePath: string): string {\n const extension = extensionOf(resourcePath);\n if (extension === \".md\") return \"text/markdown\";\n if (extension === \".mdx\") return \"text/mdx\";\n if (extension === \".json\") return \"application/json\";\n if (extension === \".yaml\" || extension === \".yml\") return \"application/yaml\";\n if (extension === \".toml\") return \"text/toml\";\n if (extension === \".ts\" || extension === \".tsx\") return \"text/typescript\";\n if (extension === \".js\" || extension === \".jsx\") return \"text/javascript\";\n if (extension === \".html\") return \"text/html\";\n if (extension === \".css\") return \"text/css\";\n if (extension === \".xml\") return \"application/xml\";\n if (extension === \".csv\") return \"text/csv\";\n if (extension === \".sql\") return \"text/sql\";\n if (extension === \".sh\") return \"text/x-shellscript\";\n if (extension === \".py\") return \"text/x-python\";\n return \"text/plain\";\n}\n\nfunction isSupportedLocalWorkspaceTextFile(resourcePath: string): boolean {\n return LOCAL_WORKSPACE_TEXT_EXTENSIONS.has(extensionOf(resourcePath));\n}\n\nexport function normalizeLocalWorkspaceResourcePath(resourcePath: string) {\n const safePath = normalizeRelativePath(\n normalizeSlash(resourcePath).replace(/^\\/+/, \"\"),\n \"resource path\",\n );\n if (LOCAL_WORKSPACE_CONTROL_FILES.has(safePath)) return safePath;\n if (safePath.startsWith(\".agents/skills/\")) {\n const relativeSkillPath = normalizeRelativePath(\n safePath.slice(\".agents/skills/\".length),\n \"resource path\",\n );\n return normalizeSlash(path.posix.join(\"skills\", relativeSkillPath));\n }\n if (safePath.startsWith(\".agent/skills/\")) {\n const relativeSkillPath = normalizeRelativePath(\n safePath.slice(\".agent/skills/\".length),\n \"resource path\",\n );\n return normalizeSlash(path.posix.join(\"skills\", relativeSkillPath));\n }\n if (safePath.startsWith(\"skills/\")) return safePath;\n throw new Error(\n `Local workspace resource \"${resourcePath}\" must be AGENTS.md, agent-native.json, mcp.config.json, .mcp.json, or under skills/.`,\n );\n}\n\nexport function canUseLocalWorkspaceResourcePath(\n resourcePath: string,\n): boolean {\n try {\n normalizeLocalWorkspaceResourcePath(resourcePath);\n return true;\n } catch {\n return false;\n }\n}\n\nfunction localWorkspaceResourceAbsolutePath(\n workspaceRoot: string,\n resourcePath: string,\n options: { preferExisting?: boolean } = {},\n): { resourcePath: string; absolutePath: string } {\n const normalized = normalizeLocalWorkspaceResourcePath(resourcePath);\n const safePath = normalizeRelativePath(\n normalizeSlash(resourcePath).replace(/^\\/+/, \"\"),\n \"resource path\",\n );\n let relativePath = normalized;\n if (\n safePath.startsWith(\".agents/skills/\") ||\n safePath.startsWith(\".agent/skills/\")\n ) {\n relativePath = safePath;\n } else if (normalized.startsWith(\"skills/\")) {\n const skillPath = normalized.slice(\"skills/\".length);\n const candidates = LOCAL_WORKSPACE_SKILL_ROOTS.map((root) =>\n normalizeSlash(path.posix.join(root, skillPath)),\n );\n relativePath = candidates[0]!;\n if (options.preferExisting) {\n relativePath =\n candidates.find((candidate) =>\n fsSync.existsSync(path.resolve(workspaceRoot, candidate)),\n ) ?? relativePath;\n }\n }\n const { absolutePath } = resolveInsideWorkspace(workspaceRoot, relativePath);\n return { resourcePath: normalized, absolutePath };\n}\n\nfunction localWorkspaceResourceDeletePaths(\n workspaceRoot: string,\n resourcePath: string,\n): string[] {\n const normalized = normalizeLocalWorkspaceResourcePath(resourcePath);\n const safePath = normalizeRelativePath(\n normalizeSlash(resourcePath).replace(/^\\/+/, \"\"),\n \"resource path\",\n );\n if (\n safePath.startsWith(\".agents/skills/\") ||\n safePath.startsWith(\".agent/skills/\") ||\n !normalized.startsWith(\"skills/\")\n ) {\n const { absolutePath } = localWorkspaceResourceAbsolutePath(\n workspaceRoot,\n resourcePath,\n );\n return [absolutePath];\n }\n\n const skillPath = normalized.slice(\"skills/\".length);\n return LOCAL_WORKSPACE_SKILL_ROOTS.map((root) => {\n const relativePath = normalizeSlash(path.posix.join(root, skillPath));\n return resolveInsideWorkspace(workspaceRoot, relativePath).absolutePath;\n });\n}\n\nfunction assertNoSymlinkAbsolutePathSync(\n workspaceRoot: string,\n absolutePath: string,\n options: { allowMissingLeaf?: boolean } = {},\n) {\n const relative = path.relative(workspaceRoot, absolutePath);\n const segments = relative.split(path.sep).filter(Boolean);\n let current = workspaceRoot;\n const pathsToCheck = [\n current,\n ...segments.map((segment) => {\n current = path.join(current, segment);\n return current;\n }),\n ];\n\n for (let index = 0; index < pathsToCheck.length; index += 1) {\n const candidate = pathsToCheck[index]!;\n try {\n const stat = fsSync.lstatSync(candidate);\n if (stat.isSymbolicLink()) {\n throw new Error(`Path \"${candidate}\" must not traverse a symlink`);\n }\n if (index < pathsToCheck.length - 1 && !stat.isDirectory()) {\n throw new Error(`Path \"${candidate}\" is not a directory`);\n }\n } catch (error) {\n if (errorCode(error) === \"ENOENT\" && options.allowMissingLeaf) return;\n throw error;\n }\n }\n}\n\nfunction readLocalWorkspaceTextFile(\n workspaceRoot: string,\n absolutePath: string,\n): { content: string; stat: fsSync.Stats } {\n assertNoSymlinkAbsolutePathSync(workspaceRoot, absolutePath);\n const fd = fsSync.openSync(absolutePath, noFollowOpenFlags());\n try {\n const stat = fsSync.fstatSync(fd);\n if (!stat.isFile()) {\n throw new Error(`Path \"${absolutePath}\" is not a file`);\n }\n if (stat.size > LOCAL_WORKSPACE_RESOURCE_MAX_BYTES) {\n throw new Error(\n `Local workspace resource \"${absolutePath}\" is too large to load`,\n );\n }\n return {\n content: fsSync.readFileSync(fd, \"utf8\"),\n stat,\n };\n } finally {\n fsSync.closeSync(fd);\n }\n}\n\nfunction localWorkspaceResourceMeta(\n resourcePath: string,\n absolutePath: string,\n content: string,\n stat: fsSync.Stats,\n): LocalWorkspaceResourceMeta {\n return {\n id: localWorkspaceResourceId(resourcePath),\n path: resourcePath,\n absolutePath,\n mimeType: mimeTypeForLocalWorkspaceResource(resourcePath),\n sizeBytes: Buffer.byteLength(content, \"utf8\"),\n hash: hashContent(content),\n createdAt: stat.birthtime.toISOString(),\n updatedAt: stat.mtime.toISOString(),\n mtimeMs: stat.mtimeMs,\n };\n}\n\nasync function maybeLocalWorkspaceResourceMeta(\n workspaceRoot: string,\n resourcePath: string,\n absolutePath: string,\n): Promise<LocalWorkspaceResourceMeta | null> {\n if (!isSupportedLocalWorkspaceTextFile(resourcePath)) return null;\n try {\n const { content, stat } = readLocalWorkspaceTextFile(\n workspaceRoot,\n absolutePath,\n );\n return localWorkspaceResourceMeta(\n resourcePath,\n absolutePath,\n content,\n stat,\n );\n } catch (error) {\n if (errorCode(error) === \"ENOENT\") return null;\n throw error;\n }\n}\n\nasync function walkLocalWorkspaceSkillRoot(\n workspaceRoot: string,\n skillRoot: string,\n seenPaths: Set<string>,\n): Promise<LocalWorkspaceResourceMeta[]> {\n const absoluteRoot = path.join(workspaceRoot, skillRoot);\n try {\n assertNoSymlinkAbsolutePathSync(workspaceRoot, absoluteRoot);\n } catch (error) {\n if (errorCode(error) === \"ENOENT\") return [];\n throw error;\n }\n\n const files: LocalWorkspaceResourceMeta[] = [];\n async function walk(directory: string): Promise<void> {\n let entries: fsSync.Dirent[];\n try {\n entries = await fs.readdir(directory, { withFileTypes: true });\n } catch (error) {\n if (errorCode(error) === \"ENOENT\") return;\n throw error;\n }\n\n for (const entry of entries) {\n if (entry.name === \".DS_Store\") continue;\n const absolutePath = path.join(directory, entry.name);\n const relativeToSkillRoot = normalizeSlash(\n path.relative(absoluteRoot, absolutePath),\n );\n const resourcePath = normalizeSlash(\n path.posix.join(\"skills\", relativeToSkillRoot),\n );\n if (seenPaths.has(resourcePath)) continue;\n if (entry.isDirectory()) {\n await walk(absolutePath);\n continue;\n }\n if (!entry.isFile()) continue;\n const meta = await maybeLocalWorkspaceResourceMeta(\n workspaceRoot,\n resourcePath,\n absolutePath,\n );\n if (!meta) continue;\n seenPaths.add(resourcePath);\n files.push(meta);\n }\n }\n\n await walk(absoluteRoot);\n return files;\n}\n\nexport async function listLocalWorkspaceResources(\n options: LocalWorkspaceResourceOptions = {},\n): Promise<LocalWorkspaceResourceMeta[]> {\n const workspaceRoot = await resolveLocalWorkspaceRoot(options);\n if (!workspaceRoot) return [];\n\n const seenPaths = new Set<string>();\n const resources: LocalWorkspaceResourceMeta[] = [];\n for (const resourcePath of LOCAL_WORKSPACE_CONTROL_FILES) {\n const { absolutePath } = localWorkspaceResourceAbsolutePath(\n workspaceRoot,\n resourcePath,\n );\n const meta = await maybeLocalWorkspaceResourceMeta(\n workspaceRoot,\n resourcePath,\n absolutePath,\n );\n if (!meta) continue;\n seenPaths.add(resourcePath);\n resources.push(meta);\n }\n\n for (const skillRoot of LOCAL_WORKSPACE_SKILL_ROOTS) {\n resources.push(\n ...(await walkLocalWorkspaceSkillRoot(\n workspaceRoot,\n skillRoot,\n seenPaths,\n )),\n );\n }\n\n return resources.sort((a, b) => a.path.localeCompare(b.path));\n}\n\nexport async function readLocalWorkspaceResource(\n options: LocalWorkspaceResourceOptions & { path: string },\n): Promise<LocalWorkspaceResourceFile | null> {\n const workspaceRoot = await resolveLocalWorkspaceRoot(options);\n if (!workspaceRoot) return null;\n const { resourcePath, absolutePath } = localWorkspaceResourceAbsolutePath(\n workspaceRoot,\n options.path,\n { preferExisting: true },\n );\n if (!isSupportedLocalWorkspaceTextFile(resourcePath)) return null;\n try {\n const { content, stat } = readLocalWorkspaceTextFile(\n workspaceRoot,\n absolutePath,\n );\n return {\n ...localWorkspaceResourceMeta(resourcePath, absolutePath, content, stat),\n content,\n };\n } catch (error) {\n if (errorCode(error) === \"ENOENT\") return null;\n throw error;\n }\n}\n\nexport async function writeLocalWorkspaceResource(\n options: WriteLocalWorkspaceResourceOptions,\n): Promise<LocalWorkspaceResourceMeta> {\n const workspaceRoot = await resolveLocalWorkspaceRoot(options);\n if (!workspaceRoot) {\n throw new Error(\"Local file mode is not enabled\");\n }\n const { resourcePath, absolutePath } = localWorkspaceResourceAbsolutePath(\n workspaceRoot,\n options.path,\n { preferExisting: true },\n );\n if (!isSupportedLocalWorkspaceTextFile(resourcePath)) {\n throw new Error(`Local workspace resource \"${resourcePath}\" is not text`);\n }\n return withWriteLock(absolutePath, async () => {\n const existing = await readLocalWorkspaceResource({\n ...options,\n path: resourcePath,\n });\n if (options.ifNotExists && existing) {\n throw new Error(`File \"${resourcePath}\" already exists`);\n }\n if (\n options.expectedHash &&\n (!existing || existing.hash !== options.expectedHash)\n ) {\n throw new Error(\n `File \"${resourcePath}\" changed on disk. Reload before saving again.`,\n );\n }\n\n assertNoSymlinkAbsolutePathSync(workspaceRoot, absolutePath, {\n allowMissingLeaf: true,\n });\n await fs.mkdir(path.dirname(absolutePath), { recursive: true });\n const tempPath = path.join(\n path.dirname(absolutePath),\n `.${path.basename(absolutePath)}.${process.pid}.${crypto.randomUUID()}.tmp`,\n );\n await fs.writeFile(tempPath, options.content, \"utf8\");\n await fs.rename(tempPath, absolutePath);\n const stat = await fs.stat(absolutePath);\n return localWorkspaceResourceMeta(\n resourcePath,\n absolutePath,\n options.content,\n stat,\n );\n });\n}\n\nexport async function deleteLocalWorkspaceResource(\n options: LocalWorkspaceResourceOptions & { path: string },\n): Promise<boolean> {\n const workspaceRoot = await resolveLocalWorkspaceRoot(options);\n if (!workspaceRoot) {\n throw new Error(\"Local file mode is not enabled\");\n }\n const absolutePaths = localWorkspaceResourceDeletePaths(\n workspaceRoot,\n options.path,\n );\n let deleted = false;\n for (const absolutePath of absolutePaths) {\n try {\n assertNoSymlinkAbsolutePathSync(workspaceRoot, absolutePath);\n await fs.unlink(absolutePath);\n deleted = true;\n } catch (error) {\n if (errorCode(error) === \"ENOENT\") continue;\n throw error;\n }\n }\n return deleted;\n}\n"]}
@@ -260,7 +260,6 @@ declare const messages: {
260
260
  createWidgetPrompt: string;
261
261
  whatShouldItDo: string;
262
262
  createPlaceholder: string;
263
- backToApp: string;
264
263
  title: string;
265
264
  hiddenShown: string;
266
265
  showHidden: string;
@@ -1 +1 @@
1
- {"version":3,"file":"default-messages.d.ts","sourceRoot":"","sources":["../../src/localization/default-messages.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,QAAQ;IACZ,IAAI;QACF,aAAa;QACb,mBAAmB;QACnB,KAAK;QACL,KAAK;QACL,eAAe;QACf,aAAa;QACb,SAAS;QACT,eAAe;QACf,UAAU;QACV,gBAAgB;;IAElB,QAAQ;QACN,KAAK;QACL,WAAW;QACX,aAAa;QACb,mBAAmB;QAEnB,aAAa;QACb,UAAU;QACV,gBAAgB;QAEhB,iBAAiB;QACjB,cAAc;QACd,oBAAoB;QACpB,gBAAgB;QAChB,oBAAoB;QACpB,QAAQ;;IAEV,QAAQ;QACN,GAAG;YACD,IAAI;YACJ,QAAQ;YACR,IAAI;YACJ,OAAO;YACP,KAAK;YACL,YAAY;YACZ,MAAM;YACN,SAAS;YACT,SAAS;YACT,YAAY;YACZ,UAAU;YACV,SAAS;YACT,KAAK;YACL,MAAM;YACN,WAAW;YACX,QAAQ;YACR,IAAI;YACJ,UAAU;YACV,UAAU;YACV,qBAAqB;;QAEvB,OAAO;YACL,qBAAqB;YACrB,qBAAqB;YACrB,uBAAuB;YACvB,KAAK;YACL,OAAO;YACP,eAAe;YACf,UAAU;YACV,YAAY;YACZ,WAAW;YACX,SAAS;YACT,cAAc;YAEd,kBAAkB;YAClB,oBAAoB;YACpB,kBAAkB;;QAEpB,KAAK;YACH,eAAe;YAEf,4BAA4B;YAE5B,eAAe;YACf,aAAa;YACb,WAAW;YACX,WAAW;YACX,SAAS;YACT,SAAS;YACT,iBAAiB;YACjB,kBAAkB;YAClB,IAAI;YACJ,IAAI;YACJ,UAAU;YACV,cAAc;YACd,oBAAoB;YACpB,uBAAuB;YAEvB,YAAY;YACZ,uBAAuB;YAEvB,UAAU;YACV,MAAM;YACN,iBAAiB;YAEjB,uBAAuB;YAEvB,iBAAiB;YACjB,cAAc;YACd,gBAA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AW;QACX,MAAM;;CAET,CAAC;eAEa,QAAQ"}
1
+ {"version":3,"file":"default-messages.d.ts","sourceRoot":"","sources":["../../src/localization/default-messages.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,QAAQ;IACZ,IAAI;QACF,aAAa;QACb,mBAAmB;QACnB,KAAK;QACL,KAAK;QACL,eAAe;QACf,aAAa;QACb,SAAS;QACT,eAAe;QACf,UAAU;QACV,gBAAgB;;IAElB,QAAQ;QACN,KAAK;QACL,WAAW;QACX,aAAa;QACb,mBAAmB;QAEnB,aAAa;QACb,UAAU;QACV,gBAAgB;QAEhB,iBAAiB;QACjB,cAAc;QACd,oBAAoB;QACpB,gBAAgB;QAChB,oBAAoB;QACpB,QAAQ;;IAEV,QAAQ;QACN,GAAG;YACD,IAAI;YACJ,QAAQ;YACR,IAAI;YACJ,OAAO;YACP,KAAK;YACL,YAAY;YACZ,MAAM;YACN,SAAS;YACT,SAAS;YACT,YAAY;YACZ,UAAU;YACV,SAAS;YACT,KAAK;YACL,MAAM;YACN,WAAW;YACX,QAAQ;YACR,IAAI;YACJ,UAAU;YACV,UAAU;YACV,qBAAqB;;QAEvB,OAAO;YACL,qBAAqB;YACrB,qBAAqB;YACrB,uBAAuB;YACvB,KAAK;YACL,OAAO;YACP,eAAe;YACf,UAAU;YACV,YAAY;YACZ,WAAW;YACX,SAAS;YACT,cAAc;YAEd,kBAAkB;YAClB,oBAAoB;YACpB,kBAAkB;;QAEpB,KAAK;YACH,eAAe;YAEf,4BAA4B;YAE5B,eAAe;YACf,aAAa;YACb,WAAW;YACX,WAAW;YACX,SAAS;YACT,SAAS;YACT,iBAAiB;YACjB,kBAAkB;YAClB,IAAI;YACJ,IAAI;YACJ,UAAU;YACV,cAAc;YACd,oBAAoB;YACpB,uBAAuB;YAEvB,YAAY;YACZ,uBAAuB;YAEvB,UAAU;YACV,MAAM;YACN,iBAAiB;YAEjB,uBAAuB;YAEvB,iBAAiB;YACjB,cAAc;YACd,gBAAgB;YAChB,IA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AC;eAEa,QAAQ"}
@@ -265,7 +265,6 @@ const messages = {
265
265
  createWidgetPrompt: 'Create a new widget that fits in slot "{{slotId}}". I\'ll describe what it should do next.',
266
266
  whatShouldItDo: "What should it do?",
267
267
  createPlaceholder: "A todo list, API dashboard, calculator...",
268
- backToApp: "Back to app",
269
268
  title: "Extensions",
270
269
  hiddenShown: "Hiding shown",
271
270
  showHidden: "Show hidden",
@@ -426,7 +425,7 @@ const messages = {
426
425
  toolsAvailable_one: "{{count}} tool available",
427
426
  toolsAvailable_other: "{{count}} tools available",
428
427
  failed: "Failed",
429
- docsLabel: "{{name}} docs",
428
+ docsLabel: "View {{name}} docs",
430
429
  catalog: {
431
430
  context7: {
432
431
  description: "Fetch current library docs in agent chats.",