@agent-native/core 0.79.26 → 0.80.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2322) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +39 -0
  3. package/corpus/core/docs/content/a2a-protocol.mdx +97 -9
  4. package/corpus/core/docs/content/actions.mdx +65 -4
  5. package/corpus/core/docs/content/agent-mentions.mdx +68 -4
  6. package/corpus/core/docs/content/agent-surfaces.mdx +112 -8
  7. package/corpus/core/docs/content/agent-teams.mdx +171 -12
  8. package/corpus/core/docs/content/agent-web-surfaces.mdx +51 -4
  9. package/corpus/core/docs/content/authentication.mdx +122 -8
  10. package/corpus/core/docs/content/automations.mdx +110 -8
  11. package/corpus/core/docs/content/blueprint-installer.mdx +42 -4
  12. package/corpus/core/docs/content/cli-adapters.mdx +44 -4
  13. package/corpus/core/docs/content/client.mdx +79 -8
  14. package/corpus/core/docs/content/cloneable-saas.mdx +85 -8
  15. package/corpus/core/docs/content/code-agents-ui.mdx +98 -8
  16. package/corpus/core/docs/content/components.mdx +118 -8
  17. package/corpus/core/docs/content/context-awareness.mdx +98 -8
  18. package/corpus/core/docs/content/creating-templates.mdx +49 -4
  19. package/corpus/core/docs/content/cross-app-sso.mdx +109 -8
  20. package/corpus/core/docs/content/database.mdx +56 -4
  21. package/corpus/core/docs/content/deployment.mdx +103 -8
  22. package/corpus/core/docs/content/dispatch.mdx +134 -8
  23. package/corpus/core/docs/content/drop-in-agent.mdx +63 -4
  24. package/corpus/core/docs/content/durable-background-runs.mdx +98 -8
  25. package/corpus/core/docs/content/durable-resume.mdx +47 -4
  26. package/corpus/core/docs/content/embedding-sdk.mdx +83 -8
  27. package/corpus/core/docs/content/evals.mdx +102 -8
  28. package/corpus/core/docs/content/extensions.mdx +113 -9
  29. package/corpus/core/docs/content/external-agents.mdx +119 -8
  30. package/corpus/core/docs/content/faq.mdx +98 -8
  31. package/corpus/core/docs/content/file-uploads.mdx +61 -4
  32. package/corpus/core/docs/content/frames.mdx +90 -8
  33. package/corpus/core/docs/content/generative-ui.mdx +50 -4
  34. package/corpus/core/docs/content/getting-started.mdx +34 -4
  35. package/corpus/core/docs/content/harness-agents.mdx +77 -8
  36. package/corpus/core/docs/content/human-approval.mdx +50 -4
  37. package/corpus/core/docs/content/key-concepts.mdx +102 -8
  38. package/corpus/core/docs/content/local-file-mode.mdx +58 -4
  39. package/corpus/core/docs/content/locales/ar-SA/a2a-protocol.mdx +97 -9
  40. package/corpus/core/docs/content/locales/ar-SA/actions.mdx +65 -4
  41. package/corpus/core/docs/content/locales/ar-SA/agent-mentions.mdx +68 -4
  42. package/corpus/core/docs/content/locales/ar-SA/agent-surfaces.mdx +114 -8
  43. package/corpus/core/docs/content/locales/ar-SA/agent-teams.mdx +174 -12
  44. package/corpus/core/docs/content/locales/ar-SA/agent-web-surfaces.mdx +49 -4
  45. package/corpus/core/docs/content/locales/ar-SA/authentication.mdx +120 -8
  46. package/corpus/core/docs/content/locales/ar-SA/automations.mdx +110 -8
  47. package/corpus/core/docs/content/locales/ar-SA/blueprint-installer.mdx +42 -4
  48. package/corpus/core/docs/content/locales/ar-SA/cli-adapters.mdx +40 -4
  49. package/corpus/core/docs/content/locales/ar-SA/client.mdx +80 -8
  50. package/corpus/core/docs/content/locales/ar-SA/cloneable-saas.mdx +85 -8
  51. package/corpus/core/docs/content/locales/ar-SA/code-agents-ui.mdx +99 -8
  52. package/corpus/core/docs/content/locales/ar-SA/components.mdx +114 -8
  53. package/corpus/core/docs/content/locales/ar-SA/context-awareness.mdx +100 -8
  54. package/corpus/core/docs/content/locales/ar-SA/creating-templates.mdx +51 -4
  55. package/corpus/core/docs/content/locales/ar-SA/cross-app-sso.mdx +109 -8
  56. package/corpus/core/docs/content/locales/ar-SA/database.mdx +52 -4
  57. package/corpus/core/docs/content/locales/ar-SA/deployment.mdx +103 -8
  58. package/corpus/core/docs/content/locales/ar-SA/dispatch.mdx +134 -8
  59. package/corpus/core/docs/content/locales/ar-SA/drop-in-agent.mdx +63 -4
  60. package/corpus/core/docs/content/locales/ar-SA/durable-resume.mdx +47 -4
  61. package/corpus/core/docs/content/locales/ar-SA/embedding-sdk.mdx +83 -8
  62. package/corpus/core/docs/content/locales/ar-SA/evals.mdx +102 -8
  63. package/corpus/core/docs/content/locales/ar-SA/extensions.mdx +113 -9
  64. package/corpus/core/docs/content/locales/ar-SA/external-agents.mdx +119 -8
  65. package/corpus/core/docs/content/locales/ar-SA/faq.mdx +98 -8
  66. package/corpus/core/docs/content/locales/ar-SA/file-uploads.mdx +61 -4
  67. package/corpus/core/docs/content/locales/ar-SA/frames.mdx +88 -8
  68. package/corpus/core/docs/content/locales/ar-SA/getting-started.mdx +34 -4
  69. package/corpus/core/docs/content/locales/ar-SA/harness-agents.mdx +79 -8
  70. package/corpus/core/docs/content/locales/ar-SA/human-approval.mdx +50 -4
  71. package/corpus/core/docs/content/locales/ar-SA/key-concepts.mdx +107 -8
  72. package/corpus/core/docs/content/locales/ar-SA/local-file-mode.mdx +56 -4
  73. package/corpus/core/docs/content/locales/ar-SA/mcp-apps.mdx +120 -10
  74. package/corpus/core/docs/content/locales/ar-SA/mcp-clients.mdx +133 -8
  75. package/corpus/core/docs/content/locales/ar-SA/mcp-protocol.mdx +105 -8
  76. package/corpus/core/docs/content/locales/ar-SA/messaging.mdx +115 -8
  77. package/corpus/core/docs/content/locales/ar-SA/migration-workbench.mdx +47 -4
  78. package/corpus/core/docs/content/locales/ar-SA/multi-app-workspace.mdx +91 -8
  79. package/corpus/core/docs/content/locales/ar-SA/multi-tenancy.mdx +80 -8
  80. package/corpus/core/docs/content/locales/ar-SA/native-chat-ui.mdx +104 -8
  81. package/corpus/core/docs/content/locales/ar-SA/notifications.mdx +135 -8
  82. package/corpus/core/docs/content/locales/ar-SA/observability.mdx +102 -8
  83. package/corpus/core/docs/content/locales/ar-SA/observational-memory.mdx +87 -8
  84. package/corpus/core/docs/content/locales/ar-SA/onboarding.mdx +45 -4
  85. package/corpus/core/docs/content/locales/ar-SA/plan-plugin.mdx +99 -8
  86. package/corpus/core/docs/content/locales/ar-SA/pr-visual-recap.mdx +125 -8
  87. package/corpus/core/docs/content/locales/ar-SA/processors.mdx +41 -4
  88. package/corpus/core/docs/content/locales/ar-SA/progress.mdx +46 -4
  89. package/corpus/core/docs/content/locales/ar-SA/pure-agent-apps.mdx +48 -4
  90. package/corpus/core/docs/content/locales/ar-SA/real-time-collaboration.mdx +102 -8
  91. package/corpus/core/docs/content/locales/ar-SA/recurring-jobs.mdx +59 -4
  92. package/corpus/core/docs/content/locales/ar-SA/routing.mdx +44 -5
  93. package/corpus/core/docs/content/locales/ar-SA/sandbox-adapters.mdx +43 -4
  94. package/corpus/core/docs/content/locales/ar-SA/security.mdx +80 -8
  95. package/corpus/core/docs/content/locales/ar-SA/server.mdx +173 -12
  96. package/corpus/core/docs/content/locales/ar-SA/sharing.mdx +45 -4
  97. package/corpus/core/docs/content/locales/ar-SA/skills-guide.mdx +118 -9
  98. package/corpus/core/docs/content/locales/ar-SA/template-analytics.mdx +46 -4
  99. package/corpus/core/docs/content/locales/ar-SA/template-assets.mdx +62 -4
  100. package/corpus/core/docs/content/locales/ar-SA/template-brain.mdx +65 -4
  101. package/corpus/core/docs/content/locales/ar-SA/template-calendar.mdx +62 -4
  102. package/corpus/core/docs/content/locales/ar-SA/template-chat.mdx +61 -4
  103. package/corpus/core/docs/content/locales/ar-SA/template-clips.mdx +52 -4
  104. package/corpus/core/docs/content/locales/ar-SA/template-content.mdx +62 -4
  105. package/corpus/core/docs/content/locales/ar-SA/template-design.mdx +101 -4
  106. package/corpus/core/docs/content/locales/ar-SA/template-dispatch.mdx +57 -4
  107. package/corpus/core/docs/content/locales/ar-SA/template-forms.mdx +62 -4
  108. package/corpus/core/docs/content/locales/ar-SA/template-mail.mdx +60 -4
  109. package/corpus/core/docs/content/locales/ar-SA/template-plan.mdx +61 -4
  110. package/corpus/core/docs/content/locales/ar-SA/template-slides.mdx +49 -4
  111. package/corpus/core/docs/content/locales/ar-SA/template-videos.mdx +53 -4
  112. package/corpus/core/docs/content/locales/ar-SA/tracking.mdx +54 -4
  113. package/corpus/core/docs/content/locales/ar-SA/using-your-agent.mdx +51 -4
  114. package/corpus/core/docs/content/locales/ar-SA/voice-input.mdx +43 -4
  115. package/corpus/core/docs/content/locales/ar-SA/what-is-agent-native.mdx +96 -8
  116. package/corpus/core/docs/content/locales/ar-SA/workspace-connections.mdx +128 -8
  117. package/corpus/core/docs/content/locales/ar-SA/workspace-management.mdx +50 -4
  118. package/corpus/core/docs/content/locales/ar-SA/workspace.mdx +112 -8
  119. package/corpus/core/docs/content/locales/ar-SA/writing-agent-instructions.mdx +41 -4
  120. package/corpus/core/docs/content/locales/de-DE/a2a-protocol.mdx +99 -9
  121. package/corpus/core/docs/content/locales/de-DE/actions.mdx +67 -4
  122. package/corpus/core/docs/content/locales/de-DE/agent-mentions.mdx +68 -4
  123. package/corpus/core/docs/content/locales/de-DE/agent-surfaces.mdx +116 -8
  124. package/corpus/core/docs/content/locales/de-DE/agent-teams.mdx +171 -12
  125. package/corpus/core/docs/content/locales/de-DE/agent-web-surfaces.mdx +51 -4
  126. package/corpus/core/docs/content/locales/de-DE/authentication.mdx +122 -8
  127. package/corpus/core/docs/content/locales/de-DE/automations.mdx +110 -8
  128. package/corpus/core/docs/content/locales/de-DE/blueprint-installer.mdx +42 -4
  129. package/corpus/core/docs/content/locales/de-DE/cli-adapters.mdx +44 -4
  130. package/corpus/core/docs/content/locales/de-DE/client.mdx +79 -8
  131. package/corpus/core/docs/content/locales/de-DE/cloneable-saas.mdx +85 -8
  132. package/corpus/core/docs/content/locales/de-DE/code-agents-ui.mdx +100 -8
  133. package/corpus/core/docs/content/locales/de-DE/components.mdx +118 -8
  134. package/corpus/core/docs/content/locales/de-DE/context-awareness.mdx +98 -8
  135. package/corpus/core/docs/content/locales/de-DE/creating-templates.mdx +51 -4
  136. package/corpus/core/docs/content/locales/de-DE/cross-app-sso.mdx +109 -8
  137. package/corpus/core/docs/content/locales/de-DE/database.mdx +52 -4
  138. package/corpus/core/docs/content/locales/de-DE/deployment.mdx +103 -8
  139. package/corpus/core/docs/content/locales/de-DE/dispatch.mdx +134 -8
  140. package/corpus/core/docs/content/locales/de-DE/drop-in-agent.mdx +63 -4
  141. package/corpus/core/docs/content/locales/de-DE/durable-resume.mdx +47 -4
  142. package/corpus/core/docs/content/locales/de-DE/embedding-sdk.mdx +85 -8
  143. package/corpus/core/docs/content/locales/de-DE/evals.mdx +102 -8
  144. package/corpus/core/docs/content/locales/de-DE/extensions.mdx +113 -9
  145. package/corpus/core/docs/content/locales/de-DE/external-agents.mdx +119 -8
  146. package/corpus/core/docs/content/locales/de-DE/faq.mdx +98 -8
  147. package/corpus/core/docs/content/locales/de-DE/file-uploads.mdx +61 -4
  148. package/corpus/core/docs/content/locales/de-DE/frames.mdx +88 -8
  149. package/corpus/core/docs/content/locales/de-DE/getting-started.mdx +34 -4
  150. package/corpus/core/docs/content/locales/de-DE/harness-agents.mdx +79 -8
  151. package/corpus/core/docs/content/locales/de-DE/human-approval.mdx +50 -4
  152. package/corpus/core/docs/content/locales/de-DE/key-concepts.mdx +104 -8
  153. package/corpus/core/docs/content/locales/de-DE/local-file-mode.mdx +58 -4
  154. package/corpus/core/docs/content/locales/de-DE/mcp-apps.mdx +120 -10
  155. package/corpus/core/docs/content/locales/de-DE/mcp-clients.mdx +133 -8
  156. package/corpus/core/docs/content/locales/de-DE/mcp-protocol.mdx +105 -8
  157. package/corpus/core/docs/content/locales/de-DE/messaging.mdx +115 -8
  158. package/corpus/core/docs/content/locales/de-DE/migration-workbench.mdx +47 -4
  159. package/corpus/core/docs/content/locales/de-DE/multi-app-workspace.mdx +91 -8
  160. package/corpus/core/docs/content/locales/de-DE/multi-tenancy.mdx +80 -8
  161. package/corpus/core/docs/content/locales/de-DE/native-chat-ui.mdx +108 -8
  162. package/corpus/core/docs/content/locales/de-DE/notifications.mdx +135 -8
  163. package/corpus/core/docs/content/locales/de-DE/observability.mdx +102 -8
  164. package/corpus/core/docs/content/locales/de-DE/observational-memory.mdx +92 -8
  165. package/corpus/core/docs/content/locales/de-DE/onboarding.mdx +45 -4
  166. package/corpus/core/docs/content/locales/de-DE/plan-plugin.mdx +99 -8
  167. package/corpus/core/docs/content/locales/de-DE/pr-visual-recap.mdx +125 -8
  168. package/corpus/core/docs/content/locales/de-DE/processors.mdx +41 -4
  169. package/corpus/core/docs/content/locales/de-DE/progress.mdx +46 -4
  170. package/corpus/core/docs/content/locales/de-DE/pure-agent-apps.mdx +50 -4
  171. package/corpus/core/docs/content/locales/de-DE/real-time-collaboration.mdx +104 -8
  172. package/corpus/core/docs/content/locales/de-DE/recurring-jobs.mdx +59 -4
  173. package/corpus/core/docs/content/locales/de-DE/routing.mdx +44 -5
  174. package/corpus/core/docs/content/locales/de-DE/sandbox-adapters.mdx +43 -4
  175. package/corpus/core/docs/content/locales/de-DE/security.mdx +80 -8
  176. package/corpus/core/docs/content/locales/de-DE/server.mdx +171 -12
  177. package/corpus/core/docs/content/locales/de-DE/sharing.mdx +45 -4
  178. package/corpus/core/docs/content/locales/de-DE/skills-guide.mdx +118 -9
  179. package/corpus/core/docs/content/locales/de-DE/template-analytics.mdx +46 -4
  180. package/corpus/core/docs/content/locales/de-DE/template-assets.mdx +62 -4
  181. package/corpus/core/docs/content/locales/de-DE/template-brain.mdx +69 -4
  182. package/corpus/core/docs/content/locales/de-DE/template-calendar.mdx +62 -4
  183. package/corpus/core/docs/content/locales/de-DE/template-chat.mdx +61 -4
  184. package/corpus/core/docs/content/locales/de-DE/template-clips.mdx +52 -4
  185. package/corpus/core/docs/content/locales/de-DE/template-content.mdx +60 -4
  186. package/corpus/core/docs/content/locales/de-DE/template-design.mdx +109 -4
  187. package/corpus/core/docs/content/locales/de-DE/template-dispatch.mdx +57 -4
  188. package/corpus/core/docs/content/locales/de-DE/template-forms.mdx +64 -4
  189. package/corpus/core/docs/content/locales/de-DE/template-mail.mdx +60 -4
  190. package/corpus/core/docs/content/locales/de-DE/template-plan.mdx +63 -4
  191. package/corpus/core/docs/content/locales/de-DE/template-slides.mdx +49 -4
  192. package/corpus/core/docs/content/locales/de-DE/template-videos.mdx +53 -4
  193. package/corpus/core/docs/content/locales/de-DE/tracking.mdx +54 -4
  194. package/corpus/core/docs/content/locales/de-DE/using-your-agent.mdx +51 -4
  195. package/corpus/core/docs/content/locales/de-DE/voice-input.mdx +45 -4
  196. package/corpus/core/docs/content/locales/de-DE/what-is-agent-native.mdx +100 -8
  197. package/corpus/core/docs/content/locales/de-DE/workspace-connections.mdx +128 -8
  198. package/corpus/core/docs/content/locales/de-DE/workspace-management.mdx +50 -4
  199. package/corpus/core/docs/content/locales/de-DE/workspace.mdx +111 -8
  200. package/corpus/core/docs/content/locales/de-DE/writing-agent-instructions.mdx +45 -4
  201. package/corpus/core/docs/content/locales/es-ES/a2a-protocol.mdx +99 -9
  202. package/corpus/core/docs/content/locales/es-ES/actions.mdx +67 -4
  203. package/corpus/core/docs/content/locales/es-ES/agent-mentions.mdx +68 -4
  204. package/corpus/core/docs/content/locales/es-ES/agent-surfaces.mdx +120 -8
  205. package/corpus/core/docs/content/locales/es-ES/agent-teams.mdx +172 -12
  206. package/corpus/core/docs/content/locales/es-ES/agent-web-surfaces.mdx +51 -4
  207. package/corpus/core/docs/content/locales/es-ES/authentication.mdx +122 -8
  208. package/corpus/core/docs/content/locales/es-ES/automations.mdx +110 -8
  209. package/corpus/core/docs/content/locales/es-ES/blueprint-installer.mdx +42 -4
  210. package/corpus/core/docs/content/locales/es-ES/cli-adapters.mdx +44 -4
  211. package/corpus/core/docs/content/locales/es-ES/client.mdx +79 -8
  212. package/corpus/core/docs/content/locales/es-ES/cloneable-saas.mdx +85 -8
  213. package/corpus/core/docs/content/locales/es-ES/code-agents-ui.mdx +101 -8
  214. package/corpus/core/docs/content/locales/es-ES/components.mdx +118 -8
  215. package/corpus/core/docs/content/locales/es-ES/context-awareness.mdx +98 -8
  216. package/corpus/core/docs/content/locales/es-ES/creating-templates.mdx +51 -4
  217. package/corpus/core/docs/content/locales/es-ES/cross-app-sso.mdx +109 -8
  218. package/corpus/core/docs/content/locales/es-ES/database.mdx +52 -4
  219. package/corpus/core/docs/content/locales/es-ES/deployment.mdx +103 -8
  220. package/corpus/core/docs/content/locales/es-ES/dispatch.mdx +134 -8
  221. package/corpus/core/docs/content/locales/es-ES/drop-in-agent.mdx +63 -4
  222. package/corpus/core/docs/content/locales/es-ES/durable-resume.mdx +47 -4
  223. package/corpus/core/docs/content/locales/es-ES/embedding-sdk.mdx +87 -8
  224. package/corpus/core/docs/content/locales/es-ES/evals.mdx +102 -8
  225. package/corpus/core/docs/content/locales/es-ES/extensions.mdx +113 -9
  226. package/corpus/core/docs/content/locales/es-ES/external-agents.mdx +119 -8
  227. package/corpus/core/docs/content/locales/es-ES/faq.mdx +98 -8
  228. package/corpus/core/docs/content/locales/es-ES/file-uploads.mdx +61 -4
  229. package/corpus/core/docs/content/locales/es-ES/frames.mdx +88 -8
  230. package/corpus/core/docs/content/locales/es-ES/getting-started.mdx +34 -4
  231. package/corpus/core/docs/content/locales/es-ES/harness-agents.mdx +79 -8
  232. package/corpus/core/docs/content/locales/es-ES/human-approval.mdx +50 -4
  233. package/corpus/core/docs/content/locales/es-ES/key-concepts.mdx +104 -8
  234. package/corpus/core/docs/content/locales/es-ES/local-file-mode.mdx +60 -4
  235. package/corpus/core/docs/content/locales/es-ES/mcp-apps.mdx +120 -10
  236. package/corpus/core/docs/content/locales/es-ES/mcp-clients.mdx +135 -8
  237. package/corpus/core/docs/content/locales/es-ES/mcp-protocol.mdx +105 -8
  238. package/corpus/core/docs/content/locales/es-ES/messaging.mdx +115 -8
  239. package/corpus/core/docs/content/locales/es-ES/migration-workbench.mdx +47 -4
  240. package/corpus/core/docs/content/locales/es-ES/multi-app-workspace.mdx +91 -8
  241. package/corpus/core/docs/content/locales/es-ES/multi-tenancy.mdx +80 -8
  242. package/corpus/core/docs/content/locales/es-ES/native-chat-ui.mdx +108 -8
  243. package/corpus/core/docs/content/locales/es-ES/notifications.mdx +135 -8
  244. package/corpus/core/docs/content/locales/es-ES/observability.mdx +104 -8
  245. package/corpus/core/docs/content/locales/es-ES/observational-memory.mdx +92 -8
  246. package/corpus/core/docs/content/locales/es-ES/onboarding.mdx +45 -4
  247. package/corpus/core/docs/content/locales/es-ES/plan-plugin.mdx +99 -8
  248. package/corpus/core/docs/content/locales/es-ES/pr-visual-recap.mdx +125 -8
  249. package/corpus/core/docs/content/locales/es-ES/processors.mdx +41 -4
  250. package/corpus/core/docs/content/locales/es-ES/progress.mdx +46 -4
  251. package/corpus/core/docs/content/locales/es-ES/pure-agent-apps.mdx +50 -4
  252. package/corpus/core/docs/content/locales/es-ES/real-time-collaboration.mdx +109 -8
  253. package/corpus/core/docs/content/locales/es-ES/recurring-jobs.mdx +59 -4
  254. package/corpus/core/docs/content/locales/es-ES/routing.mdx +44 -5
  255. package/corpus/core/docs/content/locales/es-ES/sandbox-adapters.mdx +44 -4
  256. package/corpus/core/docs/content/locales/es-ES/security.mdx +82 -8
  257. package/corpus/core/docs/content/locales/es-ES/server.mdx +173 -12
  258. package/corpus/core/docs/content/locales/es-ES/sharing.mdx +45 -4
  259. package/corpus/core/docs/content/locales/es-ES/skills-guide.mdx +118 -9
  260. package/corpus/core/docs/content/locales/es-ES/template-analytics.mdx +46 -4
  261. package/corpus/core/docs/content/locales/es-ES/template-assets.mdx +64 -4
  262. package/corpus/core/docs/content/locales/es-ES/template-brain.mdx +69 -4
  263. package/corpus/core/docs/content/locales/es-ES/template-calendar.mdx +62 -4
  264. package/corpus/core/docs/content/locales/es-ES/template-chat.mdx +61 -4
  265. package/corpus/core/docs/content/locales/es-ES/template-clips.mdx +52 -4
  266. package/corpus/core/docs/content/locales/es-ES/template-content.mdx +64 -4
  267. package/corpus/core/docs/content/locales/es-ES/template-design.mdx +108 -4
  268. package/corpus/core/docs/content/locales/es-ES/template-dispatch.mdx +57 -4
  269. package/corpus/core/docs/content/locales/es-ES/template-forms.mdx +64 -4
  270. package/corpus/core/docs/content/locales/es-ES/template-mail.mdx +60 -4
  271. package/corpus/core/docs/content/locales/es-ES/template-plan.mdx +61 -4
  272. package/corpus/core/docs/content/locales/es-ES/template-slides.mdx +49 -4
  273. package/corpus/core/docs/content/locales/es-ES/template-videos.mdx +53 -4
  274. package/corpus/core/docs/content/locales/es-ES/tracking.mdx +54 -4
  275. package/corpus/core/docs/content/locales/es-ES/using-your-agent.mdx +51 -4
  276. package/corpus/core/docs/content/locales/es-ES/voice-input.mdx +45 -4
  277. package/corpus/core/docs/content/locales/es-ES/what-is-agent-native.mdx +99 -8
  278. package/corpus/core/docs/content/locales/es-ES/workspace-connections.mdx +128 -8
  279. package/corpus/core/docs/content/locales/es-ES/workspace-management.mdx +50 -4
  280. package/corpus/core/docs/content/locales/es-ES/workspace.mdx +112 -8
  281. package/corpus/core/docs/content/locales/es-ES/writing-agent-instructions.mdx +46 -4
  282. package/corpus/core/docs/content/locales/fr-FR/a2a-protocol.mdx +97 -9
  283. package/corpus/core/docs/content/locales/fr-FR/actions.mdx +67 -4
  284. package/corpus/core/docs/content/locales/fr-FR/agent-mentions.mdx +68 -4
  285. package/corpus/core/docs/content/locales/fr-FR/agent-surfaces.mdx +118 -8
  286. package/corpus/core/docs/content/locales/fr-FR/agent-teams.mdx +172 -12
  287. package/corpus/core/docs/content/locales/fr-FR/agent-web-surfaces.mdx +51 -4
  288. package/corpus/core/docs/content/locales/fr-FR/authentication.mdx +122 -8
  289. package/corpus/core/docs/content/locales/fr-FR/automations.mdx +110 -8
  290. package/corpus/core/docs/content/locales/fr-FR/blueprint-installer.mdx +42 -4
  291. package/corpus/core/docs/content/locales/fr-FR/cli-adapters.mdx +44 -4
  292. package/corpus/core/docs/content/locales/fr-FR/client.mdx +81 -8
  293. package/corpus/core/docs/content/locales/fr-FR/cloneable-saas.mdx +85 -8
  294. package/corpus/core/docs/content/locales/fr-FR/code-agents-ui.mdx +102 -8
  295. package/corpus/core/docs/content/locales/fr-FR/components.mdx +118 -8
  296. package/corpus/core/docs/content/locales/fr-FR/context-awareness.mdx +98 -8
  297. package/corpus/core/docs/content/locales/fr-FR/creating-templates.mdx +49 -4
  298. package/corpus/core/docs/content/locales/fr-FR/cross-app-sso.mdx +109 -8
  299. package/corpus/core/docs/content/locales/fr-FR/database.mdx +52 -4
  300. package/corpus/core/docs/content/locales/fr-FR/deployment.mdx +103 -8
  301. package/corpus/core/docs/content/locales/fr-FR/dispatch.mdx +134 -8
  302. package/corpus/core/docs/content/locales/fr-FR/drop-in-agent.mdx +63 -4
  303. package/corpus/core/docs/content/locales/fr-FR/durable-resume.mdx +47 -4
  304. package/corpus/core/docs/content/locales/fr-FR/embedding-sdk.mdx +87 -8
  305. package/corpus/core/docs/content/locales/fr-FR/evals.mdx +102 -8
  306. package/corpus/core/docs/content/locales/fr-FR/extensions.mdx +113 -9
  307. package/corpus/core/docs/content/locales/fr-FR/external-agents.mdx +119 -8
  308. package/corpus/core/docs/content/locales/fr-FR/faq.mdx +98 -8
  309. package/corpus/core/docs/content/locales/fr-FR/file-uploads.mdx +61 -4
  310. package/corpus/core/docs/content/locales/fr-FR/frames.mdx +90 -8
  311. package/corpus/core/docs/content/locales/fr-FR/getting-started.mdx +34 -4
  312. package/corpus/core/docs/content/locales/fr-FR/harness-agents.mdx +77 -8
  313. package/corpus/core/docs/content/locales/fr-FR/human-approval.mdx +50 -4
  314. package/corpus/core/docs/content/locales/fr-FR/key-concepts.mdx +106 -8
  315. package/corpus/core/docs/content/locales/fr-FR/local-file-mode.mdx +58 -4
  316. package/corpus/core/docs/content/locales/fr-FR/mcp-apps.mdx +120 -10
  317. package/corpus/core/docs/content/locales/fr-FR/mcp-clients.mdx +135 -8
  318. package/corpus/core/docs/content/locales/fr-FR/mcp-protocol.mdx +105 -8
  319. package/corpus/core/docs/content/locales/fr-FR/messaging.mdx +115 -8
  320. package/corpus/core/docs/content/locales/fr-FR/migration-workbench.mdx +47 -4
  321. package/corpus/core/docs/content/locales/fr-FR/multi-app-workspace.mdx +91 -8
  322. package/corpus/core/docs/content/locales/fr-FR/multi-tenancy.mdx +80 -8
  323. package/corpus/core/docs/content/locales/fr-FR/native-chat-ui.mdx +108 -8
  324. package/corpus/core/docs/content/locales/fr-FR/notifications.mdx +135 -8
  325. package/corpus/core/docs/content/locales/fr-FR/observability.mdx +104 -8
  326. package/corpus/core/docs/content/locales/fr-FR/observational-memory.mdx +89 -8
  327. package/corpus/core/docs/content/locales/fr-FR/onboarding.mdx +45 -4
  328. package/corpus/core/docs/content/locales/fr-FR/plan-plugin.mdx +99 -8
  329. package/corpus/core/docs/content/locales/fr-FR/pr-visual-recap.mdx +126 -8
  330. package/corpus/core/docs/content/locales/fr-FR/processors.mdx +41 -4
  331. package/corpus/core/docs/content/locales/fr-FR/progress.mdx +46 -4
  332. package/corpus/core/docs/content/locales/fr-FR/pure-agent-apps.mdx +48 -4
  333. package/corpus/core/docs/content/locales/fr-FR/real-time-collaboration.mdx +107 -8
  334. package/corpus/core/docs/content/locales/fr-FR/recurring-jobs.mdx +59 -4
  335. package/corpus/core/docs/content/locales/fr-FR/routing.mdx +44 -5
  336. package/corpus/core/docs/content/locales/fr-FR/sandbox-adapters.mdx +44 -4
  337. package/corpus/core/docs/content/locales/fr-FR/security.mdx +82 -8
  338. package/corpus/core/docs/content/locales/fr-FR/server.mdx +173 -12
  339. package/corpus/core/docs/content/locales/fr-FR/sharing.mdx +45 -4
  340. package/corpus/core/docs/content/locales/fr-FR/skills-guide.mdx +118 -9
  341. package/corpus/core/docs/content/locales/fr-FR/template-analytics.mdx +46 -4
  342. package/corpus/core/docs/content/locales/fr-FR/template-assets.mdx +66 -4
  343. package/corpus/core/docs/content/locales/fr-FR/template-brain.mdx +69 -4
  344. package/corpus/core/docs/content/locales/fr-FR/template-calendar.mdx +62 -4
  345. package/corpus/core/docs/content/locales/fr-FR/template-chat.mdx +61 -4
  346. package/corpus/core/docs/content/locales/fr-FR/template-clips.mdx +52 -4
  347. package/corpus/core/docs/content/locales/fr-FR/template-content.mdx +64 -4
  348. package/corpus/core/docs/content/locales/fr-FR/template-design.mdx +107 -4
  349. package/corpus/core/docs/content/locales/fr-FR/template-dispatch.mdx +57 -4
  350. package/corpus/core/docs/content/locales/fr-FR/template-forms.mdx +64 -4
  351. package/corpus/core/docs/content/locales/fr-FR/template-mail.mdx +60 -4
  352. package/corpus/core/docs/content/locales/fr-FR/template-plan.mdx +61 -4
  353. package/corpus/core/docs/content/locales/fr-FR/template-slides.mdx +49 -4
  354. package/corpus/core/docs/content/locales/fr-FR/template-videos.mdx +53 -4
  355. package/corpus/core/docs/content/locales/fr-FR/tracking.mdx +54 -4
  356. package/corpus/core/docs/content/locales/fr-FR/using-your-agent.mdx +51 -4
  357. package/corpus/core/docs/content/locales/fr-FR/voice-input.mdx +45 -4
  358. package/corpus/core/docs/content/locales/fr-FR/what-is-agent-native.mdx +101 -8
  359. package/corpus/core/docs/content/locales/fr-FR/workspace-connections.mdx +128 -8
  360. package/corpus/core/docs/content/locales/fr-FR/workspace-management.mdx +50 -4
  361. package/corpus/core/docs/content/locales/fr-FR/workspace.mdx +112 -8
  362. package/corpus/core/docs/content/locales/fr-FR/writing-agent-instructions.mdx +47 -4
  363. package/corpus/core/docs/content/locales/hi-IN/a2a-protocol.mdx +97 -9
  364. package/corpus/core/docs/content/locales/hi-IN/actions.mdx +63 -4
  365. package/corpus/core/docs/content/locales/hi-IN/agent-mentions.mdx +68 -4
  366. package/corpus/core/docs/content/locales/hi-IN/agent-surfaces.mdx +112 -8
  367. package/corpus/core/docs/content/locales/hi-IN/agent-teams.mdx +171 -12
  368. package/corpus/core/docs/content/locales/hi-IN/agent-web-surfaces.mdx +51 -4
  369. package/corpus/core/docs/content/locales/hi-IN/authentication.mdx +122 -8
  370. package/corpus/core/docs/content/locales/hi-IN/automations.mdx +110 -8
  371. package/corpus/core/docs/content/locales/hi-IN/blueprint-installer.mdx +42 -4
  372. package/corpus/core/docs/content/locales/hi-IN/cli-adapters.mdx +44 -4
  373. package/corpus/core/docs/content/locales/hi-IN/client.mdx +79 -8
  374. package/corpus/core/docs/content/locales/hi-IN/cloneable-saas.mdx +85 -8
  375. package/corpus/core/docs/content/locales/hi-IN/code-agents-ui.mdx +96 -8
  376. package/corpus/core/docs/content/locales/hi-IN/components.mdx +114 -8
  377. package/corpus/core/docs/content/locales/hi-IN/context-awareness.mdx +102 -8
  378. package/corpus/core/docs/content/locales/hi-IN/creating-templates.mdx +53 -4
  379. package/corpus/core/docs/content/locales/hi-IN/cross-app-sso.mdx +109 -8
  380. package/corpus/core/docs/content/locales/hi-IN/database.mdx +52 -4
  381. package/corpus/core/docs/content/locales/hi-IN/deployment.mdx +103 -8
  382. package/corpus/core/docs/content/locales/hi-IN/dispatch.mdx +134 -8
  383. package/corpus/core/docs/content/locales/hi-IN/drop-in-agent.mdx +63 -4
  384. package/corpus/core/docs/content/locales/hi-IN/durable-resume.mdx +47 -4
  385. package/corpus/core/docs/content/locales/hi-IN/embedding-sdk.mdx +83 -8
  386. package/corpus/core/docs/content/locales/hi-IN/evals.mdx +100 -8
  387. package/corpus/core/docs/content/locales/hi-IN/extensions.mdx +113 -9
  388. package/corpus/core/docs/content/locales/hi-IN/external-agents.mdx +119 -8
  389. package/corpus/core/docs/content/locales/hi-IN/faq.mdx +96 -8
  390. package/corpus/core/docs/content/locales/hi-IN/file-uploads.mdx +61 -4
  391. package/corpus/core/docs/content/locales/hi-IN/frames.mdx +88 -8
  392. package/corpus/core/docs/content/locales/hi-IN/getting-started.mdx +34 -4
  393. package/corpus/core/docs/content/locales/hi-IN/harness-agents.mdx +77 -8
  394. package/corpus/core/docs/content/locales/hi-IN/human-approval.mdx +51 -4
  395. package/corpus/core/docs/content/locales/hi-IN/key-concepts.mdx +104 -8
  396. package/corpus/core/docs/content/locales/hi-IN/local-file-mode.mdx +58 -4
  397. package/corpus/core/docs/content/locales/hi-IN/mcp-apps.mdx +120 -10
  398. package/corpus/core/docs/content/locales/hi-IN/mcp-clients.mdx +133 -8
  399. package/corpus/core/docs/content/locales/hi-IN/mcp-protocol.mdx +105 -8
  400. package/corpus/core/docs/content/locales/hi-IN/messaging.mdx +115 -8
  401. package/corpus/core/docs/content/locales/hi-IN/migration-workbench.mdx +45 -4
  402. package/corpus/core/docs/content/locales/hi-IN/multi-app-workspace.mdx +91 -8
  403. package/corpus/core/docs/content/locales/hi-IN/multi-tenancy.mdx +80 -8
  404. package/corpus/core/docs/content/locales/hi-IN/native-chat-ui.mdx +106 -8
  405. package/corpus/core/docs/content/locales/hi-IN/notifications.mdx +135 -8
  406. package/corpus/core/docs/content/locales/hi-IN/observability.mdx +102 -8
  407. package/corpus/core/docs/content/locales/hi-IN/observational-memory.mdx +89 -8
  408. package/corpus/core/docs/content/locales/hi-IN/onboarding.mdx +45 -4
  409. package/corpus/core/docs/content/locales/hi-IN/plan-plugin.mdx +99 -8
  410. package/corpus/core/docs/content/locales/hi-IN/pr-visual-recap.mdx +126 -8
  411. package/corpus/core/docs/content/locales/hi-IN/processors.mdx +41 -4
  412. package/corpus/core/docs/content/locales/hi-IN/progress.mdx +46 -4
  413. package/corpus/core/docs/content/locales/hi-IN/pure-agent-apps.mdx +48 -4
  414. package/corpus/core/docs/content/locales/hi-IN/real-time-collaboration.mdx +106 -8
  415. package/corpus/core/docs/content/locales/hi-IN/recurring-jobs.mdx +59 -4
  416. package/corpus/core/docs/content/locales/hi-IN/routing.mdx +44 -5
  417. package/corpus/core/docs/content/locales/hi-IN/sandbox-adapters.mdx +43 -4
  418. package/corpus/core/docs/content/locales/hi-IN/security.mdx +78 -8
  419. package/corpus/core/docs/content/locales/hi-IN/server.mdx +169 -12
  420. package/corpus/core/docs/content/locales/hi-IN/sharing.mdx +45 -4
  421. package/corpus/core/docs/content/locales/hi-IN/skills-guide.mdx +118 -9
  422. package/corpus/core/docs/content/locales/hi-IN/template-analytics.mdx +46 -4
  423. package/corpus/core/docs/content/locales/hi-IN/template-assets.mdx +62 -4
  424. package/corpus/core/docs/content/locales/hi-IN/template-brain.mdx +69 -4
  425. package/corpus/core/docs/content/locales/hi-IN/template-calendar.mdx +62 -4
  426. package/corpus/core/docs/content/locales/hi-IN/template-chat.mdx +59 -4
  427. package/corpus/core/docs/content/locales/hi-IN/template-clips.mdx +52 -4
  428. package/corpus/core/docs/content/locales/hi-IN/template-content.mdx +62 -4
  429. package/corpus/core/docs/content/locales/hi-IN/template-design.mdx +102 -4
  430. package/corpus/core/docs/content/locales/hi-IN/template-dispatch.mdx +57 -4
  431. package/corpus/core/docs/content/locales/hi-IN/template-forms.mdx +64 -4
  432. package/corpus/core/docs/content/locales/hi-IN/template-mail.mdx +64 -4
  433. package/corpus/core/docs/content/locales/hi-IN/template-plan.mdx +61 -4
  434. package/corpus/core/docs/content/locales/hi-IN/template-slides.mdx +49 -4
  435. package/corpus/core/docs/content/locales/hi-IN/template-videos.mdx +53 -4
  436. package/corpus/core/docs/content/locales/hi-IN/tracking.mdx +54 -4
  437. package/corpus/core/docs/content/locales/hi-IN/using-your-agent.mdx +51 -4
  438. package/corpus/core/docs/content/locales/hi-IN/voice-input.mdx +43 -4
  439. package/corpus/core/docs/content/locales/hi-IN/what-is-agent-native.mdx +97 -8
  440. package/corpus/core/docs/content/locales/hi-IN/workspace-connections.mdx +128 -8
  441. package/corpus/core/docs/content/locales/hi-IN/workspace-management.mdx +50 -4
  442. package/corpus/core/docs/content/locales/hi-IN/workspace.mdx +111 -8
  443. package/corpus/core/docs/content/locales/hi-IN/writing-agent-instructions.mdx +40 -4
  444. package/corpus/core/docs/content/locales/ja-JP/a2a-protocol.mdx +97 -9
  445. package/corpus/core/docs/content/locales/ja-JP/actions.mdx +67 -4
  446. package/corpus/core/docs/content/locales/ja-JP/agent-mentions.mdx +68 -4
  447. package/corpus/core/docs/content/locales/ja-JP/agent-surfaces.mdx +116 -8
  448. package/corpus/core/docs/content/locales/ja-JP/agent-teams.mdx +172 -12
  449. package/corpus/core/docs/content/locales/ja-JP/agent-web-surfaces.mdx +51 -4
  450. package/corpus/core/docs/content/locales/ja-JP/authentication.mdx +122 -8
  451. package/corpus/core/docs/content/locales/ja-JP/automations.mdx +110 -8
  452. package/corpus/core/docs/content/locales/ja-JP/blueprint-installer.mdx +44 -4
  453. package/corpus/core/docs/content/locales/ja-JP/cli-adapters.mdx +44 -4
  454. package/corpus/core/docs/content/locales/ja-JP/client.mdx +79 -8
  455. package/corpus/core/docs/content/locales/ja-JP/cloneable-saas.mdx +85 -8
  456. package/corpus/core/docs/content/locales/ja-JP/code-agents-ui.mdx +100 -8
  457. package/corpus/core/docs/content/locales/ja-JP/components.mdx +116 -8
  458. package/corpus/core/docs/content/locales/ja-JP/context-awareness.mdx +100 -8
  459. package/corpus/core/docs/content/locales/ja-JP/creating-templates.mdx +51 -4
  460. package/corpus/core/docs/content/locales/ja-JP/cross-app-sso.mdx +109 -8
  461. package/corpus/core/docs/content/locales/ja-JP/database.mdx +52 -4
  462. package/corpus/core/docs/content/locales/ja-JP/deployment.mdx +103 -8
  463. package/corpus/core/docs/content/locales/ja-JP/dispatch.mdx +134 -8
  464. package/corpus/core/docs/content/locales/ja-JP/drop-in-agent.mdx +63 -4
  465. package/corpus/core/docs/content/locales/ja-JP/durable-resume.mdx +47 -4
  466. package/corpus/core/docs/content/locales/ja-JP/embedding-sdk.mdx +85 -8
  467. package/corpus/core/docs/content/locales/ja-JP/evals.mdx +102 -8
  468. package/corpus/core/docs/content/locales/ja-JP/extensions.mdx +111 -9
  469. package/corpus/core/docs/content/locales/ja-JP/external-agents.mdx +119 -8
  470. package/corpus/core/docs/content/locales/ja-JP/faq.mdx +98 -8
  471. package/corpus/core/docs/content/locales/ja-JP/file-uploads.mdx +61 -4
  472. package/corpus/core/docs/content/locales/ja-JP/frames.mdx +88 -8
  473. package/corpus/core/docs/content/locales/ja-JP/getting-started.mdx +34 -4
  474. package/corpus/core/docs/content/locales/ja-JP/harness-agents.mdx +79 -8
  475. package/corpus/core/docs/content/locales/ja-JP/human-approval.mdx +50 -4
  476. package/corpus/core/docs/content/locales/ja-JP/key-concepts.mdx +105 -8
  477. package/corpus/core/docs/content/locales/ja-JP/local-file-mode.mdx +58 -4
  478. package/corpus/core/docs/content/locales/ja-JP/mcp-apps.mdx +119 -10
  479. package/corpus/core/docs/content/locales/ja-JP/mcp-clients.mdx +134 -8
  480. package/corpus/core/docs/content/locales/ja-JP/mcp-protocol.mdx +105 -8
  481. package/corpus/core/docs/content/locales/ja-JP/messaging.mdx +115 -8
  482. package/corpus/core/docs/content/locales/ja-JP/migration-workbench.mdx +47 -4
  483. package/corpus/core/docs/content/locales/ja-JP/multi-app-workspace.mdx +91 -8
  484. package/corpus/core/docs/content/locales/ja-JP/multi-tenancy.mdx +80 -8
  485. package/corpus/core/docs/content/locales/ja-JP/native-chat-ui.mdx +104 -8
  486. package/corpus/core/docs/content/locales/ja-JP/notifications.mdx +135 -8
  487. package/corpus/core/docs/content/locales/ja-JP/observability.mdx +104 -8
  488. package/corpus/core/docs/content/locales/ja-JP/observational-memory.mdx +89 -8
  489. package/corpus/core/docs/content/locales/ja-JP/onboarding.mdx +45 -4
  490. package/corpus/core/docs/content/locales/ja-JP/plan-plugin.mdx +99 -8
  491. package/corpus/core/docs/content/locales/ja-JP/pr-visual-recap.mdx +123 -8
  492. package/corpus/core/docs/content/locales/ja-JP/processors.mdx +39 -4
  493. package/corpus/core/docs/content/locales/ja-JP/progress.mdx +46 -4
  494. package/corpus/core/docs/content/locales/ja-JP/pure-agent-apps.mdx +48 -4
  495. package/corpus/core/docs/content/locales/ja-JP/real-time-collaboration.mdx +106 -8
  496. package/corpus/core/docs/content/locales/ja-JP/recurring-jobs.mdx +59 -4
  497. package/corpus/core/docs/content/locales/ja-JP/routing.mdx +44 -5
  498. package/corpus/core/docs/content/locales/ja-JP/sandbox-adapters.mdx +43 -4
  499. package/corpus/core/docs/content/locales/ja-JP/security.mdx +82 -8
  500. package/corpus/core/docs/content/locales/ja-JP/server.mdx +171 -12
  501. package/corpus/core/docs/content/locales/ja-JP/sharing.mdx +45 -4
  502. package/corpus/core/docs/content/locales/ja-JP/skills-guide.mdx +118 -9
  503. package/corpus/core/docs/content/locales/ja-JP/template-analytics.mdx +46 -4
  504. package/corpus/core/docs/content/locales/ja-JP/template-assets.mdx +64 -4
  505. package/corpus/core/docs/content/locales/ja-JP/template-brain.mdx +67 -4
  506. package/corpus/core/docs/content/locales/ja-JP/template-calendar.mdx +62 -4
  507. package/corpus/core/docs/content/locales/ja-JP/template-chat.mdx +61 -4
  508. package/corpus/core/docs/content/locales/ja-JP/template-clips.mdx +52 -4
  509. package/corpus/core/docs/content/locales/ja-JP/template-content.mdx +62 -4
  510. package/corpus/core/docs/content/locales/ja-JP/template-design.mdx +106 -4
  511. package/corpus/core/docs/content/locales/ja-JP/template-dispatch.mdx +57 -4
  512. package/corpus/core/docs/content/locales/ja-JP/template-forms.mdx +62 -4
  513. package/corpus/core/docs/content/locales/ja-JP/template-mail.mdx +62 -4
  514. package/corpus/core/docs/content/locales/ja-JP/template-plan.mdx +63 -4
  515. package/corpus/core/docs/content/locales/ja-JP/template-slides.mdx +49 -4
  516. package/corpus/core/docs/content/locales/ja-JP/template-videos.mdx +53 -4
  517. package/corpus/core/docs/content/locales/ja-JP/tracking.mdx +54 -4
  518. package/corpus/core/docs/content/locales/ja-JP/using-your-agent.mdx +51 -4
  519. package/corpus/core/docs/content/locales/ja-JP/voice-input.mdx +43 -4
  520. package/corpus/core/docs/content/locales/ja-JP/what-is-agent-native.mdx +96 -8
  521. package/corpus/core/docs/content/locales/ja-JP/workspace-connections.mdx +128 -8
  522. package/corpus/core/docs/content/locales/ja-JP/workspace-management.mdx +50 -4
  523. package/corpus/core/docs/content/locales/ja-JP/workspace.mdx +111 -8
  524. package/corpus/core/docs/content/locales/ja-JP/writing-agent-instructions.mdx +44 -4
  525. package/corpus/core/docs/content/locales/ko-KR/a2a-protocol.mdx +97 -9
  526. package/corpus/core/docs/content/locales/ko-KR/actions.mdx +63 -4
  527. package/corpus/core/docs/content/locales/ko-KR/agent-mentions.mdx +68 -4
  528. package/corpus/core/docs/content/locales/ko-KR/agent-surfaces.mdx +113 -8
  529. package/corpus/core/docs/content/locales/ko-KR/agent-teams.mdx +171 -12
  530. package/corpus/core/docs/content/locales/ko-KR/agent-web-surfaces.mdx +51 -4
  531. package/corpus/core/docs/content/locales/ko-KR/authentication.mdx +122 -8
  532. package/corpus/core/docs/content/locales/ko-KR/automations.mdx +110 -8
  533. package/corpus/core/docs/content/locales/ko-KR/blueprint-installer.mdx +42 -4
  534. package/corpus/core/docs/content/locales/ko-KR/cli-adapters.mdx +44 -4
  535. package/corpus/core/docs/content/locales/ko-KR/client.mdx +79 -8
  536. package/corpus/core/docs/content/locales/ko-KR/cloneable-saas.mdx +85 -8
  537. package/corpus/core/docs/content/locales/ko-KR/code-agents-ui.mdx +96 -8
  538. package/corpus/core/docs/content/locales/ko-KR/components.mdx +112 -8
  539. package/corpus/core/docs/content/locales/ko-KR/context-awareness.mdx +96 -8
  540. package/corpus/core/docs/content/locales/ko-KR/creating-templates.mdx +51 -4
  541. package/corpus/core/docs/content/locales/ko-KR/cross-app-sso.mdx +109 -8
  542. package/corpus/core/docs/content/locales/ko-KR/database.mdx +52 -4
  543. package/corpus/core/docs/content/locales/ko-KR/deployment.mdx +103 -8
  544. package/corpus/core/docs/content/locales/ko-KR/dispatch.mdx +132 -8
  545. package/corpus/core/docs/content/locales/ko-KR/drop-in-agent.mdx +63 -4
  546. package/corpus/core/docs/content/locales/ko-KR/durable-resume.mdx +47 -4
  547. package/corpus/core/docs/content/locales/ko-KR/embedding-sdk.mdx +81 -8
  548. package/corpus/core/docs/content/locales/ko-KR/evals.mdx +102 -8
  549. package/corpus/core/docs/content/locales/ko-KR/extensions.mdx +111 -9
  550. package/corpus/core/docs/content/locales/ko-KR/external-agents.mdx +119 -8
  551. package/corpus/core/docs/content/locales/ko-KR/faq.mdx +96 -8
  552. package/corpus/core/docs/content/locales/ko-KR/file-uploads.mdx +61 -4
  553. package/corpus/core/docs/content/locales/ko-KR/frames.mdx +86 -8
  554. package/corpus/core/docs/content/locales/ko-KR/getting-started.mdx +34 -4
  555. package/corpus/core/docs/content/locales/ko-KR/harness-agents.mdx +77 -8
  556. package/corpus/core/docs/content/locales/ko-KR/human-approval.mdx +50 -4
  557. package/corpus/core/docs/content/locales/ko-KR/key-concepts.mdx +104 -8
  558. package/corpus/core/docs/content/locales/ko-KR/local-file-mode.mdx +56 -4
  559. package/corpus/core/docs/content/locales/ko-KR/mcp-apps.mdx +120 -10
  560. package/corpus/core/docs/content/locales/ko-KR/mcp-clients.mdx +133 -8
  561. package/corpus/core/docs/content/locales/ko-KR/mcp-protocol.mdx +105 -8
  562. package/corpus/core/docs/content/locales/ko-KR/messaging.mdx +115 -8
  563. package/corpus/core/docs/content/locales/ko-KR/migration-workbench.mdx +45 -4
  564. package/corpus/core/docs/content/locales/ko-KR/multi-app-workspace.mdx +91 -8
  565. package/corpus/core/docs/content/locales/ko-KR/multi-tenancy.mdx +80 -8
  566. package/corpus/core/docs/content/locales/ko-KR/native-chat-ui.mdx +104 -8
  567. package/corpus/core/docs/content/locales/ko-KR/notifications.mdx +135 -8
  568. package/corpus/core/docs/content/locales/ko-KR/observability.mdx +102 -8
  569. package/corpus/core/docs/content/locales/ko-KR/observational-memory.mdx +87 -8
  570. package/corpus/core/docs/content/locales/ko-KR/onboarding.mdx +44 -4
  571. package/corpus/core/docs/content/locales/ko-KR/plan-plugin.mdx +99 -8
  572. package/corpus/core/docs/content/locales/ko-KR/pr-visual-recap.mdx +125 -8
  573. package/corpus/core/docs/content/locales/ko-KR/processors.mdx +39 -4
  574. package/corpus/core/docs/content/locales/ko-KR/progress.mdx +46 -4
  575. package/corpus/core/docs/content/locales/ko-KR/pure-agent-apps.mdx +46 -4
  576. package/corpus/core/docs/content/locales/ko-KR/real-time-collaboration.mdx +104 -8
  577. package/corpus/core/docs/content/locales/ko-KR/recurring-jobs.mdx +59 -4
  578. package/corpus/core/docs/content/locales/ko-KR/routing.mdx +44 -5
  579. package/corpus/core/docs/content/locales/ko-KR/sandbox-adapters.mdx +41 -4
  580. package/corpus/core/docs/content/locales/ko-KR/security.mdx +78 -8
  581. package/corpus/core/docs/content/locales/ko-KR/server.mdx +171 -12
  582. package/corpus/core/docs/content/locales/ko-KR/sharing.mdx +45 -4
  583. package/corpus/core/docs/content/locales/ko-KR/skills-guide.mdx +118 -9
  584. package/corpus/core/docs/content/locales/ko-KR/template-analytics.mdx +46 -4
  585. package/corpus/core/docs/content/locales/ko-KR/template-assets.mdx +62 -4
  586. package/corpus/core/docs/content/locales/ko-KR/template-brain.mdx +65 -4
  587. package/corpus/core/docs/content/locales/ko-KR/template-calendar.mdx +60 -4
  588. package/corpus/core/docs/content/locales/ko-KR/template-chat.mdx +59 -4
  589. package/corpus/core/docs/content/locales/ko-KR/template-clips.mdx +52 -4
  590. package/corpus/core/docs/content/locales/ko-KR/template-content.mdx +60 -4
  591. package/corpus/core/docs/content/locales/ko-KR/template-design.mdx +102 -4
  592. package/corpus/core/docs/content/locales/ko-KR/template-dispatch.mdx +57 -4
  593. package/corpus/core/docs/content/locales/ko-KR/template-forms.mdx +60 -4
  594. package/corpus/core/docs/content/locales/ko-KR/template-mail.mdx +60 -4
  595. package/corpus/core/docs/content/locales/ko-KR/template-plan.mdx +57 -4
  596. package/corpus/core/docs/content/locales/ko-KR/template-slides.mdx +49 -4
  597. package/corpus/core/docs/content/locales/ko-KR/template-videos.mdx +53 -4
  598. package/corpus/core/docs/content/locales/ko-KR/tracking.mdx +54 -4
  599. package/corpus/core/docs/content/locales/ko-KR/using-your-agent.mdx +51 -4
  600. package/corpus/core/docs/content/locales/ko-KR/voice-input.mdx +43 -4
  601. package/corpus/core/docs/content/locales/ko-KR/what-is-agent-native.mdx +95 -8
  602. package/corpus/core/docs/content/locales/ko-KR/workspace-connections.mdx +128 -8
  603. package/corpus/core/docs/content/locales/ko-KR/workspace-management.mdx +50 -4
  604. package/corpus/core/docs/content/locales/ko-KR/workspace.mdx +111 -8
  605. package/corpus/core/docs/content/locales/ko-KR/writing-agent-instructions.mdx +38 -4
  606. package/corpus/core/docs/content/locales/pt-BR/a2a-protocol.mdx +99 -9
  607. package/corpus/core/docs/content/locales/pt-BR/actions.mdx +67 -4
  608. package/corpus/core/docs/content/locales/pt-BR/agent-mentions.mdx +68 -4
  609. package/corpus/core/docs/content/locales/pt-BR/agent-surfaces.mdx +116 -8
  610. package/corpus/core/docs/content/locales/pt-BR/agent-teams.mdx +172 -12
  611. package/corpus/core/docs/content/locales/pt-BR/agent-web-surfaces.mdx +51 -4
  612. package/corpus/core/docs/content/locales/pt-BR/authentication.mdx +122 -8
  613. package/corpus/core/docs/content/locales/pt-BR/automations.mdx +110 -8
  614. package/corpus/core/docs/content/locales/pt-BR/blueprint-installer.mdx +42 -4
  615. package/corpus/core/docs/content/locales/pt-BR/cli-adapters.mdx +44 -4
  616. package/corpus/core/docs/content/locales/pt-BR/client.mdx +81 -8
  617. package/corpus/core/docs/content/locales/pt-BR/cloneable-saas.mdx +85 -8
  618. package/corpus/core/docs/content/locales/pt-BR/code-agents-ui.mdx +98 -8
  619. package/corpus/core/docs/content/locales/pt-BR/components.mdx +118 -8
  620. package/corpus/core/docs/content/locales/pt-BR/context-awareness.mdx +100 -8
  621. package/corpus/core/docs/content/locales/pt-BR/creating-templates.mdx +51 -4
  622. package/corpus/core/docs/content/locales/pt-BR/cross-app-sso.mdx +109 -8
  623. package/corpus/core/docs/content/locales/pt-BR/database.mdx +52 -4
  624. package/corpus/core/docs/content/locales/pt-BR/deployment.mdx +103 -8
  625. package/corpus/core/docs/content/locales/pt-BR/dispatch.mdx +134 -8
  626. package/corpus/core/docs/content/locales/pt-BR/drop-in-agent.mdx +63 -4
  627. package/corpus/core/docs/content/locales/pt-BR/durable-resume.mdx +47 -4
  628. package/corpus/core/docs/content/locales/pt-BR/embedding-sdk.mdx +87 -8
  629. package/corpus/core/docs/content/locales/pt-BR/evals.mdx +102 -8
  630. package/corpus/core/docs/content/locales/pt-BR/extensions.mdx +113 -9
  631. package/corpus/core/docs/content/locales/pt-BR/external-agents.mdx +119 -8
  632. package/corpus/core/docs/content/locales/pt-BR/faq.mdx +98 -8
  633. package/corpus/core/docs/content/locales/pt-BR/file-uploads.mdx +61 -4
  634. package/corpus/core/docs/content/locales/pt-BR/frames.mdx +88 -8
  635. package/corpus/core/docs/content/locales/pt-BR/getting-started.mdx +34 -4
  636. package/corpus/core/docs/content/locales/pt-BR/harness-agents.mdx +79 -8
  637. package/corpus/core/docs/content/locales/pt-BR/human-approval.mdx +50 -4
  638. package/corpus/core/docs/content/locales/pt-BR/key-concepts.mdx +104 -8
  639. package/corpus/core/docs/content/locales/pt-BR/local-file-mode.mdx +60 -4
  640. package/corpus/core/docs/content/locales/pt-BR/mcp-apps.mdx +120 -10
  641. package/corpus/core/docs/content/locales/pt-BR/mcp-clients.mdx +133 -8
  642. package/corpus/core/docs/content/locales/pt-BR/mcp-protocol.mdx +105 -8
  643. package/corpus/core/docs/content/locales/pt-BR/messaging.mdx +115 -8
  644. package/corpus/core/docs/content/locales/pt-BR/migration-workbench.mdx +47 -4
  645. package/corpus/core/docs/content/locales/pt-BR/multi-app-workspace.mdx +91 -8
  646. package/corpus/core/docs/content/locales/pt-BR/multi-tenancy.mdx +80 -8
  647. package/corpus/core/docs/content/locales/pt-BR/native-chat-ui.mdx +108 -8
  648. package/corpus/core/docs/content/locales/pt-BR/notifications.mdx +135 -8
  649. package/corpus/core/docs/content/locales/pt-BR/observability.mdx +104 -8
  650. package/corpus/core/docs/content/locales/pt-BR/observational-memory.mdx +92 -8
  651. package/corpus/core/docs/content/locales/pt-BR/onboarding.mdx +45 -4
  652. package/corpus/core/docs/content/locales/pt-BR/plan-plugin.mdx +99 -8
  653. package/corpus/core/docs/content/locales/pt-BR/pr-visual-recap.mdx +125 -8
  654. package/corpus/core/docs/content/locales/pt-BR/processors.mdx +41 -4
  655. package/corpus/core/docs/content/locales/pt-BR/progress.mdx +46 -4
  656. package/corpus/core/docs/content/locales/pt-BR/pure-agent-apps.mdx +48 -4
  657. package/corpus/core/docs/content/locales/pt-BR/real-time-collaboration.mdx +107 -8
  658. package/corpus/core/docs/content/locales/pt-BR/recurring-jobs.mdx +59 -4
  659. package/corpus/core/docs/content/locales/pt-BR/routing.mdx +44 -5
  660. package/corpus/core/docs/content/locales/pt-BR/sandbox-adapters.mdx +43 -4
  661. package/corpus/core/docs/content/locales/pt-BR/security.mdx +82 -8
  662. package/corpus/core/docs/content/locales/pt-BR/server.mdx +173 -12
  663. package/corpus/core/docs/content/locales/pt-BR/sharing.mdx +45 -4
  664. package/corpus/core/docs/content/locales/pt-BR/skills-guide.mdx +118 -9
  665. package/corpus/core/docs/content/locales/pt-BR/template-analytics.mdx +46 -4
  666. package/corpus/core/docs/content/locales/pt-BR/template-assets.mdx +64 -4
  667. package/corpus/core/docs/content/locales/pt-BR/template-brain.mdx +69 -4
  668. package/corpus/core/docs/content/locales/pt-BR/template-calendar.mdx +62 -4
  669. package/corpus/core/docs/content/locales/pt-BR/template-chat.mdx +61 -4
  670. package/corpus/core/docs/content/locales/pt-BR/template-clips.mdx +52 -4
  671. package/corpus/core/docs/content/locales/pt-BR/template-content.mdx +64 -4
  672. package/corpus/core/docs/content/locales/pt-BR/template-design.mdx +106 -4
  673. package/corpus/core/docs/content/locales/pt-BR/template-dispatch.mdx +57 -4
  674. package/corpus/core/docs/content/locales/pt-BR/template-forms.mdx +64 -4
  675. package/corpus/core/docs/content/locales/pt-BR/template-mail.mdx +60 -4
  676. package/corpus/core/docs/content/locales/pt-BR/template-plan.mdx +63 -4
  677. package/corpus/core/docs/content/locales/pt-BR/template-slides.mdx +49 -4
  678. package/corpus/core/docs/content/locales/pt-BR/template-videos.mdx +53 -4
  679. package/corpus/core/docs/content/locales/pt-BR/tracking.mdx +54 -4
  680. package/corpus/core/docs/content/locales/pt-BR/using-your-agent.mdx +51 -4
  681. package/corpus/core/docs/content/locales/pt-BR/voice-input.mdx +43 -4
  682. package/corpus/core/docs/content/locales/pt-BR/what-is-agent-native.mdx +101 -8
  683. package/corpus/core/docs/content/locales/pt-BR/workspace-connections.mdx +128 -8
  684. package/corpus/core/docs/content/locales/pt-BR/workspace-management.mdx +50 -4
  685. package/corpus/core/docs/content/locales/pt-BR/workspace.mdx +111 -8
  686. package/corpus/core/docs/content/locales/pt-BR/writing-agent-instructions.mdx +46 -4
  687. package/corpus/core/docs/content/locales/zh-CN/a2a-protocol.mdx +97 -9
  688. package/corpus/core/docs/content/locales/zh-CN/actions.mdx +65 -4
  689. package/corpus/core/docs/content/locales/zh-CN/agent-mentions.mdx +68 -4
  690. package/corpus/core/docs/content/locales/zh-CN/agent-surfaces.mdx +108 -8
  691. package/corpus/core/docs/content/locales/zh-CN/agent-teams.mdx +171 -12
  692. package/corpus/core/docs/content/locales/zh-CN/agent-web-surfaces.mdx +51 -4
  693. package/corpus/core/docs/content/locales/zh-CN/authentication.mdx +122 -8
  694. package/corpus/core/docs/content/locales/zh-CN/automations.mdx +110 -8
  695. package/corpus/core/docs/content/locales/zh-CN/blueprint-installer.mdx +42 -4
  696. package/corpus/core/docs/content/locales/zh-CN/cli-adapters.mdx +44 -4
  697. package/corpus/core/docs/content/locales/zh-CN/client.mdx +79 -8
  698. package/corpus/core/docs/content/locales/zh-CN/cloneable-saas.mdx +83 -8
  699. package/corpus/core/docs/content/locales/zh-CN/code-agents-ui.mdx +94 -8
  700. package/corpus/core/docs/content/locales/zh-CN/components.mdx +112 -8
  701. package/corpus/core/docs/content/locales/zh-CN/context-awareness.mdx +96 -8
  702. package/corpus/core/docs/content/locales/zh-CN/creating-templates.mdx +51 -4
  703. package/corpus/core/docs/content/locales/zh-CN/cross-app-sso.mdx +107 -8
  704. package/corpus/core/docs/content/locales/zh-CN/database.mdx +52 -4
  705. package/corpus/core/docs/content/locales/zh-CN/deployment.mdx +103 -8
  706. package/corpus/core/docs/content/locales/zh-CN/dispatch.mdx +134 -8
  707. package/corpus/core/docs/content/locales/zh-CN/drop-in-agent.mdx +63 -4
  708. package/corpus/core/docs/content/locales/zh-CN/durable-resume.mdx +45 -4
  709. package/corpus/core/docs/content/locales/zh-CN/embedding-sdk.mdx +81 -8
  710. package/corpus/core/docs/content/locales/zh-CN/evals.mdx +100 -8
  711. package/corpus/core/docs/content/locales/zh-CN/extensions.mdx +111 -9
  712. package/corpus/core/docs/content/locales/zh-CN/external-agents.mdx +119 -8
  713. package/corpus/core/docs/content/locales/zh-CN/faq.mdx +96 -8
  714. package/corpus/core/docs/content/locales/zh-CN/file-uploads.mdx +61 -4
  715. package/corpus/core/docs/content/locales/zh-CN/frames.mdx +86 -8
  716. package/corpus/core/docs/content/locales/zh-CN/getting-started.mdx +34 -4
  717. package/corpus/core/docs/content/locales/zh-CN/harness-agents.mdx +79 -8
  718. package/corpus/core/docs/content/locales/zh-CN/human-approval.mdx +50 -4
  719. package/corpus/core/docs/content/locales/zh-CN/key-concepts.mdx +100 -8
  720. package/corpus/core/docs/content/locales/zh-CN/local-file-mode.mdx +56 -4
  721. package/corpus/core/docs/content/locales/zh-CN/mcp-apps.mdx +120 -10
  722. package/corpus/core/docs/content/locales/zh-CN/mcp-clients.mdx +133 -8
  723. package/corpus/core/docs/content/locales/zh-CN/mcp-protocol.mdx +105 -8
  724. package/corpus/core/docs/content/locales/zh-CN/messaging.mdx +115 -8
  725. package/corpus/core/docs/content/locales/zh-CN/migration-workbench.mdx +45 -4
  726. package/corpus/core/docs/content/locales/zh-CN/multi-app-workspace.mdx +91 -8
  727. package/corpus/core/docs/content/locales/zh-CN/multi-tenancy.mdx +80 -8
  728. package/corpus/core/docs/content/locales/zh-CN/native-chat-ui.mdx +104 -8
  729. package/corpus/core/docs/content/locales/zh-CN/notifications.mdx +135 -8
  730. package/corpus/core/docs/content/locales/zh-CN/observability.mdx +102 -8
  731. package/corpus/core/docs/content/locales/zh-CN/observational-memory.mdx +85 -8
  732. package/corpus/core/docs/content/locales/zh-CN/onboarding.mdx +44 -4
  733. package/corpus/core/docs/content/locales/zh-CN/plan-plugin.mdx +97 -8
  734. package/corpus/core/docs/content/locales/zh-CN/pr-visual-recap.mdx +123 -8
  735. package/corpus/core/docs/content/locales/zh-CN/processors.mdx +39 -4
  736. package/corpus/core/docs/content/locales/zh-CN/progress.mdx +46 -4
  737. package/corpus/core/docs/content/locales/zh-CN/pure-agent-apps.mdx +46 -4
  738. package/corpus/core/docs/content/locales/zh-CN/real-time-collaboration.mdx +98 -8
  739. package/corpus/core/docs/content/locales/zh-CN/recurring-jobs.mdx +59 -4
  740. package/corpus/core/docs/content/locales/zh-CN/routing.mdx +42 -5
  741. package/corpus/core/docs/content/locales/zh-CN/sandbox-adapters.mdx +41 -4
  742. package/corpus/core/docs/content/locales/zh-CN/security.mdx +78 -8
  743. package/corpus/core/docs/content/locales/zh-CN/server.mdx +169 -12
  744. package/corpus/core/docs/content/locales/zh-CN/sharing.mdx +45 -4
  745. package/corpus/core/docs/content/locales/zh-CN/skills-guide.mdx +118 -9
  746. package/corpus/core/docs/content/locales/zh-CN/template-analytics.mdx +46 -4
  747. package/corpus/core/docs/content/locales/zh-CN/template-assets.mdx +58 -4
  748. package/corpus/core/docs/content/locales/zh-CN/template-brain.mdx +65 -4
  749. package/corpus/core/docs/content/locales/zh-CN/template-calendar.mdx +58 -4
  750. package/corpus/core/docs/content/locales/zh-CN/template-chat.mdx +57 -4
  751. package/corpus/core/docs/content/locales/zh-CN/template-clips.mdx +52 -4
  752. package/corpus/core/docs/content/locales/zh-CN/template-content.mdx +58 -4
  753. package/corpus/core/docs/content/locales/zh-CN/template-design.mdx +94 -4
  754. package/corpus/core/docs/content/locales/zh-CN/template-dispatch.mdx +57 -4
  755. package/corpus/core/docs/content/locales/zh-CN/template-forms.mdx +58 -4
  756. package/corpus/core/docs/content/locales/zh-CN/template-mail.mdx +60 -4
  757. package/corpus/core/docs/content/locales/zh-CN/template-plan.mdx +57 -4
  758. package/corpus/core/docs/content/locales/zh-CN/template-slides.mdx +49 -4
  759. package/corpus/core/docs/content/locales/zh-CN/template-videos.mdx +51 -4
  760. package/corpus/core/docs/content/locales/zh-CN/tracking.mdx +54 -4
  761. package/corpus/core/docs/content/locales/zh-CN/using-your-agent.mdx +51 -4
  762. package/corpus/core/docs/content/locales/zh-CN/voice-input.mdx +43 -4
  763. package/corpus/core/docs/content/locales/zh-CN/what-is-agent-native.mdx +94 -8
  764. package/corpus/core/docs/content/locales/zh-CN/workspace-connections.mdx +126 -8
  765. package/corpus/core/docs/content/locales/zh-CN/workspace-management.mdx +50 -4
  766. package/corpus/core/docs/content/locales/zh-CN/workspace.mdx +110 -8
  767. package/corpus/core/docs/content/locales/zh-CN/writing-agent-instructions.mdx +38 -4
  768. package/corpus/core/docs/content/locales/zh-TW/a2a-protocol.mdx +97 -9
  769. package/corpus/core/docs/content/locales/zh-TW/actions.mdx +63 -4
  770. package/corpus/core/docs/content/locales/zh-TW/agent-mentions.mdx +68 -4
  771. package/corpus/core/docs/content/locales/zh-TW/agent-surfaces.mdx +108 -8
  772. package/corpus/core/docs/content/locales/zh-TW/agent-teams.mdx +171 -12
  773. package/corpus/core/docs/content/locales/zh-TW/agent-web-surfaces.mdx +51 -4
  774. package/corpus/core/docs/content/locales/zh-TW/authentication.mdx +122 -8
  775. package/corpus/core/docs/content/locales/zh-TW/automations.mdx +110 -8
  776. package/corpus/core/docs/content/locales/zh-TW/blueprint-installer.mdx +42 -4
  777. package/corpus/core/docs/content/locales/zh-TW/cli-adapters.mdx +44 -4
  778. package/corpus/core/docs/content/locales/zh-TW/client.mdx +79 -8
  779. package/corpus/core/docs/content/locales/zh-TW/cloneable-saas.mdx +83 -8
  780. package/corpus/core/docs/content/locales/zh-TW/code-agents-ui.mdx +94 -8
  781. package/corpus/core/docs/content/locales/zh-TW/components.mdx +112 -8
  782. package/corpus/core/docs/content/locales/zh-TW/context-awareness.mdx +96 -8
  783. package/corpus/core/docs/content/locales/zh-TW/creating-templates.mdx +51 -4
  784. package/corpus/core/docs/content/locales/zh-TW/cross-app-sso.mdx +107 -8
  785. package/corpus/core/docs/content/locales/zh-TW/database.mdx +52 -4
  786. package/corpus/core/docs/content/locales/zh-TW/deployment.mdx +103 -8
  787. package/corpus/core/docs/content/locales/zh-TW/dispatch.mdx +134 -8
  788. package/corpus/core/docs/content/locales/zh-TW/drop-in-agent.mdx +63 -4
  789. package/corpus/core/docs/content/locales/zh-TW/durable-background-runs.mdx +88 -8
  790. package/corpus/core/docs/content/locales/zh-TW/durable-resume.mdx +45 -4
  791. package/corpus/core/docs/content/locales/zh-TW/embedding-sdk.mdx +83 -8
  792. package/corpus/core/docs/content/locales/zh-TW/evals.mdx +100 -8
  793. package/corpus/core/docs/content/locales/zh-TW/extensions.mdx +111 -9
  794. package/corpus/core/docs/content/locales/zh-TW/external-agents.mdx +119 -8
  795. package/corpus/core/docs/content/locales/zh-TW/faq.mdx +96 -8
  796. package/corpus/core/docs/content/locales/zh-TW/file-uploads.mdx +61 -4
  797. package/corpus/core/docs/content/locales/zh-TW/frames.mdx +86 -8
  798. package/corpus/core/docs/content/locales/zh-TW/getting-started.mdx +34 -4
  799. package/corpus/core/docs/content/locales/zh-TW/harness-agents.mdx +79 -8
  800. package/corpus/core/docs/content/locales/zh-TW/human-approval.mdx +50 -4
  801. package/corpus/core/docs/content/locales/zh-TW/key-concepts.mdx +100 -8
  802. package/corpus/core/docs/content/locales/zh-TW/local-file-mode.mdx +56 -4
  803. package/corpus/core/docs/content/locales/zh-TW/mcp-apps.mdx +120 -10
  804. package/corpus/core/docs/content/locales/zh-TW/mcp-clients.mdx +133 -8
  805. package/corpus/core/docs/content/locales/zh-TW/mcp-protocol.mdx +105 -8
  806. package/corpus/core/docs/content/locales/zh-TW/messaging.mdx +115 -8
  807. package/corpus/core/docs/content/locales/zh-TW/migration-workbench.mdx +45 -4
  808. package/corpus/core/docs/content/locales/zh-TW/multi-app-workspace.mdx +91 -8
  809. package/corpus/core/docs/content/locales/zh-TW/multi-tenancy.mdx +80 -8
  810. package/corpus/core/docs/content/locales/zh-TW/native-chat-ui.mdx +104 -8
  811. package/corpus/core/docs/content/locales/zh-TW/notifications.mdx +135 -8
  812. package/corpus/core/docs/content/locales/zh-TW/observability.mdx +102 -8
  813. package/corpus/core/docs/content/locales/zh-TW/observational-memory.mdx +85 -8
  814. package/corpus/core/docs/content/locales/zh-TW/onboarding.mdx +44 -4
  815. package/corpus/core/docs/content/locales/zh-TW/plan-plugin.mdx +97 -8
  816. package/corpus/core/docs/content/locales/zh-TW/pr-visual-recap.mdx +123 -8
  817. package/corpus/core/docs/content/locales/zh-TW/processors.mdx +39 -4
  818. package/corpus/core/docs/content/locales/zh-TW/progress.mdx +46 -4
  819. package/corpus/core/docs/content/locales/zh-TW/pure-agent-apps.mdx +46 -4
  820. package/corpus/core/docs/content/locales/zh-TW/real-time-collaboration.mdx +98 -8
  821. package/corpus/core/docs/content/locales/zh-TW/recurring-jobs.mdx +59 -4
  822. package/corpus/core/docs/content/locales/zh-TW/routing.mdx +42 -5
  823. package/corpus/core/docs/content/locales/zh-TW/sandbox-adapters.mdx +41 -4
  824. package/corpus/core/docs/content/locales/zh-TW/security.mdx +80 -8
  825. package/corpus/core/docs/content/locales/zh-TW/server.mdx +169 -12
  826. package/corpus/core/docs/content/locales/zh-TW/sharing.mdx +45 -4
  827. package/corpus/core/docs/content/locales/zh-TW/skills-guide.mdx +118 -9
  828. package/corpus/core/docs/content/locales/zh-TW/template-analytics.mdx +46 -4
  829. package/corpus/core/docs/content/locales/zh-TW/template-assets.mdx +58 -4
  830. package/corpus/core/docs/content/locales/zh-TW/template-brain.mdx +65 -4
  831. package/corpus/core/docs/content/locales/zh-TW/template-calendar.mdx +58 -4
  832. package/corpus/core/docs/content/locales/zh-TW/template-chat.mdx +59 -4
  833. package/corpus/core/docs/content/locales/zh-TW/template-clips.mdx +52 -4
  834. package/corpus/core/docs/content/locales/zh-TW/template-content.mdx +58 -4
  835. package/corpus/core/docs/content/locales/zh-TW/template-design.mdx +96 -4
  836. package/corpus/core/docs/content/locales/zh-TW/template-dispatch.mdx +57 -4
  837. package/corpus/core/docs/content/locales/zh-TW/template-forms.mdx +58 -4
  838. package/corpus/core/docs/content/locales/zh-TW/template-mail.mdx +60 -4
  839. package/corpus/core/docs/content/locales/zh-TW/template-plan.mdx +57 -4
  840. package/corpus/core/docs/content/locales/zh-TW/template-slides.mdx +49 -4
  841. package/corpus/core/docs/content/locales/zh-TW/template-videos.mdx +51 -4
  842. package/corpus/core/docs/content/locales/zh-TW/tracking.mdx +54 -4
  843. package/corpus/core/docs/content/locales/zh-TW/using-your-agent.mdx +51 -4
  844. package/corpus/core/docs/content/locales/zh-TW/voice-input.mdx +43 -4
  845. package/corpus/core/docs/content/locales/zh-TW/what-is-agent-native.mdx +94 -8
  846. package/corpus/core/docs/content/locales/zh-TW/workspace-connections.mdx +126 -8
  847. package/corpus/core/docs/content/locales/zh-TW/workspace-management.mdx +50 -4
  848. package/corpus/core/docs/content/locales/zh-TW/workspace.mdx +111 -8
  849. package/corpus/core/docs/content/locales/zh-TW/writing-agent-instructions.mdx +38 -4
  850. package/corpus/core/docs/content/mcp-apps.mdx +120 -10
  851. package/corpus/core/docs/content/mcp-clients.mdx +161 -8
  852. package/corpus/core/docs/content/mcp-protocol.mdx +105 -8
  853. package/corpus/core/docs/content/messaging.mdx +115 -8
  854. package/corpus/core/docs/content/migration-workbench.mdx +45 -4
  855. package/corpus/core/docs/content/multi-app-workspace.mdx +91 -8
  856. package/corpus/core/docs/content/multi-tenancy.mdx +80 -8
  857. package/corpus/core/docs/content/native-chat-ui.mdx +106 -8
  858. package/corpus/core/docs/content/notifications.mdx +135 -8
  859. package/corpus/core/docs/content/observability.mdx +102 -8
  860. package/corpus/core/docs/content/observational-memory.mdx +89 -8
  861. package/corpus/core/docs/content/onboarding.mdx +45 -4
  862. package/corpus/core/docs/content/plan-plugin.mdx +99 -8
  863. package/corpus/core/docs/content/pr-visual-recap.mdx +125 -8
  864. package/corpus/core/docs/content/processors.mdx +41 -4
  865. package/corpus/core/docs/content/progress.mdx +46 -4
  866. package/corpus/core/docs/content/pure-agent-apps.mdx +46 -4
  867. package/corpus/core/docs/content/real-time-collaboration.mdx +104 -8
  868. package/corpus/core/docs/content/recurring-jobs.mdx +59 -4
  869. package/corpus/core/docs/content/routing.mdx +44 -5
  870. package/corpus/core/docs/content/sandbox-adapters.mdx +43 -4
  871. package/corpus/core/docs/content/security.mdx +80 -8
  872. package/corpus/core/docs/content/server.mdx +173 -12
  873. package/corpus/core/docs/content/sharing.mdx +45 -4
  874. package/corpus/core/docs/content/skills-guide.mdx +118 -9
  875. package/corpus/core/docs/content/template-analytics.mdx +46 -4
  876. package/corpus/core/docs/content/template-assets.mdx +60 -4
  877. package/corpus/core/docs/content/template-brain.mdx +67 -4
  878. package/corpus/core/docs/content/template-calendar.mdx +62 -4
  879. package/corpus/core/docs/content/template-chat.mdx +61 -4
  880. package/corpus/core/docs/content/template-clips.mdx +52 -4
  881. package/corpus/core/docs/content/template-content.mdx +60 -4
  882. package/corpus/core/docs/content/template-design.mdx +103 -4
  883. package/corpus/core/docs/content/template-dispatch.mdx +57 -4
  884. package/corpus/core/docs/content/template-forms.mdx +62 -4
  885. package/corpus/core/docs/content/template-mail.mdx +60 -4
  886. package/corpus/core/docs/content/template-plan.mdx +61 -4
  887. package/corpus/core/docs/content/template-slides.mdx +49 -4
  888. package/corpus/core/docs/content/template-videos.mdx +51 -4
  889. package/corpus/core/docs/content/tracking.mdx +54 -4
  890. package/corpus/core/docs/content/using-your-agent.mdx +51 -4
  891. package/corpus/core/docs/content/voice-input.mdx +43 -4
  892. package/corpus/core/docs/content/what-is-agent-native.mdx +188 -8
  893. package/corpus/core/docs/content/workspace-connections.mdx +128 -8
  894. package/corpus/core/docs/content/workspace-management.mdx +50 -4
  895. package/corpus/core/docs/content/workspace.mdx +111 -8
  896. package/corpus/core/docs/content/writing-agent-instructions.mdx +45 -4
  897. package/corpus/core/package.json +2 -1
  898. package/corpus/core/src/agent/engine/index.ts +1 -0
  899. package/corpus/core/src/agent/engine/registry.ts +40 -0
  900. package/corpus/core/src/agent/production-agent.ts +6 -2
  901. package/corpus/core/src/application-state/store.ts +5 -5
  902. package/corpus/core/src/chat-threads/store.ts +2 -2
  903. package/corpus/core/src/cli/content-local.ts +374 -0
  904. package/corpus/core/src/cli/design-connect.ts +490 -0
  905. package/corpus/core/src/cli/index.ts +33 -0
  906. package/corpus/core/src/cli/skills.ts +355 -200
  907. package/corpus/core/src/client/AssistantChat.tsx +39 -3
  908. package/corpus/core/src/client/MultiTabAssistantChat.tsx +11 -93
  909. package/corpus/core/src/client/agent-chat.ts +27 -3
  910. package/corpus/core/src/client/analytics.ts +68 -15
  911. package/corpus/core/src/client/blocks/index.ts +2 -0
  912. package/corpus/core/src/client/blocks/library/MermaidBlock.tsx +1 -1
  913. package/corpus/core/src/client/blocks/library/diagram.config.ts +42 -18
  914. package/corpus/core/src/client/blocks/library/diagram.tsx +2 -2
  915. package/corpus/core/src/client/blocks/library/sanitize-html.ts +71 -6
  916. package/corpus/core/src/client/blocks/library/wireframe-kit.tsx +2 -2
  917. package/corpus/core/src/client/blocks/library/wireframe.tsx +9 -3
  918. package/corpus/core/src/client/blocks/mdx.ts +62 -1
  919. package/corpus/core/src/client/blocks/server.ts +2 -0
  920. package/corpus/core/src/client/blocks/types.ts +5 -4
  921. package/corpus/core/src/client/chat/message-components.tsx +2 -98
  922. package/corpus/core/src/client/chat-model-groups.ts +147 -0
  923. package/corpus/core/src/client/components/LiveCursorOverlay.tsx +33 -66
  924. package/corpus/core/src/client/components/ui/dialog.tsx +91 -0
  925. package/corpus/core/src/client/composer/ComposerPlusMenu.tsx +33 -290
  926. package/corpus/core/src/client/composer/TiptapComposer.tsx +99 -24
  927. package/corpus/core/src/client/composer/useVoiceDictation.ts +429 -260
  928. package/corpus/core/src/client/frame-protocol.ts +17 -2
  929. package/corpus/core/src/client/index.ts +2 -0
  930. package/corpus/core/src/client/resources/McpIntegrationDialog.tsx +614 -0
  931. package/corpus/core/src/client/resources/ResourcesPanel.tsx +411 -644
  932. package/corpus/core/src/client/resources/mcp-integration-catalog.ts +239 -0
  933. package/corpus/core/src/client/rich-markdown-editor/RegistryBlockNode.tsx +2 -2
  934. package/corpus/core/src/client/settings/SettingsPanel.tsx +1 -1
  935. package/corpus/core/src/client/sharing/ShareButton.tsx +20 -15
  936. package/corpus/core/src/client/use-agent-engine-configured.ts +80 -28
  937. package/corpus/core/src/client/use-chat-models.ts +12 -104
  938. package/corpus/core/src/db/client.ts +0 -5
  939. package/corpus/core/src/integrations/adapters/email.ts +2 -2
  940. package/corpus/core/src/local-artifacts/index.ts +18 -0
  941. package/corpus/core/src/localization/default-messages.ts +81 -0
  942. package/corpus/core/src/localization/shared.ts +3 -3
  943. package/corpus/core/src/org/handlers.ts +2 -2
  944. package/corpus/core/src/resources/store.ts +7 -7
  945. package/corpus/core/src/server/core-routes-plugin.ts +34 -12
  946. package/corpus/core/src/server/transcribe-voice.ts +57 -22
  947. package/corpus/core/src/shared/mcp-embed-headers.ts +23 -1
  948. package/corpus/core/src/shared/mcp-integration-config.ts +101 -0
  949. package/corpus/core/src/styles/agent-native.css +58 -107
  950. package/corpus/core/src/styles/blocks.css +15 -3
  951. package/corpus/core/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +10 -0
  952. package/corpus/core/src/vite/client.ts +19 -0
  953. package/corpus/core/src/voice/index.ts +18 -0
  954. package/corpus/core/src/voice/voice-cleanup-prompt.ts +38 -0
  955. package/corpus/core/src/voice/voice-context.ts +217 -0
  956. package/corpus/core/src/voice/voice-replacements.ts +75 -0
  957. package/corpus/templates/analytics/AGENTS.md +4 -3
  958. package/corpus/templates/analytics/actions/list-session-recordings.ts +6 -1
  959. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +557 -400
  960. package/corpus/templates/analytics/app/global.css +22 -4
  961. package/corpus/templates/analytics/app/i18n/zh-TW.ts +3 -0
  962. package/corpus/templates/analytics/app/i18n-data.ts +21 -0
  963. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +33 -8
  964. package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +7 -0
  965. package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +32 -10
  966. package/corpus/templates/analytics/changelog/2026-06-28-ask-tab-now-matches-the-darker-app-background.md +6 -0
  967. package/corpus/templates/analytics/changelog/2026-06-28-dashboard-email-reports-now-use-cleaner-light-mode-snapshots.md +6 -0
  968. package/corpus/templates/analytics/changelog/2026-06-28-left-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
  969. package/corpus/templates/analytics/changelog/2026-06-28-sessions-now-show-only-signed-in-recordings-with-playable-re.md +6 -0
  970. package/corpus/templates/analytics/changelog/2026-06-28-sessions-shows-scoped-recordings-even-when-replay-events-are.md +6 -0
  971. package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +3 -3
  972. package/corpus/templates/analytics/server/lib/dashboard-report.ts +29 -7
  973. package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +5 -2
  974. package/corpus/templates/analytics/server/lib/session-replay.ts +21 -7
  975. package/corpus/templates/assets/app/components/layout/Sidebar.tsx +4 -4
  976. package/corpus/templates/assets/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
  977. package/corpus/templates/brain/app/components/layout/Layout.tsx +29 -2
  978. package/corpus/templates/brain/app/components/layout/Sidebar.tsx +131 -42
  979. package/corpus/templates/brain/app/i18n/zh-TW.ts +2 -0
  980. package/corpus/templates/brain/app/i18n-data.ts +20 -0
  981. package/corpus/templates/brain/changelog/2026-06-28-left-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
  982. package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +29 -1
  983. package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +417 -299
  984. package/corpus/templates/calendar/app/i18n/zh-TW.ts +2 -0
  985. package/corpus/templates/calendar/app/i18n-data.ts +20 -0
  986. package/corpus/templates/calendar/changelog/2026-06-28-left-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
  987. package/corpus/templates/chat/app/components/layout/Sidebar.tsx +6 -19
  988. package/corpus/templates/chat/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
  989. package/corpus/templates/clips/AGENTS.md +8 -0
  990. package/corpus/templates/clips/actions/cleanup-transcript.ts +58 -10
  991. package/corpus/templates/clips/actions/finalize-meeting.ts +81 -12
  992. package/corpus/templates/clips/actions/get-builder-credit-status.ts +22 -0
  993. package/corpus/templates/clips/actions/get-recording-player-data.ts +18 -3
  994. package/corpus/templates/clips/actions/lib/agents-md-context.ts +4 -1
  995. package/corpus/templates/clips/actions/lib/builder-credits-state.ts +46 -0
  996. package/corpus/templates/clips/actions/lib/provider-transcript.ts +51 -0
  997. package/corpus/templates/clips/actions/regenerate-title.ts +18 -0
  998. package/corpus/templates/clips/actions/request-transcript.ts +56 -33
  999. package/corpus/templates/clips/actions/save-browser-transcript.ts +1 -17
  1000. package/corpus/templates/clips/app/components/library/library-layout.tsx +3 -3
  1001. package/corpus/templates/clips/app/components/meetings/share-meeting-dialog.tsx +1 -1
  1002. package/corpus/templates/clips/app/components/player/share-dialog.tsx +2 -2
  1003. package/corpus/templates/clips/app/components/player/transcript-panel.tsx +120 -11
  1004. package/corpus/templates/clips/app/i18n/ar-SA.ts +25 -0
  1005. package/corpus/templates/clips/app/i18n/de-DE.ts +25 -0
  1006. package/corpus/templates/clips/app/i18n/en-US.ts +25 -0
  1007. package/corpus/templates/clips/app/i18n/es-ES.ts +25 -0
  1008. package/corpus/templates/clips/app/i18n/fr-FR.ts +25 -0
  1009. package/corpus/templates/clips/app/i18n/hi-IN.ts +25 -0
  1010. package/corpus/templates/clips/app/i18n/ja-JP.ts +25 -0
  1011. package/corpus/templates/clips/app/i18n/ko-KR.ts +25 -0
  1012. package/corpus/templates/clips/app/i18n/pt-BR.ts +25 -0
  1013. package/corpus/templates/clips/app/i18n/zh-CN.ts +23 -0
  1014. package/corpus/templates/clips/app/i18n/zh-TW.ts +23 -0
  1015. package/corpus/templates/clips/app/routes/_app.settings._index.tsx +69 -0
  1016. package/corpus/templates/clips/app/routes/r.$recordingId.tsx +52 -2
  1017. package/corpus/templates/clips/app/routes/record.tsx +26 -15
  1018. package/corpus/templates/clips/changelog/2026-06-28-builder-credit-pauses-show-friendly-upgrade-guidance.md +6 -0
  1019. package/corpus/templates/clips/changelog/2026-06-28-left-sidebar-footer-controls-use-less-divider-chrome.md +6 -0
  1020. package/corpus/templates/clips/changelog/2026-06-28-transcription-now-auto-detects-spoken-language-instead-of-following.md +6 -0
  1021. package/corpus/templates/clips/changelog/2026-06-28-video-uploads-now-finish-when-duration-metadata-is-unavailable.md +6 -0
  1022. package/corpus/templates/clips/desktop/src/lib/personal-vocabulary.ts +13 -8
  1023. package/corpus/templates/clips/desktop/src/lib/transcription-engine.ts +7 -3
  1024. package/corpus/templates/clips/desktop/src/lib/voice-dictation.ts +60 -1
  1025. package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +30 -12
  1026. package/corpus/templates/clips/desktop/src-tauri/src/whisper_speech.rs +6 -19
  1027. package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/chunk.post.ts +4 -3
  1028. package/corpus/templates/clips/shared/builder-credits.ts +120 -0
  1029. package/corpus/templates/clips/shared/recording-core.ts +26 -8
  1030. package/corpus/templates/content/AGENTS.md +23 -2
  1031. package/corpus/templates/content/actions/_builder-docs-client.ts +952 -0
  1032. package/corpus/templates/content/actions/_document-flush.ts +62 -0
  1033. package/corpus/templates/content/actions/_local-file-documents.ts +115 -18
  1034. package/corpus/templates/content/actions/check-builder-doc.ts +38 -0
  1035. package/corpus/templates/content/actions/delete-document.ts +8 -0
  1036. package/corpus/templates/content/actions/import-content-source.ts +12 -0
  1037. package/corpus/templates/content/actions/list-builder-docs.ts +29 -0
  1038. package/corpus/templates/content/actions/pull-builder-doc.ts +42 -0
  1039. package/corpus/templates/content/actions/pull-document.ts +9 -59
  1040. package/corpus/templates/content/actions/push-builder-doc.ts +45 -0
  1041. package/corpus/templates/content/app/blocks/BuilderDocsBlocks.tsx +254 -0
  1042. package/corpus/templates/content/app/blocks/contentBlockRegistry.tsx +4 -0
  1043. package/corpus/templates/content/app/components/editor/DocumentDatabase.tsx +1 -1
  1044. package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +1 -1
  1045. package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +5 -5
  1046. package/corpus/templates/content/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
  1047. package/corpus/templates/content/server/db/schema.ts +12 -0
  1048. package/corpus/templates/content/server/plugins/db.ts +23 -0
  1049. package/corpus/templates/content/shared/api.ts +1 -0
  1050. package/corpus/templates/content/shared/builder-docs-blocks.ts +361 -0
  1051. package/corpus/templates/content/shared/builder-mdx.ts +1037 -0
  1052. package/corpus/templates/content/shared/content-source.ts +6 -0
  1053. package/corpus/templates/content/shared/nfm-registry.ts +4 -0
  1054. package/corpus/templates/content/vite.config.ts +13 -0
  1055. package/corpus/templates/design/.agents/skills/visual-edit/SKILL.md +137 -0
  1056. package/corpus/templates/design/AGENTS.md +95 -5
  1057. package/corpus/templates/design/DESIGN.md +82 -0
  1058. package/corpus/templates/design/DEVELOPING.md +43 -0
  1059. package/corpus/templates/design/actions/add-localhost-screens.ts +426 -0
  1060. package/corpus/templates/design/actions/apply-shader.ts +277 -0
  1061. package/corpus/templates/design/actions/apply-visual-edit.ts +303 -0
  1062. package/corpus/templates/design/actions/connect-localhost.ts +183 -0
  1063. package/corpus/templates/design/actions/edit-design.ts +195 -42
  1064. package/corpus/templates/design/actions/generate-design.ts +71 -1
  1065. package/corpus/templates/design/actions/generate-screens.ts +193 -0
  1066. package/corpus/templates/design/actions/get-code-layer-projection.ts +191 -0
  1067. package/corpus/templates/design/actions/get-shader.ts +119 -0
  1068. package/corpus/templates/design/actions/list-localhost-connections.ts +95 -0
  1069. package/corpus/templates/design/actions/navigate.ts +55 -2
  1070. package/corpus/templates/design/actions/view-screen.ts +68 -1
  1071. package/corpus/templates/design/agent-native.app-skill.json +10 -0
  1072. package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +761 -0
  1073. package/corpus/templates/design/app/components/design/DesignCanvas.tsx +2057 -103
  1074. package/corpus/templates/design/app/components/design/DesignEditorSkeleton.tsx +74 -38
  1075. package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +399 -0
  1076. package/corpus/templates/design/app/components/design/EditPanel.tsx +3185 -439
  1077. package/corpus/templates/design/app/components/design/LayersPanel.tsx +1124 -0
  1078. package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +3116 -147
  1079. package/corpus/templates/design/app/components/design/QuestionFlow.tsx +700 -13
  1080. package/corpus/templates/design/app/components/design/TweaksPanel.tsx +107 -63
  1081. package/corpus/templates/design/app/components/design/index.ts +0 -5
  1082. package/corpus/templates/design/app/components/design/inspector/AlignmentMatrix.tsx +286 -0
  1083. package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +699 -0
  1084. package/corpus/templates/design/app/components/design/inspector/ConstraintsWidget.tsx +461 -0
  1085. package/corpus/templates/design/app/components/design/inspector/ExportSettingsPanel.tsx +166 -0
  1086. package/corpus/templates/design/app/components/design/inspector/FigmaColorPicker.tsx +1420 -0
  1087. package/corpus/templates/design/app/components/design/inspector/SHADER_INTEGRATION.md +420 -0
  1088. package/corpus/templates/design/app/components/design/inspector/ScrubInput.tsx +215 -0
  1089. package/corpus/templates/design/app/components/design/inspector/ShaderControls.stories.tsx +71 -0
  1090. package/corpus/templates/design/app/components/design/inspector/ShaderControls.tsx +518 -0
  1091. package/corpus/templates/design/app/components/design/inspector/ShaderEffectRow.tsx +106 -0
  1092. package/corpus/templates/design/app/components/design/inspector/figma-icons.tsx +361 -0
  1093. package/corpus/templates/design/app/components/design/inspector/index.ts +60 -0
  1094. package/corpus/templates/design/app/components/design/inspector/scrub-input-utils.ts +201 -0
  1095. package/corpus/templates/design/app/components/design/types.ts +23 -0
  1096. package/corpus/templates/design/app/components/layout/Layout.tsx +24 -13
  1097. package/corpus/templates/design/app/components/layout/Sidebar.tsx +4 -4
  1098. package/corpus/templates/design/app/components/visual-editor/CanvasCommentPins.tsx +474 -36
  1099. package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +22 -5
  1100. package/corpus/templates/design/app/components/visual-editor/SaveStatusIndicator.tsx +24 -11
  1101. package/corpus/templates/design/app/global.css +121 -3
  1102. package/corpus/templates/design/app/hooks/use-agent-generating.ts +4 -0
  1103. package/corpus/templates/design/app/hooks/use-navigation-state.ts +130 -8
  1104. package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +329 -0
  1105. package/corpus/templates/design/app/i18n/zh-TW.ts +264 -0
  1106. package/corpus/templates/design/app/i18n-data.ts +2790 -1
  1107. package/corpus/templates/design/app/pages/DesignEditor.tsx +5108 -851
  1108. package/corpus/templates/design/changelog/2026-06-28-annotate-mode-now-combines-drawing-and-comment-pins-in-one-c.md +6 -0
  1109. package/corpus/templates/design/changelog/2026-06-28-design-editor-panel-borders-are-cleaner-so-the-canvas-edge-s.md +6 -0
  1110. package/corpus/templates/design/changelog/2026-06-28-drawing-prompts-now-reliably-open-and-submit-to-the-design-a.md +6 -0
  1111. package/corpus/templates/design/changelog/2026-06-28-editor-app-menus-now-use-an-outline-agent-native-mark-with-b.md +6 -0
  1112. package/corpus/templates/design/changelog/2026-06-28-figma-style-code-design-mode.md +6 -0
  1113. package/corpus/templates/design/changelog/2026-06-28-layer-selection-now-updates-chat-context-without-opening-the.md +6 -0
  1114. package/corpus/templates/design/changelog/2026-06-28-layer-selections-now-preserve-hidden-and-locked-canvas-state.md +6 -0
  1115. package/corpus/templates/design/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
  1116. package/corpus/templates/design/changelog/2026-06-28-live-cursors-now-keep-names-beside-a-cleaner-pointer-marker.md +6 -0
  1117. package/corpus/templates/design/changelog/2026-06-28-mode-switching-now-lives-in-a-compact-bottom-right-icon-dock.md +6 -0
  1118. package/corpus/templates/design/changelog/2026-06-28-screen-overview-now-handles-zooming-drawing-opening-and-dele.md +6 -0
  1119. package/corpus/templates/design/changelog/2026-06-28-screen-overview-now-selects-screens-on-click-and-opens-them-.md +6 -0
  1120. package/corpus/templates/design/changelog/2026-06-28-screen-overview-zooms-into-the-active-screen-with-smoother-e.md +6 -0
  1121. package/corpus/templates/design/changelog/2026-06-28-selected-element-chips-in-chat-are-shorter-and-easier-to-sca.md +6 -0
  1122. package/corpus/templates/design/changelog/2026-06-28-the-design-editor-toolbar-is-more-compact-and-the-app-menu-m.md +6 -0
  1123. package/corpus/templates/design/changelog/2026-06-28-tweaks-now-live-at-the-top-of-the-design-sidebar-instead-of-.md +6 -0
  1124. package/corpus/templates/design/changelog/2026-06-28-tweaks-now-live-in-the-right-inspector-beside-the-design-tab.md +6 -0
  1125. package/corpus/templates/design/changelog/2026-06-29-active-sidebar-rows-use-soft-highlights.md +6 -0
  1126. package/corpus/templates/design/changelog/2026-06-29-agents-can-now-open-screen-overview-focus-screens-and-add.md +6 -0
  1127. package/corpus/templates/design/changelog/2026-06-29-design-agents-now-edit-broad-copy-changes-more-reliably.md +6 -0
  1128. package/corpus/templates/design/changelog/2026-06-29-design-editor-extensions-now-run-inline-beside-the-artboard.md +6 -0
  1129. package/corpus/templates/design/changelog/2026-06-29-sidebars-use-darker-chrome-and-chat-warns-immediately.md +6 -0
  1130. package/corpus/templates/design/changelog/2026-06-29-visual-edit-can-open-localhost-routes-as-url-backed-screens.md +6 -0
  1131. package/corpus/templates/design/package.json +1 -0
  1132. package/corpus/templates/design/server/db/schema.ts +26 -0
  1133. package/corpus/templates/design/server/lib/design-snapshot.ts +1 -1
  1134. package/corpus/templates/design/server/plugins/agent-chat.ts +3 -0
  1135. package/corpus/templates/design/shared/api.ts +27 -0
  1136. package/corpus/templates/design/shared/canvas-frames.ts +103 -0
  1137. package/corpus/templates/design/shared/canvas-math.ts +1058 -0
  1138. package/corpus/templates/design/shared/code-layer.ts +2212 -0
  1139. package/corpus/templates/design/shared/color-utils.ts +180 -0
  1140. package/corpus/templates/design/shared/generation-session.ts +61 -0
  1141. package/corpus/templates/design/shared/shader-presets.ts +782 -0
  1142. package/corpus/templates/design/shared/shader-safety.ts +137 -0
  1143. package/corpus/templates/design/shared/source-mode.ts +237 -0
  1144. package/corpus/templates/forms/app/components/layout/Sidebar.tsx +149 -6
  1145. package/corpus/templates/forms/app/i18n/ar-SA.ts +2 -0
  1146. package/corpus/templates/forms/app/i18n/de-DE.ts +2 -0
  1147. package/corpus/templates/forms/app/i18n/en-US.ts +2 -0
  1148. package/corpus/templates/forms/app/i18n/es-ES.ts +2 -0
  1149. package/corpus/templates/forms/app/i18n/fr-FR.ts +2 -0
  1150. package/corpus/templates/forms/app/i18n/hi-IN.ts +2 -0
  1151. package/corpus/templates/forms/app/i18n/ja-JP.ts +2 -0
  1152. package/corpus/templates/forms/app/i18n/ko-KR.ts +2 -0
  1153. package/corpus/templates/forms/app/i18n/pt-BR.ts +2 -0
  1154. package/corpus/templates/forms/app/i18n/zh-CN.ts +2 -0
  1155. package/corpus/templates/forms/app/i18n/zh-TW.ts +2 -0
  1156. package/corpus/templates/forms/changelog/2026-06-28-left-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
  1157. package/corpus/templates/macros/app/components/layout/AppLayout.tsx +2 -2
  1158. package/corpus/templates/macros/changelog/2026-06-28-left-sidebar-footer-controls-use-less-divider-chrome.md +6 -0
  1159. package/corpus/templates/mail/app/components/layout/AppLayout.tsx +408 -247
  1160. package/corpus/templates/mail/app/i18n/ar-SA.ts +4 -0
  1161. package/corpus/templates/mail/app/i18n/de-DE.ts +4 -0
  1162. package/corpus/templates/mail/app/i18n/en-US.ts +4 -0
  1163. package/corpus/templates/mail/app/i18n/es-ES.ts +4 -0
  1164. package/corpus/templates/mail/app/i18n/fr-FR.ts +4 -0
  1165. package/corpus/templates/mail/app/i18n/hi-IN.ts +4 -0
  1166. package/corpus/templates/mail/app/i18n/ja-JP.ts +4 -0
  1167. package/corpus/templates/mail/app/i18n/ko-KR.ts +4 -0
  1168. package/corpus/templates/mail/app/i18n/pt-BR.ts +4 -0
  1169. package/corpus/templates/mail/app/i18n/zh-CN.ts +4 -0
  1170. package/corpus/templates/mail/app/i18n/zh-TW.ts +4 -0
  1171. package/corpus/templates/mail/changelog/2026-06-28-pinned-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
  1172. package/corpus/templates/plan/.agents/skills/visual-plan/SKILL.md +25 -92
  1173. package/corpus/templates/plan/.agents/skills/visual-plan/references/connection.md +51 -0
  1174. package/corpus/templates/plan/.agents/skills/visual-plan/references/document-quality.md +5 -1
  1175. package/corpus/templates/plan/.agents/skills/visual-plan/references/local-files.md +85 -0
  1176. package/corpus/templates/plan/.agents/skills/visual-plan/references/wireframe.md +21 -0
  1177. package/corpus/templates/plan/.agents/skills/visual-recap/SKILL.md +32 -104
  1178. package/corpus/templates/plan/.agents/skills/visual-recap/references/connection.md +51 -0
  1179. package/corpus/templates/plan/.agents/skills/visual-recap/references/local-files.md +85 -0
  1180. package/corpus/templates/plan/.agents/skills/visual-recap/references/wireframe.md +21 -0
  1181. package/corpus/templates/plan/actions/create-prototype-plan.ts +1 -1
  1182. package/corpus/templates/plan/actions/delete-visual-plan.ts +2 -2
  1183. package/corpus/templates/plan/actions/get-plan-blocks.ts +2 -0
  1184. package/corpus/templates/plan/app/components/layout/Sidebar.tsx +6 -8
  1185. package/corpus/templates/plan/app/components/plan/CanvasArea.tsx +25 -29
  1186. package/corpus/templates/plan/app/components/plan/wireframe/Wireframe.tsx +10 -5
  1187. package/corpus/templates/plan/app/components/plan/wireframe/html-artboard.css +15 -3
  1188. package/corpus/templates/plan/app/components/plan/wireframe/kit/rough.tsx +6 -6
  1189. package/corpus/templates/plan/app/components/plan/wireframe/sanitize-html.ts +71 -6
  1190. package/corpus/templates/plan/app/global.css +67 -81
  1191. package/corpus/templates/plan/app/pages/PlansPage.tsx +8 -0
  1192. package/corpus/templates/plan/app/root.tsx +31 -1
  1193. package/corpus/templates/plan/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
  1194. package/corpus/templates/plan/changelog/2026-06-28-plan-canvases-stay-stable-while-panning-and-zooming-in-chrom.md +6 -0
  1195. package/corpus/templates/plan/changelog/2026-06-28-plan-wireframes-avoid-overlapping-sketch-lines-in-dense-mockups.md +6 -0
  1196. package/corpus/templates/plan/changelog/2026-06-28-plan-wireframes-ignore-host-color-utility-classes-so-canvas-.md +6 -0
  1197. package/corpus/templates/plan/changelog/2026-06-28-plans-use-the-shared-neutral-light-and-dark-theme.md +6 -0
  1198. package/corpus/templates/plan/changelog/2026-06-28-sending-open-feedback-from-a-plan-now-opens-the-inline-plan-.md +6 -0
  1199. package/corpus/templates/plan/changelog/2026-06-28-wireframe-style-can-now-be-switched-between-sketchy-and-clean.md +6 -0
  1200. package/corpus/templates/plan/server/plan-content.ts +62 -3
  1201. package/corpus/templates/plan/server/plan-mdx.ts +177 -2
  1202. package/corpus/templates/slides/app/components/layout/Sidebar.tsx +5 -5
  1203. package/corpus/templates/slides/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
  1204. package/corpus/templates/videos/app/components/Sidebar.tsx +2 -2
  1205. package/corpus/templates/videos/app/components/layout/Layout.tsx +29 -2
  1206. package/corpus/templates/videos/app/components/layout/NavSidebar.tsx +113 -30
  1207. package/corpus/templates/videos/app/i18n/ar-SA.ts +2 -0
  1208. package/corpus/templates/videos/app/i18n/de-DE.ts +2 -0
  1209. package/corpus/templates/videos/app/i18n/en-US.ts +2 -0
  1210. package/corpus/templates/videos/app/i18n/es-ES.ts +2 -0
  1211. package/corpus/templates/videos/app/i18n/fr-FR.ts +2 -0
  1212. package/corpus/templates/videos/app/i18n/hi-IN.ts +2 -0
  1213. package/corpus/templates/videos/app/i18n/ja-JP.ts +2 -0
  1214. package/corpus/templates/videos/app/i18n/ko-KR.ts +2 -0
  1215. package/corpus/templates/videos/app/i18n/pt-BR.ts +2 -0
  1216. package/corpus/templates/videos/app/i18n/zh-CN.ts +2 -0
  1217. package/corpus/templates/videos/app/i18n/zh-TW.ts +2 -0
  1218. package/corpus/templates/videos/changelog/2026-06-28-left-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
  1219. package/dist/agent/engine/index.d.ts +1 -1
  1220. package/dist/agent/engine/index.d.ts.map +1 -1
  1221. package/dist/agent/engine/index.js +1 -1
  1222. package/dist/agent/engine/index.js.map +1 -1
  1223. package/dist/agent/engine/registry.d.ts +9 -0
  1224. package/dist/agent/engine/registry.d.ts.map +1 -1
  1225. package/dist/agent/engine/registry.js +37 -0
  1226. package/dist/agent/engine/registry.js.map +1 -1
  1227. package/dist/agent/production-agent.d.ts.map +1 -1
  1228. package/dist/agent/production-agent.js +4 -3
  1229. package/dist/agent/production-agent.js.map +1 -1
  1230. package/dist/application-state/store.js +5 -5
  1231. package/dist/application-state/store.js.map +1 -1
  1232. package/dist/chat-threads/store.js +2 -2
  1233. package/dist/chat-threads/store.js.map +1 -1
  1234. package/dist/cli/content-local.d.ts +31 -0
  1235. package/dist/cli/content-local.d.ts.map +1 -0
  1236. package/dist/cli/content-local.js +300 -0
  1237. package/dist/cli/content-local.js.map +1 -0
  1238. package/dist/cli/design-connect.d.ts +52 -0
  1239. package/dist/cli/design-connect.d.ts.map +1 -0
  1240. package/dist/cli/design-connect.js +409 -0
  1241. package/dist/cli/design-connect.js.map +1 -0
  1242. package/dist/cli/index.js +31 -0
  1243. package/dist/cli/index.js.map +1 -1
  1244. package/dist/cli/skills.d.ts +13 -4
  1245. package/dist/cli/skills.d.ts.map +1 -1
  1246. package/dist/cli/skills.js +348 -200
  1247. package/dist/cli/skills.js.map +1 -1
  1248. package/dist/client/AssistantChat.d.ts.map +1 -1
  1249. package/dist/client/AssistantChat.js +34 -4
  1250. package/dist/client/AssistantChat.js.map +1 -1
  1251. package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
  1252. package/dist/client/MultiTabAssistantChat.js +8 -69
  1253. package/dist/client/MultiTabAssistantChat.js.map +1 -1
  1254. package/dist/client/agent-chat.d.ts +6 -0
  1255. package/dist/client/agent-chat.d.ts.map +1 -1
  1256. package/dist/client/agent-chat.js +17 -3
  1257. package/dist/client/agent-chat.js.map +1 -1
  1258. package/dist/client/analytics.d.ts.map +1 -1
  1259. package/dist/client/analytics.js +48 -13
  1260. package/dist/client/analytics.js.map +1 -1
  1261. package/dist/client/blocks/index.d.ts +1 -1
  1262. package/dist/client/blocks/index.d.ts.map +1 -1
  1263. package/dist/client/blocks/index.js +1 -1
  1264. package/dist/client/blocks/index.js.map +1 -1
  1265. package/dist/client/blocks/library/MermaidBlock.js +1 -1
  1266. package/dist/client/blocks/library/MermaidBlock.js.map +1 -1
  1267. package/dist/client/blocks/library/diagram.config.d.ts +9 -9
  1268. package/dist/client/blocks/library/diagram.config.d.ts.map +1 -1
  1269. package/dist/client/blocks/library/diagram.config.js +36 -12
  1270. package/dist/client/blocks/library/diagram.config.js.map +1 -1
  1271. package/dist/client/blocks/library/diagram.js +1 -1
  1272. package/dist/client/blocks/library/diagram.js.map +1 -1
  1273. package/dist/client/blocks/library/sanitize-html.d.ts +3 -1
  1274. package/dist/client/blocks/library/sanitize-html.d.ts.map +1 -1
  1275. package/dist/client/blocks/library/sanitize-html.js +53 -5
  1276. package/dist/client/blocks/library/sanitize-html.js.map +1 -1
  1277. package/dist/client/blocks/library/wireframe-kit.d.ts +2 -2
  1278. package/dist/client/blocks/library/wireframe-kit.d.ts.map +1 -1
  1279. package/dist/client/blocks/library/wireframe-kit.js +2 -2
  1280. package/dist/client/blocks/library/wireframe-kit.js.map +1 -1
  1281. package/dist/client/blocks/library/wireframe.d.ts.map +1 -1
  1282. package/dist/client/blocks/library/wireframe.js +5 -2
  1283. package/dist/client/blocks/library/wireframe.js.map +1 -1
  1284. package/dist/client/blocks/mdx.d.ts +11 -0
  1285. package/dist/client/blocks/mdx.d.ts.map +1 -1
  1286. package/dist/client/blocks/mdx.js +47 -1
  1287. package/dist/client/blocks/mdx.js.map +1 -1
  1288. package/dist/client/blocks/server.d.ts +1 -1
  1289. package/dist/client/blocks/server.d.ts.map +1 -1
  1290. package/dist/client/blocks/server.js +1 -1
  1291. package/dist/client/blocks/server.js.map +1 -1
  1292. package/dist/client/blocks/types.d.ts +5 -4
  1293. package/dist/client/blocks/types.d.ts.map +1 -1
  1294. package/dist/client/blocks/types.js.map +1 -1
  1295. package/dist/client/chat/message-components.d.ts.map +1 -1
  1296. package/dist/client/chat/message-components.js +2 -12
  1297. package/dist/client/chat/message-components.js.map +1 -1
  1298. package/dist/client/chat-model-groups.d.ts +22 -0
  1299. package/dist/client/chat-model-groups.d.ts.map +1 -0
  1300. package/dist/client/chat-model-groups.js +93 -0
  1301. package/dist/client/chat-model-groups.js.map +1 -0
  1302. package/dist/client/components/LiveCursorOverlay.d.ts +1 -2
  1303. package/dist/client/components/LiveCursorOverlay.d.ts.map +1 -1
  1304. package/dist/client/components/LiveCursorOverlay.js +19 -40
  1305. package/dist/client/components/LiveCursorOverlay.js.map +1 -1
  1306. package/dist/client/components/ui/dialog.d.ts +14 -0
  1307. package/dist/client/components/ui/dialog.d.ts.map +1 -0
  1308. package/dist/client/components/ui/dialog.js +21 -0
  1309. package/dist/client/components/ui/dialog.js.map +1 -0
  1310. package/dist/client/composer/ComposerPlusMenu.d.ts.map +1 -1
  1311. package/dist/client/composer/ComposerPlusMenu.js +24 -149
  1312. package/dist/client/composer/ComposerPlusMenu.js.map +1 -1
  1313. package/dist/client/composer/TiptapComposer.d.ts +3 -1
  1314. package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
  1315. package/dist/client/composer/TiptapComposer.js +86 -24
  1316. package/dist/client/composer/TiptapComposer.js.map +1 -1
  1317. package/dist/client/composer/useVoiceDictation.d.ts +9 -0
  1318. package/dist/client/composer/useVoiceDictation.d.ts.map +1 -1
  1319. package/dist/client/composer/useVoiceDictation.js +154 -32
  1320. package/dist/client/composer/useVoiceDictation.js.map +1 -1
  1321. package/dist/client/frame-protocol.d.ts +17 -2
  1322. package/dist/client/frame-protocol.d.ts.map +1 -1
  1323. package/dist/client/frame-protocol.js.map +1 -1
  1324. package/dist/client/index.d.ts +1 -1
  1325. package/dist/client/index.d.ts.map +1 -1
  1326. package/dist/client/index.js +1 -1
  1327. package/dist/client/index.js.map +1 -1
  1328. package/dist/client/resources/McpIntegrationDialog.d.ts +13 -0
  1329. package/dist/client/resources/McpIntegrationDialog.d.ts.map +1 -0
  1330. package/dist/client/resources/McpIntegrationDialog.js +261 -0
  1331. package/dist/client/resources/McpIntegrationDialog.js.map +1 -0
  1332. package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
  1333. package/dist/client/resources/ResourcesPanel.js +74 -190
  1334. package/dist/client/resources/ResourcesPanel.js.map +1 -1
  1335. package/dist/client/resources/mcp-integration-catalog.d.ts +30 -0
  1336. package/dist/client/resources/mcp-integration-catalog.d.ts.map +1 -0
  1337. package/dist/client/resources/mcp-integration-catalog.js +191 -0
  1338. package/dist/client/resources/mcp-integration-catalog.js.map +1 -0
  1339. package/dist/client/rich-markdown-editor/RegistryBlockNode.js +2 -2
  1340. package/dist/client/rich-markdown-editor/RegistryBlockNode.js.map +1 -1
  1341. package/dist/client/settings/SettingsPanel.js +1 -1
  1342. package/dist/client/settings/SettingsPanel.js.map +1 -1
  1343. package/dist/client/sharing/ShareButton.d.ts +2 -0
  1344. package/dist/client/sharing/ShareButton.d.ts.map +1 -1
  1345. package/dist/client/sharing/ShareButton.js +7 -6
  1346. package/dist/client/sharing/ShareButton.js.map +1 -1
  1347. package/dist/client/use-agent-engine-configured.d.ts +5 -0
  1348. package/dist/client/use-agent-engine-configured.d.ts.map +1 -1
  1349. package/dist/client/use-agent-engine-configured.js +51 -25
  1350. package/dist/client/use-agent-engine-configured.js.map +1 -1
  1351. package/dist/client/use-chat-models.d.ts +2 -7
  1352. package/dist/client/use-chat-models.d.ts.map +1 -1
  1353. package/dist/client/use-chat-models.js +8 -78
  1354. package/dist/client/use-chat-models.js.map +1 -1
  1355. package/dist/collab/awareness.d.ts +2 -2
  1356. package/dist/collab/awareness.d.ts.map +1 -1
  1357. package/dist/collab/routes.d.ts +2 -2
  1358. package/dist/db/client.d.ts.map +1 -1
  1359. package/dist/db/client.js +0 -5
  1360. package/dist/db/client.js.map +1 -1
  1361. package/dist/integrations/adapters/email.js +2 -2
  1362. package/dist/integrations/adapters/email.js.map +1 -1
  1363. package/dist/local-artifacts/index.d.ts +6 -0
  1364. package/dist/local-artifacts/index.d.ts.map +1 -1
  1365. package/dist/local-artifacts/index.js +12 -0
  1366. package/dist/local-artifacts/index.js.map +1 -1
  1367. package/dist/localization/default-messages.d.ts +76 -0
  1368. package/dist/localization/default-messages.d.ts.map +1 -1
  1369. package/dist/localization/default-messages.js +76 -0
  1370. package/dist/localization/default-messages.js.map +1 -1
  1371. package/dist/localization/shared.d.ts +1 -1
  1372. package/dist/localization/shared.js +3 -3
  1373. package/dist/localization/shared.js.map +1 -1
  1374. package/dist/notifications/routes.d.ts +3 -3
  1375. package/dist/observability/routes.d.ts +6 -6
  1376. package/dist/org/handlers.js +2 -2
  1377. package/dist/org/handlers.js.map +1 -1
  1378. package/dist/progress/routes.d.ts +1 -1
  1379. package/dist/provider-api/corpus-jobs.d.ts +2 -2
  1380. package/dist/resources/handlers.d.ts +2 -2
  1381. package/dist/resources/store.js +7 -7
  1382. package/dist/resources/store.js.map +1 -1
  1383. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  1384. package/dist/server/core-routes-plugin.d.ts +1 -0
  1385. package/dist/server/core-routes-plugin.d.ts.map +1 -1
  1386. package/dist/server/core-routes-plugin.js +29 -11
  1387. package/dist/server/core-routes-plugin.js.map +1 -1
  1388. package/dist/server/transcribe-voice.d.ts +1 -1
  1389. package/dist/server/transcribe-voice.d.ts.map +1 -1
  1390. package/dist/server/transcribe-voice.js +40 -24
  1391. package/dist/server/transcribe-voice.js.map +1 -1
  1392. package/dist/shared/mcp-embed-headers.d.ts +1 -0
  1393. package/dist/shared/mcp-embed-headers.d.ts.map +1 -1
  1394. package/dist/shared/mcp-embed-headers.js +20 -1
  1395. package/dist/shared/mcp-embed-headers.js.map +1 -1
  1396. package/dist/shared/mcp-integration-config.d.ts +27 -0
  1397. package/dist/shared/mcp-integration-config.d.ts.map +1 -0
  1398. package/dist/shared/mcp-integration-config.js +56 -0
  1399. package/dist/shared/mcp-integration-config.js.map +1 -0
  1400. package/dist/styles/agent-native.css +58 -107
  1401. package/dist/styles/blocks.css +15 -3
  1402. package/dist/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +10 -0
  1403. package/dist/vite/client.d.ts +11 -0
  1404. package/dist/vite/client.d.ts.map +1 -1
  1405. package/dist/vite/client.js +4 -0
  1406. package/dist/vite/client.js.map +1 -1
  1407. package/dist/voice/index.d.ts +5 -0
  1408. package/dist/voice/index.d.ts.map +1 -0
  1409. package/dist/voice/index.js +4 -0
  1410. package/dist/voice/index.js.map +1 -0
  1411. package/dist/voice/voice-cleanup-prompt.d.ts +6 -0
  1412. package/dist/voice/voice-cleanup-prompt.d.ts.map +1 -0
  1413. package/dist/voice/voice-cleanup-prompt.js +26 -0
  1414. package/dist/voice/voice-cleanup-prompt.js.map +1 -0
  1415. package/dist/voice/voice-context.d.ts +25 -0
  1416. package/dist/voice/voice-context.d.ts.map +1 -0
  1417. package/dist/voice/voice-context.js +156 -0
  1418. package/dist/voice/voice-context.js.map +1 -0
  1419. package/dist/voice/voice-replacements.d.ts +4 -0
  1420. package/dist/voice/voice-replacements.d.ts.map +1 -0
  1421. package/dist/voice/voice-replacements.js +52 -0
  1422. package/dist/voice/voice-replacements.js.map +1 -0
  1423. package/docs/content/a2a-protocol.mdx +97 -9
  1424. package/docs/content/actions.mdx +65 -4
  1425. package/docs/content/agent-mentions.mdx +68 -4
  1426. package/docs/content/agent-surfaces.mdx +112 -8
  1427. package/docs/content/agent-teams.mdx +171 -12
  1428. package/docs/content/agent-web-surfaces.mdx +51 -4
  1429. package/docs/content/authentication.mdx +122 -8
  1430. package/docs/content/automations.mdx +110 -8
  1431. package/docs/content/blueprint-installer.mdx +42 -4
  1432. package/docs/content/cli-adapters.mdx +44 -4
  1433. package/docs/content/client.mdx +79 -8
  1434. package/docs/content/cloneable-saas.mdx +85 -8
  1435. package/docs/content/code-agents-ui.mdx +98 -8
  1436. package/docs/content/components.mdx +118 -8
  1437. package/docs/content/context-awareness.mdx +98 -8
  1438. package/docs/content/creating-templates.mdx +49 -4
  1439. package/docs/content/cross-app-sso.mdx +109 -8
  1440. package/docs/content/database.mdx +56 -4
  1441. package/docs/content/deployment.mdx +103 -8
  1442. package/docs/content/dispatch.mdx +134 -8
  1443. package/docs/content/drop-in-agent.mdx +63 -4
  1444. package/docs/content/durable-background-runs.mdx +98 -8
  1445. package/docs/content/durable-resume.mdx +47 -4
  1446. package/docs/content/embedding-sdk.mdx +83 -8
  1447. package/docs/content/evals.mdx +102 -8
  1448. package/docs/content/extensions.mdx +113 -9
  1449. package/docs/content/external-agents.mdx +119 -8
  1450. package/docs/content/faq.mdx +98 -8
  1451. package/docs/content/file-uploads.mdx +61 -4
  1452. package/docs/content/frames.mdx +90 -8
  1453. package/docs/content/generative-ui.mdx +50 -4
  1454. package/docs/content/getting-started.mdx +34 -4
  1455. package/docs/content/harness-agents.mdx +77 -8
  1456. package/docs/content/human-approval.mdx +50 -4
  1457. package/docs/content/key-concepts.mdx +102 -8
  1458. package/docs/content/local-file-mode.mdx +58 -4
  1459. package/docs/content/locales/ar-SA/a2a-protocol.mdx +97 -9
  1460. package/docs/content/locales/ar-SA/actions.mdx +65 -4
  1461. package/docs/content/locales/ar-SA/agent-mentions.mdx +68 -4
  1462. package/docs/content/locales/ar-SA/agent-surfaces.mdx +114 -8
  1463. package/docs/content/locales/ar-SA/agent-teams.mdx +174 -12
  1464. package/docs/content/locales/ar-SA/agent-web-surfaces.mdx +49 -4
  1465. package/docs/content/locales/ar-SA/authentication.mdx +120 -8
  1466. package/docs/content/locales/ar-SA/automations.mdx +110 -8
  1467. package/docs/content/locales/ar-SA/blueprint-installer.mdx +42 -4
  1468. package/docs/content/locales/ar-SA/cli-adapters.mdx +40 -4
  1469. package/docs/content/locales/ar-SA/client.mdx +80 -8
  1470. package/docs/content/locales/ar-SA/cloneable-saas.mdx +85 -8
  1471. package/docs/content/locales/ar-SA/code-agents-ui.mdx +99 -8
  1472. package/docs/content/locales/ar-SA/components.mdx +114 -8
  1473. package/docs/content/locales/ar-SA/context-awareness.mdx +100 -8
  1474. package/docs/content/locales/ar-SA/creating-templates.mdx +51 -4
  1475. package/docs/content/locales/ar-SA/cross-app-sso.mdx +109 -8
  1476. package/docs/content/locales/ar-SA/database.mdx +52 -4
  1477. package/docs/content/locales/ar-SA/deployment.mdx +103 -8
  1478. package/docs/content/locales/ar-SA/dispatch.mdx +134 -8
  1479. package/docs/content/locales/ar-SA/drop-in-agent.mdx +63 -4
  1480. package/docs/content/locales/ar-SA/durable-resume.mdx +47 -4
  1481. package/docs/content/locales/ar-SA/embedding-sdk.mdx +83 -8
  1482. package/docs/content/locales/ar-SA/evals.mdx +102 -8
  1483. package/docs/content/locales/ar-SA/extensions.mdx +113 -9
  1484. package/docs/content/locales/ar-SA/external-agents.mdx +119 -8
  1485. package/docs/content/locales/ar-SA/faq.mdx +98 -8
  1486. package/docs/content/locales/ar-SA/file-uploads.mdx +61 -4
  1487. package/docs/content/locales/ar-SA/frames.mdx +88 -8
  1488. package/docs/content/locales/ar-SA/getting-started.mdx +34 -4
  1489. package/docs/content/locales/ar-SA/harness-agents.mdx +79 -8
  1490. package/docs/content/locales/ar-SA/human-approval.mdx +50 -4
  1491. package/docs/content/locales/ar-SA/key-concepts.mdx +107 -8
  1492. package/docs/content/locales/ar-SA/local-file-mode.mdx +56 -4
  1493. package/docs/content/locales/ar-SA/mcp-apps.mdx +120 -10
  1494. package/docs/content/locales/ar-SA/mcp-clients.mdx +133 -8
  1495. package/docs/content/locales/ar-SA/mcp-protocol.mdx +105 -8
  1496. package/docs/content/locales/ar-SA/messaging.mdx +115 -8
  1497. package/docs/content/locales/ar-SA/migration-workbench.mdx +47 -4
  1498. package/docs/content/locales/ar-SA/multi-app-workspace.mdx +91 -8
  1499. package/docs/content/locales/ar-SA/multi-tenancy.mdx +80 -8
  1500. package/docs/content/locales/ar-SA/native-chat-ui.mdx +104 -8
  1501. package/docs/content/locales/ar-SA/notifications.mdx +135 -8
  1502. package/docs/content/locales/ar-SA/observability.mdx +102 -8
  1503. package/docs/content/locales/ar-SA/observational-memory.mdx +87 -8
  1504. package/docs/content/locales/ar-SA/onboarding.mdx +45 -4
  1505. package/docs/content/locales/ar-SA/plan-plugin.mdx +99 -8
  1506. package/docs/content/locales/ar-SA/pr-visual-recap.mdx +125 -8
  1507. package/docs/content/locales/ar-SA/processors.mdx +41 -4
  1508. package/docs/content/locales/ar-SA/progress.mdx +46 -4
  1509. package/docs/content/locales/ar-SA/pure-agent-apps.mdx +48 -4
  1510. package/docs/content/locales/ar-SA/real-time-collaboration.mdx +102 -8
  1511. package/docs/content/locales/ar-SA/recurring-jobs.mdx +59 -4
  1512. package/docs/content/locales/ar-SA/routing.mdx +44 -5
  1513. package/docs/content/locales/ar-SA/sandbox-adapters.mdx +43 -4
  1514. package/docs/content/locales/ar-SA/security.mdx +80 -8
  1515. package/docs/content/locales/ar-SA/server.mdx +173 -12
  1516. package/docs/content/locales/ar-SA/sharing.mdx +45 -4
  1517. package/docs/content/locales/ar-SA/skills-guide.mdx +118 -9
  1518. package/docs/content/locales/ar-SA/template-analytics.mdx +46 -4
  1519. package/docs/content/locales/ar-SA/template-assets.mdx +62 -4
  1520. package/docs/content/locales/ar-SA/template-brain.mdx +65 -4
  1521. package/docs/content/locales/ar-SA/template-calendar.mdx +62 -4
  1522. package/docs/content/locales/ar-SA/template-chat.mdx +61 -4
  1523. package/docs/content/locales/ar-SA/template-clips.mdx +52 -4
  1524. package/docs/content/locales/ar-SA/template-content.mdx +62 -4
  1525. package/docs/content/locales/ar-SA/template-design.mdx +101 -4
  1526. package/docs/content/locales/ar-SA/template-dispatch.mdx +57 -4
  1527. package/docs/content/locales/ar-SA/template-forms.mdx +62 -4
  1528. package/docs/content/locales/ar-SA/template-mail.mdx +60 -4
  1529. package/docs/content/locales/ar-SA/template-plan.mdx +61 -4
  1530. package/docs/content/locales/ar-SA/template-slides.mdx +49 -4
  1531. package/docs/content/locales/ar-SA/template-videos.mdx +53 -4
  1532. package/docs/content/locales/ar-SA/tracking.mdx +54 -4
  1533. package/docs/content/locales/ar-SA/using-your-agent.mdx +51 -4
  1534. package/docs/content/locales/ar-SA/voice-input.mdx +43 -4
  1535. package/docs/content/locales/ar-SA/what-is-agent-native.mdx +96 -8
  1536. package/docs/content/locales/ar-SA/workspace-connections.mdx +128 -8
  1537. package/docs/content/locales/ar-SA/workspace-management.mdx +50 -4
  1538. package/docs/content/locales/ar-SA/workspace.mdx +112 -8
  1539. package/docs/content/locales/ar-SA/writing-agent-instructions.mdx +41 -4
  1540. package/docs/content/locales/de-DE/a2a-protocol.mdx +99 -9
  1541. package/docs/content/locales/de-DE/actions.mdx +67 -4
  1542. package/docs/content/locales/de-DE/agent-mentions.mdx +68 -4
  1543. package/docs/content/locales/de-DE/agent-surfaces.mdx +116 -8
  1544. package/docs/content/locales/de-DE/agent-teams.mdx +171 -12
  1545. package/docs/content/locales/de-DE/agent-web-surfaces.mdx +51 -4
  1546. package/docs/content/locales/de-DE/authentication.mdx +122 -8
  1547. package/docs/content/locales/de-DE/automations.mdx +110 -8
  1548. package/docs/content/locales/de-DE/blueprint-installer.mdx +42 -4
  1549. package/docs/content/locales/de-DE/cli-adapters.mdx +44 -4
  1550. package/docs/content/locales/de-DE/client.mdx +79 -8
  1551. package/docs/content/locales/de-DE/cloneable-saas.mdx +85 -8
  1552. package/docs/content/locales/de-DE/code-agents-ui.mdx +100 -8
  1553. package/docs/content/locales/de-DE/components.mdx +118 -8
  1554. package/docs/content/locales/de-DE/context-awareness.mdx +98 -8
  1555. package/docs/content/locales/de-DE/creating-templates.mdx +51 -4
  1556. package/docs/content/locales/de-DE/cross-app-sso.mdx +109 -8
  1557. package/docs/content/locales/de-DE/database.mdx +52 -4
  1558. package/docs/content/locales/de-DE/deployment.mdx +103 -8
  1559. package/docs/content/locales/de-DE/dispatch.mdx +134 -8
  1560. package/docs/content/locales/de-DE/drop-in-agent.mdx +63 -4
  1561. package/docs/content/locales/de-DE/durable-resume.mdx +47 -4
  1562. package/docs/content/locales/de-DE/embedding-sdk.mdx +85 -8
  1563. package/docs/content/locales/de-DE/evals.mdx +102 -8
  1564. package/docs/content/locales/de-DE/extensions.mdx +113 -9
  1565. package/docs/content/locales/de-DE/external-agents.mdx +119 -8
  1566. package/docs/content/locales/de-DE/faq.mdx +98 -8
  1567. package/docs/content/locales/de-DE/file-uploads.mdx +61 -4
  1568. package/docs/content/locales/de-DE/frames.mdx +88 -8
  1569. package/docs/content/locales/de-DE/getting-started.mdx +34 -4
  1570. package/docs/content/locales/de-DE/harness-agents.mdx +79 -8
  1571. package/docs/content/locales/de-DE/human-approval.mdx +50 -4
  1572. package/docs/content/locales/de-DE/key-concepts.mdx +104 -8
  1573. package/docs/content/locales/de-DE/local-file-mode.mdx +58 -4
  1574. package/docs/content/locales/de-DE/mcp-apps.mdx +120 -10
  1575. package/docs/content/locales/de-DE/mcp-clients.mdx +133 -8
  1576. package/docs/content/locales/de-DE/mcp-protocol.mdx +105 -8
  1577. package/docs/content/locales/de-DE/messaging.mdx +115 -8
  1578. package/docs/content/locales/de-DE/migration-workbench.mdx +47 -4
  1579. package/docs/content/locales/de-DE/multi-app-workspace.mdx +91 -8
  1580. package/docs/content/locales/de-DE/multi-tenancy.mdx +80 -8
  1581. package/docs/content/locales/de-DE/native-chat-ui.mdx +108 -8
  1582. package/docs/content/locales/de-DE/notifications.mdx +135 -8
  1583. package/docs/content/locales/de-DE/observability.mdx +102 -8
  1584. package/docs/content/locales/de-DE/observational-memory.mdx +92 -8
  1585. package/docs/content/locales/de-DE/onboarding.mdx +45 -4
  1586. package/docs/content/locales/de-DE/plan-plugin.mdx +99 -8
  1587. package/docs/content/locales/de-DE/pr-visual-recap.mdx +125 -8
  1588. package/docs/content/locales/de-DE/processors.mdx +41 -4
  1589. package/docs/content/locales/de-DE/progress.mdx +46 -4
  1590. package/docs/content/locales/de-DE/pure-agent-apps.mdx +50 -4
  1591. package/docs/content/locales/de-DE/real-time-collaboration.mdx +104 -8
  1592. package/docs/content/locales/de-DE/recurring-jobs.mdx +59 -4
  1593. package/docs/content/locales/de-DE/routing.mdx +44 -5
  1594. package/docs/content/locales/de-DE/sandbox-adapters.mdx +43 -4
  1595. package/docs/content/locales/de-DE/security.mdx +80 -8
  1596. package/docs/content/locales/de-DE/server.mdx +171 -12
  1597. package/docs/content/locales/de-DE/sharing.mdx +45 -4
  1598. package/docs/content/locales/de-DE/skills-guide.mdx +118 -9
  1599. package/docs/content/locales/de-DE/template-analytics.mdx +46 -4
  1600. package/docs/content/locales/de-DE/template-assets.mdx +62 -4
  1601. package/docs/content/locales/de-DE/template-brain.mdx +69 -4
  1602. package/docs/content/locales/de-DE/template-calendar.mdx +62 -4
  1603. package/docs/content/locales/de-DE/template-chat.mdx +61 -4
  1604. package/docs/content/locales/de-DE/template-clips.mdx +52 -4
  1605. package/docs/content/locales/de-DE/template-content.mdx +60 -4
  1606. package/docs/content/locales/de-DE/template-design.mdx +109 -4
  1607. package/docs/content/locales/de-DE/template-dispatch.mdx +57 -4
  1608. package/docs/content/locales/de-DE/template-forms.mdx +64 -4
  1609. package/docs/content/locales/de-DE/template-mail.mdx +60 -4
  1610. package/docs/content/locales/de-DE/template-plan.mdx +63 -4
  1611. package/docs/content/locales/de-DE/template-slides.mdx +49 -4
  1612. package/docs/content/locales/de-DE/template-videos.mdx +53 -4
  1613. package/docs/content/locales/de-DE/tracking.mdx +54 -4
  1614. package/docs/content/locales/de-DE/using-your-agent.mdx +51 -4
  1615. package/docs/content/locales/de-DE/voice-input.mdx +45 -4
  1616. package/docs/content/locales/de-DE/what-is-agent-native.mdx +100 -8
  1617. package/docs/content/locales/de-DE/workspace-connections.mdx +128 -8
  1618. package/docs/content/locales/de-DE/workspace-management.mdx +50 -4
  1619. package/docs/content/locales/de-DE/workspace.mdx +111 -8
  1620. package/docs/content/locales/de-DE/writing-agent-instructions.mdx +45 -4
  1621. package/docs/content/locales/es-ES/a2a-protocol.mdx +99 -9
  1622. package/docs/content/locales/es-ES/actions.mdx +67 -4
  1623. package/docs/content/locales/es-ES/agent-mentions.mdx +68 -4
  1624. package/docs/content/locales/es-ES/agent-surfaces.mdx +120 -8
  1625. package/docs/content/locales/es-ES/agent-teams.mdx +172 -12
  1626. package/docs/content/locales/es-ES/agent-web-surfaces.mdx +51 -4
  1627. package/docs/content/locales/es-ES/authentication.mdx +122 -8
  1628. package/docs/content/locales/es-ES/automations.mdx +110 -8
  1629. package/docs/content/locales/es-ES/blueprint-installer.mdx +42 -4
  1630. package/docs/content/locales/es-ES/cli-adapters.mdx +44 -4
  1631. package/docs/content/locales/es-ES/client.mdx +79 -8
  1632. package/docs/content/locales/es-ES/cloneable-saas.mdx +85 -8
  1633. package/docs/content/locales/es-ES/code-agents-ui.mdx +101 -8
  1634. package/docs/content/locales/es-ES/components.mdx +118 -8
  1635. package/docs/content/locales/es-ES/context-awareness.mdx +98 -8
  1636. package/docs/content/locales/es-ES/creating-templates.mdx +51 -4
  1637. package/docs/content/locales/es-ES/cross-app-sso.mdx +109 -8
  1638. package/docs/content/locales/es-ES/database.mdx +52 -4
  1639. package/docs/content/locales/es-ES/deployment.mdx +103 -8
  1640. package/docs/content/locales/es-ES/dispatch.mdx +134 -8
  1641. package/docs/content/locales/es-ES/drop-in-agent.mdx +63 -4
  1642. package/docs/content/locales/es-ES/durable-resume.mdx +47 -4
  1643. package/docs/content/locales/es-ES/embedding-sdk.mdx +87 -8
  1644. package/docs/content/locales/es-ES/evals.mdx +102 -8
  1645. package/docs/content/locales/es-ES/extensions.mdx +113 -9
  1646. package/docs/content/locales/es-ES/external-agents.mdx +119 -8
  1647. package/docs/content/locales/es-ES/faq.mdx +98 -8
  1648. package/docs/content/locales/es-ES/file-uploads.mdx +61 -4
  1649. package/docs/content/locales/es-ES/frames.mdx +88 -8
  1650. package/docs/content/locales/es-ES/getting-started.mdx +34 -4
  1651. package/docs/content/locales/es-ES/harness-agents.mdx +79 -8
  1652. package/docs/content/locales/es-ES/human-approval.mdx +50 -4
  1653. package/docs/content/locales/es-ES/key-concepts.mdx +104 -8
  1654. package/docs/content/locales/es-ES/local-file-mode.mdx +60 -4
  1655. package/docs/content/locales/es-ES/mcp-apps.mdx +120 -10
  1656. package/docs/content/locales/es-ES/mcp-clients.mdx +135 -8
  1657. package/docs/content/locales/es-ES/mcp-protocol.mdx +105 -8
  1658. package/docs/content/locales/es-ES/messaging.mdx +115 -8
  1659. package/docs/content/locales/es-ES/migration-workbench.mdx +47 -4
  1660. package/docs/content/locales/es-ES/multi-app-workspace.mdx +91 -8
  1661. package/docs/content/locales/es-ES/multi-tenancy.mdx +80 -8
  1662. package/docs/content/locales/es-ES/native-chat-ui.mdx +108 -8
  1663. package/docs/content/locales/es-ES/notifications.mdx +135 -8
  1664. package/docs/content/locales/es-ES/observability.mdx +104 -8
  1665. package/docs/content/locales/es-ES/observational-memory.mdx +92 -8
  1666. package/docs/content/locales/es-ES/onboarding.mdx +45 -4
  1667. package/docs/content/locales/es-ES/plan-plugin.mdx +99 -8
  1668. package/docs/content/locales/es-ES/pr-visual-recap.mdx +125 -8
  1669. package/docs/content/locales/es-ES/processors.mdx +41 -4
  1670. package/docs/content/locales/es-ES/progress.mdx +46 -4
  1671. package/docs/content/locales/es-ES/pure-agent-apps.mdx +50 -4
  1672. package/docs/content/locales/es-ES/real-time-collaboration.mdx +109 -8
  1673. package/docs/content/locales/es-ES/recurring-jobs.mdx +59 -4
  1674. package/docs/content/locales/es-ES/routing.mdx +44 -5
  1675. package/docs/content/locales/es-ES/sandbox-adapters.mdx +44 -4
  1676. package/docs/content/locales/es-ES/security.mdx +82 -8
  1677. package/docs/content/locales/es-ES/server.mdx +173 -12
  1678. package/docs/content/locales/es-ES/sharing.mdx +45 -4
  1679. package/docs/content/locales/es-ES/skills-guide.mdx +118 -9
  1680. package/docs/content/locales/es-ES/template-analytics.mdx +46 -4
  1681. package/docs/content/locales/es-ES/template-assets.mdx +64 -4
  1682. package/docs/content/locales/es-ES/template-brain.mdx +69 -4
  1683. package/docs/content/locales/es-ES/template-calendar.mdx +62 -4
  1684. package/docs/content/locales/es-ES/template-chat.mdx +61 -4
  1685. package/docs/content/locales/es-ES/template-clips.mdx +52 -4
  1686. package/docs/content/locales/es-ES/template-content.mdx +64 -4
  1687. package/docs/content/locales/es-ES/template-design.mdx +108 -4
  1688. package/docs/content/locales/es-ES/template-dispatch.mdx +57 -4
  1689. package/docs/content/locales/es-ES/template-forms.mdx +64 -4
  1690. package/docs/content/locales/es-ES/template-mail.mdx +60 -4
  1691. package/docs/content/locales/es-ES/template-plan.mdx +61 -4
  1692. package/docs/content/locales/es-ES/template-slides.mdx +49 -4
  1693. package/docs/content/locales/es-ES/template-videos.mdx +53 -4
  1694. package/docs/content/locales/es-ES/tracking.mdx +54 -4
  1695. package/docs/content/locales/es-ES/using-your-agent.mdx +51 -4
  1696. package/docs/content/locales/es-ES/voice-input.mdx +45 -4
  1697. package/docs/content/locales/es-ES/what-is-agent-native.mdx +99 -8
  1698. package/docs/content/locales/es-ES/workspace-connections.mdx +128 -8
  1699. package/docs/content/locales/es-ES/workspace-management.mdx +50 -4
  1700. package/docs/content/locales/es-ES/workspace.mdx +112 -8
  1701. package/docs/content/locales/es-ES/writing-agent-instructions.mdx +46 -4
  1702. package/docs/content/locales/fr-FR/a2a-protocol.mdx +97 -9
  1703. package/docs/content/locales/fr-FR/actions.mdx +67 -4
  1704. package/docs/content/locales/fr-FR/agent-mentions.mdx +68 -4
  1705. package/docs/content/locales/fr-FR/agent-surfaces.mdx +118 -8
  1706. package/docs/content/locales/fr-FR/agent-teams.mdx +172 -12
  1707. package/docs/content/locales/fr-FR/agent-web-surfaces.mdx +51 -4
  1708. package/docs/content/locales/fr-FR/authentication.mdx +122 -8
  1709. package/docs/content/locales/fr-FR/automations.mdx +110 -8
  1710. package/docs/content/locales/fr-FR/blueprint-installer.mdx +42 -4
  1711. package/docs/content/locales/fr-FR/cli-adapters.mdx +44 -4
  1712. package/docs/content/locales/fr-FR/client.mdx +81 -8
  1713. package/docs/content/locales/fr-FR/cloneable-saas.mdx +85 -8
  1714. package/docs/content/locales/fr-FR/code-agents-ui.mdx +102 -8
  1715. package/docs/content/locales/fr-FR/components.mdx +118 -8
  1716. package/docs/content/locales/fr-FR/context-awareness.mdx +98 -8
  1717. package/docs/content/locales/fr-FR/creating-templates.mdx +49 -4
  1718. package/docs/content/locales/fr-FR/cross-app-sso.mdx +109 -8
  1719. package/docs/content/locales/fr-FR/database.mdx +52 -4
  1720. package/docs/content/locales/fr-FR/deployment.mdx +103 -8
  1721. package/docs/content/locales/fr-FR/dispatch.mdx +134 -8
  1722. package/docs/content/locales/fr-FR/drop-in-agent.mdx +63 -4
  1723. package/docs/content/locales/fr-FR/durable-resume.mdx +47 -4
  1724. package/docs/content/locales/fr-FR/embedding-sdk.mdx +87 -8
  1725. package/docs/content/locales/fr-FR/evals.mdx +102 -8
  1726. package/docs/content/locales/fr-FR/extensions.mdx +113 -9
  1727. package/docs/content/locales/fr-FR/external-agents.mdx +119 -8
  1728. package/docs/content/locales/fr-FR/faq.mdx +98 -8
  1729. package/docs/content/locales/fr-FR/file-uploads.mdx +61 -4
  1730. package/docs/content/locales/fr-FR/frames.mdx +90 -8
  1731. package/docs/content/locales/fr-FR/getting-started.mdx +34 -4
  1732. package/docs/content/locales/fr-FR/harness-agents.mdx +77 -8
  1733. package/docs/content/locales/fr-FR/human-approval.mdx +50 -4
  1734. package/docs/content/locales/fr-FR/key-concepts.mdx +106 -8
  1735. package/docs/content/locales/fr-FR/local-file-mode.mdx +58 -4
  1736. package/docs/content/locales/fr-FR/mcp-apps.mdx +120 -10
  1737. package/docs/content/locales/fr-FR/mcp-clients.mdx +135 -8
  1738. package/docs/content/locales/fr-FR/mcp-protocol.mdx +105 -8
  1739. package/docs/content/locales/fr-FR/messaging.mdx +115 -8
  1740. package/docs/content/locales/fr-FR/migration-workbench.mdx +47 -4
  1741. package/docs/content/locales/fr-FR/multi-app-workspace.mdx +91 -8
  1742. package/docs/content/locales/fr-FR/multi-tenancy.mdx +80 -8
  1743. package/docs/content/locales/fr-FR/native-chat-ui.mdx +108 -8
  1744. package/docs/content/locales/fr-FR/notifications.mdx +135 -8
  1745. package/docs/content/locales/fr-FR/observability.mdx +104 -8
  1746. package/docs/content/locales/fr-FR/observational-memory.mdx +89 -8
  1747. package/docs/content/locales/fr-FR/onboarding.mdx +45 -4
  1748. package/docs/content/locales/fr-FR/plan-plugin.mdx +99 -8
  1749. package/docs/content/locales/fr-FR/pr-visual-recap.mdx +126 -8
  1750. package/docs/content/locales/fr-FR/processors.mdx +41 -4
  1751. package/docs/content/locales/fr-FR/progress.mdx +46 -4
  1752. package/docs/content/locales/fr-FR/pure-agent-apps.mdx +48 -4
  1753. package/docs/content/locales/fr-FR/real-time-collaboration.mdx +107 -8
  1754. package/docs/content/locales/fr-FR/recurring-jobs.mdx +59 -4
  1755. package/docs/content/locales/fr-FR/routing.mdx +44 -5
  1756. package/docs/content/locales/fr-FR/sandbox-adapters.mdx +44 -4
  1757. package/docs/content/locales/fr-FR/security.mdx +82 -8
  1758. package/docs/content/locales/fr-FR/server.mdx +173 -12
  1759. package/docs/content/locales/fr-FR/sharing.mdx +45 -4
  1760. package/docs/content/locales/fr-FR/skills-guide.mdx +118 -9
  1761. package/docs/content/locales/fr-FR/template-analytics.mdx +46 -4
  1762. package/docs/content/locales/fr-FR/template-assets.mdx +66 -4
  1763. package/docs/content/locales/fr-FR/template-brain.mdx +69 -4
  1764. package/docs/content/locales/fr-FR/template-calendar.mdx +62 -4
  1765. package/docs/content/locales/fr-FR/template-chat.mdx +61 -4
  1766. package/docs/content/locales/fr-FR/template-clips.mdx +52 -4
  1767. package/docs/content/locales/fr-FR/template-content.mdx +64 -4
  1768. package/docs/content/locales/fr-FR/template-design.mdx +107 -4
  1769. package/docs/content/locales/fr-FR/template-dispatch.mdx +57 -4
  1770. package/docs/content/locales/fr-FR/template-forms.mdx +64 -4
  1771. package/docs/content/locales/fr-FR/template-mail.mdx +60 -4
  1772. package/docs/content/locales/fr-FR/template-plan.mdx +61 -4
  1773. package/docs/content/locales/fr-FR/template-slides.mdx +49 -4
  1774. package/docs/content/locales/fr-FR/template-videos.mdx +53 -4
  1775. package/docs/content/locales/fr-FR/tracking.mdx +54 -4
  1776. package/docs/content/locales/fr-FR/using-your-agent.mdx +51 -4
  1777. package/docs/content/locales/fr-FR/voice-input.mdx +45 -4
  1778. package/docs/content/locales/fr-FR/what-is-agent-native.mdx +101 -8
  1779. package/docs/content/locales/fr-FR/workspace-connections.mdx +128 -8
  1780. package/docs/content/locales/fr-FR/workspace-management.mdx +50 -4
  1781. package/docs/content/locales/fr-FR/workspace.mdx +112 -8
  1782. package/docs/content/locales/fr-FR/writing-agent-instructions.mdx +47 -4
  1783. package/docs/content/locales/hi-IN/a2a-protocol.mdx +97 -9
  1784. package/docs/content/locales/hi-IN/actions.mdx +63 -4
  1785. package/docs/content/locales/hi-IN/agent-mentions.mdx +68 -4
  1786. package/docs/content/locales/hi-IN/agent-surfaces.mdx +112 -8
  1787. package/docs/content/locales/hi-IN/agent-teams.mdx +171 -12
  1788. package/docs/content/locales/hi-IN/agent-web-surfaces.mdx +51 -4
  1789. package/docs/content/locales/hi-IN/authentication.mdx +122 -8
  1790. package/docs/content/locales/hi-IN/automations.mdx +110 -8
  1791. package/docs/content/locales/hi-IN/blueprint-installer.mdx +42 -4
  1792. package/docs/content/locales/hi-IN/cli-adapters.mdx +44 -4
  1793. package/docs/content/locales/hi-IN/client.mdx +79 -8
  1794. package/docs/content/locales/hi-IN/cloneable-saas.mdx +85 -8
  1795. package/docs/content/locales/hi-IN/code-agents-ui.mdx +96 -8
  1796. package/docs/content/locales/hi-IN/components.mdx +114 -8
  1797. package/docs/content/locales/hi-IN/context-awareness.mdx +102 -8
  1798. package/docs/content/locales/hi-IN/creating-templates.mdx +53 -4
  1799. package/docs/content/locales/hi-IN/cross-app-sso.mdx +109 -8
  1800. package/docs/content/locales/hi-IN/database.mdx +52 -4
  1801. package/docs/content/locales/hi-IN/deployment.mdx +103 -8
  1802. package/docs/content/locales/hi-IN/dispatch.mdx +134 -8
  1803. package/docs/content/locales/hi-IN/drop-in-agent.mdx +63 -4
  1804. package/docs/content/locales/hi-IN/durable-resume.mdx +47 -4
  1805. package/docs/content/locales/hi-IN/embedding-sdk.mdx +83 -8
  1806. package/docs/content/locales/hi-IN/evals.mdx +100 -8
  1807. package/docs/content/locales/hi-IN/extensions.mdx +113 -9
  1808. package/docs/content/locales/hi-IN/external-agents.mdx +119 -8
  1809. package/docs/content/locales/hi-IN/faq.mdx +96 -8
  1810. package/docs/content/locales/hi-IN/file-uploads.mdx +61 -4
  1811. package/docs/content/locales/hi-IN/frames.mdx +88 -8
  1812. package/docs/content/locales/hi-IN/getting-started.mdx +34 -4
  1813. package/docs/content/locales/hi-IN/harness-agents.mdx +77 -8
  1814. package/docs/content/locales/hi-IN/human-approval.mdx +51 -4
  1815. package/docs/content/locales/hi-IN/key-concepts.mdx +104 -8
  1816. package/docs/content/locales/hi-IN/local-file-mode.mdx +58 -4
  1817. package/docs/content/locales/hi-IN/mcp-apps.mdx +120 -10
  1818. package/docs/content/locales/hi-IN/mcp-clients.mdx +133 -8
  1819. package/docs/content/locales/hi-IN/mcp-protocol.mdx +105 -8
  1820. package/docs/content/locales/hi-IN/messaging.mdx +115 -8
  1821. package/docs/content/locales/hi-IN/migration-workbench.mdx +45 -4
  1822. package/docs/content/locales/hi-IN/multi-app-workspace.mdx +91 -8
  1823. package/docs/content/locales/hi-IN/multi-tenancy.mdx +80 -8
  1824. package/docs/content/locales/hi-IN/native-chat-ui.mdx +106 -8
  1825. package/docs/content/locales/hi-IN/notifications.mdx +135 -8
  1826. package/docs/content/locales/hi-IN/observability.mdx +102 -8
  1827. package/docs/content/locales/hi-IN/observational-memory.mdx +89 -8
  1828. package/docs/content/locales/hi-IN/onboarding.mdx +45 -4
  1829. package/docs/content/locales/hi-IN/plan-plugin.mdx +99 -8
  1830. package/docs/content/locales/hi-IN/pr-visual-recap.mdx +126 -8
  1831. package/docs/content/locales/hi-IN/processors.mdx +41 -4
  1832. package/docs/content/locales/hi-IN/progress.mdx +46 -4
  1833. package/docs/content/locales/hi-IN/pure-agent-apps.mdx +48 -4
  1834. package/docs/content/locales/hi-IN/real-time-collaboration.mdx +106 -8
  1835. package/docs/content/locales/hi-IN/recurring-jobs.mdx +59 -4
  1836. package/docs/content/locales/hi-IN/routing.mdx +44 -5
  1837. package/docs/content/locales/hi-IN/sandbox-adapters.mdx +43 -4
  1838. package/docs/content/locales/hi-IN/security.mdx +78 -8
  1839. package/docs/content/locales/hi-IN/server.mdx +169 -12
  1840. package/docs/content/locales/hi-IN/sharing.mdx +45 -4
  1841. package/docs/content/locales/hi-IN/skills-guide.mdx +118 -9
  1842. package/docs/content/locales/hi-IN/template-analytics.mdx +46 -4
  1843. package/docs/content/locales/hi-IN/template-assets.mdx +62 -4
  1844. package/docs/content/locales/hi-IN/template-brain.mdx +69 -4
  1845. package/docs/content/locales/hi-IN/template-calendar.mdx +62 -4
  1846. package/docs/content/locales/hi-IN/template-chat.mdx +59 -4
  1847. package/docs/content/locales/hi-IN/template-clips.mdx +52 -4
  1848. package/docs/content/locales/hi-IN/template-content.mdx +62 -4
  1849. package/docs/content/locales/hi-IN/template-design.mdx +102 -4
  1850. package/docs/content/locales/hi-IN/template-dispatch.mdx +57 -4
  1851. package/docs/content/locales/hi-IN/template-forms.mdx +64 -4
  1852. package/docs/content/locales/hi-IN/template-mail.mdx +64 -4
  1853. package/docs/content/locales/hi-IN/template-plan.mdx +61 -4
  1854. package/docs/content/locales/hi-IN/template-slides.mdx +49 -4
  1855. package/docs/content/locales/hi-IN/template-videos.mdx +53 -4
  1856. package/docs/content/locales/hi-IN/tracking.mdx +54 -4
  1857. package/docs/content/locales/hi-IN/using-your-agent.mdx +51 -4
  1858. package/docs/content/locales/hi-IN/voice-input.mdx +43 -4
  1859. package/docs/content/locales/hi-IN/what-is-agent-native.mdx +97 -8
  1860. package/docs/content/locales/hi-IN/workspace-connections.mdx +128 -8
  1861. package/docs/content/locales/hi-IN/workspace-management.mdx +50 -4
  1862. package/docs/content/locales/hi-IN/workspace.mdx +111 -8
  1863. package/docs/content/locales/hi-IN/writing-agent-instructions.mdx +40 -4
  1864. package/docs/content/locales/ja-JP/a2a-protocol.mdx +97 -9
  1865. package/docs/content/locales/ja-JP/actions.mdx +67 -4
  1866. package/docs/content/locales/ja-JP/agent-mentions.mdx +68 -4
  1867. package/docs/content/locales/ja-JP/agent-surfaces.mdx +116 -8
  1868. package/docs/content/locales/ja-JP/agent-teams.mdx +172 -12
  1869. package/docs/content/locales/ja-JP/agent-web-surfaces.mdx +51 -4
  1870. package/docs/content/locales/ja-JP/authentication.mdx +122 -8
  1871. package/docs/content/locales/ja-JP/automations.mdx +110 -8
  1872. package/docs/content/locales/ja-JP/blueprint-installer.mdx +44 -4
  1873. package/docs/content/locales/ja-JP/cli-adapters.mdx +44 -4
  1874. package/docs/content/locales/ja-JP/client.mdx +79 -8
  1875. package/docs/content/locales/ja-JP/cloneable-saas.mdx +85 -8
  1876. package/docs/content/locales/ja-JP/code-agents-ui.mdx +100 -8
  1877. package/docs/content/locales/ja-JP/components.mdx +116 -8
  1878. package/docs/content/locales/ja-JP/context-awareness.mdx +100 -8
  1879. package/docs/content/locales/ja-JP/creating-templates.mdx +51 -4
  1880. package/docs/content/locales/ja-JP/cross-app-sso.mdx +109 -8
  1881. package/docs/content/locales/ja-JP/database.mdx +52 -4
  1882. package/docs/content/locales/ja-JP/deployment.mdx +103 -8
  1883. package/docs/content/locales/ja-JP/dispatch.mdx +134 -8
  1884. package/docs/content/locales/ja-JP/drop-in-agent.mdx +63 -4
  1885. package/docs/content/locales/ja-JP/durable-resume.mdx +47 -4
  1886. package/docs/content/locales/ja-JP/embedding-sdk.mdx +85 -8
  1887. package/docs/content/locales/ja-JP/evals.mdx +102 -8
  1888. package/docs/content/locales/ja-JP/extensions.mdx +111 -9
  1889. package/docs/content/locales/ja-JP/external-agents.mdx +119 -8
  1890. package/docs/content/locales/ja-JP/faq.mdx +98 -8
  1891. package/docs/content/locales/ja-JP/file-uploads.mdx +61 -4
  1892. package/docs/content/locales/ja-JP/frames.mdx +88 -8
  1893. package/docs/content/locales/ja-JP/getting-started.mdx +34 -4
  1894. package/docs/content/locales/ja-JP/harness-agents.mdx +79 -8
  1895. package/docs/content/locales/ja-JP/human-approval.mdx +50 -4
  1896. package/docs/content/locales/ja-JP/key-concepts.mdx +105 -8
  1897. package/docs/content/locales/ja-JP/local-file-mode.mdx +58 -4
  1898. package/docs/content/locales/ja-JP/mcp-apps.mdx +119 -10
  1899. package/docs/content/locales/ja-JP/mcp-clients.mdx +134 -8
  1900. package/docs/content/locales/ja-JP/mcp-protocol.mdx +105 -8
  1901. package/docs/content/locales/ja-JP/messaging.mdx +115 -8
  1902. package/docs/content/locales/ja-JP/migration-workbench.mdx +47 -4
  1903. package/docs/content/locales/ja-JP/multi-app-workspace.mdx +91 -8
  1904. package/docs/content/locales/ja-JP/multi-tenancy.mdx +80 -8
  1905. package/docs/content/locales/ja-JP/native-chat-ui.mdx +104 -8
  1906. package/docs/content/locales/ja-JP/notifications.mdx +135 -8
  1907. package/docs/content/locales/ja-JP/observability.mdx +104 -8
  1908. package/docs/content/locales/ja-JP/observational-memory.mdx +89 -8
  1909. package/docs/content/locales/ja-JP/onboarding.mdx +45 -4
  1910. package/docs/content/locales/ja-JP/plan-plugin.mdx +99 -8
  1911. package/docs/content/locales/ja-JP/pr-visual-recap.mdx +123 -8
  1912. package/docs/content/locales/ja-JP/processors.mdx +39 -4
  1913. package/docs/content/locales/ja-JP/progress.mdx +46 -4
  1914. package/docs/content/locales/ja-JP/pure-agent-apps.mdx +48 -4
  1915. package/docs/content/locales/ja-JP/real-time-collaboration.mdx +106 -8
  1916. package/docs/content/locales/ja-JP/recurring-jobs.mdx +59 -4
  1917. package/docs/content/locales/ja-JP/routing.mdx +44 -5
  1918. package/docs/content/locales/ja-JP/sandbox-adapters.mdx +43 -4
  1919. package/docs/content/locales/ja-JP/security.mdx +82 -8
  1920. package/docs/content/locales/ja-JP/server.mdx +171 -12
  1921. package/docs/content/locales/ja-JP/sharing.mdx +45 -4
  1922. package/docs/content/locales/ja-JP/skills-guide.mdx +118 -9
  1923. package/docs/content/locales/ja-JP/template-analytics.mdx +46 -4
  1924. package/docs/content/locales/ja-JP/template-assets.mdx +64 -4
  1925. package/docs/content/locales/ja-JP/template-brain.mdx +67 -4
  1926. package/docs/content/locales/ja-JP/template-calendar.mdx +62 -4
  1927. package/docs/content/locales/ja-JP/template-chat.mdx +61 -4
  1928. package/docs/content/locales/ja-JP/template-clips.mdx +52 -4
  1929. package/docs/content/locales/ja-JP/template-content.mdx +62 -4
  1930. package/docs/content/locales/ja-JP/template-design.mdx +106 -4
  1931. package/docs/content/locales/ja-JP/template-dispatch.mdx +57 -4
  1932. package/docs/content/locales/ja-JP/template-forms.mdx +62 -4
  1933. package/docs/content/locales/ja-JP/template-mail.mdx +62 -4
  1934. package/docs/content/locales/ja-JP/template-plan.mdx +63 -4
  1935. package/docs/content/locales/ja-JP/template-slides.mdx +49 -4
  1936. package/docs/content/locales/ja-JP/template-videos.mdx +53 -4
  1937. package/docs/content/locales/ja-JP/tracking.mdx +54 -4
  1938. package/docs/content/locales/ja-JP/using-your-agent.mdx +51 -4
  1939. package/docs/content/locales/ja-JP/voice-input.mdx +43 -4
  1940. package/docs/content/locales/ja-JP/what-is-agent-native.mdx +96 -8
  1941. package/docs/content/locales/ja-JP/workspace-connections.mdx +128 -8
  1942. package/docs/content/locales/ja-JP/workspace-management.mdx +50 -4
  1943. package/docs/content/locales/ja-JP/workspace.mdx +111 -8
  1944. package/docs/content/locales/ja-JP/writing-agent-instructions.mdx +44 -4
  1945. package/docs/content/locales/ko-KR/a2a-protocol.mdx +97 -9
  1946. package/docs/content/locales/ko-KR/actions.mdx +63 -4
  1947. package/docs/content/locales/ko-KR/agent-mentions.mdx +68 -4
  1948. package/docs/content/locales/ko-KR/agent-surfaces.mdx +113 -8
  1949. package/docs/content/locales/ko-KR/agent-teams.mdx +171 -12
  1950. package/docs/content/locales/ko-KR/agent-web-surfaces.mdx +51 -4
  1951. package/docs/content/locales/ko-KR/authentication.mdx +122 -8
  1952. package/docs/content/locales/ko-KR/automations.mdx +110 -8
  1953. package/docs/content/locales/ko-KR/blueprint-installer.mdx +42 -4
  1954. package/docs/content/locales/ko-KR/cli-adapters.mdx +44 -4
  1955. package/docs/content/locales/ko-KR/client.mdx +79 -8
  1956. package/docs/content/locales/ko-KR/cloneable-saas.mdx +85 -8
  1957. package/docs/content/locales/ko-KR/code-agents-ui.mdx +96 -8
  1958. package/docs/content/locales/ko-KR/components.mdx +112 -8
  1959. package/docs/content/locales/ko-KR/context-awareness.mdx +96 -8
  1960. package/docs/content/locales/ko-KR/creating-templates.mdx +51 -4
  1961. package/docs/content/locales/ko-KR/cross-app-sso.mdx +109 -8
  1962. package/docs/content/locales/ko-KR/database.mdx +52 -4
  1963. package/docs/content/locales/ko-KR/deployment.mdx +103 -8
  1964. package/docs/content/locales/ko-KR/dispatch.mdx +132 -8
  1965. package/docs/content/locales/ko-KR/drop-in-agent.mdx +63 -4
  1966. package/docs/content/locales/ko-KR/durable-resume.mdx +47 -4
  1967. package/docs/content/locales/ko-KR/embedding-sdk.mdx +81 -8
  1968. package/docs/content/locales/ko-KR/evals.mdx +102 -8
  1969. package/docs/content/locales/ko-KR/extensions.mdx +111 -9
  1970. package/docs/content/locales/ko-KR/external-agents.mdx +119 -8
  1971. package/docs/content/locales/ko-KR/faq.mdx +96 -8
  1972. package/docs/content/locales/ko-KR/file-uploads.mdx +61 -4
  1973. package/docs/content/locales/ko-KR/frames.mdx +86 -8
  1974. package/docs/content/locales/ko-KR/getting-started.mdx +34 -4
  1975. package/docs/content/locales/ko-KR/harness-agents.mdx +77 -8
  1976. package/docs/content/locales/ko-KR/human-approval.mdx +50 -4
  1977. package/docs/content/locales/ko-KR/key-concepts.mdx +104 -8
  1978. package/docs/content/locales/ko-KR/local-file-mode.mdx +56 -4
  1979. package/docs/content/locales/ko-KR/mcp-apps.mdx +120 -10
  1980. package/docs/content/locales/ko-KR/mcp-clients.mdx +133 -8
  1981. package/docs/content/locales/ko-KR/mcp-protocol.mdx +105 -8
  1982. package/docs/content/locales/ko-KR/messaging.mdx +115 -8
  1983. package/docs/content/locales/ko-KR/migration-workbench.mdx +45 -4
  1984. package/docs/content/locales/ko-KR/multi-app-workspace.mdx +91 -8
  1985. package/docs/content/locales/ko-KR/multi-tenancy.mdx +80 -8
  1986. package/docs/content/locales/ko-KR/native-chat-ui.mdx +104 -8
  1987. package/docs/content/locales/ko-KR/notifications.mdx +135 -8
  1988. package/docs/content/locales/ko-KR/observability.mdx +102 -8
  1989. package/docs/content/locales/ko-KR/observational-memory.mdx +87 -8
  1990. package/docs/content/locales/ko-KR/onboarding.mdx +44 -4
  1991. package/docs/content/locales/ko-KR/plan-plugin.mdx +99 -8
  1992. package/docs/content/locales/ko-KR/pr-visual-recap.mdx +125 -8
  1993. package/docs/content/locales/ko-KR/processors.mdx +39 -4
  1994. package/docs/content/locales/ko-KR/progress.mdx +46 -4
  1995. package/docs/content/locales/ko-KR/pure-agent-apps.mdx +46 -4
  1996. package/docs/content/locales/ko-KR/real-time-collaboration.mdx +104 -8
  1997. package/docs/content/locales/ko-KR/recurring-jobs.mdx +59 -4
  1998. package/docs/content/locales/ko-KR/routing.mdx +44 -5
  1999. package/docs/content/locales/ko-KR/sandbox-adapters.mdx +41 -4
  2000. package/docs/content/locales/ko-KR/security.mdx +78 -8
  2001. package/docs/content/locales/ko-KR/server.mdx +171 -12
  2002. package/docs/content/locales/ko-KR/sharing.mdx +45 -4
  2003. package/docs/content/locales/ko-KR/skills-guide.mdx +118 -9
  2004. package/docs/content/locales/ko-KR/template-analytics.mdx +46 -4
  2005. package/docs/content/locales/ko-KR/template-assets.mdx +62 -4
  2006. package/docs/content/locales/ko-KR/template-brain.mdx +65 -4
  2007. package/docs/content/locales/ko-KR/template-calendar.mdx +60 -4
  2008. package/docs/content/locales/ko-KR/template-chat.mdx +59 -4
  2009. package/docs/content/locales/ko-KR/template-clips.mdx +52 -4
  2010. package/docs/content/locales/ko-KR/template-content.mdx +60 -4
  2011. package/docs/content/locales/ko-KR/template-design.mdx +102 -4
  2012. package/docs/content/locales/ko-KR/template-dispatch.mdx +57 -4
  2013. package/docs/content/locales/ko-KR/template-forms.mdx +60 -4
  2014. package/docs/content/locales/ko-KR/template-mail.mdx +60 -4
  2015. package/docs/content/locales/ko-KR/template-plan.mdx +57 -4
  2016. package/docs/content/locales/ko-KR/template-slides.mdx +49 -4
  2017. package/docs/content/locales/ko-KR/template-videos.mdx +53 -4
  2018. package/docs/content/locales/ko-KR/tracking.mdx +54 -4
  2019. package/docs/content/locales/ko-KR/using-your-agent.mdx +51 -4
  2020. package/docs/content/locales/ko-KR/voice-input.mdx +43 -4
  2021. package/docs/content/locales/ko-KR/what-is-agent-native.mdx +95 -8
  2022. package/docs/content/locales/ko-KR/workspace-connections.mdx +128 -8
  2023. package/docs/content/locales/ko-KR/workspace-management.mdx +50 -4
  2024. package/docs/content/locales/ko-KR/workspace.mdx +111 -8
  2025. package/docs/content/locales/ko-KR/writing-agent-instructions.mdx +38 -4
  2026. package/docs/content/locales/pt-BR/a2a-protocol.mdx +99 -9
  2027. package/docs/content/locales/pt-BR/actions.mdx +67 -4
  2028. package/docs/content/locales/pt-BR/agent-mentions.mdx +68 -4
  2029. package/docs/content/locales/pt-BR/agent-surfaces.mdx +116 -8
  2030. package/docs/content/locales/pt-BR/agent-teams.mdx +172 -12
  2031. package/docs/content/locales/pt-BR/agent-web-surfaces.mdx +51 -4
  2032. package/docs/content/locales/pt-BR/authentication.mdx +122 -8
  2033. package/docs/content/locales/pt-BR/automations.mdx +110 -8
  2034. package/docs/content/locales/pt-BR/blueprint-installer.mdx +42 -4
  2035. package/docs/content/locales/pt-BR/cli-adapters.mdx +44 -4
  2036. package/docs/content/locales/pt-BR/client.mdx +81 -8
  2037. package/docs/content/locales/pt-BR/cloneable-saas.mdx +85 -8
  2038. package/docs/content/locales/pt-BR/code-agents-ui.mdx +98 -8
  2039. package/docs/content/locales/pt-BR/components.mdx +118 -8
  2040. package/docs/content/locales/pt-BR/context-awareness.mdx +100 -8
  2041. package/docs/content/locales/pt-BR/creating-templates.mdx +51 -4
  2042. package/docs/content/locales/pt-BR/cross-app-sso.mdx +109 -8
  2043. package/docs/content/locales/pt-BR/database.mdx +52 -4
  2044. package/docs/content/locales/pt-BR/deployment.mdx +103 -8
  2045. package/docs/content/locales/pt-BR/dispatch.mdx +134 -8
  2046. package/docs/content/locales/pt-BR/drop-in-agent.mdx +63 -4
  2047. package/docs/content/locales/pt-BR/durable-resume.mdx +47 -4
  2048. package/docs/content/locales/pt-BR/embedding-sdk.mdx +87 -8
  2049. package/docs/content/locales/pt-BR/evals.mdx +102 -8
  2050. package/docs/content/locales/pt-BR/extensions.mdx +113 -9
  2051. package/docs/content/locales/pt-BR/external-agents.mdx +119 -8
  2052. package/docs/content/locales/pt-BR/faq.mdx +98 -8
  2053. package/docs/content/locales/pt-BR/file-uploads.mdx +61 -4
  2054. package/docs/content/locales/pt-BR/frames.mdx +88 -8
  2055. package/docs/content/locales/pt-BR/getting-started.mdx +34 -4
  2056. package/docs/content/locales/pt-BR/harness-agents.mdx +79 -8
  2057. package/docs/content/locales/pt-BR/human-approval.mdx +50 -4
  2058. package/docs/content/locales/pt-BR/key-concepts.mdx +104 -8
  2059. package/docs/content/locales/pt-BR/local-file-mode.mdx +60 -4
  2060. package/docs/content/locales/pt-BR/mcp-apps.mdx +120 -10
  2061. package/docs/content/locales/pt-BR/mcp-clients.mdx +133 -8
  2062. package/docs/content/locales/pt-BR/mcp-protocol.mdx +105 -8
  2063. package/docs/content/locales/pt-BR/messaging.mdx +115 -8
  2064. package/docs/content/locales/pt-BR/migration-workbench.mdx +47 -4
  2065. package/docs/content/locales/pt-BR/multi-app-workspace.mdx +91 -8
  2066. package/docs/content/locales/pt-BR/multi-tenancy.mdx +80 -8
  2067. package/docs/content/locales/pt-BR/native-chat-ui.mdx +108 -8
  2068. package/docs/content/locales/pt-BR/notifications.mdx +135 -8
  2069. package/docs/content/locales/pt-BR/observability.mdx +104 -8
  2070. package/docs/content/locales/pt-BR/observational-memory.mdx +92 -8
  2071. package/docs/content/locales/pt-BR/onboarding.mdx +45 -4
  2072. package/docs/content/locales/pt-BR/plan-plugin.mdx +99 -8
  2073. package/docs/content/locales/pt-BR/pr-visual-recap.mdx +125 -8
  2074. package/docs/content/locales/pt-BR/processors.mdx +41 -4
  2075. package/docs/content/locales/pt-BR/progress.mdx +46 -4
  2076. package/docs/content/locales/pt-BR/pure-agent-apps.mdx +48 -4
  2077. package/docs/content/locales/pt-BR/real-time-collaboration.mdx +107 -8
  2078. package/docs/content/locales/pt-BR/recurring-jobs.mdx +59 -4
  2079. package/docs/content/locales/pt-BR/routing.mdx +44 -5
  2080. package/docs/content/locales/pt-BR/sandbox-adapters.mdx +43 -4
  2081. package/docs/content/locales/pt-BR/security.mdx +82 -8
  2082. package/docs/content/locales/pt-BR/server.mdx +173 -12
  2083. package/docs/content/locales/pt-BR/sharing.mdx +45 -4
  2084. package/docs/content/locales/pt-BR/skills-guide.mdx +118 -9
  2085. package/docs/content/locales/pt-BR/template-analytics.mdx +46 -4
  2086. package/docs/content/locales/pt-BR/template-assets.mdx +64 -4
  2087. package/docs/content/locales/pt-BR/template-brain.mdx +69 -4
  2088. package/docs/content/locales/pt-BR/template-calendar.mdx +62 -4
  2089. package/docs/content/locales/pt-BR/template-chat.mdx +61 -4
  2090. package/docs/content/locales/pt-BR/template-clips.mdx +52 -4
  2091. package/docs/content/locales/pt-BR/template-content.mdx +64 -4
  2092. package/docs/content/locales/pt-BR/template-design.mdx +106 -4
  2093. package/docs/content/locales/pt-BR/template-dispatch.mdx +57 -4
  2094. package/docs/content/locales/pt-BR/template-forms.mdx +64 -4
  2095. package/docs/content/locales/pt-BR/template-mail.mdx +60 -4
  2096. package/docs/content/locales/pt-BR/template-plan.mdx +63 -4
  2097. package/docs/content/locales/pt-BR/template-slides.mdx +49 -4
  2098. package/docs/content/locales/pt-BR/template-videos.mdx +53 -4
  2099. package/docs/content/locales/pt-BR/tracking.mdx +54 -4
  2100. package/docs/content/locales/pt-BR/using-your-agent.mdx +51 -4
  2101. package/docs/content/locales/pt-BR/voice-input.mdx +43 -4
  2102. package/docs/content/locales/pt-BR/what-is-agent-native.mdx +101 -8
  2103. package/docs/content/locales/pt-BR/workspace-connections.mdx +128 -8
  2104. package/docs/content/locales/pt-BR/workspace-management.mdx +50 -4
  2105. package/docs/content/locales/pt-BR/workspace.mdx +111 -8
  2106. package/docs/content/locales/pt-BR/writing-agent-instructions.mdx +46 -4
  2107. package/docs/content/locales/zh-CN/a2a-protocol.mdx +97 -9
  2108. package/docs/content/locales/zh-CN/actions.mdx +65 -4
  2109. package/docs/content/locales/zh-CN/agent-mentions.mdx +68 -4
  2110. package/docs/content/locales/zh-CN/agent-surfaces.mdx +108 -8
  2111. package/docs/content/locales/zh-CN/agent-teams.mdx +171 -12
  2112. package/docs/content/locales/zh-CN/agent-web-surfaces.mdx +51 -4
  2113. package/docs/content/locales/zh-CN/authentication.mdx +122 -8
  2114. package/docs/content/locales/zh-CN/automations.mdx +110 -8
  2115. package/docs/content/locales/zh-CN/blueprint-installer.mdx +42 -4
  2116. package/docs/content/locales/zh-CN/cli-adapters.mdx +44 -4
  2117. package/docs/content/locales/zh-CN/client.mdx +79 -8
  2118. package/docs/content/locales/zh-CN/cloneable-saas.mdx +83 -8
  2119. package/docs/content/locales/zh-CN/code-agents-ui.mdx +94 -8
  2120. package/docs/content/locales/zh-CN/components.mdx +112 -8
  2121. package/docs/content/locales/zh-CN/context-awareness.mdx +96 -8
  2122. package/docs/content/locales/zh-CN/creating-templates.mdx +51 -4
  2123. package/docs/content/locales/zh-CN/cross-app-sso.mdx +107 -8
  2124. package/docs/content/locales/zh-CN/database.mdx +52 -4
  2125. package/docs/content/locales/zh-CN/deployment.mdx +103 -8
  2126. package/docs/content/locales/zh-CN/dispatch.mdx +134 -8
  2127. package/docs/content/locales/zh-CN/drop-in-agent.mdx +63 -4
  2128. package/docs/content/locales/zh-CN/durable-resume.mdx +45 -4
  2129. package/docs/content/locales/zh-CN/embedding-sdk.mdx +81 -8
  2130. package/docs/content/locales/zh-CN/evals.mdx +100 -8
  2131. package/docs/content/locales/zh-CN/extensions.mdx +111 -9
  2132. package/docs/content/locales/zh-CN/external-agents.mdx +119 -8
  2133. package/docs/content/locales/zh-CN/faq.mdx +96 -8
  2134. package/docs/content/locales/zh-CN/file-uploads.mdx +61 -4
  2135. package/docs/content/locales/zh-CN/frames.mdx +86 -8
  2136. package/docs/content/locales/zh-CN/getting-started.mdx +34 -4
  2137. package/docs/content/locales/zh-CN/harness-agents.mdx +79 -8
  2138. package/docs/content/locales/zh-CN/human-approval.mdx +50 -4
  2139. package/docs/content/locales/zh-CN/key-concepts.mdx +100 -8
  2140. package/docs/content/locales/zh-CN/local-file-mode.mdx +56 -4
  2141. package/docs/content/locales/zh-CN/mcp-apps.mdx +120 -10
  2142. package/docs/content/locales/zh-CN/mcp-clients.mdx +133 -8
  2143. package/docs/content/locales/zh-CN/mcp-protocol.mdx +105 -8
  2144. package/docs/content/locales/zh-CN/messaging.mdx +115 -8
  2145. package/docs/content/locales/zh-CN/migration-workbench.mdx +45 -4
  2146. package/docs/content/locales/zh-CN/multi-app-workspace.mdx +91 -8
  2147. package/docs/content/locales/zh-CN/multi-tenancy.mdx +80 -8
  2148. package/docs/content/locales/zh-CN/native-chat-ui.mdx +104 -8
  2149. package/docs/content/locales/zh-CN/notifications.mdx +135 -8
  2150. package/docs/content/locales/zh-CN/observability.mdx +102 -8
  2151. package/docs/content/locales/zh-CN/observational-memory.mdx +85 -8
  2152. package/docs/content/locales/zh-CN/onboarding.mdx +44 -4
  2153. package/docs/content/locales/zh-CN/plan-plugin.mdx +97 -8
  2154. package/docs/content/locales/zh-CN/pr-visual-recap.mdx +123 -8
  2155. package/docs/content/locales/zh-CN/processors.mdx +39 -4
  2156. package/docs/content/locales/zh-CN/progress.mdx +46 -4
  2157. package/docs/content/locales/zh-CN/pure-agent-apps.mdx +46 -4
  2158. package/docs/content/locales/zh-CN/real-time-collaboration.mdx +98 -8
  2159. package/docs/content/locales/zh-CN/recurring-jobs.mdx +59 -4
  2160. package/docs/content/locales/zh-CN/routing.mdx +42 -5
  2161. package/docs/content/locales/zh-CN/sandbox-adapters.mdx +41 -4
  2162. package/docs/content/locales/zh-CN/security.mdx +78 -8
  2163. package/docs/content/locales/zh-CN/server.mdx +169 -12
  2164. package/docs/content/locales/zh-CN/sharing.mdx +45 -4
  2165. package/docs/content/locales/zh-CN/skills-guide.mdx +118 -9
  2166. package/docs/content/locales/zh-CN/template-analytics.mdx +46 -4
  2167. package/docs/content/locales/zh-CN/template-assets.mdx +58 -4
  2168. package/docs/content/locales/zh-CN/template-brain.mdx +65 -4
  2169. package/docs/content/locales/zh-CN/template-calendar.mdx +58 -4
  2170. package/docs/content/locales/zh-CN/template-chat.mdx +57 -4
  2171. package/docs/content/locales/zh-CN/template-clips.mdx +52 -4
  2172. package/docs/content/locales/zh-CN/template-content.mdx +58 -4
  2173. package/docs/content/locales/zh-CN/template-design.mdx +94 -4
  2174. package/docs/content/locales/zh-CN/template-dispatch.mdx +57 -4
  2175. package/docs/content/locales/zh-CN/template-forms.mdx +58 -4
  2176. package/docs/content/locales/zh-CN/template-mail.mdx +60 -4
  2177. package/docs/content/locales/zh-CN/template-plan.mdx +57 -4
  2178. package/docs/content/locales/zh-CN/template-slides.mdx +49 -4
  2179. package/docs/content/locales/zh-CN/template-videos.mdx +51 -4
  2180. package/docs/content/locales/zh-CN/tracking.mdx +54 -4
  2181. package/docs/content/locales/zh-CN/using-your-agent.mdx +51 -4
  2182. package/docs/content/locales/zh-CN/voice-input.mdx +43 -4
  2183. package/docs/content/locales/zh-CN/what-is-agent-native.mdx +94 -8
  2184. package/docs/content/locales/zh-CN/workspace-connections.mdx +126 -8
  2185. package/docs/content/locales/zh-CN/workspace-management.mdx +50 -4
  2186. package/docs/content/locales/zh-CN/workspace.mdx +110 -8
  2187. package/docs/content/locales/zh-CN/writing-agent-instructions.mdx +38 -4
  2188. package/docs/content/locales/zh-TW/a2a-protocol.mdx +97 -9
  2189. package/docs/content/locales/zh-TW/actions.mdx +63 -4
  2190. package/docs/content/locales/zh-TW/agent-mentions.mdx +68 -4
  2191. package/docs/content/locales/zh-TW/agent-surfaces.mdx +108 -8
  2192. package/docs/content/locales/zh-TW/agent-teams.mdx +171 -12
  2193. package/docs/content/locales/zh-TW/agent-web-surfaces.mdx +51 -4
  2194. package/docs/content/locales/zh-TW/authentication.mdx +122 -8
  2195. package/docs/content/locales/zh-TW/automations.mdx +110 -8
  2196. package/docs/content/locales/zh-TW/blueprint-installer.mdx +42 -4
  2197. package/docs/content/locales/zh-TW/cli-adapters.mdx +44 -4
  2198. package/docs/content/locales/zh-TW/client.mdx +79 -8
  2199. package/docs/content/locales/zh-TW/cloneable-saas.mdx +83 -8
  2200. package/docs/content/locales/zh-TW/code-agents-ui.mdx +94 -8
  2201. package/docs/content/locales/zh-TW/components.mdx +112 -8
  2202. package/docs/content/locales/zh-TW/context-awareness.mdx +96 -8
  2203. package/docs/content/locales/zh-TW/creating-templates.mdx +51 -4
  2204. package/docs/content/locales/zh-TW/cross-app-sso.mdx +107 -8
  2205. package/docs/content/locales/zh-TW/database.mdx +52 -4
  2206. package/docs/content/locales/zh-TW/deployment.mdx +103 -8
  2207. package/docs/content/locales/zh-TW/dispatch.mdx +134 -8
  2208. package/docs/content/locales/zh-TW/drop-in-agent.mdx +63 -4
  2209. package/docs/content/locales/zh-TW/durable-background-runs.mdx +88 -8
  2210. package/docs/content/locales/zh-TW/durable-resume.mdx +45 -4
  2211. package/docs/content/locales/zh-TW/embedding-sdk.mdx +83 -8
  2212. package/docs/content/locales/zh-TW/evals.mdx +100 -8
  2213. package/docs/content/locales/zh-TW/extensions.mdx +111 -9
  2214. package/docs/content/locales/zh-TW/external-agents.mdx +119 -8
  2215. package/docs/content/locales/zh-TW/faq.mdx +96 -8
  2216. package/docs/content/locales/zh-TW/file-uploads.mdx +61 -4
  2217. package/docs/content/locales/zh-TW/frames.mdx +86 -8
  2218. package/docs/content/locales/zh-TW/getting-started.mdx +34 -4
  2219. package/docs/content/locales/zh-TW/harness-agents.mdx +79 -8
  2220. package/docs/content/locales/zh-TW/human-approval.mdx +50 -4
  2221. package/docs/content/locales/zh-TW/key-concepts.mdx +100 -8
  2222. package/docs/content/locales/zh-TW/local-file-mode.mdx +56 -4
  2223. package/docs/content/locales/zh-TW/mcp-apps.mdx +120 -10
  2224. package/docs/content/locales/zh-TW/mcp-clients.mdx +133 -8
  2225. package/docs/content/locales/zh-TW/mcp-protocol.mdx +105 -8
  2226. package/docs/content/locales/zh-TW/messaging.mdx +115 -8
  2227. package/docs/content/locales/zh-TW/migration-workbench.mdx +45 -4
  2228. package/docs/content/locales/zh-TW/multi-app-workspace.mdx +91 -8
  2229. package/docs/content/locales/zh-TW/multi-tenancy.mdx +80 -8
  2230. package/docs/content/locales/zh-TW/native-chat-ui.mdx +104 -8
  2231. package/docs/content/locales/zh-TW/notifications.mdx +135 -8
  2232. package/docs/content/locales/zh-TW/observability.mdx +102 -8
  2233. package/docs/content/locales/zh-TW/observational-memory.mdx +85 -8
  2234. package/docs/content/locales/zh-TW/onboarding.mdx +44 -4
  2235. package/docs/content/locales/zh-TW/plan-plugin.mdx +97 -8
  2236. package/docs/content/locales/zh-TW/pr-visual-recap.mdx +123 -8
  2237. package/docs/content/locales/zh-TW/processors.mdx +39 -4
  2238. package/docs/content/locales/zh-TW/progress.mdx +46 -4
  2239. package/docs/content/locales/zh-TW/pure-agent-apps.mdx +46 -4
  2240. package/docs/content/locales/zh-TW/real-time-collaboration.mdx +98 -8
  2241. package/docs/content/locales/zh-TW/recurring-jobs.mdx +59 -4
  2242. package/docs/content/locales/zh-TW/routing.mdx +42 -5
  2243. package/docs/content/locales/zh-TW/sandbox-adapters.mdx +41 -4
  2244. package/docs/content/locales/zh-TW/security.mdx +80 -8
  2245. package/docs/content/locales/zh-TW/server.mdx +169 -12
  2246. package/docs/content/locales/zh-TW/sharing.mdx +45 -4
  2247. package/docs/content/locales/zh-TW/skills-guide.mdx +118 -9
  2248. package/docs/content/locales/zh-TW/template-analytics.mdx +46 -4
  2249. package/docs/content/locales/zh-TW/template-assets.mdx +58 -4
  2250. package/docs/content/locales/zh-TW/template-brain.mdx +65 -4
  2251. package/docs/content/locales/zh-TW/template-calendar.mdx +58 -4
  2252. package/docs/content/locales/zh-TW/template-chat.mdx +59 -4
  2253. package/docs/content/locales/zh-TW/template-clips.mdx +52 -4
  2254. package/docs/content/locales/zh-TW/template-content.mdx +58 -4
  2255. package/docs/content/locales/zh-TW/template-design.mdx +96 -4
  2256. package/docs/content/locales/zh-TW/template-dispatch.mdx +57 -4
  2257. package/docs/content/locales/zh-TW/template-forms.mdx +58 -4
  2258. package/docs/content/locales/zh-TW/template-mail.mdx +60 -4
  2259. package/docs/content/locales/zh-TW/template-plan.mdx +57 -4
  2260. package/docs/content/locales/zh-TW/template-slides.mdx +49 -4
  2261. package/docs/content/locales/zh-TW/template-videos.mdx +51 -4
  2262. package/docs/content/locales/zh-TW/tracking.mdx +54 -4
  2263. package/docs/content/locales/zh-TW/using-your-agent.mdx +51 -4
  2264. package/docs/content/locales/zh-TW/voice-input.mdx +43 -4
  2265. package/docs/content/locales/zh-TW/what-is-agent-native.mdx +94 -8
  2266. package/docs/content/locales/zh-TW/workspace-connections.mdx +126 -8
  2267. package/docs/content/locales/zh-TW/workspace-management.mdx +50 -4
  2268. package/docs/content/locales/zh-TW/workspace.mdx +111 -8
  2269. package/docs/content/locales/zh-TW/writing-agent-instructions.mdx +38 -4
  2270. package/docs/content/mcp-apps.mdx +120 -10
  2271. package/docs/content/mcp-clients.mdx +161 -8
  2272. package/docs/content/mcp-protocol.mdx +105 -8
  2273. package/docs/content/messaging.mdx +115 -8
  2274. package/docs/content/migration-workbench.mdx +45 -4
  2275. package/docs/content/multi-app-workspace.mdx +91 -8
  2276. package/docs/content/multi-tenancy.mdx +80 -8
  2277. package/docs/content/native-chat-ui.mdx +106 -8
  2278. package/docs/content/notifications.mdx +135 -8
  2279. package/docs/content/observability.mdx +102 -8
  2280. package/docs/content/observational-memory.mdx +89 -8
  2281. package/docs/content/onboarding.mdx +45 -4
  2282. package/docs/content/plan-plugin.mdx +99 -8
  2283. package/docs/content/pr-visual-recap.mdx +125 -8
  2284. package/docs/content/processors.mdx +41 -4
  2285. package/docs/content/progress.mdx +46 -4
  2286. package/docs/content/pure-agent-apps.mdx +46 -4
  2287. package/docs/content/real-time-collaboration.mdx +104 -8
  2288. package/docs/content/recurring-jobs.mdx +59 -4
  2289. package/docs/content/routing.mdx +44 -5
  2290. package/docs/content/sandbox-adapters.mdx +43 -4
  2291. package/docs/content/security.mdx +80 -8
  2292. package/docs/content/server.mdx +173 -12
  2293. package/docs/content/sharing.mdx +45 -4
  2294. package/docs/content/skills-guide.mdx +118 -9
  2295. package/docs/content/template-analytics.mdx +46 -4
  2296. package/docs/content/template-assets.mdx +60 -4
  2297. package/docs/content/template-brain.mdx +67 -4
  2298. package/docs/content/template-calendar.mdx +62 -4
  2299. package/docs/content/template-chat.mdx +61 -4
  2300. package/docs/content/template-clips.mdx +52 -4
  2301. package/docs/content/template-content.mdx +60 -4
  2302. package/docs/content/template-design.mdx +103 -4
  2303. package/docs/content/template-dispatch.mdx +57 -4
  2304. package/docs/content/template-forms.mdx +62 -4
  2305. package/docs/content/template-mail.mdx +60 -4
  2306. package/docs/content/template-plan.mdx +61 -4
  2307. package/docs/content/template-slides.mdx +49 -4
  2308. package/docs/content/template-videos.mdx +51 -4
  2309. package/docs/content/tracking.mdx +54 -4
  2310. package/docs/content/using-your-agent.mdx +51 -4
  2311. package/docs/content/voice-input.mdx +43 -4
  2312. package/docs/content/what-is-agent-native.mdx +188 -8
  2313. package/docs/content/workspace-connections.mdx +128 -8
  2314. package/docs/content/workspace-management.mdx +50 -4
  2315. package/docs/content/workspace.mdx +111 -8
  2316. package/docs/content/writing-agent-instructions.mdx +45 -4
  2317. package/package.json +2 -1
  2318. package/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +10 -0
  2319. package/corpus/templates/design/app/components/design/DesignToolbar.tsx +0 -339
  2320. package/corpus/templates/design/app/components/design/PresentMode.tsx +0 -68
  2321. package/corpus/templates/design/app/components/design/ViewportTabs.tsx +0 -149
  2322. package/corpus/templates/design/app/components/design/ZoomControls.tsx +0 -157
@@ -1 +1 @@
1
- {"version":3,"file":"email.js","sourceRoot":"","sources":["../../../src/integrations/adapters/email.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG9C,OAAO,EAAE,SAAS,EAAE,WAAW,IAAI,aAAa,EAAE,MAAM,IAAI,CAAC;AAE7D,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAS1D,wCAAwC;AACxC,MAAM,qBAAqB,GAAG,KAAK,CAAC;AAEpC,0DAA0D;AAC1D,MAAM,cAAc,GAAG,EAAE,CAAC;AAC1B,uCAAuC;AACvC,MAAM,oBA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AAC;AACb,CAAC","sourcesContent":["import { timingSafeEqual } from \"node:crypto\";\n\nimport type { H3Event } from \"h3\";\nimport { getHeader, readRawBody as h3ReadRawBody } from \"h3\";\n\nimport { getDbExec } from \"../../db/client.js\";\nimport type { EnvKeyConfig } from \"../../server/create-server.js\";\nimport { resolveSecret } from \"../../server/credential-provider.js\";\nimport {\n sendEmail,\n isEmailConfigured,\n getEmailProvider,\n} from \"../../server/email.js\";\nimport { getIntegrationConfig } from \"../config-store.js\";\nimport type {\n PlatformAdapter,\n IncomingMessage,\n OutgoingMessage,\n IntegrationStatus,\n OutboundTarget,\n} from \"../types.js\";\n\n/** Max body length before truncation */\nconst EMAIL_MAX_BODY_LENGTH = 15000;\n\n/** Rate limit: max emails per sender within the window */\nconst RATE_LIMIT_MAX = 20;\n/** Rate limit window in ms (1 hour) */\nconst RATE_LIMIT_WINDOW_MS = 60 * 60 * 1000;\n\n/**\n * One-shot warning flags so we don't spam logs on every webhook.\n * Cleared per process — one warning per cold start is enough to surface\n * a misconfiguration without leaking config status to anyone with log access\n * (M6 in the webhook security audit).\n */\nlet _resendUnverifiedWarned = false;\nlet _sendgridUnverifiedWarned = false;\n\nfunction escapeLike(value: string): string {\n return value.replace(/([\\\\%_])/g, \"\\\\$1\");\n}\n\n/**\n * Returns true when the deployment is running in production mode and the\n * operator has NOT explicitly opted into accepting unverified webhooks for\n * local testing. In production we MUST refuse webhooks whose signature can't\n * be verified — accepting them with attacker-controlled `from:` addresses\n * lets the dispatch owner-resolution path run as the victim (C1 in the\n * webhook security audit).\n */\nfunction shouldRefuseWhenSecretMissing(): boolean {\n if (process.env.AGENT_NATIVE_ALLOW_UNVERIFIED_WEBHOOKS === \"1\") return false;\n return process.env.NODE_ENV === \"production\";\n}\n\n/**\n * Create an Email platform adapter for inbound/outbound email via\n * Resend or SendGrid webhooks.\n *\n * Required env vars:\n * - EMAIL_AGENT_ADDRESS — The email address the agent receives mail at\n *\n * One of these must also be set (checked via isEmailConfigured()):\n * - RESEND_API_KEY — For sending/receiving via Resend\n * - SENDGRID_API_KEY — For sending/receiving via SendGrid\n *\n * Optional:\n * - EMAIL_INBOUND_WEBHOOK_SECRET — Webhook signature verification secret\n */\nexport function emailAdapter(): PlatformAdapter {\n return {\n platform: \"email\",\n label: \"Email\",\n\n getRequiredEnvKeys(): EnvKeyConfig[] {\n return [\n {\n key: \"EMAIL_AGENT_ADDRESS\",\n label: \"Agent Email Address\",\n required: true,\n helpText:\n \"The email address people will use to message your agent (e.g. `agent@yourcompany.com`, or pick from your `<slug>.resend.app` sandbox).\",\n },\n {\n key: \"RESEND_API_KEY\",\n label: \"Resend API Key\",\n required: false,\n helpText:\n \"From resend.com → API keys (starts with `re_`). Either Resend or SendGrid is required for sending and receiving mail.\",\n },\n {\n key: \"SENDGRID_API_KEY\",\n label: \"SendGrid API Key\",\n required: false,\n helpText:\n \"From sendgrid.com → Settings → API Keys (starts with `SG.`). Either Resend or SendGrid is required.\",\n },\n {\n key: \"EMAIL_INBOUND_WEBHOOK_SECRET\",\n label: \"Inbound Webhook Secret\",\n required: false,\n helpText:\n \"Optional. From Resend (Webhooks → Signing Secret, starts with `whsec_`) or your SendGrid Inbound Parse basic-auth password. Used to verify inbound webhooks are real.\",\n },\n ];\n },\n\n async handleVerification(\n _event: H3Event,\n ): Promise<{ handled: boolean; response?: unknown }> {\n // Email webhooks don't need challenge handshakes\n return { handled: false };\n },\n\n async verifyWebhook(event: H3Event): Promise<boolean> {\n const secret =\n (await resolveSecret(\"EMAIL_INBOUND_WEBHOOK_SECRET\")) ?? undefined;\n const provider = await getEmailProvider();\n\n if (provider === \"resend\") {\n return verifyResendWebhook(event, secret);\n }\n\n if (provider === \"sendgrid\") {\n return verifySendGridWebhook(event, secret);\n }\n\n // No provider configured — reject\n console.warn(\"[email] No email provider configured, rejecting webhook\");\n return false;\n },\n\n async parseIncomingMessage(\n event: H3Event,\n ): Promise<IncomingMessage | null> {\n const provider = await getEmailProvider();\n const agentAddress = (\n await resolveSecret(\"EMAIL_AGENT_ADDRESS\")\n )?.toLowerCase();\n if (!agentAddress) {\n console.warn(\"[email] EMAIL_AGENT_ADDRESS not configured\");\n return null;\n }\n\n let parsed: ParsedEmail | null = null;\n\n if (provider === \"resend\") {\n parsed = await parseResendWebhook(event);\n } else if (provider === \"sendgrid\") {\n parsed = await parseSendGridWebhook(event);\n }\n\n if (!parsed) return null;\n\n // Rate limiting (SQL-backed heuristic — counts the sender's already-queued\n // tasks within the last hour). The previous in-memory map reset on every\n // serverless cold start, so the actual ceiling per attacker was\n // RATE_LIMIT_MAX × number_of_active_instances. SQL-backed counting holds\n // across instances. See H4 in the webhook security audit.\n const senderEmail = parsed.from.email.toLowerCase();\n if (await isRateLimited(senderEmail)) {\n console.warn(\n `[email] Rate limited sender: ${senderEmail} (>${RATE_LIMIT_MAX}/hr)`,\n );\n return null;\n }\n\n // Check allowed domains\n const config = await getIntegrationConfig(\"email\");\n if (config?.configData?.allowedDomains) {\n const allowed = config.configData.allowedDomains as string[];\n if (allowed.length > 0) {\n const senderDomain = senderEmail.split(\"@\")[1];\n if (!senderDomain || !allowed.includes(senderDomain)) {\n console.warn(\n `[email] Rejected email from ${senderEmail}: domain not in allowedDomains`,\n );\n return null;\n }\n }\n }\n\n // Determine if agent was CC'd (not in To, but in CC)\n const toAddresses = parsed.to.map((a) => a.toLowerCase());\n const ccAddresses = (parsed.cc ?? []).map((a) => a.toLowerCase());\n const isCC =\n !toAddresses.includes(agentAddress) &&\n ccAddresses.includes(agentAddress);\n\n // Build thread ID from References chain (Gmail-style: oldest Message-ID is thread root).\n // Scope the thread root by sender so an attacker who can forge a `References:`\n // header pointing at someone else's thread root can't graft into that thread.\n // Without this scoping, a third party could craft an inbound email whose\n // References chain matches a known victim's Message-ID and inject messages into\n // the victim's existing conversation — leaking prior content via the agent's\n // reply (M1 in the webhooks security audit).\n const threadRootId = scopeThreadIdToSender(\n getThreadRootId(parsed.messageId, parsed.references),\n senderEmail,\n );\n\n // Build body text\n let bodyText = parsed.text || stripHtmlForPlainText(parsed.html || \"\");\n\n // Truncate if needed\n if (bodyText.length > EMAIL_MAX_BODY_LENGTH) {\n bodyText =\n bodyText.slice(0, EMAIL_MAX_BODY_LENGTH) + \"\\n[Message truncated]\";\n }\n\n // Prefix CC'd emails with context\n if (isCC) {\n const otherRecipients = toAddresses\n .filter((a) => a !== agentAddress)\n .join(\", \");\n bodyText =\n `[CC'd on email between ${senderEmail} and ${otherRecipients || \"others\"}]\\n` +\n `Subject: ${parsed.subject}\\n\\n` +\n bodyText;\n }\n\n return {\n platform: \"email\",\n externalThreadId: threadRootId,\n text: bodyText,\n senderName: parsed.from.name,\n senderId: senderEmail,\n // Carry the message-authentication verdict downstream. Owner\n // resolution (dispatch) must NOT grant a real user's identity /\n // credentials unless the sender is verified — an unverified or\n // spoofed `From:` falls back to a synthetic, credential-less owner.\n senderVerified: parsed.senderVerified,\n platformContext: {\n messageId: parsed.messageId,\n subject: parsed.subject,\n from: senderEmail,\n to: parsed.to,\n cc: parsed.cc,\n inReplyTo: parsed.inReplyTo,\n references: parsed.references,\n isCC,\n senderVerified: parsed.senderVerified,\n },\n timestamp: parsed.date ? new Date(parsed.date).getTime() : Date.now(),\n };\n },\n\n async sendResponse(\n message: OutgoingMessage,\n context: IncomingMessage,\n ): Promise<void> {\n const agentAddress = await resolveSecret(\"EMAIL_AGENT_ADDRESS\");\n if (!agentAddress) {\n console.error(\"[email] EMAIL_AGENT_ADDRESS not configured\");\n return;\n }\n\n const config = await getIntegrationConfig(\"email\");\n const displayName =\n (config?.configData?.displayName as string) || \"Dispatch Agent\";\n\n // EMAIL_FROM overrides the from-address — required when the receiving\n // address is on a sub-domain that can't be a verified sender (e.g.\n // *.resend.app). Inbound and outbound addresses can differ.\n const emailFrom = await resolveSecret(\"EMAIL_FROM\");\n const fromAddress = emailFrom || `${displayName} <${agentAddress}>`;\n\n const subject = context.platformContext.subject as string;\n const reSubject = subject.startsWith(\"Re: \") ? subject : `Re: ${subject}`;\n\n try {\n await sendEmail({\n to: context.senderId!,\n from: fromAddress,\n subject: reSubject,\n html: message.text,\n text: stripHtmlForPlainText(message.text),\n inReplyTo: context.platformContext.messageId as string,\n references: buildReferencesHeader(context.platformContext),\n cc: context.platformContext.isCC\n ? buildReplyAllCc(context, agentAddress)\n : undefined,\n });\n } catch (err) {\n console.error(\"[email] Failed to send response:\", err);\n }\n },\n\n async sendMessageToTarget(\n message: OutgoingMessage,\n target: OutboundTarget,\n ): Promise<void> {\n const agentAddress = await resolveSecret(\"EMAIL_AGENT_ADDRESS\");\n if (!agentAddress) {\n console.error(\"[email] EMAIL_AGENT_ADDRESS not configured\");\n return;\n }\n\n const config = await getIntegrationConfig(\"email\");\n const displayName =\n (config?.configData?.displayName as string) || \"Dispatch Agent\";\n\n try {\n await sendEmail({\n to: target.destination,\n from: `${displayName} <${agentAddress}>`,\n subject: target.label || \"Message from Dispatch Agent\",\n html: message.text,\n text: stripHtmlForPlainText(message.text),\n ...(target.threadRef\n ? {\n inReplyTo: target.threadRef,\n references: target.threadRef,\n }\n : {}),\n });\n } catch (err) {\n console.error(\"[email] Failed to send proactive message:\", err);\n throw err;\n }\n },\n\n formatAgentResponse(text: string): OutgoingMessage {\n const bodyHtml = markdownToHtml(text);\n const html = wrapInEmailTemplate(bodyHtml);\n return { text: html, platformContext: {} };\n },\n\n async getStatus(_baseUrl?: string): Promise<IntegrationStatus> {\n const hasAgentAddress = !!(await resolveSecret(\"EMAIL_AGENT_ADDRESS\"));\n const hasEmailProvider = await isEmailConfigured();\n const hasWebhookSecret = !!(await resolveSecret(\n \"EMAIL_INBOUND_WEBHOOK_SECRET\",\n ));\n const configured = hasAgentAddress && hasEmailProvider;\n\n return {\n platform: \"email\",\n label: \"Email\",\n enabled: false, // overridden by plugin\n configured,\n details: {\n hasAgentAddress,\n hasEmailProvider,\n hasWebhookSecret,\n provider: await getEmailProvider(),\n },\n error: !configured\n ? \"Save EMAIL_AGENT_ADDRESS and either RESEND_API_KEY or SENDGRID_API_KEY in settings\"\n : undefined,\n };\n },\n };\n}\n\n// ---------------------------------------------------------------------------\n// Parsed email shape\n// ---------------------------------------------------------------------------\n\ninterface ParsedEmail {\n messageId: string;\n subject: string;\n from: { name?: string; email: string };\n to: string[];\n cc?: string[];\n text?: string;\n html?: string;\n inReplyTo?: string;\n references?: string[];\n date?: string;\n /**\n * True when the provider's message-authentication results show that the\n * mail genuinely originated from the From domain: DKIM `pass` aligned with\n * the From domain, or an aligned SPF `pass`. False when results are absent\n * or fail — we fail closed so a spoofed `From:` can never be treated as\n * verified. See FINDING 3 (inbound-email impersonation) in the webhook\n * security audit.\n */\n senderVerified: boolean;\n}\n\n// ---------------------------------------------------------------------------\n// Webhook verification\n// ---------------------------------------------------------------------------\n\nasync function verifyResendWebhook(\n event: H3Event,\n secret?: string,\n): Promise<boolean> {\n if (!secret) {\n if (shouldRefuseWhenSecretMissing()) {\n if (!_resendUnverifiedWarned) {\n _resendUnverifiedWarned = true;\n console.error(\n \"[email] EMAIL_INBOUND_WEBHOOK_SECRET not set — refusing Resend webhook in production. \" +\n \"Set EMAIL_INBOUND_WEBHOOK_SECRET, or set AGENT_NATIVE_ALLOW_UNVERIFIED_WEBHOOKS=1 for local testing only.\",\n );\n }\n return false;\n }\n if (!_resendUnverifiedWarned) {\n _resendUnverifiedWarned = true;\n console.warn(\n \"[email] EMAIL_INBOUND_WEBHOOK_SECRET not set — accepting Resend webhook without verification (dev mode)\",\n );\n }\n return true;\n }\n\n const svixId = getHeader(event, \"svix-id\");\n const svixTimestamp = getHeader(event, \"svix-timestamp\");\n const svixSignature = getHeader(event, \"svix-signature\");\n\n if (!svixId || !svixTimestamp || !svixSignature) {\n console.warn(\"[email] Missing Svix signature headers\");\n return false;\n }\n\n // Reject requests older than 5 minutes (replay protection)\n const ts = parseInt(svixTimestamp, 10);\n if (Math.abs(Date.now() / 1000 - ts) > 300) {\n console.warn(\"[email] Svix timestamp too old, rejecting\");\n return false;\n }\n\n const body = await readRawBody(event);\n const crypto = await import(\"node:crypto\");\n\n // Svix signing secret may be prefixed with \"whsec_\"\n const rawSecret = secret.startsWith(\"whsec_\") ? secret.slice(6) : secret;\n const secretBytes = Buffer.from(rawSecret, \"base64\");\n\n const signedContent = `${svixId}.${svixTimestamp}.${body}`;\n const expectedSignature = crypto\n .createHmac(\"sha256\", secretBytes)\n .update(signedContent)\n .digest(\"base64\");\n\n // Svix sends multiple signatures separated by spaces, each prefixed with \"v1,\"\n const signatures = svixSignature.split(\" \");\n for (const sig of signatures) {\n const sigValue = sig.startsWith(\"v1,\") ? sig.slice(3) : sig;\n try {\n if (\n crypto.timingSafeEqual(\n Buffer.from(expectedSignature),\n Buffer.from(sigValue),\n )\n ) {\n return true;\n }\n } catch {\n // Length mismatch — try next signature\n }\n }\n\n console.warn(\"[email] Svix signature verification failed\");\n return false;\n}\n\nfunction safeEq(a: string, b: string): boolean {\n const aBuf = Buffer.from(a);\n const bBuf = Buffer.from(b);\n if (aBuf.length !== bBuf.length) return false;\n return timingSafeEqual(aBuf, bBuf);\n}\n\nasync function verifySendGridWebhook(\n event: H3Event,\n secret?: string,\n): Promise<boolean> {\n if (!secret) {\n if (shouldRefuseWhenSecretMissing()) {\n if (!_sendgridUnverifiedWarned) {\n _sendgridUnverifiedWarned = true;\n console.error(\n \"[email] EMAIL_INBOUND_WEBHOOK_SECRET not set — refusing SendGrid webhook in production. \" +\n \"Set EMAIL_INBOUND_WEBHOOK_SECRET, or set AGENT_NATIVE_ALLOW_UNVERIFIED_WEBHOOKS=1 for local testing only.\",\n );\n }\n return false;\n }\n if (!_sendgridUnverifiedWarned) {\n _sendgridUnverifiedWarned = true;\n console.warn(\n \"[email] EMAIL_INBOUND_WEBHOOK_SECRET not set — accepting SendGrid webhook without verification (dev mode)\",\n );\n }\n return true;\n }\n\n // Check for the secret in a custom header or basic auth\n const authHeader = getHeader(event, \"authorization\");\n if (authHeader) {\n // Basic auth: \"Basic base64(user:pass)\" — secret is the password\n if (authHeader.startsWith(\"Basic \")) {\n const decoded = Buffer.from(authHeader.slice(6), \"base64\").toString();\n const password = decoded.split(\":\")[1];\n if (password !== undefined && safeEq(password, secret)) return true;\n }\n }\n\n // Also check a custom header (common SendGrid Inbound Parse pattern)\n const customSecret = getHeader(event, \"x-webhook-secret\");\n if (customSecret !== undefined && safeEq(customSecret, secret)) return true;\n\n console.warn(\"[email] SendGrid webhook secret verification failed\");\n return false;\n}\n\n// ---------------------------------------------------------------------------\n// Inbound email parsing\n// ---------------------------------------------------------------------------\n\nasync function parseResendWebhook(event: H3Event): Promise<ParsedEmail | null> {\n const raw = await readRawBody(event);\n const body = JSON.parse(raw);\n if (!body || body.type !== \"email.received\") return null;\n\n const data = body.data;\n if (!data) return null;\n\n // Resend webhook payload provides email metadata directly in data\n // Fields: from, to, cc, subject, text, html, headers, created_at\n const fromRaw = data.from as string | undefined;\n const from = fromRaw ? parseEmailAddress(fromRaw) : null;\n if (!from) return null;\n\n const toRaw = data.to as string | string[] | undefined;\n const to = normalizeAddressList(toRaw);\n const ccRaw = data.cc as string | string[] | undefined;\n const cc = normalizeAddressList(ccRaw);\n\n // Parse headers for Message-ID, In-Reply-To, References\n const headers = parseHeadersObject(data.headers);\n const messageId =\n headers[\"message-id\"] || data.email_id || `resend-${Date.now()}`;\n\n // Resend forwards the raw `Authentication-Results` header (and may also\n // surface explicit `dkim`/`spf` fields). Derive a verified verdict from\n // whichever is present; absent results fail closed (unverified).\n const senderVerified = computeSenderVerified({\n fromEmail: from.email,\n authResults: headers[\"authentication-results\"],\n dkim: typeof data.dkim === \"string\" ? data.dkim : undefined,\n spf: typeof data.spf === \"string\" ? data.spf : undefined,\n });\n\n return {\n messageId,\n subject: (data.subject as string) || \"(no subject)\",\n from,\n to,\n cc: cc.length > 0 ? cc : undefined,\n text: data.text as string | undefined,\n html: data.html as string | undefined,\n inReplyTo: headers[\"in-reply-to\"] || undefined,\n references: parseReferencesHeader(headers[\"references\"]),\n date: (data.created_at as string) || undefined,\n senderVerified,\n };\n}\n\nasync function parseSendGridWebhook(\n event: H3Event,\n): Promise<ParsedEmail | null> {\n const raw = await readRawBody(event);\n const body = JSON.parse(raw);\n if (!body) return null;\n\n // SendGrid Inbound Parse sends form data with fields:\n // from, to, cc, subject, text, html, headers, envelope\n const fromRaw = body.from as string | undefined;\n const from = fromRaw ? parseEmailAddress(fromRaw) : null;\n if (!from) return null;\n\n const toRaw = body.to as string | undefined;\n const to = toRaw ? toRaw.split(\",\").map((a: string) => a.trim()) : [];\n const ccRaw = body.cc as string | undefined;\n const cc = ccRaw ? ccRaw.split(\",\").map((a: string) => a.trim()) : [];\n\n // Parse raw headers string\n const headersStr = body.headers as string | undefined;\n const headers = parseHeadersString(headersStr);\n const messageId = headers[\"message-id\"] || `sendgrid-${Date.now()}`;\n\n // SendGrid Inbound Parse posts explicit `dkim` (e.g. `{@example.com : pass}`)\n // and `SPF` (e.g. `pass`) form fields, and also carries\n // `Authentication-Results` inside the raw headers blob. Use all available\n // signals; absent results fail closed (unverified).\n const senderVerified = computeSenderVerified({\n fromEmail: from.email,\n authResults: headers[\"authentication-results\"],\n dkim: typeof body.dkim === \"string\" ? body.dkim : undefined,\n spf: typeof body.SPF === \"string\" ? body.SPF : undefined,\n });\n\n return {\n messageId,\n subject: (body.subject as string) || \"(no subject)\",\n from,\n to,\n cc: cc.length > 0 ? cc : undefined,\n text: body.text as string | undefined,\n html: body.html as string | undefined,\n inReplyTo: headers[\"in-reply-to\"] || undefined,\n references: parseReferencesHeader(headers[\"references\"]),\n date: headers[\"date\"] || undefined,\n senderVerified,\n };\n}\n\n// ---------------------------------------------------------------------------\n// Helpers — sender authentication (DKIM / SPF)\n// ---------------------------------------------------------------------------\n\n/**\n * Extract the registrable-ish domain from an email address (lowercased).\n * We keep the full host rather than collapsing to an eTLD+1 — exact-domain\n * alignment is the conservative choice here, and avoids bundling a public\n * suffix list. Subdomain senders that legitimately DKIM-sign with the parent\n * domain are handled by the suffix check in `domainsAlign`.\n */\nfunction emailDomain(email: string): string {\n const at = email.lastIndexOf(\"@\");\n return at >= 0\n ? email\n .slice(at + 1)\n .trim()\n .toLowerCase()\n : \"\";\n}\n\n/**\n * True when `signingDomain` is the From domain or a parent of it (e.g.\n * From `user@mail.example.com` aligned with a `d=example.com` signature).\n * Both directions of subdomain nesting are accepted because senders sign\n * with either the exact From host or the organizational parent.\n */\nfunction domainsAlign(fromDomain: string, signingDomain: string): boolean {\n if (!fromDomain || !signingDomain) return false;\n if (fromDomain === signingDomain) return true;\n return (\n fromDomain.endsWith(`.${signingDomain}`) ||\n signingDomain.endsWith(`.${fromDomain}`)\n );\n}\n\n/**\n * Compute whether an inbound email is authenticated as genuinely coming from\n * its `From:` domain. Returns true only when DKIM passes for an aligned\n * domain, or SPF passes for an aligned domain. Anything else — missing\n * results, `fail`, `softfail`, `none`, `neutral`, `temperror`, `permerror`\n * — returns false (fail closed).\n *\n * Inputs may come from provider-specific fields (`dkim`, `spf`) and/or the\n * RFC 8601 `Authentication-Results` header, in any combination. We treat the\n * union: if ANY source shows an aligned pass, the sender is verified.\n */\nfunction computeSenderVerified(input: {\n fromEmail: string;\n authResults?: string;\n dkim?: string;\n spf?: string;\n}): boolean {\n const fromDomain = emailDomain(input.fromEmail);\n if (!fromDomain) return false;\n\n // 1. Provider DKIM field, e.g. SendGrid `{@example.com : pass}` or\n // `{@example.com : pass; @other.com : fail}`.\n if (input.dkim) {\n const dkimEntries = input.dkim.matchAll(\n /@([a-z0-9.-]+)\\s*:\\s*(pass|fail|none|neutral|softfail|temperror|permerror)/gi,\n );\n for (const m of dkimEntries) {\n const domain = m[1].toLowerCase();\n const verdict = m[2].toLowerCase();\n if (verdict === \"pass\" && domainsAlign(fromDomain, domain)) return true;\n }\n }\n\n // 2. Provider SPF field. SendGrid posts a bare verdict (e.g. `pass`); since\n // SPF authenticates the envelope/MailFrom rather than the header From,\n // a bare `pass` with no domain only counts when we can't tell it's\n // misaligned. We accept a bare `pass` as an aligned SPF pass — this is\n // the same trust level Gmail-style routing assigns to a plain SPF pass.\n if (input.spf) {\n const spfVerdict = input.spf.trim().toLowerCase();\n if (spfVerdict === \"pass\") return true;\n }\n\n // 3. RFC 8601 `Authentication-Results` header (may list multiple methods).\n if (input.authResults) {\n const ar = input.authResults.toLowerCase();\n // DKIM with an aligned domain.\n const dkimRe = /dkim=pass[^;]*?(?:header\\.(?:d|i)=|@)([a-z0-9.-]+)/g;\n for (const m of ar.matchAll(dkimRe)) {\n const domain = m[1].replace(/^@/, \"\");\n if (domainsAlign(fromDomain, domain)) return true;\n }\n // SPF pass (envelope auth) — accept as an aligned pass.\n if (/spf=pass\\b/.test(ar)) return true;\n }\n\n return false;\n}\n\n// ---------------------------------------------------------------------------\n// Rate limiting\n// ---------------------------------------------------------------------------\n\n/**\n * Rate-limit heuristic backed by the `integration_pending_tasks` queue.\n *\n * Counts how many tasks this sender has produced in the last hour. The count\n * INCLUDES tasks already processed (status = completed/failed) because the\n * rows aren't deleted on completion — that's enough signal to throttle a\n * single noisy/abusive sender without needing a dedicated counter table.\n *\n * Two trade-offs worth knowing:\n * - This is a coarse heuristic, not exact metering. Within one hour the\n * count is correct; rows produced more than an hour ago naturally drop\n * off. We don't try to be precise, only to raise the bar past the\n * \"send 10K emails through one Lambda burst\" failure mode.\n * - The query relies on the `idx_pending_tasks_status_created` index plus\n * a sender substring match. A targeted attacker could amortise the cost\n * by reusing one sender address — that's fine, the goal here is to bound\n * the attack within a single attacker identity, not to detect spoofing.\n *\n * If the table doesn't yet exist on this deployment (no inbound webhook has\n * been processed before), we silently allow the message — the schema is\n * provisioned on first task insert. See H4 in the webhook security audit.\n */\nasync function isRateLimited(senderEmail: string): Promise<boolean> {\n const cutoff = Date.now() - RATE_LIMIT_WINDOW_MS;\n try {\n const client = getDbExec();\n const { rows } = await client.execute({\n sql: `\n SELECT COUNT(*) AS c\n FROM integration_pending_tasks\n WHERE platform = ?\n AND created_at >= ?\n AND payload LIKE ? ESCAPE '\\\\'\n `,\n args: [\"email\", cutoff, `%\"senderId\":\"${escapeLike(senderEmail)}\"%`],\n });\n const count = Number(\n (rows[0] as Record<string, unknown> | undefined)?.c ?? 0,\n );\n return count >= RATE_LIMIT_MAX;\n } catch {\n // Table doesn't exist yet (first webhook on a fresh deployment) — allow.\n return false;\n }\n}\n\n// ---------------------------------------------------------------------------\n// Helpers — email address parsing\n// ---------------------------------------------------------------------------\n\n/** Parse \"Name <addr@example.com>\" or plain \"addr@example.com\" */\nfunction parseEmailAddress(raw: string): { name?: string; email: string } {\n const match = raw.match(/^\\s*(.*?)\\s*<([^>]+)>\\s*$/);\n if (match && match[2]) {\n return {\n name: match[1].replace(/^[\"']|[\"']$/g, \"\").trim() || undefined,\n email: match[2].trim(),\n };\n }\n return { email: raw.trim() };\n}\n\n/** Normalize a to/cc field that may be a string, array, or undefined into a string[] of addresses */\nfunction normalizeAddressList(raw: string | string[] | undefined): string[] {\n if (!raw) return [];\n if (Array.isArray(raw)) return raw.map((a) => a.trim());\n return raw.split(\",\").map((a) => a.trim());\n}\n\n// ---------------------------------------------------------------------------\n// Helpers — header parsing\n// ---------------------------------------------------------------------------\n\n/** Parse a headers object (Resend format: array of {name, value} or Record) */\nfunction parseHeadersObject(headers: unknown): Record<string, string> {\n const result: Record<string, string> = {};\n if (!headers) return result;\n\n if (Array.isArray(headers)) {\n for (const h of headers) {\n if (h && typeof h === \"object\" && \"name\" in h && \"value\" in h) {\n result[(h.name as string).toLowerCase()] = h.value as string;\n }\n }\n } else if (typeof headers === \"object\") {\n for (const [key, value] of Object.entries(\n headers as Record<string, unknown>,\n )) {\n result[key.toLowerCase()] = String(value);\n }\n }\n return result;\n}\n\n/** Parse a raw headers string (SendGrid format: \"Key: Value\\nKey: Value\\n...\") */\nfunction parseHeadersString(raw: string | undefined): Record<string, string> {\n const result: Record<string, string> = {};\n if (!raw) return result;\n\n const lines = raw.split(/\\r?\\n/);\n let currentKey = \"\";\n let currentValue = \"\";\n\n for (const line of lines) {\n // Continuation line (starts with whitespace)\n if (/^\\s/.test(line) && currentKey) {\n currentValue += \" \" + line.trim();\n continue;\n }\n // Save previous header\n if (currentKey) {\n result[currentKey.toLowerCase()] = currentValue;\n }\n const colonIdx = line.indexOf(\":\");\n if (colonIdx > 0) {\n currentKey = line.slice(0, colonIdx).trim();\n currentValue = line.slice(colonIdx + 1).trim();\n } else {\n currentKey = \"\";\n currentValue = \"\";\n }\n }\n // Save last header\n if (currentKey) {\n result[currentKey.toLowerCase()] = currentValue;\n }\n return result;\n}\n\n/** Parse a References header value into an array of Message-IDs */\nfunction parseReferencesHeader(\n references: string | undefined,\n): string[] | undefined {\n if (!references) return undefined;\n const ids = references.match(/<[^>]+>/g);\n return ids && ids.length > 0 ? ids : undefined;\n}\n\n// ---------------------------------------------------------------------------\n// Helpers — threading\n// ---------------------------------------------------------------------------\n\n/**\n * Get the thread root ID using a Gmail-style approach:\n * the oldest Message-ID from the References chain is the thread root.\n * If no References, use the current Message-ID.\n */\nfunction getThreadRootId(messageId: string, references?: string[]): string {\n if (references && references.length > 0) {\n return references[0];\n }\n return messageId;\n}\n\n/**\n * Scope a raw thread root id by the sender's email address. Two different\n * senders crafting the same `References:` header value should NOT collide\n * onto the same internal thread mapping — that's the email-side fix for the\n * thread-injection finding (M1 in the webhook security audit).\n *\n * The returned id is opaque to callers and stays stable across messages\n * from the same sender on the same conversation thread, so reply behaviour\n * is unchanged.\n */\nfunction scopeThreadIdToSender(\n rawThreadId: string,\n senderEmail: string,\n): string {\n return `${senderEmail.toLowerCase()}::${rawThreadId}`;\n}\n\n// ---------------------------------------------------------------------------\n// Helpers — reply building\n// ---------------------------------------------------------------------------\n\n/** Build a References header from the platform context */\nfunction buildReferencesHeader(ctx: Record<string, unknown>): string {\n const parts: string[] = [];\n\n // Include existing references\n const refs = ctx.references as string[] | undefined;\n if (refs) {\n parts.push(...refs);\n }\n\n // Append the current message ID\n const messageId = ctx.messageId as string | undefined;\n if (messageId) {\n // Avoid duplicates\n if (!parts.includes(messageId)) {\n parts.push(messageId);\n }\n }\n\n return parts.join(\" \");\n}\n\n/**\n * Build CC list for reply-all when agent was CC'd.\n * Include original To addresses and other CC addresses, excluding the agent and the original sender.\n */\nfunction buildReplyAllCc(\n context: IncomingMessage,\n agentAddress: string,\n): string[] | undefined {\n const normalizedAgentAddress = agentAddress.toLowerCase();\n const senderEmail = context.senderId?.toLowerCase();\n const toAddresses = (context.platformContext.to as string[]) || [];\n const ccAddresses = (context.platformContext.cc as string[]) || [];\n\n const allRecipients = new Set<string>();\n for (const addr of [...toAddresses, ...ccAddresses]) {\n const normalized = addr.toLowerCase().trim();\n // Exclude agent address and original sender (sender goes in To)\n if (normalized !== normalizedAgentAddress && normalized !== senderEmail) {\n allRecipients.add(normalized);\n }\n }\n\n return allRecipients.size > 0 ? Array.from(allRecipients) : undefined;\n}\n\n// ---------------------------------------------------------------------------\n// Helpers — text conversion\n// ---------------------------------------------------------------------------\n\n/** Strip HTML tags for a plain-text version of the email */\nfunction stripHtmlForPlainText(html: string): string {\n return html\n .replace(/<br\\s*\\/?>/gi, \"\\n\")\n .replace(/<\\/p>/gi, \"\\n\\n\")\n .replace(/<\\/div>/gi, \"\\n\")\n .replace(/<\\/li>/gi, \"\\n\")\n .replace(/<li[^>]*>/gi, \"- \")\n .replace(/<\\/h[1-6]>/gi, \"\\n\\n\")\n .replace(/<[^>]+>/g, \"\")\n .replace(/&nbsp;/g, \" \")\n .replace(/&amp;/g, \"&\")\n .replace(/&lt;/g, \"<\")\n .replace(/&gt;/g, \">\")\n .replace(/&quot;/g, '\"')\n .replace(/&#39;/g, \"'\")\n .replace(/\\n{3,}/g, \"\\n\\n\")\n .trim();\n}\n\nfunction escapeHtml(s: string): string {\n return s\n .replace(/&/g, \"&amp;\")\n .replace(/</g, \"&lt;\")\n .replace(/>/g, \"&gt;\")\n .replace(/\"/g, \"&quot;\")\n .replace(/'/g, \"&#39;\");\n}\n\nfunction decodeBasicHtmlEntities(s: string): string {\n return s\n .replace(/&amp;/g, \"&\")\n .replace(/&lt;/g, \"<\")\n .replace(/&gt;/g, \">\")\n .replace(/&quot;/g, '\"')\n .replace(/&#39;/g, \"'\");\n}\n\nfunction splitTrailingUrlPunctuation(raw: string): {\n url: string;\n trailing: string;\n} {\n let url = raw;\n let trailing = \"\";\n const trailingEntities = [\"&quot;\", \"&#39;\"];\n\n for (;;) {\n const entity = trailingEntities.find((candidate) =>\n url.endsWith(candidate),\n );\n if (!entity) break;\n url = url.slice(0, -entity.length);\n trailing = entity + trailing;\n }\n\n while (/[.,!?;:]$/.test(url)) {\n trailing = url.slice(-1) + trailing;\n url = url.slice(0, -1);\n }\n\n while (url.endsWith(\")\") && !url.includes(\"(\")) {\n trailing = \")\" + trailing;\n url = url.slice(0, -1);\n }\n\n return { url, trailing };\n}\n\nfunction labelForUrl(rawUrl: string): string {\n try {\n const parsed = new URL(decodeBasicHtmlEntities(rawUrl));\n const host = parsed.hostname.replace(/^www\\./, \"\");\n return host ? `Open ${host}` : \"Open link\";\n } catch {\n return \"Open link\";\n }\n}\n\nfunction linkifyTextSegment(segment: string): string {\n return segment.replace(/\\bhttps?:\\/\\/[^\\s<>\"']+/gi, (raw) => {\n const { url, trailing } = splitTrailingUrlPunctuation(raw);\n const href = decodeBasicHtmlEntities(url);\n return `<a href=\"${escapeHtml(href)}\" style=\"color:#2563eb;text-decoration:underline;\">${escapeHtml(\n labelForUrl(url),\n )}</a>${trailing}`;\n });\n}\n\nfunction linkifyBareUrlsInHtml(html: string): string {\n const parts = html.split(/(<\\/?[^>]+>)/g);\n let skipDepth = 0;\n\n return parts\n .map((part) => {\n if (part.startsWith(\"<\") && part.endsWith(\">\")) {\n if (/^<\\/\\s*(a|code)\\b/i.test(part)) {\n skipDepth = Math.max(0, skipDepth - 1);\n } else if (/^<\\s*(a|code)\\b/i.test(part)) {\n skipDepth += 1;\n }\n return part;\n }\n return skipDepth > 0 ? part : linkifyTextSegment(part);\n })\n .join(\"\");\n}\n\n/** Convert basic markdown to HTML for email rendering */\nfunction markdownToHtml(md: string): string {\n let html = md;\n\n // Escape HTML entities in the source (but not our generated tags)\n html = escapeHtml(html);\n\n // Bold: **text** or __text__\n html = html.replace(/\\*\\*(.+?)\\*\\*/g, \"<strong>$1</strong>\");\n html = html.replace(/__(.+?)__/g, \"<strong>$1</strong>\");\n\n // Italic: *text* or _text_ (but not inside words with underscores)\n html = html.replace(/(?<!\\w)\\*([^*]+?)\\*(?!\\w)/g, \"<em>$1</em>\");\n html = html.replace(/(?<!\\w)_([^_]+?)_(?!\\w)/g, \"<em>$1</em>\");\n\n // Links: [text](url)\n html = html.replace(/\\[([^\\]]+)\\]\\(([^)]+)\\)/g, (_match, label, url) => {\n const visibleLabel = /^https?:\\/\\//i.test(decodeBasicHtmlEntities(label))\n ? escapeHtml(labelForUrl(label))\n : label;\n return `<a href=\"${escapeHtml(\n decodeBasicHtmlEntities(url),\n )}\" style=\"color:#2563eb;text-decoration:underline;\">${visibleLabel}</a>`;\n });\n\n // Inline code: `code`\n html = html.replace(\n /`([^`]+)`/g,\n '<code style=\"background:#f1f5f9;padding:1px 4px;border-radius:3px;font-size:0.9em;\">$1</code>',\n );\n\n // Bare URLs: keep the destination in href but avoid spelling long URLs out.\n html = linkifyBareUrlsInHtml(html);\n\n // Unordered lists: lines starting with \"- \" or \"* \"\n html = html.replace(/^([*-]) (.+)$/gm, \"<li>$2</li>\");\n // Wrap consecutive <li> in <ul>\n html = html.replace(\n /(<li>.*?<\\/li>\\n?)+/g,\n '<ul style=\"margin:8px 0;padding-left:20px;\">$&</ul>',\n );\n\n // Ordered lists: lines starting with \"1. \", \"2. \" etc.\n html = html.replace(/^\\d+\\. (.+)$/gm, \"<li>$1</li>\");\n // Wrap consecutive <li> that aren't in <ul> in <ol>\n html = html.replace(/(?<!<\\/ul>)(<li>.*?<\\/li>\\n?)+/g, (match) => {\n if (match.includes(\"<ul\")) return match;\n return `<ol style=\"margin:8px 0;padding-left:20px;\">${match}</ol>`;\n });\n\n // Headings: # through ###\n html = html.replace(\n /^### (.+)$/gm,\n '<h3 style=\"margin:16px 0 8px;font-size:1.1em;\">$1</h3>',\n );\n html = html.replace(\n /^## (.+)$/gm,\n '<h2 style=\"margin:16px 0 8px;font-size:1.25em;\">$1</h2>',\n );\n html = html.replace(\n /^# (.+)$/gm,\n '<h1 style=\"margin:16px 0 8px;font-size:1.4em;\">$1</h1>',\n );\n\n // Horizontal rules: --- or ***\n html = html.replace(\n /^(-{3,}|\\*{3,})$/gm,\n '<hr style=\"border:none;border-top:1px solid #e2e8f0;margin:16px 0;\">',\n );\n\n // Paragraphs: double newlines\n html = html.replace(/\\n\\n/g, \"</p><p>\");\n // Single newlines → <br>\n html = html.replace(/\\n/g, \"<br>\");\n\n // Wrap in paragraph tags\n html = `<p>${html}</p>`;\n // Clean up empty paragraphs\n html = html.replace(/<p>\\s*<\\/p>/g, \"\");\n\n return html;\n}\n\n/** Wrap body HTML in a minimal email template with inline styles */\nfunction wrapInEmailTemplate(bodyHtml: string): string {\n return `<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n</head>\n<body style=\"margin:0;padding:0;background-color:#ffffff;\">\n<div style=\"max-width:600px;margin:0 auto;padding:20px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:14px;line-height:1.6;color:#1a1a1a;\">\n${bodyHtml}\n</div>\n</body>\n</html>`;\n}\n\n// ---------------------------------------------------------------------------\n// Raw body reader (matches Slack adapter pattern)\n// ---------------------------------------------------------------------------\n\n/**\n * Read the raw request body as a string and cache on the event context.\n * Reads raw bytes from the request stream — never re-stringifies a parsed\n * body, since the Resend / Svix HMAC is computed over the exact bytes sent\n * (M2 in the webhook security audit).\n */\nasync function readRawBody(event: H3Event): Promise<string> {\n const cached = event.context.__rawBody;\n if (typeof cached === \"string\") return cached;\n const raw = (await h3ReadRawBody(event)) ?? \"\";\n event.context.__rawBody = raw;\n return raw;\n}\n"]}
1
+ {"version":3,"file":"email.js","source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AI,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;IAExC,OAAO,IAAI,CAAC;AACd,CAAC;AAED,oEAAoE;AACpE,SAAS,mBAAmB,CAAC,QAAgB;IAC3C,OAAO;;;;;;;;EAQP,QAAQ;;;QAGF,CAAC;AACT,CAAC;AAED,8EAA8E;AAC9E,kDAAkD;AAClD,8EAA8E;AAE9E;;;;;GAKG;AACH,KAAK,UAAU,WAAW,CAAC,KAAc;IACvC,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;IACvC,IAAI,OAAO,MAAM,KAAK,QAAQ;QAAE,OAAO,MAAM,CAAC;IAC9C,MAAM,GAAG,GAAG,CAAC,MAAM,aAAa,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;IAC/C,KAAK,CAAC,OAAO,CAAC,SAAS,GAAG,GAAG,CAAC;IAC9B,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import { timingSafeEqual } from \"node:crypto\";\n\nimport type { H3Event } from \"h3\";\nimport { getHeader, readRawBody as h3ReadRawBody } from \"h3\";\n\nimport { getDbExec } from \"../../db/client.js\";\nimport type { EnvKeyConfig } from \"../../server/create-server.js\";\nimport { resolveSecret } from \"../../server/credential-provider.js\";\nimport {\n sendEmail,\n isEmailConfigured,\n getEmailProvider,\n} from \"../../server/email.js\";\nimport { getIntegrationConfig } from \"../config-store.js\";\nimport type {\n PlatformAdapter,\n IncomingMessage,\n OutgoingMessage,\n IntegrationStatus,\n OutboundTarget,\n} from \"../types.js\";\n\n/** Max body length before truncation */\nconst EMAIL_MAX_BODY_LENGTH = 15000;\n\n/** Rate limit: max emails per sender within the window */\nconst RATE_LIMIT_MAX = 20;\n/** Rate limit window in ms (1 hour) */\nconst RATE_LIMIT_WINDOW_MS = 60 * 60 * 1000;\n\n/**\n * One-shot warning flags so we don't spam logs on every webhook.\n * Cleared per process — one warning per cold start is enough to surface\n * a misconfiguration without leaking config status to anyone with log access\n * (M6 in the webhook security audit).\n */\nlet _resendUnverifiedWarned = false;\nlet _sendgridUnverifiedWarned = false;\n\nfunction escapeLike(value: string): string {\n return value.replace(/[!%_]/g, (match) => `!${match}`);\n}\n\n/**\n * Returns true when the deployment is running in production mode and the\n * operator has NOT explicitly opted into accepting unverified webhooks for\n * local testing. In production we MUST refuse webhooks whose signature can't\n * be verified — accepting them with attacker-controlled `from:` addresses\n * lets the dispatch owner-resolution path run as the victim (C1 in the\n * webhook security audit).\n */\nfunction shouldRefuseWhenSecretMissing(): boolean {\n if (process.env.AGENT_NATIVE_ALLOW_UNVERIFIED_WEBHOOKS === \"1\") return false;\n return process.env.NODE_ENV === \"production\";\n}\n\n/**\n * Create an Email platform adapter for inbound/outbound email via\n * Resend or SendGrid webhooks.\n *\n * Required env vars:\n * - EMAIL_AGENT_ADDRESS — The email address the agent receives mail at\n *\n * One of these must also be set (checked via isEmailConfigured()):\n * - RESEND_API_KEY — For sending/receiving via Resend\n * - SENDGRID_API_KEY — For sending/receiving via SendGrid\n *\n * Optional:\n * - EMAIL_INBOUND_WEBHOOK_SECRET — Webhook signature verification secret\n */\nexport function emailAdapter(): PlatformAdapter {\n return {\n platform: \"email\",\n label: \"Email\",\n\n getRequiredEnvKeys(): EnvKeyConfig[] {\n return [\n {\n key: \"EMAIL_AGENT_ADDRESS\",\n label: \"Agent Email Address\",\n required: true,\n helpText:\n \"The email address people will use to message your agent (e.g. `agent@yourcompany.com`, or pick from your `<slug>.resend.app` sandbox).\",\n },\n {\n key: \"RESEND_API_KEY\",\n label: \"Resend API Key\",\n required: false,\n helpText:\n \"From resend.com → API keys (starts with `re_`). Either Resend or SendGrid is required for sending and receiving mail.\",\n },\n {\n key: \"SENDGRID_API_KEY\",\n label: \"SendGrid API Key\",\n required: false,\n helpText:\n \"From sendgrid.com → Settings → API Keys (starts with `SG.`). Either Resend or SendGrid is required.\",\n },\n {\n key: \"EMAIL_INBOUND_WEBHOOK_SECRET\",\n label: \"Inbound Webhook Secret\",\n required: false,\n helpText:\n \"Optional. From Resend (Webhooks → Signing Secret, starts with `whsec_`) or your SendGrid Inbound Parse basic-auth password. Used to verify inbound webhooks are real.\",\n },\n ];\n },\n\n async handleVerification(\n _event: H3Event,\n ): Promise<{ handled: boolean; response?: unknown }> {\n // Email webhooks don't need challenge handshakes\n return { handled: false };\n },\n\n async verifyWebhook(event: H3Event): Promise<boolean> {\n const secret =\n (await resolveSecret(\"EMAIL_INBOUND_WEBHOOK_SECRET\")) ?? undefined;\n const provider = await getEmailProvider();\n\n if (provider === \"resend\") {\n return verifyResendWebhook(event, secret);\n }\n\n if (provider === \"sendgrid\") {\n return verifySendGridWebhook(event, secret);\n }\n\n // No provider configured — reject\n console.warn(\"[email] No email provider configured, rejecting webhook\");\n return false;\n },\n\n async parseIncomingMessage(\n event: H3Event,\n ): Promise<IncomingMessage | null> {\n const provider = await getEmailProvider();\n const agentAddress = (\n await resolveSecret(\"EMAIL_AGENT_ADDRESS\")\n )?.toLowerCase();\n if (!agentAddress) {\n console.warn(\"[email] EMAIL_AGENT_ADDRESS not configured\");\n return null;\n }\n\n let parsed: ParsedEmail | null = null;\n\n if (provider === \"resend\") {\n parsed = await parseResendWebhook(event);\n } else if (provider === \"sendgrid\") {\n parsed = await parseSendGridWebhook(event);\n }\n\n if (!parsed) return null;\n\n // Rate limiting (SQL-backed heuristic — counts the sender's already-queued\n // tasks within the last hour). The previous in-memory map reset on every\n // serverless cold start, so the actual ceiling per attacker was\n // RATE_LIMIT_MAX × number_of_active_instances. SQL-backed counting holds\n // across instances. See H4 in the webhook security audit.\n const senderEmail = parsed.from.email.toLowerCase();\n if (await isRateLimited(senderEmail)) {\n console.warn(\n `[email] Rate limited sender: ${senderEmail} (>${RATE_LIMIT_MAX}/hr)`,\n );\n return null;\n }\n\n // Check allowed domains\n const config = await getIntegrationConfig(\"email\");\n if (config?.configData?.allowedDomains) {\n const allowed = config.configData.allowedDomains as string[];\n if (allowed.length > 0) {\n const senderDomain = senderEmail.split(\"@\")[1];\n if (!senderDomain || !allowed.includes(senderDomain)) {\n console.warn(\n `[email] Rejected email from ${senderEmail}: domain not in allowedDomains`,\n );\n return null;\n }\n }\n }\n\n // Determine if agent was CC'd (not in To, but in CC)\n const toAddresses = parsed.to.map((a) => a.toLowerCase());\n const ccAddresses = (parsed.cc ?? []).map((a) => a.toLowerCase());\n const isCC =\n !toAddresses.includes(agentAddress) &&\n ccAddresses.includes(agentAddress);\n\n // Build thread ID from References chain (Gmail-style: oldest Message-ID is thread root).\n // Scope the thread root by sender so an attacker who can forge a `References:`\n // header pointing at someone else's thread root can't graft into that thread.\n // Without this scoping, a third party could craft an inbound email whose\n // References chain matches a known victim's Message-ID and inject messages into\n // the victim's existing conversation — leaking prior content via the agent's\n // reply (M1 in the webhooks security audit).\n const threadRootId = scopeThreadIdToSender(\n getThreadRootId(parsed.messageId, parsed.references),\n senderEmail,\n );\n\n // Build body text\n let bodyText = parsed.text || stripHtmlForPlainText(parsed.html || \"\");\n\n // Truncate if needed\n if (bodyText.length > EMAIL_MAX_BODY_LENGTH) {\n bodyText =\n bodyText.slice(0, EMAIL_MAX_BODY_LENGTH) + \"\\n[Message truncated]\";\n }\n\n // Prefix CC'd emails with context\n if (isCC) {\n const otherRecipients = toAddresses\n .filter((a) => a !== agentAddress)\n .join(\", \");\n bodyText =\n `[CC'd on email between ${senderEmail} and ${otherRecipients || \"others\"}]\\n` +\n `Subject: ${parsed.subject}\\n\\n` +\n bodyText;\n }\n\n return {\n platform: \"email\",\n externalThreadId: threadRootId,\n text: bodyText,\n senderName: parsed.from.name,\n senderId: senderEmail,\n // Carry the message-authentication verdict downstream. Owner\n // resolution (dispatch) must NOT grant a real user's identity /\n // credentials unless the sender is verified — an unverified or\n // spoofed `From:` falls back to a synthetic, credential-less owner.\n senderVerified: parsed.senderVerified,\n platformContext: {\n messageId: parsed.messageId,\n subject: parsed.subject,\n from: senderEmail,\n to: parsed.to,\n cc: parsed.cc,\n inReplyTo: parsed.inReplyTo,\n references: parsed.references,\n isCC,\n senderVerified: parsed.senderVerified,\n },\n timestamp: parsed.date ? new Date(parsed.date).getTime() : Date.now(),\n };\n },\n\n async sendResponse(\n message: OutgoingMessage,\n context: IncomingMessage,\n ): Promise<void> {\n const agentAddress = await resolveSecret(\"EMAIL_AGENT_ADDRESS\");\n if (!agentAddress) {\n console.error(\"[email] EMAIL_AGENT_ADDRESS not configured\");\n return;\n }\n\n const config = await getIntegrationConfig(\"email\");\n const displayName =\n (config?.configData?.displayName as string) || \"Dispatch Agent\";\n\n // EMAIL_FROM overrides the from-address — required when the receiving\n // address is on a sub-domain that can't be a verified sender (e.g.\n // *.resend.app). Inbound and outbound addresses can differ.\n const emailFrom = await resolveSecret(\"EMAIL_FROM\");\n const fromAddress = emailFrom || `${displayName} <${agentAddress}>`;\n\n const subject = context.platformContext.subject as string;\n const reSubject = subject.startsWith(\"Re: \") ? subject : `Re: ${subject}`;\n\n try {\n await sendEmail({\n to: context.senderId!,\n from: fromAddress,\n subject: reSubject,\n html: message.text,\n text: stripHtmlForPlainText(message.text),\n inReplyTo: context.platformContext.messageId as string,\n references: buildReferencesHeader(context.platformContext),\n cc: context.platformContext.isCC\n ? buildReplyAllCc(context, agentAddress)\n : undefined,\n });\n } catch (err) {\n console.error(\"[email] Failed to send response:\", err);\n }\n },\n\n async sendMessageToTarget(\n message: OutgoingMessage,\n target: OutboundTarget,\n ): Promise<void> {\n const agentAddress = await resolveSecret(\"EMAIL_AGENT_ADDRESS\");\n if (!agentAddress) {\n console.error(\"[email] EMAIL_AGENT_ADDRESS not configured\");\n return;\n }\n\n const config = await getIntegrationConfig(\"email\");\n const displayName =\n (config?.configData?.displayName as string) || \"Dispatch Agent\";\n\n try {\n await sendEmail({\n to: target.destination,\n from: `${displayName} <${agentAddress}>`,\n subject: target.label || \"Message from Dispatch Agent\",\n html: message.text,\n text: stripHtmlForPlainText(message.text),\n ...(target.threadRef\n ? {\n inReplyTo: target.threadRef,\n references: target.threadRef,\n }\n : {}),\n });\n } catch (err) {\n console.error(\"[email] Failed to send proactive message:\", err);\n throw err;\n }\n },\n\n formatAgentResponse(text: string): OutgoingMessage {\n const bodyHtml = markdownToHtml(text);\n const html = wrapInEmailTemplate(bodyHtml);\n return { text: html, platformContext: {} };\n },\n\n async getStatus(_baseUrl?: string): Promise<IntegrationStatus> {\n const hasAgentAddress = !!(await resolveSecret(\"EMAIL_AGENT_ADDRESS\"));\n const hasEmailProvider = await isEmailConfigured();\n const hasWebhookSecret = !!(await resolveSecret(\n \"EMAIL_INBOUND_WEBHOOK_SECRET\",\n ));\n const configured = hasAgentAddress && hasEmailProvider;\n\n return {\n platform: \"email\",\n label: \"Email\",\n enabled: false, // overridden by plugin\n configured,\n details: {\n hasAgentAddress,\n hasEmailProvider,\n hasWebhookSecret,\n provider: await getEmailProvider(),\n },\n error: !configured\n ? \"Save EMAIL_AGENT_ADDRESS and either RESEND_API_KEY or SENDGRID_API_KEY in settings\"\n : undefined,\n };\n },\n };\n}\n\n// ---------------------------------------------------------------------------\n// Parsed email shape\n// ---------------------------------------------------------------------------\n\ninterface ParsedEmail {\n messageId: string;\n subject: string;\n from: { name?: string; email: string };\n to: string[];\n cc?: string[];\n text?: string;\n html?: string;\n inReplyTo?: string;\n references?: string[];\n date?: string;\n /**\n * True when the provider's message-authentication results show that the\n * mail genuinely originated from the From domain: DKIM `pass` aligned with\n * the From domain, or an aligned SPF `pass`. False when results are absent\n * or fail — we fail closed so a spoofed `From:` can never be treated as\n * verified. See FINDING 3 (inbound-email impersonation) in the webhook\n * security audit.\n */\n senderVerified: boolean;\n}\n\n// ---------------------------------------------------------------------------\n// Webhook verification\n// ---------------------------------------------------------------------------\n\nasync function verifyResendWebhook(\n event: H3Event,\n secret?: string,\n): Promise<boolean> {\n if (!secret) {\n if (shouldRefuseWhenSecretMissing()) {\n if (!_resendUnverifiedWarned) {\n _resendUnverifiedWarned = true;\n console.error(\n \"[email] EMAIL_INBOUND_WEBHOOK_SECRET not set — refusing Resend webhook in production. \" +\n \"Set EMAIL_INBOUND_WEBHOOK_SECRET, or set AGENT_NATIVE_ALLOW_UNVERIFIED_WEBHOOKS=1 for local testing only.\",\n );\n }\n return false;\n }\n if (!_resendUnverifiedWarned) {\n _resendUnverifiedWarned = true;\n console.warn(\n \"[email] EMAIL_INBOUND_WEBHOOK_SECRET not set — accepting Resend webhook without verification (dev mode)\",\n );\n }\n return true;\n }\n\n const svixId = getHeader(event, \"svix-id\");\n const svixTimestamp = getHeader(event, \"svix-timestamp\");\n const svixSignature = getHeader(event, \"svix-signature\");\n\n if (!svixId || !svixTimestamp || !svixSignature) {\n console.warn(\"[email] Missing Svix signature headers\");\n return false;\n }\n\n // Reject requests older than 5 minutes (replay protection)\n const ts = parseInt(svixTimestamp, 10);\n if (Math.abs(Date.now() / 1000 - ts) > 300) {\n console.warn(\"[email] Svix timestamp too old, rejecting\");\n return false;\n }\n\n const body = await readRawBody(event);\n const crypto = await import(\"node:crypto\");\n\n // Svix signing secret may be prefixed with \"whsec_\"\n const rawSecret = secret.startsWith(\"whsec_\") ? secret.slice(6) : secret;\n const secretBytes = Buffer.from(rawSecret, \"base64\");\n\n const signedContent = `${svixId}.${svixTimestamp}.${body}`;\n const expectedSignature = crypto\n .createHmac(\"sha256\", secretBytes)\n .update(signedContent)\n .digest(\"base64\");\n\n // Svix sends multiple signatures separated by spaces, each prefixed with \"v1,\"\n const signatures = svixSignature.split(\" \");\n for (const sig of signatures) {\n const sigValue = sig.startsWith(\"v1,\") ? sig.slice(3) : sig;\n try {\n if (\n crypto.timingSafeEqual(\n Buffer.from(expectedSignature),\n Buffer.from(sigValue),\n )\n ) {\n return true;\n }\n } catch {\n // Length mismatch — try next signature\n }\n }\n\n console.warn(\"[email] Svix signature verification failed\");\n return false;\n}\n\nfunction safeEq(a: string, b: string): boolean {\n const aBuf = Buffer.from(a);\n const bBuf = Buffer.from(b);\n if (aBuf.length !== bBuf.length) return false;\n return timingSafeEqual(aBuf, bBuf);\n}\n\nasync function verifySendGridWebhook(\n event: H3Event,\n secret?: string,\n): Promise<boolean> {\n if (!secret) {\n if (shouldRefuseWhenSecretMissing()) {\n if (!_sendgridUnverifiedWarned) {\n _sendgridUnverifiedWarned = true;\n console.error(\n \"[email] EMAIL_INBOUND_WEBHOOK_SECRET not set — refusing SendGrid webhook in production. \" +\n \"Set EMAIL_INBOUND_WEBHOOK_SECRET, or set AGENT_NATIVE_ALLOW_UNVERIFIED_WEBHOOKS=1 for local testing only.\",\n );\n }\n return false;\n }\n if (!_sendgridUnverifiedWarned) {\n _sendgridUnverifiedWarned = true;\n console.warn(\n \"[email] EMAIL_INBOUND_WEBHOOK_SECRET not set — accepting SendGrid webhook without verification (dev mode)\",\n );\n }\n return true;\n }\n\n // Check for the secret in a custom header or basic auth\n const authHeader = getHeader(event, \"authorization\");\n if (authHeader) {\n // Basic auth: \"Basic base64(user:pass)\" — secret is the password\n if (authHeader.startsWith(\"Basic \")) {\n const decoded = Buffer.from(authHeader.slice(6), \"base64\").toString();\n const password = decoded.split(\":\")[1];\n if (password !== undefined && safeEq(password, secret)) return true;\n }\n }\n\n // Also check a custom header (common SendGrid Inbound Parse pattern)\n const customSecret = getHeader(event, \"x-webhook-secret\");\n if (customSecret !== undefined && safeEq(customSecret, secret)) return true;\n\n console.warn(\"[email] SendGrid webhook secret verification failed\");\n return false;\n}\n\n// ---------------------------------------------------------------------------\n// Inbound email parsing\n// ---------------------------------------------------------------------------\n\nasync function parseResendWebhook(event: H3Event): Promise<ParsedEmail | null> {\n const raw = await readRawBody(event);\n const body = JSON.parse(raw);\n if (!body || body.type !== \"email.received\") return null;\n\n const data = body.data;\n if (!data) return null;\n\n // Resend webhook payload provides email metadata directly in data\n // Fields: from, to, cc, subject, text, html, headers, created_at\n const fromRaw = data.from as string | undefined;\n const from = fromRaw ? parseEmailAddress(fromRaw) : null;\n if (!from) return null;\n\n const toRaw = data.to as string | string[] | undefined;\n const to = normalizeAddressList(toRaw);\n const ccRaw = data.cc as string | string[] | undefined;\n const cc = normalizeAddressList(ccRaw);\n\n // Parse headers for Message-ID, In-Reply-To, References\n const headers = parseHeadersObject(data.headers);\n const messageId =\n headers[\"message-id\"] || data.email_id || `resend-${Date.now()}`;\n\n // Resend forwards the raw `Authentication-Results` header (and may also\n // surface explicit `dkim`/`spf` fields). Derive a verified verdict from\n // whichever is present; absent results fail closed (unverified).\n const senderVerified = computeSenderVerified({\n fromEmail: from.email,\n authResults: headers[\"authentication-results\"],\n dkim: typeof data.dkim === \"string\" ? data.dkim : undefined,\n spf: typeof data.spf === \"string\" ? data.spf : undefined,\n });\n\n return {\n messageId,\n subject: (data.subject as string) || \"(no subject)\",\n from,\n to,\n cc: cc.length > 0 ? cc : undefined,\n text: data.text as string | undefined,\n html: data.html as string | undefined,\n inReplyTo: headers[\"in-reply-to\"] || undefined,\n references: parseReferencesHeader(headers[\"references\"]),\n date: (data.created_at as string) || undefined,\n senderVerified,\n };\n}\n\nasync function parseSendGridWebhook(\n event: H3Event,\n): Promise<ParsedEmail | null> {\n const raw = await readRawBody(event);\n const body = JSON.parse(raw);\n if (!body) return null;\n\n // SendGrid Inbound Parse sends form data with fields:\n // from, to, cc, subject, text, html, headers, envelope\n const fromRaw = body.from as string | undefined;\n const from = fromRaw ? parseEmailAddress(fromRaw) : null;\n if (!from) return null;\n\n const toRaw = body.to as string | undefined;\n const to = toRaw ? toRaw.split(\",\").map((a: string) => a.trim()) : [];\n const ccRaw = body.cc as string | undefined;\n const cc = ccRaw ? ccRaw.split(\",\").map((a: string) => a.trim()) : [];\n\n // Parse raw headers string\n const headersStr = body.headers as string | undefined;\n const headers = parseHeadersString(headersStr);\n const messageId = headers[\"message-id\"] || `sendgrid-${Date.now()}`;\n\n // SendGrid Inbound Parse posts explicit `dkim` (e.g. `{@example.com : pass}`)\n // and `SPF` (e.g. `pass`) form fields, and also carries\n // `Authentication-Results` inside the raw headers blob. Use all available\n // signals; absent results fail closed (unverified).\n const senderVerified = computeSenderVerified({\n fromEmail: from.email,\n authResults: headers[\"authentication-results\"],\n dkim: typeof body.dkim === \"string\" ? body.dkim : undefined,\n spf: typeof body.SPF === \"string\" ? body.SPF : undefined,\n });\n\n return {\n messageId,\n subject: (body.subject as string) || \"(no subject)\",\n from,\n to,\n cc: cc.length > 0 ? cc : undefined,\n text: body.text as string | undefined,\n html: body.html as string | undefined,\n inReplyTo: headers[\"in-reply-to\"] || undefined,\n references: parseReferencesHeader(headers[\"references\"]),\n date: headers[\"date\"] || undefined,\n senderVerified,\n };\n}\n\n// ---------------------------------------------------------------------------\n// Helpers — sender authentication (DKIM / SPF)\n// ---------------------------------------------------------------------------\n\n/**\n * Extract the registrable-ish domain from an email address (lowercased).\n * We keep the full host rather than collapsing to an eTLD+1 — exact-domain\n * alignment is the conservative choice here, and avoids bundling a public\n * suffix list. Subdomain senders that legitimately DKIM-sign with the parent\n * domain are handled by the suffix check in `domainsAlign`.\n */\nfunction emailDomain(email: string): string {\n const at = email.lastIndexOf(\"@\");\n return at >= 0\n ? email\n .slice(at + 1)\n .trim()\n .toLowerCase()\n : \"\";\n}\n\n/**\n * True when `signingDomain` is the From domain or a parent of it (e.g.\n * From `user@mail.example.com` aligned with a `d=example.com` signature).\n * Both directions of subdomain nesting are accepted because senders sign\n * with either the exact From host or the organizational parent.\n */\nfunction domainsAlign(fromDomain: string, signingDomain: string): boolean {\n if (!fromDomain || !signingDomain) return false;\n if (fromDomain === signingDomain) return true;\n return (\n fromDomain.endsWith(`.${signingDomain}`) ||\n signingDomain.endsWith(`.${fromDomain}`)\n );\n}\n\n/**\n * Compute whether an inbound email is authenticated as genuinely coming from\n * its `From:` domain. Returns true only when DKIM passes for an aligned\n * domain, or SPF passes for an aligned domain. Anything else — missing\n * results, `fail`, `softfail`, `none`, `neutral`, `temperror`, `permerror`\n * — returns false (fail closed).\n *\n * Inputs may come from provider-specific fields (`dkim`, `spf`) and/or the\n * RFC 8601 `Authentication-Results` header, in any combination. We treat the\n * union: if ANY source shows an aligned pass, the sender is verified.\n */\nfunction computeSenderVerified(input: {\n fromEmail: string;\n authResults?: string;\n dkim?: string;\n spf?: string;\n}): boolean {\n const fromDomain = emailDomain(input.fromEmail);\n if (!fromDomain) return false;\n\n // 1. Provider DKIM field, e.g. SendGrid `{@example.com : pass}` or\n // `{@example.com : pass; @other.com : fail}`.\n if (input.dkim) {\n const dkimEntries = input.dkim.matchAll(\n /@([a-z0-9.-]+)\\s*:\\s*(pass|fail|none|neutral|softfail|temperror|permerror)/gi,\n );\n for (const m of dkimEntries) {\n const domain = m[1].toLowerCase();\n const verdict = m[2].toLowerCase();\n if (verdict === \"pass\" && domainsAlign(fromDomain, domain)) return true;\n }\n }\n\n // 2. Provider SPF field. SendGrid posts a bare verdict (e.g. `pass`); since\n // SPF authenticates the envelope/MailFrom rather than the header From,\n // a bare `pass` with no domain only counts when we can't tell it's\n // misaligned. We accept a bare `pass` as an aligned SPF pass — this is\n // the same trust level Gmail-style routing assigns to a plain SPF pass.\n if (input.spf) {\n const spfVerdict = input.spf.trim().toLowerCase();\n if (spfVerdict === \"pass\") return true;\n }\n\n // 3. RFC 8601 `Authentication-Results` header (may list multiple methods).\n if (input.authResults) {\n const ar = input.authResults.toLowerCase();\n // DKIM with an aligned domain.\n const dkimRe = /dkim=pass[^;]*?(?:header\\.(?:d|i)=|@)([a-z0-9.-]+)/g;\n for (const m of ar.matchAll(dkimRe)) {\n const domain = m[1].replace(/^@/, \"\");\n if (domainsAlign(fromDomain, domain)) return true;\n }\n // SPF pass (envelope auth) — accept as an aligned pass.\n if (/spf=pass\\b/.test(ar)) return true;\n }\n\n return false;\n}\n\n// ---------------------------------------------------------------------------\n// Rate limiting\n// ---------------------------------------------------------------------------\n\n/**\n * Rate-limit heuristic backed by the `integration_pending_tasks` queue.\n *\n * Counts how many tasks this sender has produced in the last hour. The count\n * INCLUDES tasks already processed (status = completed/failed) because the\n * rows aren't deleted on completion — that's enough signal to throttle a\n * single noisy/abusive sender without needing a dedicated counter table.\n *\n * Two trade-offs worth knowing:\n * - This is a coarse heuristic, not exact metering. Within one hour the\n * count is correct; rows produced more than an hour ago naturally drop\n * off. We don't try to be precise, only to raise the bar past the\n * \"send 10K emails through one Lambda burst\" failure mode.\n * - The query relies on the `idx_pending_tasks_status_created` index plus\n * a sender substring match. A targeted attacker could amortise the cost\n * by reusing one sender address — that's fine, the goal here is to bound\n * the attack within a single attacker identity, not to detect spoofing.\n *\n * If the table doesn't yet exist on this deployment (no inbound webhook has\n * been processed before), we silently allow the message — the schema is\n * provisioned on first task insert. See H4 in the webhook security audit.\n */\nasync function isRateLimited(senderEmail: string): Promise<boolean> {\n const cutoff = Date.now() - RATE_LIMIT_WINDOW_MS;\n try {\n const client = getDbExec();\n const { rows } = await client.execute({\n sql: `\n SELECT COUNT(*) AS c\n FROM integration_pending_tasks\n WHERE platform = ?\n AND created_at >= ?\n AND payload LIKE ? ESCAPE '!'\n `,\n args: [\"email\", cutoff, `%\"senderId\":\"${escapeLike(senderEmail)}\"%`],\n });\n const count = Number(\n (rows[0] as Record<string, unknown> | undefined)?.c ?? 0,\n );\n return count >= RATE_LIMIT_MAX;\n } catch {\n // Table doesn't exist yet (first webhook on a fresh deployment) — allow.\n return false;\n }\n}\n\n// ---------------------------------------------------------------------------\n// Helpers — email address parsing\n// ---------------------------------------------------------------------------\n\n/** Parse \"Name <addr@example.com>\" or plain \"addr@example.com\" */\nfunction parseEmailAddress(raw: string): { name?: string; email: string } {\n const match = raw.match(/^\\s*(.*?)\\s*<([^>]+)>\\s*$/);\n if (match && match[2]) {\n return {\n name: match[1].replace(/^[\"']|[\"']$/g, \"\").trim() || undefined,\n email: match[2].trim(),\n };\n }\n return { email: raw.trim() };\n}\n\n/** Normalize a to/cc field that may be a string, array, or undefined into a string[] of addresses */\nfunction normalizeAddressList(raw: string | string[] | undefined): string[] {\n if (!raw) return [];\n if (Array.isArray(raw)) return raw.map((a) => a.trim());\n return raw.split(\",\").map((a) => a.trim());\n}\n\n// ---------------------------------------------------------------------------\n// Helpers — header parsing\n// ---------------------------------------------------------------------------\n\n/** Parse a headers object (Resend format: array of {name, value} or Record) */\nfunction parseHeadersObject(headers: unknown): Record<string, string> {\n const result: Record<string, string> = {};\n if (!headers) return result;\n\n if (Array.isArray(headers)) {\n for (const h of headers) {\n if (h && typeof h === \"object\" && \"name\" in h && \"value\" in h) {\n result[(h.name as string).toLowerCase()] = h.value as string;\n }\n }\n } else if (typeof headers === \"object\") {\n for (const [key, value] of Object.entries(\n headers as Record<string, unknown>,\n )) {\n result[key.toLowerCase()] = String(value);\n }\n }\n return result;\n}\n\n/** Parse a raw headers string (SendGrid format: \"Key: Value\\nKey: Value\\n...\") */\nfunction parseHeadersString(raw: string | undefined): Record<string, string> {\n const result: Record<string, string> = {};\n if (!raw) return result;\n\n const lines = raw.split(/\\r?\\n/);\n let currentKey = \"\";\n let currentValue = \"\";\n\n for (const line of lines) {\n // Continuation line (starts with whitespace)\n if (/^\\s/.test(line) && currentKey) {\n currentValue += \" \" + line.trim();\n continue;\n }\n // Save previous header\n if (currentKey) {\n result[currentKey.toLowerCase()] = currentValue;\n }\n const colonIdx = line.indexOf(\":\");\n if (colonIdx > 0) {\n currentKey = line.slice(0, colonIdx).trim();\n currentValue = line.slice(colonIdx + 1).trim();\n } else {\n currentKey = \"\";\n currentValue = \"\";\n }\n }\n // Save last header\n if (currentKey) {\n result[currentKey.toLowerCase()] = currentValue;\n }\n return result;\n}\n\n/** Parse a References header value into an array of Message-IDs */\nfunction parseReferencesHeader(\n references: string | undefined,\n): string[] | undefined {\n if (!references) return undefined;\n const ids = references.match(/<[^>]+>/g);\n return ids && ids.length > 0 ? ids : undefined;\n}\n\n// ---------------------------------------------------------------------------\n// Helpers — threading\n// ---------------------------------------------------------------------------\n\n/**\n * Get the thread root ID using a Gmail-style approach:\n * the oldest Message-ID from the References chain is the thread root.\n * If no References, use the current Message-ID.\n */\nfunction getThreadRootId(messageId: string, references?: string[]): string {\n if (references && references.length > 0) {\n return references[0];\n }\n return messageId;\n}\n\n/**\n * Scope a raw thread root id by the sender's email address. Two different\n * senders crafting the same `References:` header value should NOT collide\n * onto the same internal thread mapping — that's the email-side fix for the\n * thread-injection finding (M1 in the webhook security audit).\n *\n * The returned id is opaque to callers and stays stable across messages\n * from the same sender on the same conversation thread, so reply behaviour\n * is unchanged.\n */\nfunction scopeThreadIdToSender(\n rawThreadId: string,\n senderEmail: string,\n): string {\n return `${senderEmail.toLowerCase()}::${rawThreadId}`;\n}\n\n// ---------------------------------------------------------------------------\n// Helpers — reply building\n// ---------------------------------------------------------------------------\n\n/** Build a References header from the platform context */\nfunction buildReferencesHeader(ctx: Record<string, unknown>): string {\n const parts: string[] = [];\n\n // Include existing references\n const refs = ctx.references as string[] | undefined;\n if (refs) {\n parts.push(...refs);\n }\n\n // Append the current message ID\n const messageId = ctx.messageId as string | undefined;\n if (messageId) {\n // Avoid duplicates\n if (!parts.includes(messageId)) {\n parts.push(messageId);\n }\n }\n\n return parts.join(\" \");\n}\n\n/**\n * Build CC list for reply-all when agent was CC'd.\n * Include original To addresses and other CC addresses, excluding the agent and the original sender.\n */\nfunction buildReplyAllCc(\n context: IncomingMessage,\n agentAddress: string,\n): string[] | undefined {\n const normalizedAgentAddress = agentAddress.toLowerCase();\n const senderEmail = context.senderId?.toLowerCase();\n const toAddresses = (context.platformContext.to as string[]) || [];\n const ccAddresses = (context.platformContext.cc as string[]) || [];\n\n const allRecipients = new Set<string>();\n for (const addr of [...toAddresses, ...ccAddresses]) {\n const normalized = addr.toLowerCase().trim();\n // Exclude agent address and original sender (sender goes in To)\n if (normalized !== normalizedAgentAddress && normalized !== senderEmail) {\n allRecipients.add(normalized);\n }\n }\n\n return allRecipients.size > 0 ? Array.from(allRecipients) : undefined;\n}\n\n// ---------------------------------------------------------------------------\n// Helpers — text conversion\n// ---------------------------------------------------------------------------\n\n/** Strip HTML tags for a plain-text version of the email */\nfunction stripHtmlForPlainText(html: string): string {\n return html\n .replace(/<br\\s*\\/?>/gi, \"\\n\")\n .replace(/<\\/p>/gi, \"\\n\\n\")\n .replace(/<\\/div>/gi, \"\\n\")\n .replace(/<\\/li>/gi, \"\\n\")\n .replace(/<li[^>]*>/gi, \"- \")\n .replace(/<\\/h[1-6]>/gi, \"\\n\\n\")\n .replace(/<[^>]+>/g, \"\")\n .replace(/&nbsp;/g, \" \")\n .replace(/&amp;/g, \"&\")\n .replace(/&lt;/g, \"<\")\n .replace(/&gt;/g, \">\")\n .replace(/&quot;/g, '\"')\n .replace(/&#39;/g, \"'\")\n .replace(/\\n{3,}/g, \"\\n\\n\")\n .trim();\n}\n\nfunction escapeHtml(s: string): string {\n return s\n .replace(/&/g, \"&amp;\")\n .replace(/</g, \"&lt;\")\n .replace(/>/g, \"&gt;\")\n .replace(/\"/g, \"&quot;\")\n .replace(/'/g, \"&#39;\");\n}\n\nfunction decodeBasicHtmlEntities(s: string): string {\n return s\n .replace(/&amp;/g, \"&\")\n .replace(/&lt;/g, \"<\")\n .replace(/&gt;/g, \">\")\n .replace(/&quot;/g, '\"')\n .replace(/&#39;/g, \"'\");\n}\n\nfunction splitTrailingUrlPunctuation(raw: string): {\n url: string;\n trailing: string;\n} {\n let url = raw;\n let trailing = \"\";\n const trailingEntities = [\"&quot;\", \"&#39;\"];\n\n for (;;) {\n const entity = trailingEntities.find((candidate) =>\n url.endsWith(candidate),\n );\n if (!entity) break;\n url = url.slice(0, -entity.length);\n trailing = entity + trailing;\n }\n\n while (/[.,!?;:]$/.test(url)) {\n trailing = url.slice(-1) + trailing;\n url = url.slice(0, -1);\n }\n\n while (url.endsWith(\")\") && !url.includes(\"(\")) {\n trailing = \")\" + trailing;\n url = url.slice(0, -1);\n }\n\n return { url, trailing };\n}\n\nfunction labelForUrl(rawUrl: string): string {\n try {\n const parsed = new URL(decodeBasicHtmlEntities(rawUrl));\n const host = parsed.hostname.replace(/^www\\./, \"\");\n return host ? `Open ${host}` : \"Open link\";\n } catch {\n return \"Open link\";\n }\n}\n\nfunction linkifyTextSegment(segment: string): string {\n return segment.replace(/\\bhttps?:\\/\\/[^\\s<>\"']+/gi, (raw) => {\n const { url, trailing } = splitTrailingUrlPunctuation(raw);\n const href = decodeBasicHtmlEntities(url);\n return `<a href=\"${escapeHtml(href)}\" style=\"color:#2563eb;text-decoration:underline;\">${escapeHtml(\n labelForUrl(url),\n )}</a>${trailing}`;\n });\n}\n\nfunction linkifyBareUrlsInHtml(html: string): string {\n const parts = html.split(/(<\\/?[^>]+>)/g);\n let skipDepth = 0;\n\n return parts\n .map((part) => {\n if (part.startsWith(\"<\") && part.endsWith(\">\")) {\n if (/^<\\/\\s*(a|code)\\b/i.test(part)) {\n skipDepth = Math.max(0, skipDepth - 1);\n } else if (/^<\\s*(a|code)\\b/i.test(part)) {\n skipDepth += 1;\n }\n return part;\n }\n return skipDepth > 0 ? part : linkifyTextSegment(part);\n })\n .join(\"\");\n}\n\n/** Convert basic markdown to HTML for email rendering */\nfunction markdownToHtml(md: string): string {\n let html = md;\n\n // Escape HTML entities in the source (but not our generated tags)\n html = escapeHtml(html);\n\n // Bold: **text** or __text__\n html = html.replace(/\\*\\*(.+?)\\*\\*/g, \"<strong>$1</strong>\");\n html = html.replace(/__(.+?)__/g, \"<strong>$1</strong>\");\n\n // Italic: *text* or _text_ (but not inside words with underscores)\n html = html.replace(/(?<!\\w)\\*([^*]+?)\\*(?!\\w)/g, \"<em>$1</em>\");\n html = html.replace(/(?<!\\w)_([^_]+?)_(?!\\w)/g, \"<em>$1</em>\");\n\n // Links: [text](url)\n html = html.replace(/\\[([^\\]]+)\\]\\(([^)]+)\\)/g, (_match, label, url) => {\n const visibleLabel = /^https?:\\/\\//i.test(decodeBasicHtmlEntities(label))\n ? escapeHtml(labelForUrl(label))\n : label;\n return `<a href=\"${escapeHtml(\n decodeBasicHtmlEntities(url),\n )}\" style=\"color:#2563eb;text-decoration:underline;\">${visibleLabel}</a>`;\n });\n\n // Inline code: `code`\n html = html.replace(\n /`([^`]+)`/g,\n '<code style=\"background:#f1f5f9;padding:1px 4px;border-radius:3px;font-size:0.9em;\">$1</code>',\n );\n\n // Bare URLs: keep the destination in href but avoid spelling long URLs out.\n html = linkifyBareUrlsInHtml(html);\n\n // Unordered lists: lines starting with \"- \" or \"* \"\n html = html.replace(/^([*-]) (.+)$/gm, \"<li>$2</li>\");\n // Wrap consecutive <li> in <ul>\n html = html.replace(\n /(<li>.*?<\\/li>\\n?)+/g,\n '<ul style=\"margin:8px 0;padding-left:20px;\">$&</ul>',\n );\n\n // Ordered lists: lines starting with \"1. \", \"2. \" etc.\n html = html.replace(/^\\d+\\. (.+)$/gm, \"<li>$1</li>\");\n // Wrap consecutive <li> that aren't in <ul> in <ol>\n html = html.replace(/(?<!<\\/ul>)(<li>.*?<\\/li>\\n?)+/g, (match) => {\n if (match.includes(\"<ul\")) return match;\n return `<ol style=\"margin:8px 0;padding-left:20px;\">${match}</ol>`;\n });\n\n // Headings: # through ###\n html = html.replace(\n /^### (.+)$/gm,\n '<h3 style=\"margin:16px 0 8px;font-size:1.1em;\">$1</h3>',\n );\n html = html.replace(\n /^## (.+)$/gm,\n '<h2 style=\"margin:16px 0 8px;font-size:1.25em;\">$1</h2>',\n );\n html = html.replace(\n /^# (.+)$/gm,\n '<h1 style=\"margin:16px 0 8px;font-size:1.4em;\">$1</h1>',\n );\n\n // Horizontal rules: --- or ***\n html = html.replace(\n /^(-{3,}|\\*{3,})$/gm,\n '<hr style=\"border:none;border-top:1px solid #e2e8f0;margin:16px 0;\">',\n );\n\n // Paragraphs: double newlines\n html = html.replace(/\\n\\n/g, \"</p><p>\");\n // Single newlines → <br>\n html = html.replace(/\\n/g, \"<br>\");\n\n // Wrap in paragraph tags\n html = `<p>${html}</p>`;\n // Clean up empty paragraphs\n html = html.replace(/<p>\\s*<\\/p>/g, \"\");\n\n return html;\n}\n\n/** Wrap body HTML in a minimal email template with inline styles */\nfunction wrapInEmailTemplate(bodyHtml: string): string {\n return `<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n</head>\n<body style=\"margin:0;padding:0;background-color:#ffffff;\">\n<div style=\"max-width:600px;margin:0 auto;padding:20px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:14px;line-height:1.6;color:#1a1a1a;\">\n${bodyHtml}\n</div>\n</body>\n</html>`;\n}\n\n// ---------------------------------------------------------------------------\n// Raw body reader (matches Slack adapter pattern)\n// ---------------------------------------------------------------------------\n\n/**\n * Read the raw request body as a string and cache on the event context.\n * Reads raw bytes from the request stream — never re-stringifies a parsed\n * body, since the Resend / Svix HMAC is computed over the exact bytes sent\n * (M2 in the webhook security audit).\n */\nasync function readRawBody(event: H3Event): Promise<string> {\n const cached = event.context.__rawBody;\n if (typeof cached === \"string\") return cached;\n const raw = (await h3ReadRawBody(event)) ?? \"\";\n event.context.__rawBody = raw;\n return raw;\n}\n"]}
@@ -3,12 +3,14 @@ export interface AgentNativeManifestRoot {
3
3
  name?: string;
4
4
  path: string;
5
5
  kind?: string;
6
+ profile?: string;
6
7
  extensions?: string[];
7
8
  include?: string[];
8
9
  hide?: string[];
9
10
  }
10
11
  export interface AgentNativeManifestApp {
11
12
  mode?: AgentNativeDataMode;
13
+ profile?: string;
12
14
  roots?: AgentNativeManifestRoot[];
13
15
  components?: string | string[];
14
16
  extensions?: string | string[];
@@ -26,6 +28,7 @@ export interface LoadedAgentNativeManifest {
26
28
  }
27
29
  export interface LocalArtifactAppDefaults {
28
30
  mode?: AgentNativeDataMode;
31
+ profile?: string;
29
32
  roots: AgentNativeManifestRoot[];
30
33
  hide?: string[];
31
34
  components?: string | string[];
@@ -49,6 +52,7 @@ export interface LoadedLocalArtifactRoot {
49
52
  path: string;
50
53
  absolutePath: string;
51
54
  kind?: string;
55
+ profile?: string;
52
56
  extensions: string[];
53
57
  hide: string[];
54
58
  include: string[];
@@ -56,6 +60,7 @@ export interface LoadedLocalArtifactRoot {
56
60
  export interface LoadedLocalArtifactApp {
57
61
  appId: string;
58
62
  mode: AgentNativeDataMode;
63
+ profile?: string;
59
64
  manifestPath: string | null;
60
65
  workspaceRoot: string;
61
66
  roots: LoadedLocalArtifactRoot[];
@@ -69,6 +74,7 @@ export interface LocalArtifactFileMeta {
69
74
  rootName: string;
70
75
  rootPath: string;
71
76
  kind?: string;
77
+ profile?: string;
72
78
  extension: string;
73
79
  contentType: string;
74
80
  sizeBytes: number;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/local-artifacts/index.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,aAAa,CAAC;AAE7D,MAAM,WAAW,uBAAuB;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,KAAK,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC/B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;CAC/C;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,mBAAmB,CAAC;CAC/B;AAED,MAAM,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AAED,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,6BAA6B,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GACxD,OAAO,CAAC,0BAA0B,GAAG,IAAI,CAAC,CAsB5C;AAED,wBAAsB,2BAA2B,CAC/C,OAAO,EAAE,kCAAkC,GAC1C,OAAO,CAAC,0BAA0B,CAAC,CAgDrC;AAED,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,6BAA6B,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GACxD,OAAO,CAAC,OAAO,CAAC,CAqBlB"}
@@ -69,6 +69,12 @@ function normalizeMode(value) {
69
69
  return value;
70
70
  return undefined;
71
71
  }
72
+ function normalizeProfile(value) {
73
+ if (typeof value !== "string")
74
+ return undefined;
75
+ const trimmed = value.trim();
76
+ return trimmed || undefined;
77
+ }
72
78
  function normalizeSlash(filePath) {
73
79
  return filePath.replace(/\\/g, "/");
74
80
  }
@@ -119,6 +125,7 @@ function normalizeManifestRoot(value) {
119
125
  name: typeof value.name === "string" ? value.name : undefined,
120
126
  path: value.path,
121
127
  kind: typeof value.kind === "string" ? value.kind : undefined,
128
+ profile: normalizeProfile(value.profile),
122
129
  extensions: normalizeExtensions(value.extensions),
123
130
  include: asStringArray(value.include),
124
131
  hide: asStringArray(value.hide),
@@ -141,6 +148,7 @@ function normalizeManifestApp(value) {
141
148
  : [];
142
149
  return {
143
150
  mode: normalizeMode(value.mode),
151
+ profile: normalizeProfile(value.profile),
144
152
  roots,
145
153
  components: typeof value.components === "string" || Array.isArray(value.components)
146
154
  ? asStringArray(value.components)
@@ -251,6 +259,7 @@ export async function isAgentNativeLocalFileMode(options = {}) {
251
259
  function mergeAppConfig(manifestApp, defaults) {
252
260
  return {
253
261
  mode: manifestApp?.mode ?? defaults?.mode,
262
+ profile: manifestApp?.profile ?? defaults?.profile,
254
263
  roots: manifestApp?.roots && manifestApp.roots.length > 0
255
264
  ? manifestApp.roots
256
265
  : (defaults?.roots ?? []),
@@ -288,6 +297,7 @@ export async function getLocalArtifactApp(options) {
288
297
  path: safePath,
289
298
  absolutePath,
290
299
  kind: root.kind,
300
+ profile: root.profile ?? app.profile,
291
301
  extensions,
292
302
  hide: [...DEFAULT_HIDE_PATTERNS, ...asStringArray(root.hide)],
293
303
  include: asStringArray(root.include),
@@ -296,6 +306,7 @@ export async function getLocalArtifactApp(options) {
296
306
  return {
297
307
  appId: options.appId,
298
308
  mode,
309
+ profile: app.profile,
299
310
  manifestPath: loaded?.path ?? null,
300
311
  workspaceRoot,
301
312
  roots,
@@ -399,6 +410,7 @@ async function fileMetaForPath(root, artifactPath, absolutePath, contentOverride
399
410
  rootName: root.name,
400
411
  rootPath: root.path,
401
412
  kind: root.kind,
413
+ profile: root.profile,
402
414
  extension,
403
415
  contentType: contentTypeForExtension(extension),
404
416
  sizeBytes: Buffer.byteLength(content, "utf8"),