@agent-native/core 0.93.0 → 0.94.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1197) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +31 -0
  3. package/corpus/core/docs/content/a2a-protocol.mdx +21 -5
  4. package/corpus/core/docs/content/actions.mdx +9 -23
  5. package/corpus/core/docs/content/agent-mentions.mdx +31 -29
  6. package/corpus/core/docs/content/agent-native-toolkit.mdx +15 -6
  7. package/corpus/core/docs/content/agent-surfaces.mdx +9 -13
  8. package/corpus/core/docs/content/agent-teams.mdx +1 -0
  9. package/corpus/core/docs/content/authentication.mdx +10 -3
  10. package/corpus/core/docs/content/automation-connectors.mdx +82 -39
  11. package/corpus/core/docs/content/automations.mdx +17 -3
  12. package/corpus/core/docs/content/blueprint-installer.mdx +11 -4
  13. package/corpus/core/docs/content/cli-adapters.mdx +9 -6
  14. package/corpus/core/docs/content/client.mdx +16 -0
  15. package/corpus/core/docs/content/cloneable-saas.mdx +14 -11
  16. package/corpus/core/docs/content/code-agents-ui.mdx +65 -0
  17. package/corpus/core/docs/content/components.mdx +30 -14
  18. package/corpus/core/docs/content/context-awareness.mdx +27 -15
  19. package/corpus/core/docs/content/creating-templates.mdx +15 -9
  20. package/corpus/core/docs/content/cross-app-sso.mdx +16 -6
  21. package/corpus/core/docs/content/data-programs.mdx +1 -1
  22. package/corpus/core/docs/content/database.mdx +17 -5
  23. package/corpus/core/docs/content/deployment.mdx +19 -18
  24. package/corpus/core/docs/content/dispatch.mdx +6 -2
  25. package/corpus/core/docs/content/drop-in-agent.mdx +10 -4
  26. package/corpus/core/docs/content/durable-background-runs.mdx +9 -5
  27. package/corpus/core/docs/content/durable-resume.mdx +9 -4
  28. package/corpus/core/docs/content/embedding-sdk.mdx +26 -8
  29. package/corpus/core/docs/content/evals.mdx +3 -5
  30. package/corpus/core/docs/content/extensions.mdx +22 -9
  31. package/corpus/core/docs/content/external-agents.mdx +25 -34
  32. package/corpus/core/docs/content/faq.mdx +8 -0
  33. package/corpus/core/docs/content/file-uploads.mdx +12 -3
  34. package/corpus/core/docs/content/frames.mdx +16 -0
  35. package/corpus/core/docs/content/generative-ui.mdx +1 -1
  36. package/corpus/core/docs/content/getting-started.mdx +34 -21
  37. package/corpus/core/docs/content/harness-agents.mdx +8 -4
  38. package/corpus/core/docs/content/human-approval.mdx +8 -3
  39. package/corpus/core/docs/content/internationalization.mdx +9 -4
  40. package/corpus/core/docs/content/key-concepts.mdx +13 -20
  41. package/corpus/core/docs/content/local-file-mode.mdx +14 -8
  42. package/corpus/core/docs/content/locales/ar-SA/actions.mdx +2 -2
  43. package/corpus/core/docs/content/locales/ar-SA/agent-native-toolkit.mdx +2 -2
  44. package/corpus/core/docs/content/locales/ar-SA/agent-surfaces.mdx +8 -10
  45. package/corpus/core/docs/content/locales/ar-SA/agent-teams.mdx +1 -0
  46. package/corpus/core/docs/content/locales/ar-SA/authentication.mdx +1 -1
  47. package/corpus/core/docs/content/locales/ar-SA/components.mdx +11 -1
  48. package/corpus/core/docs/content/locales/ar-SA/creating-templates.mdx +3 -7
  49. package/corpus/core/docs/content/locales/ar-SA/cross-app-sso.mdx +16 -6
  50. package/corpus/core/docs/content/locales/ar-SA/deployment.mdx +8 -0
  51. package/corpus/core/docs/content/locales/ar-SA/external-agents.mdx +2 -7
  52. package/corpus/core/docs/content/locales/ar-SA/key-concepts.mdx +13 -20
  53. package/corpus/core/docs/content/locales/ar-SA/multi-tenancy.mdx +5 -5
  54. package/corpus/core/docs/content/locales/ar-SA/notifications.mdx +18 -10
  55. package/corpus/core/docs/content/locales/ar-SA/processors.mdx +11 -5
  56. package/corpus/core/docs/content/locales/ar-SA/server.mdx +17 -10
  57. package/corpus/core/docs/content/locales/ar-SA/sharing.mdx +10 -10
  58. package/corpus/core/docs/content/locales/ar-SA/skills-guide.mdx +34 -17
  59. package/corpus/core/docs/content/locales/ar-SA/template-assets.mdx +16 -13
  60. package/corpus/core/docs/content/locales/ar-SA/template-brain.mdx +3 -1
  61. package/corpus/core/docs/content/locales/ar-SA/template-clips.mdx +3 -3
  62. package/corpus/core/docs/content/locales/ar-SA/template-design.mdx +3 -1
  63. package/corpus/core/docs/content/locales/ar-SA/template-dispatch.mdx +5 -1
  64. package/corpus/core/docs/content/locales/ar-SA/template-mail.mdx +8 -0
  65. package/corpus/core/docs/content/locales/ar-SA/tracking.mdx +9 -6
  66. package/corpus/core/docs/content/locales/ar-SA/using-your-agent.mdx +0 -7
  67. package/corpus/core/docs/content/locales/ar-SA/voice-input.mdx +6 -0
  68. package/corpus/core/docs/content/locales/ar-SA/workspace-connections.mdx +9 -2
  69. package/corpus/core/docs/content/locales/ar-SA/workspace.mdx +19 -18
  70. package/corpus/core/docs/content/locales/de-DE/actions.mdx +2 -2
  71. package/corpus/core/docs/content/locales/de-DE/agent-native-toolkit.mdx +2 -2
  72. package/corpus/core/docs/content/locales/de-DE/agent-surfaces.mdx +8 -10
  73. package/corpus/core/docs/content/locales/de-DE/agent-teams.mdx +1 -0
  74. package/corpus/core/docs/content/locales/de-DE/authentication.mdx +1 -1
  75. package/corpus/core/docs/content/locales/de-DE/components.mdx +11 -1
  76. package/corpus/core/docs/content/locales/de-DE/creating-templates.mdx +3 -7
  77. package/corpus/core/docs/content/locales/de-DE/cross-app-sso.mdx +16 -6
  78. package/corpus/core/docs/content/locales/de-DE/deployment.mdx +8 -0
  79. package/corpus/core/docs/content/locales/de-DE/external-agents.mdx +3 -7
  80. package/corpus/core/docs/content/locales/de-DE/key-concepts.mdx +13 -20
  81. package/corpus/core/docs/content/locales/de-DE/multi-tenancy.mdx +5 -5
  82. package/corpus/core/docs/content/locales/de-DE/notifications.mdx +18 -10
  83. package/corpus/core/docs/content/locales/de-DE/processors.mdx +11 -5
  84. package/corpus/core/docs/content/locales/de-DE/server.mdx +18 -10
  85. package/corpus/core/docs/content/locales/de-DE/sharing.mdx +10 -10
  86. package/corpus/core/docs/content/locales/de-DE/skills-guide.mdx +34 -17
  87. package/corpus/core/docs/content/locales/de-DE/template-assets.mdx +16 -13
  88. package/corpus/core/docs/content/locales/de-DE/template-brain.mdx +3 -1
  89. package/corpus/core/docs/content/locales/de-DE/template-clips.mdx +3 -3
  90. package/corpus/core/docs/content/locales/de-DE/template-design.mdx +3 -1
  91. package/corpus/core/docs/content/locales/de-DE/template-dispatch.mdx +5 -1
  92. package/corpus/core/docs/content/locales/de-DE/template-mail.mdx +8 -0
  93. package/corpus/core/docs/content/locales/de-DE/tracking.mdx +9 -6
  94. package/corpus/core/docs/content/locales/de-DE/using-your-agent.mdx +0 -7
  95. package/corpus/core/docs/content/locales/de-DE/voice-input.mdx +6 -0
  96. package/corpus/core/docs/content/locales/de-DE/workspace-connections.mdx +9 -2
  97. package/corpus/core/docs/content/locales/de-DE/workspace.mdx +19 -18
  98. package/corpus/core/docs/content/locales/es-ES/actions.mdx +2 -2
  99. package/corpus/core/docs/content/locales/es-ES/agent-native-toolkit.mdx +2 -2
  100. package/corpus/core/docs/content/locales/es-ES/agent-surfaces.mdx +8 -10
  101. package/corpus/core/docs/content/locales/es-ES/agent-teams.mdx +1 -0
  102. package/corpus/core/docs/content/locales/es-ES/authentication.mdx +1 -1
  103. package/corpus/core/docs/content/locales/es-ES/components.mdx +11 -1
  104. package/corpus/core/docs/content/locales/es-ES/creating-templates.mdx +3 -7
  105. package/corpus/core/docs/content/locales/es-ES/cross-app-sso.mdx +16 -6
  106. package/corpus/core/docs/content/locales/es-ES/deployment.mdx +8 -0
  107. package/corpus/core/docs/content/locales/es-ES/external-agents.mdx +3 -7
  108. package/corpus/core/docs/content/locales/es-ES/key-concepts.mdx +13 -20
  109. package/corpus/core/docs/content/locales/es-ES/multi-tenancy.mdx +5 -5
  110. package/corpus/core/docs/content/locales/es-ES/notifications.mdx +18 -10
  111. package/corpus/core/docs/content/locales/es-ES/processors.mdx +11 -5
  112. package/corpus/core/docs/content/locales/es-ES/server.mdx +17 -10
  113. package/corpus/core/docs/content/locales/es-ES/sharing.mdx +10 -10
  114. package/corpus/core/docs/content/locales/es-ES/skills-guide.mdx +34 -17
  115. package/corpus/core/docs/content/locales/es-ES/template-assets.mdx +16 -13
  116. package/corpus/core/docs/content/locales/es-ES/template-brain.mdx +3 -1
  117. package/corpus/core/docs/content/locales/es-ES/template-clips.mdx +3 -3
  118. package/corpus/core/docs/content/locales/es-ES/template-design.mdx +3 -1
  119. package/corpus/core/docs/content/locales/es-ES/template-dispatch.mdx +5 -1
  120. package/corpus/core/docs/content/locales/es-ES/template-mail.mdx +8 -0
  121. package/corpus/core/docs/content/locales/es-ES/tracking.mdx +9 -6
  122. package/corpus/core/docs/content/locales/es-ES/using-your-agent.mdx +0 -7
  123. package/corpus/core/docs/content/locales/es-ES/voice-input.mdx +6 -0
  124. package/corpus/core/docs/content/locales/es-ES/workspace-connections.mdx +9 -2
  125. package/corpus/core/docs/content/locales/es-ES/workspace.mdx +19 -18
  126. package/corpus/core/docs/content/locales/fr-FR/actions.mdx +2 -2
  127. package/corpus/core/docs/content/locales/fr-FR/agent-native-toolkit.mdx +2 -2
  128. package/corpus/core/docs/content/locales/fr-FR/agent-surfaces.mdx +8 -10
  129. package/corpus/core/docs/content/locales/fr-FR/agent-teams.mdx +1 -0
  130. package/corpus/core/docs/content/locales/fr-FR/authentication.mdx +1 -1
  131. package/corpus/core/docs/content/locales/fr-FR/components.mdx +11 -1
  132. package/corpus/core/docs/content/locales/fr-FR/creating-templates.mdx +3 -7
  133. package/corpus/core/docs/content/locales/fr-FR/cross-app-sso.mdx +16 -6
  134. package/corpus/core/docs/content/locales/fr-FR/deployment.mdx +8 -0
  135. package/corpus/core/docs/content/locales/fr-FR/external-agents.mdx +3 -7
  136. package/corpus/core/docs/content/locales/fr-FR/key-concepts.mdx +13 -20
  137. package/corpus/core/docs/content/locales/fr-FR/multi-tenancy.mdx +5 -5
  138. package/corpus/core/docs/content/locales/fr-FR/notifications.mdx +18 -10
  139. package/corpus/core/docs/content/locales/fr-FR/processors.mdx +11 -5
  140. package/corpus/core/docs/content/locales/fr-FR/server.mdx +17 -10
  141. package/corpus/core/docs/content/locales/fr-FR/sharing.mdx +10 -10
  142. package/corpus/core/docs/content/locales/fr-FR/skills-guide.mdx +34 -17
  143. package/corpus/core/docs/content/locales/fr-FR/template-assets.mdx +16 -13
  144. package/corpus/core/docs/content/locales/fr-FR/template-brain.mdx +3 -1
  145. package/corpus/core/docs/content/locales/fr-FR/template-clips.mdx +3 -3
  146. package/corpus/core/docs/content/locales/fr-FR/template-design.mdx +3 -1
  147. package/corpus/core/docs/content/locales/fr-FR/template-dispatch.mdx +5 -1
  148. package/corpus/core/docs/content/locales/fr-FR/template-mail.mdx +8 -0
  149. package/corpus/core/docs/content/locales/fr-FR/tracking.mdx +9 -6
  150. package/corpus/core/docs/content/locales/fr-FR/using-your-agent.mdx +0 -7
  151. package/corpus/core/docs/content/locales/fr-FR/voice-input.mdx +6 -0
  152. package/corpus/core/docs/content/locales/fr-FR/workspace-connections.mdx +9 -2
  153. package/corpus/core/docs/content/locales/fr-FR/workspace.mdx +19 -18
  154. package/corpus/core/docs/content/locales/hi-IN/actions.mdx +2 -2
  155. package/corpus/core/docs/content/locales/hi-IN/agent-native-toolkit.mdx +2 -2
  156. package/corpus/core/docs/content/locales/hi-IN/agent-surfaces.mdx +8 -10
  157. package/corpus/core/docs/content/locales/hi-IN/agent-teams.mdx +1 -0
  158. package/corpus/core/docs/content/locales/hi-IN/authentication.mdx +1 -1
  159. package/corpus/core/docs/content/locales/hi-IN/components.mdx +11 -1
  160. package/corpus/core/docs/content/locales/hi-IN/creating-templates.mdx +3 -7
  161. package/corpus/core/docs/content/locales/hi-IN/cross-app-sso.mdx +16 -6
  162. package/corpus/core/docs/content/locales/hi-IN/deployment.mdx +8 -0
  163. package/corpus/core/docs/content/locales/hi-IN/external-agents.mdx +2 -7
  164. package/corpus/core/docs/content/locales/hi-IN/key-concepts.mdx +13 -20
  165. package/corpus/core/docs/content/locales/hi-IN/multi-tenancy.mdx +5 -5
  166. package/corpus/core/docs/content/locales/hi-IN/notifications.mdx +18 -10
  167. package/corpus/core/docs/content/locales/hi-IN/processors.mdx +11 -5
  168. package/corpus/core/docs/content/locales/hi-IN/server.mdx +17 -10
  169. package/corpus/core/docs/content/locales/hi-IN/sharing.mdx +10 -10
  170. package/corpus/core/docs/content/locales/hi-IN/skills-guide.mdx +34 -17
  171. package/corpus/core/docs/content/locales/hi-IN/template-assets.mdx +16 -13
  172. package/corpus/core/docs/content/locales/hi-IN/template-brain.mdx +3 -1
  173. package/corpus/core/docs/content/locales/hi-IN/template-clips.mdx +3 -3
  174. package/corpus/core/docs/content/locales/hi-IN/template-design.mdx +3 -1
  175. package/corpus/core/docs/content/locales/hi-IN/template-dispatch.mdx +5 -1
  176. package/corpus/core/docs/content/locales/hi-IN/template-mail.mdx +8 -0
  177. package/corpus/core/docs/content/locales/hi-IN/tracking.mdx +9 -6
  178. package/corpus/core/docs/content/locales/hi-IN/using-your-agent.mdx +0 -7
  179. package/corpus/core/docs/content/locales/hi-IN/voice-input.mdx +6 -0
  180. package/corpus/core/docs/content/locales/hi-IN/workspace-connections.mdx +9 -2
  181. package/corpus/core/docs/content/locales/hi-IN/workspace.mdx +19 -18
  182. package/corpus/core/docs/content/locales/ja-JP/actions.mdx +2 -2
  183. package/corpus/core/docs/content/locales/ja-JP/agent-native-toolkit.mdx +2 -2
  184. package/corpus/core/docs/content/locales/ja-JP/agent-surfaces.mdx +8 -10
  185. package/corpus/core/docs/content/locales/ja-JP/agent-teams.mdx +1 -0
  186. package/corpus/core/docs/content/locales/ja-JP/authentication.mdx +1 -1
  187. package/corpus/core/docs/content/locales/ja-JP/components.mdx +11 -1
  188. package/corpus/core/docs/content/locales/ja-JP/creating-templates.mdx +3 -7
  189. package/corpus/core/docs/content/locales/ja-JP/cross-app-sso.mdx +16 -6
  190. package/corpus/core/docs/content/locales/ja-JP/deployment.mdx +8 -0
  191. package/corpus/core/docs/content/locales/ja-JP/external-agents.mdx +2 -7
  192. package/corpus/core/docs/content/locales/ja-JP/key-concepts.mdx +13 -20
  193. package/corpus/core/docs/content/locales/ja-JP/multi-tenancy.mdx +5 -5
  194. package/corpus/core/docs/content/locales/ja-JP/notifications.mdx +18 -10
  195. package/corpus/core/docs/content/locales/ja-JP/processors.mdx +11 -5
  196. package/corpus/core/docs/content/locales/ja-JP/server.mdx +17 -10
  197. package/corpus/core/docs/content/locales/ja-JP/sharing.mdx +10 -10
  198. package/corpus/core/docs/content/locales/ja-JP/skills-guide.mdx +34 -17
  199. package/corpus/core/docs/content/locales/ja-JP/template-assets.mdx +16 -13
  200. package/corpus/core/docs/content/locales/ja-JP/template-brain.mdx +3 -1
  201. package/corpus/core/docs/content/locales/ja-JP/template-clips.mdx +3 -4
  202. package/corpus/core/docs/content/locales/ja-JP/template-design.mdx +3 -1
  203. package/corpus/core/docs/content/locales/ja-JP/template-dispatch.mdx +5 -1
  204. package/corpus/core/docs/content/locales/ja-JP/template-mail.mdx +8 -0
  205. package/corpus/core/docs/content/locales/ja-JP/tracking.mdx +9 -6
  206. package/corpus/core/docs/content/locales/ja-JP/using-your-agent.mdx +0 -7
  207. package/corpus/core/docs/content/locales/ja-JP/voice-input.mdx +6 -0
  208. package/corpus/core/docs/content/locales/ja-JP/workspace-connections.mdx +9 -2
  209. package/corpus/core/docs/content/locales/ja-JP/workspace.mdx +19 -18
  210. package/corpus/core/docs/content/locales/ko-KR/actions.mdx +2 -2
  211. package/corpus/core/docs/content/locales/ko-KR/agent-native-toolkit.mdx +2 -2
  212. package/corpus/core/docs/content/locales/ko-KR/agent-surfaces.mdx +8 -10
  213. package/corpus/core/docs/content/locales/ko-KR/agent-teams.mdx +1 -0
  214. package/corpus/core/docs/content/locales/ko-KR/authentication.mdx +1 -1
  215. package/corpus/core/docs/content/locales/ko-KR/components.mdx +11 -1
  216. package/corpus/core/docs/content/locales/ko-KR/creating-templates.mdx +3 -7
  217. package/corpus/core/docs/content/locales/ko-KR/cross-app-sso.mdx +16 -6
  218. package/corpus/core/docs/content/locales/ko-KR/deployment.mdx +8 -0
  219. package/corpus/core/docs/content/locales/ko-KR/external-agents.mdx +2 -7
  220. package/corpus/core/docs/content/locales/ko-KR/key-concepts.mdx +13 -20
  221. package/corpus/core/docs/content/locales/ko-KR/multi-tenancy.mdx +5 -5
  222. package/corpus/core/docs/content/locales/ko-KR/notifications.mdx +18 -10
  223. package/corpus/core/docs/content/locales/ko-KR/processors.mdx +11 -5
  224. package/corpus/core/docs/content/locales/ko-KR/server.mdx +17 -10
  225. package/corpus/core/docs/content/locales/ko-KR/sharing.mdx +10 -10
  226. package/corpus/core/docs/content/locales/ko-KR/skills-guide.mdx +34 -17
  227. package/corpus/core/docs/content/locales/ko-KR/template-assets.mdx +16 -13
  228. package/corpus/core/docs/content/locales/ko-KR/template-brain.mdx +3 -1
  229. package/corpus/core/docs/content/locales/ko-KR/template-clips.mdx +3 -4
  230. package/corpus/core/docs/content/locales/ko-KR/template-design.mdx +3 -1
  231. package/corpus/core/docs/content/locales/ko-KR/template-dispatch.mdx +5 -1
  232. package/corpus/core/docs/content/locales/ko-KR/template-mail.mdx +8 -0
  233. package/corpus/core/docs/content/locales/ko-KR/tracking.mdx +9 -6
  234. package/corpus/core/docs/content/locales/ko-KR/using-your-agent.mdx +0 -7
  235. package/corpus/core/docs/content/locales/ko-KR/voice-input.mdx +6 -0
  236. package/corpus/core/docs/content/locales/ko-KR/workspace-connections.mdx +9 -2
  237. package/corpus/core/docs/content/locales/ko-KR/workspace.mdx +19 -18
  238. package/corpus/core/docs/content/locales/pt-BR/actions.mdx +2 -2
  239. package/corpus/core/docs/content/locales/pt-BR/agent-native-toolkit.mdx +2 -2
  240. package/corpus/core/docs/content/locales/pt-BR/agent-surfaces.mdx +8 -10
  241. package/corpus/core/docs/content/locales/pt-BR/agent-teams.mdx +1 -0
  242. package/corpus/core/docs/content/locales/pt-BR/authentication.mdx +1 -1
  243. package/corpus/core/docs/content/locales/pt-BR/components.mdx +11 -1
  244. package/corpus/core/docs/content/locales/pt-BR/creating-templates.mdx +3 -7
  245. package/corpus/core/docs/content/locales/pt-BR/cross-app-sso.mdx +16 -6
  246. package/corpus/core/docs/content/locales/pt-BR/deployment.mdx +8 -0
  247. package/corpus/core/docs/content/locales/pt-BR/external-agents.mdx +3 -7
  248. package/corpus/core/docs/content/locales/pt-BR/key-concepts.mdx +13 -20
  249. package/corpus/core/docs/content/locales/pt-BR/multi-tenancy.mdx +5 -5
  250. package/corpus/core/docs/content/locales/pt-BR/notifications.mdx +18 -10
  251. package/corpus/core/docs/content/locales/pt-BR/processors.mdx +11 -5
  252. package/corpus/core/docs/content/locales/pt-BR/server.mdx +17 -10
  253. package/corpus/core/docs/content/locales/pt-BR/sharing.mdx +10 -10
  254. package/corpus/core/docs/content/locales/pt-BR/skills-guide.mdx +34 -17
  255. package/corpus/core/docs/content/locales/pt-BR/template-assets.mdx +16 -13
  256. package/corpus/core/docs/content/locales/pt-BR/template-brain.mdx +3 -1
  257. package/corpus/core/docs/content/locales/pt-BR/template-clips.mdx +3 -3
  258. package/corpus/core/docs/content/locales/pt-BR/template-design.mdx +3 -1
  259. package/corpus/core/docs/content/locales/pt-BR/template-dispatch.mdx +5 -1
  260. package/corpus/core/docs/content/locales/pt-BR/template-mail.mdx +8 -0
  261. package/corpus/core/docs/content/locales/pt-BR/tracking.mdx +9 -6
  262. package/corpus/core/docs/content/locales/pt-BR/using-your-agent.mdx +0 -7
  263. package/corpus/core/docs/content/locales/pt-BR/voice-input.mdx +6 -0
  264. package/corpus/core/docs/content/locales/pt-BR/workspace-connections.mdx +9 -2
  265. package/corpus/core/docs/content/locales/pt-BR/workspace.mdx +19 -18
  266. package/corpus/core/docs/content/locales/zh-CN/actions.mdx +2 -2
  267. package/corpus/core/docs/content/locales/zh-CN/agent-native-toolkit.mdx +2 -2
  268. package/corpus/core/docs/content/locales/zh-CN/agent-surfaces.mdx +8 -10
  269. package/corpus/core/docs/content/locales/zh-CN/agent-teams.mdx +1 -0
  270. package/corpus/core/docs/content/locales/zh-CN/authentication.mdx +1 -1
  271. package/corpus/core/docs/content/locales/zh-CN/components.mdx +11 -1
  272. package/corpus/core/docs/content/locales/zh-CN/creating-templates.mdx +3 -7
  273. package/corpus/core/docs/content/locales/zh-CN/cross-app-sso.mdx +16 -6
  274. package/corpus/core/docs/content/locales/zh-CN/deployment.mdx +8 -0
  275. package/corpus/core/docs/content/locales/zh-CN/external-agents.mdx +2 -7
  276. package/corpus/core/docs/content/locales/zh-CN/key-concepts.mdx +13 -20
  277. package/corpus/core/docs/content/locales/zh-CN/multi-tenancy.mdx +5 -5
  278. package/corpus/core/docs/content/locales/zh-CN/notifications.mdx +18 -10
  279. package/corpus/core/docs/content/locales/zh-CN/processors.mdx +11 -5
  280. package/corpus/core/docs/content/locales/zh-CN/server.mdx +16 -10
  281. package/corpus/core/docs/content/locales/zh-CN/sharing.mdx +10 -10
  282. package/corpus/core/docs/content/locales/zh-CN/skills-guide.mdx +34 -17
  283. package/corpus/core/docs/content/locales/zh-CN/template-assets.mdx +16 -13
  284. package/corpus/core/docs/content/locales/zh-CN/template-brain.mdx +3 -1
  285. package/corpus/core/docs/content/locales/zh-CN/template-clips.mdx +3 -4
  286. package/corpus/core/docs/content/locales/zh-CN/template-design.mdx +3 -1
  287. package/corpus/core/docs/content/locales/zh-CN/template-dispatch.mdx +5 -1
  288. package/corpus/core/docs/content/locales/zh-CN/template-mail.mdx +8 -0
  289. package/corpus/core/docs/content/locales/zh-CN/tracking.mdx +9 -6
  290. package/corpus/core/docs/content/locales/zh-CN/using-your-agent.mdx +0 -7
  291. package/corpus/core/docs/content/locales/zh-CN/voice-input.mdx +6 -0
  292. package/corpus/core/docs/content/locales/zh-CN/workspace-connections.mdx +9 -2
  293. package/corpus/core/docs/content/locales/zh-CN/workspace.mdx +19 -18
  294. package/corpus/core/docs/content/locales/zh-TW/actions.mdx +2 -2
  295. package/corpus/core/docs/content/locales/zh-TW/agent-native-toolkit.mdx +2 -2
  296. package/corpus/core/docs/content/locales/zh-TW/agent-surfaces.mdx +8 -10
  297. package/corpus/core/docs/content/locales/zh-TW/agent-teams.mdx +1 -0
  298. package/corpus/core/docs/content/locales/zh-TW/authentication.mdx +1 -1
  299. package/corpus/core/docs/content/locales/zh-TW/components.mdx +11 -1
  300. package/corpus/core/docs/content/locales/zh-TW/creating-templates.mdx +3 -7
  301. package/corpus/core/docs/content/locales/zh-TW/cross-app-sso.mdx +16 -6
  302. package/corpus/core/docs/content/locales/zh-TW/deployment.mdx +8 -0
  303. package/corpus/core/docs/content/locales/zh-TW/external-agents.mdx +2 -7
  304. package/corpus/core/docs/content/locales/zh-TW/key-concepts.mdx +13 -20
  305. package/corpus/core/docs/content/locales/zh-TW/multi-tenancy.mdx +5 -5
  306. package/corpus/core/docs/content/locales/zh-TW/notifications.mdx +18 -10
  307. package/corpus/core/docs/content/locales/zh-TW/processors.mdx +11 -5
  308. package/corpus/core/docs/content/locales/zh-TW/server.mdx +16 -10
  309. package/corpus/core/docs/content/locales/zh-TW/sharing.mdx +10 -10
  310. package/corpus/core/docs/content/locales/zh-TW/skills-guide.mdx +34 -17
  311. package/corpus/core/docs/content/locales/zh-TW/template-assets.mdx +16 -13
  312. package/corpus/core/docs/content/locales/zh-TW/template-brain.mdx +3 -1
  313. package/corpus/core/docs/content/locales/zh-TW/template-clips.mdx +3 -4
  314. package/corpus/core/docs/content/locales/zh-TW/template-design.mdx +3 -1
  315. package/corpus/core/docs/content/locales/zh-TW/template-dispatch.mdx +5 -1
  316. package/corpus/core/docs/content/locales/zh-TW/template-mail.mdx +8 -0
  317. package/corpus/core/docs/content/locales/zh-TW/tracking.mdx +9 -6
  318. package/corpus/core/docs/content/locales/zh-TW/using-your-agent.mdx +0 -7
  319. package/corpus/core/docs/content/locales/zh-TW/voice-input.mdx +6 -0
  320. package/corpus/core/docs/content/locales/zh-TW/workspace-connections.mdx +9 -2
  321. package/corpus/core/docs/content/locales/zh-TW/workspace.mdx +19 -18
  322. package/corpus/core/docs/content/mcp-apps.mdx +14 -32
  323. package/corpus/core/docs/content/mcp-clients.mdx +48 -54
  324. package/corpus/core/docs/content/mcp-protocol.mdx +25 -10
  325. package/corpus/core/docs/content/messaging.mdx +19 -11
  326. package/corpus/core/docs/content/multi-app-workspace.mdx +11 -96
  327. package/corpus/core/docs/content/multi-tenancy.mdx +5 -5
  328. package/corpus/core/docs/content/native-chat-ui.mdx +4 -4
  329. package/corpus/core/docs/content/notifications.mdx +19 -12
  330. package/corpus/core/docs/content/observability.mdx +2 -4
  331. package/corpus/core/docs/content/observational-memory.mdx +7 -3
  332. package/corpus/core/docs/content/onboarding.mdx +9 -2
  333. package/corpus/core/docs/content/plan-plugin.mdx +10 -2
  334. package/corpus/core/docs/content/pr-visual-recap.mdx +1 -1
  335. package/corpus/core/docs/content/processors.mdx +11 -5
  336. package/corpus/core/docs/content/pure-agent-apps.mdx +5 -1
  337. package/corpus/core/docs/content/real-time-collaboration.mdx +30 -67
  338. package/corpus/core/docs/content/recurring-jobs.mdx +8 -6
  339. package/corpus/core/docs/content/routing.mdx +3 -4
  340. package/corpus/core/docs/content/sandbox-adapters.mdx +30 -53
  341. package/corpus/core/docs/content/security.mdx +8 -0
  342. package/corpus/core/docs/content/server.mdx +17 -10
  343. package/corpus/core/docs/content/sharing.mdx +10 -10
  344. package/corpus/core/docs/content/skills-guide.mdx +35 -16
  345. package/corpus/core/docs/content/template-analytics.mdx +11 -8
  346. package/corpus/core/docs/content/template-assets.mdx +16 -13
  347. package/corpus/core/docs/content/template-brain.mdx +3 -1
  348. package/corpus/core/docs/content/template-calendar.mdx +12 -4
  349. package/corpus/core/docs/content/template-chat.mdx +4 -4
  350. package/corpus/core/docs/content/template-clips.mdx +3 -3
  351. package/corpus/core/docs/content/template-content.mdx +23 -18
  352. package/corpus/core/docs/content/template-design.mdx +3 -1
  353. package/corpus/core/docs/content/template-dispatch.mdx +5 -1
  354. package/corpus/core/docs/content/template-mail.mdx +14 -2
  355. package/corpus/core/docs/content/template-plan.mdx +22 -15
  356. package/corpus/core/docs/content/template-slides.mdx +11 -3
  357. package/corpus/core/docs/content/toolkit-agent-ux.mdx +46 -3
  358. package/corpus/core/docs/content/toolkit-collaboration.mdx +58 -4
  359. package/corpus/core/docs/content/toolkit-command-navigation.mdx +8 -2
  360. package/corpus/core/docs/content/toolkit-comments-review.mdx +10 -2
  361. package/corpus/core/docs/content/toolkit-history.mdx +8 -3
  362. package/corpus/core/docs/content/toolkit-observability.mdx +48 -2
  363. package/corpus/core/docs/content/toolkit-org-team.mdx +8 -2
  364. package/corpus/core/docs/content/toolkit-resources.mdx +45 -2
  365. package/corpus/core/docs/content/toolkit-settings.mdx +8 -2
  366. package/corpus/core/docs/content/toolkit-setup-connections.mdx +7 -2
  367. package/corpus/core/docs/content/toolkit-sharing.mdx +46 -3
  368. package/corpus/core/docs/content/toolkit-ui.mdx +82 -11
  369. package/corpus/core/docs/content/tracking.mdx +10 -8
  370. package/corpus/core/docs/content/using-your-agent.mdx +0 -12
  371. package/corpus/core/docs/content/voice-input.mdx +7 -1
  372. package/corpus/core/docs/content/what-is-agent-native.mdx +7 -8
  373. package/corpus/core/docs/content/workspace-connections.mdx +16 -23
  374. package/corpus/core/docs/content/workspace-management.mdx +16 -4
  375. package/corpus/core/docs/content/workspace.mdx +19 -18
  376. package/corpus/core/package.json +1 -1
  377. package/corpus/core/src/agent/context-xray/tokenize.ts +6 -1
  378. package/corpus/core/src/agent/engine/ai-sdk-engine.ts +9 -5
  379. package/corpus/core/src/agent/engine/anthropic-engine.ts +2 -4
  380. package/corpus/core/src/agent/engine/builder-engine.ts +5 -7
  381. package/corpus/core/src/agent/engine/index.ts +1 -0
  382. package/corpus/core/src/agent/engine/registry.ts +40 -0
  383. package/corpus/core/src/agent/harness/ai-sdk-adapter.ts +6 -1
  384. package/corpus/core/src/agent/harness/background.ts +96 -19
  385. package/corpus/core/src/agent/harness/index.ts +11 -0
  386. package/corpus/core/src/agent/harness/lifecycle.ts +498 -0
  387. package/corpus/core/src/agent/harness/runner.ts +38 -0
  388. package/corpus/core/src/agent/harness/store.ts +22 -3
  389. package/corpus/core/src/agent/model-config.ts +4 -1
  390. package/corpus/core/src/agent/production-agent.ts +190 -6
  391. package/corpus/core/src/agent/run-manager.ts +5 -1
  392. package/corpus/core/src/application-state/index.ts +1 -0
  393. package/corpus/core/src/application-state/store.ts +32 -0
  394. package/corpus/core/src/cli/code-agent-connector.ts +263 -8
  395. package/corpus/core/src/cli/code-agent-executor.ts +15 -1
  396. package/corpus/core/src/client/AgentPanel.tsx +41 -38
  397. package/corpus/core/src/client/AssistantChat.tsx +98 -6
  398. package/corpus/core/src/client/MultiTabAssistantChat.tsx +33 -40
  399. package/corpus/core/src/client/appearance.ts +8 -5
  400. package/corpus/core/src/client/chat/connectors.ts +293 -29
  401. package/corpus/core/src/client/chat/message-components.tsx +23 -1
  402. package/corpus/core/src/client/chat/runtime.ts +126 -25
  403. package/corpus/core/src/client/chat/tool-call-display.tsx +45 -4
  404. package/corpus/core/src/client/composer/RealtimeVoiceMode.tsx +294 -0
  405. package/corpus/core/src/client/composer/TiptapComposer.tsx +21 -20
  406. package/corpus/core/src/client/composer/VoiceButton.tsx +20 -0
  407. package/corpus/core/src/client/composer/index.ts +22 -0
  408. package/corpus/core/src/client/composer/useRealtimeVoiceMode.tsx +640 -0
  409. package/corpus/core/src/client/guided-questions.tsx +12 -3
  410. package/corpus/core/src/client/index.ts +18 -0
  411. package/corpus/core/src/client/settings/DemoModeSection.tsx +4 -3
  412. package/corpus/core/src/client/settings/SettingsPanel.tsx +4 -0
  413. package/corpus/core/src/client/settings/SettingsTabsPage.tsx +95 -37
  414. package/corpus/core/src/client/use-chat-models.ts +17 -17
  415. package/corpus/core/src/client/use-db-sync.ts +108 -7
  416. package/corpus/core/src/code-agents/background-controller.ts +18 -0
  417. package/corpus/core/src/collab/ydoc-manager.ts +41 -6
  418. package/corpus/core/src/db/migrations.ts +17 -1
  419. package/corpus/core/src/demo/fetch-interceptor.ts +16 -11
  420. package/corpus/core/src/integrations/adapters/slack.ts +41 -2
  421. package/corpus/core/src/integrations/awaiting-input-store.ts +130 -0
  422. package/corpus/core/src/integrations/computer-supervision-store.ts +423 -0
  423. package/corpus/core/src/integrations/computer-supervision.ts +213 -0
  424. package/corpus/core/src/integrations/index.ts +29 -1
  425. package/corpus/core/src/integrations/plugin.ts +231 -2
  426. package/corpus/core/src/integrations/remote-commands-store.ts +334 -3
  427. package/corpus/core/src/integrations/remote-devices-store.ts +68 -9
  428. package/corpus/core/src/integrations/remote-json-safety.ts +127 -0
  429. package/corpus/core/src/integrations/remote-run-events-store.ts +104 -19
  430. package/corpus/core/src/integrations/remote-types.ts +66 -3
  431. package/corpus/core/src/integrations/webhook-handler.ts +161 -2
  432. package/corpus/core/src/localization/default-messages.ts +28 -0
  433. package/corpus/core/src/mcp-client/config.ts +48 -2
  434. package/corpus/core/src/mcp-client/index.ts +35 -2
  435. package/corpus/core/src/mcp-client/tool-policy.ts +182 -0
  436. package/corpus/core/src/secrets/register-framework-secrets.ts +27 -4
  437. package/corpus/core/src/server/agent-chat-plugin.ts +62 -8
  438. package/corpus/core/src/server/index.ts +16 -0
  439. package/corpus/core/src/server/realtime-voice.ts +590 -0
  440. package/corpus/core/src/shared/reasoning-effort.ts +61 -19
  441. package/corpus/core/src/styles/agent-conversation.css +17 -0
  442. package/corpus/core/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +39 -5
  443. package/corpus/templates/brain/app/lib/settings-navigation.ts +22 -0
  444. package/corpus/templates/brain/app/routes/settings.tsx +367 -252
  445. package/corpus/templates/brain/changelog/2026-07-10-brain-settings-now-separate-assistant-behavior-publishing-re.md +6 -0
  446. package/corpus/templates/brain/changelog/2026-07-10-organization-settings-now-opens-directly-from-the-workspace-.md +6 -0
  447. package/corpus/templates/calendar/.agents/skills/event-management/SKILL.md +36 -4
  448. package/corpus/templates/calendar/AGENTS.md +4 -0
  449. package/corpus/templates/calendar/actions/create-event.ts +7 -19
  450. package/corpus/templates/calendar/actions/delete-event.ts +10 -3
  451. package/corpus/templates/calendar/actions/rsvp-event.ts +1 -1
  452. package/corpus/templates/calendar/actions/update-event.ts +4 -3
  453. package/corpus/templates/calendar/app/components/calendar/CreateEventDialog.tsx +100 -13
  454. package/corpus/templates/calendar/app/components/calendar/DayView.tsx +12 -4
  455. package/corpus/templates/calendar/app/components/calendar/EventDetailPanel.tsx +3 -3
  456. package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +86 -8
  457. package/corpus/templates/calendar/app/components/calendar/EventDialog.tsx +3 -1
  458. package/corpus/templates/calendar/app/components/calendar/WeekView.tsx +12 -4
  459. package/corpus/templates/calendar/app/hooks/use-events.ts +1 -0
  460. package/corpus/templates/calendar/app/lib/event-account-selection.ts +36 -0
  461. package/corpus/templates/calendar/app/lib/event-form-initialization.ts +21 -0
  462. package/corpus/templates/calendar/app/lib/event-mutation-inputs.ts +18 -0
  463. package/corpus/templates/calendar/app/pages/CalendarView.tsx +119 -26
  464. package/corpus/templates/calendar/changelog/2026-07-10-choose-which-connected-google-account-receives-a-new-event-w.md +6 -0
  465. package/corpus/templates/calendar/server/db/schema.ts +2 -0
  466. package/corpus/templates/calendar/server/handlers/bookings.ts +43 -6
  467. package/corpus/templates/calendar/server/handlers/events.ts +28 -9
  468. package/corpus/templates/calendar/server/lib/google-calendar.ts +66 -38
  469. package/corpus/templates/calendar/server/plugins/db.ts +5 -0
  470. package/corpus/templates/clips/.agents/skills/ai-video-tools/SKILL.md +12 -3
  471. package/corpus/templates/clips/.agents/skills/meetings/SKILL.md +1 -1
  472. package/corpus/templates/clips/AGENTS.md +4 -2
  473. package/corpus/templates/clips/actions/regenerate-title.ts +53 -7
  474. package/corpus/templates/clips/actions/request-transcript.ts +152 -41
  475. package/corpus/templates/clips/actions/save-browser-transcript.ts +11 -9
  476. package/corpus/templates/clips/app/components/player/comments-panel.tsx +101 -53
  477. package/corpus/templates/clips/app/components/player/playback-comment-overlay.tsx +102 -0
  478. package/corpus/templates/clips/app/components/player/video-player.tsx +10 -1
  479. package/corpus/templates/clips/app/hooks/use-auto-title.ts +14 -0
  480. package/corpus/templates/clips/app/routes/embed.$shareId.tsx +2 -0
  481. package/corpus/templates/clips/changelog/2026-07-10-comment-replies-now-open-inline-and-focus-immediately-while-.md +6 -0
  482. package/corpus/templates/clips/changelog/2026-07-10-dismissed-upload-warnings-now-keep-recordings-in-clip-drafts.md +6 -0
  483. package/corpus/templates/clips/changelog/2026-07-10-dragging-the-meeting-recorder-no-longer-opens-the-expanded.md +6 -0
  484. package/corpus/templates/clips/changelog/2026-07-10-finishing-meeting-notes-no-longer-opens-your-browser.md +6 -0
  485. package/corpus/templates/clips/changelog/2026-07-10-meeting-recordings-now-keep-microphone-audio-and-recover-tra.md +6 -0
  486. package/corpus/templates/clips/changelog/2026-07-10-recording-pause-and-resume-controls-now-respond-reliably-on-.md +6 -0
  487. package/corpus/templates/clips/changelog/2026-07-10-starting-and-joining-a-meeting-now-closes-the-desktop-popover.md +6 -0
  488. package/corpus/templates/clips/changelog/2026-07-10-timestamped-comments-now-appear-over-the-video-as-playback-r.md +6 -0
  489. package/corpus/templates/clips/changelog/2026-07-10-transcript-backed-titles-and-summaries-now-finish-after-recording.md +6 -0
  490. package/corpus/templates/clips/changelog/2026-07-10-zoom-meetings-now-open-directly-in-the-desktop-app.md +6 -0
  491. package/corpus/templates/clips/chrome-extension/src/overlay.ts +49 -7
  492. package/corpus/templates/clips/desktop/src/app.tsx +70 -42
  493. package/corpus/templates/clips/desktop/src/hooks/useMeetingTranscription.ts +8 -14
  494. package/corpus/templates/clips/desktop/src/lib/meeting-join-url.ts +33 -0
  495. package/corpus/templates/clips/desktop/src/lib/pause-transition.ts +79 -0
  496. package/corpus/templates/clips/desktop/src/lib/pill-interaction.ts +19 -0
  497. package/corpus/templates/clips/desktop/src/lib/recorder.ts +90 -39
  498. package/corpus/templates/clips/desktop/src/lib/transcription-engine.ts +3 -2
  499. package/corpus/templates/clips/desktop/src/overlays/meeting-notification.tsx +3 -2
  500. package/corpus/templates/clips/desktop/src/overlays/recording-pill.tsx +32 -6
  501. package/corpus/templates/clips/desktop/src/overlays/toolbar.tsx +50 -5
  502. package/corpus/templates/clips/desktop/src/styles.css +11 -19
  503. package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +2 -1
  504. package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +121 -4
  505. package/corpus/templates/clips/desktop/src-tauri/src/native_speech.rs +97 -17
  506. package/corpus/templates/clips/desktop/src-tauri/src/whisper_speech.rs +80 -5
  507. package/corpus/templates/clips/desktop/src-tauri/tauri.conf.json +1 -1
  508. package/corpus/templates/clips/vitest.config.ts +23 -0
  509. package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +28 -9
  510. package/corpus/templates/content/changelog/2026-07-10-open-documents-no-longer-make-constant-background-requests-w.md +6 -0
  511. package/corpus/templates/design/.agents/skills/design-systems/SKILL.md +21 -4
  512. package/corpus/templates/design/AGENTS.md +7 -0
  513. package/corpus/templates/design/app/components/design/DesignCanvas.tsx +132 -7
  514. package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +73 -18
  515. package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +6 -1
  516. package/corpus/templates/design/app/components/design/multi-screen/frame-geometry.ts +135 -5
  517. package/corpus/templates/design/app/lib/clipboard-content-lineage.ts +64 -0
  518. package/corpus/templates/design/app/lib/design-clipboard-managed-styles.ts +247 -0
  519. package/corpus/templates/design/app/lib/design-clipboard.ts +60 -3
  520. package/corpus/templates/design/app/lib/design-import.ts +31 -3
  521. package/corpus/templates/design/app/pages/design-editor/latest-write-queue.ts +56 -0
  522. package/corpus/templates/design/app/pages/design-editor/performance-buffer-guard.ts +80 -0
  523. package/corpus/templates/design/changelog/2026-07-10-concurrent-agent-and-artboard-edits-no-longer-show-misleadin.md +6 -0
  524. package/corpus/templates/design/changelog/2026-07-10-designs-with-html-examples-inside-alpine-attributes-or-comme.md +6 -0
  525. package/corpus/templates/design/changelog/2026-07-10-interactive-designs-no-longer-appear-blank-in-the-canvas-whe.md +6 -0
  526. package/corpus/templates/design/changelog/2026-07-10-long-overview-editing-sessions-lots-of-pan-zoom-screen-switc.md +6 -0
  527. package/corpus/templates/design/changelog/2026-07-10-rapid-breakpoint-and-edit-scope-changes-no-longer-jump-back-.md +6 -0
  528. package/corpus/templates/design/changelog/2026-07-10-responsive-breakpoint-previews-stay-visible-while-panning-ac.md +6 -0
  529. package/corpus/templates/design/changelog/2026-07-10-rich-design-clipboard-markers-are-now-accepted-only-from-the.md +6 -0
  530. package/corpus/templates/design/e2e/helpers.ts +16 -5
  531. package/corpus/templates/design/server/source-workspace.ts +28 -2
  532. package/corpus/templates/design/shared/html-integrity.ts +119 -24
  533. package/corpus/templates/dispatch/AGENTS.md +10 -2
  534. package/corpus/templates/dispatch/actions/view-screen.ts +11 -0
  535. package/corpus/templates/dispatch/app/hooks/use-navigation-state.ts +13 -0
  536. package/corpus/templates/dispatch/app/i18n/zh-TW.ts +3 -0
  537. package/corpus/templates/dispatch/app/i18n-data.ts +37 -1
  538. package/corpus/templates/dispatch/app/routes/operations.tsx +1 -0
  539. package/corpus/templates/dispatch/changelog/2026-07-10-dispatch-now-has-a-cleaner-chat-history-and-quieter-sidebar-.md +6 -0
  540. package/corpus/templates/dispatch/changelog/2026-07-10-operations-console-brings-agent-monitoring-and-database-inspection-tog.md +6 -0
  541. package/corpus/templates/mail/actions/get-integration-statuses.ts +36 -0
  542. package/corpus/templates/mail/app/components/email/EmailThread.tsx +3 -2
  543. package/corpus/templates/mail/app/components/email/IntegrationsSidebar.tsx +3 -3
  544. package/corpus/templates/mail/app/hooks/use-apollo.ts +5 -71
  545. package/corpus/templates/mail/app/hooks/use-draft-queue.ts +1 -1
  546. package/corpus/templates/mail/app/hooks/use-integrations.ts +51 -48
  547. package/corpus/templates/mail/app/lib/integration-status.ts +31 -0
  548. package/corpus/templates/mail/app/lib/sync-invalidation.ts +5 -0
  549. package/corpus/templates/mail/app/pages/SettingsPage.tsx +3 -0
  550. package/corpus/templates/mail/app/root.tsx +22 -12
  551. package/corpus/templates/mail/changelog/2026-07-10-email-content-backgrounds-now-blend-cleanly-with-dark-mode.md +6 -0
  552. package/corpus/templates/mail/changelog/2026-07-10-mail-settings-now-group-drafting-automation-and-connected-se.md +6 -0
  553. package/corpus/templates/mail/changelog/2026-07-10-organization-settings-now-opens-directly-from-the-workspace-.md +6 -0
  554. package/dist/agent/context-xray/tokenize.d.ts.map +1 -1
  555. package/dist/agent/context-xray/tokenize.js +6 -1
  556. package/dist/agent/context-xray/tokenize.js.map +1 -1
  557. package/dist/agent/engine/ai-sdk-engine.d.ts.map +1 -1
  558. package/dist/agent/engine/ai-sdk-engine.js +8 -3
  559. package/dist/agent/engine/ai-sdk-engine.js.map +1 -1
  560. package/dist/agent/engine/anthropic-engine.d.ts.map +1 -1
  561. package/dist/agent/engine/anthropic-engine.js +2 -4
  562. package/dist/agent/engine/anthropic-engine.js.map +1 -1
  563. package/dist/agent/engine/builder-engine.d.ts +1 -1
  564. package/dist/agent/engine/builder-engine.d.ts.map +1 -1
  565. package/dist/agent/engine/builder-engine.js +2 -3
  566. package/dist/agent/engine/builder-engine.js.map +1 -1
  567. package/dist/agent/engine/index.d.ts +1 -1
  568. package/dist/agent/engine/index.d.ts.map +1 -1
  569. package/dist/agent/engine/index.js +1 -1
  570. package/dist/agent/engine/index.js.map +1 -1
  571. package/dist/agent/engine/registry.d.ts +13 -0
  572. package/dist/agent/engine/registry.d.ts.map +1 -1
  573. package/dist/agent/engine/registry.js +33 -0
  574. package/dist/agent/engine/registry.js.map +1 -1
  575. package/dist/agent/harness/ai-sdk-adapter.d.ts.map +1 -1
  576. package/dist/agent/harness/ai-sdk-adapter.js +3 -1
  577. package/dist/agent/harness/ai-sdk-adapter.js.map +1 -1
  578. package/dist/agent/harness/background.d.ts +9 -9
  579. package/dist/agent/harness/background.d.ts.map +1 -1
  580. package/dist/agent/harness/background.js +77 -19
  581. package/dist/agent/harness/background.js.map +1 -1
  582. package/dist/agent/harness/index.d.ts +1 -0
  583. package/dist/agent/harness/index.d.ts.map +1 -1
  584. package/dist/agent/harness/index.js +1 -0
  585. package/dist/agent/harness/index.js.map +1 -1
  586. package/dist/agent/harness/lifecycle.d.ts +45 -0
  587. package/dist/agent/harness/lifecycle.d.ts.map +1 -0
  588. package/dist/agent/harness/lifecycle.js +318 -0
  589. package/dist/agent/harness/lifecycle.js.map +1 -0
  590. package/dist/agent/harness/runner.d.ts.map +1 -1
  591. package/dist/agent/harness/runner.js +29 -1
  592. package/dist/agent/harness/runner.js.map +1 -1
  593. package/dist/agent/harness/store.d.ts +2 -0
  594. package/dist/agent/harness/store.d.ts.map +1 -1
  595. package/dist/agent/harness/store.js +17 -3
  596. package/dist/agent/harness/store.js.map +1 -1
  597. package/dist/agent/model-config.d.ts +2 -2
  598. package/dist/agent/model-config.d.ts.map +1 -1
  599. package/dist/agent/model-config.js +4 -1
  600. package/dist/agent/model-config.js.map +1 -1
  601. package/dist/agent/production-agent.d.ts +38 -0
  602. package/dist/agent/production-agent.d.ts.map +1 -1
  603. package/dist/agent/production-agent.js +135 -4
  604. package/dist/agent/production-agent.js.map +1 -1
  605. package/dist/agent/run-manager.d.ts.map +1 -1
  606. package/dist/agent/run-manager.js.map +1 -1
  607. package/dist/application-state/index.d.ts +1 -1
  608. package/dist/application-state/index.d.ts.map +1 -1
  609. package/dist/application-state/index.js +1 -1
  610. package/dist/application-state/index.js.map +1 -1
  611. package/dist/application-state/store.d.ts +6 -0
  612. package/dist/application-state/store.d.ts.map +1 -1
  613. package/dist/application-state/store.js +31 -0
  614. package/dist/application-state/store.js.map +1 -1
  615. package/dist/cli/code-agent-connector.d.ts +9 -0
  616. package/dist/cli/code-agent-connector.d.ts.map +1 -1
  617. package/dist/cli/code-agent-connector.js +212 -10
  618. package/dist/cli/code-agent-connector.js.map +1 -1
  619. package/dist/cli/code-agent-executor.d.ts +2 -0
  620. package/dist/cli/code-agent-executor.d.ts.map +1 -1
  621. package/dist/cli/code-agent-executor.js +8 -1
  622. package/dist/cli/code-agent-executor.js.map +1 -1
  623. package/dist/client/AgentPanel.d.ts.map +1 -1
  624. package/dist/client/AgentPanel.js +6 -5
  625. package/dist/client/AgentPanel.js.map +1 -1
  626. package/dist/client/AssistantChat.d.ts +12 -0
  627. package/dist/client/AssistantChat.d.ts.map +1 -1
  628. package/dist/client/AssistantChat.js +71 -5
  629. package/dist/client/AssistantChat.js.map +1 -1
  630. package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
  631. package/dist/client/MultiTabAssistantChat.js +16 -37
  632. package/dist/client/MultiTabAssistantChat.js.map +1 -1
  633. package/dist/client/appearance.d.ts +4 -2
  634. package/dist/client/appearance.d.ts.map +1 -1
  635. package/dist/client/appearance.js +8 -5
  636. package/dist/client/appearance.js.map +1 -1
  637. package/dist/client/chat/connectors.d.ts.map +1 -1
  638. package/dist/client/chat/connectors.js +206 -28
  639. package/dist/client/chat/connectors.js.map +1 -1
  640. package/dist/client/chat/message-components.d.ts.map +1 -1
  641. package/dist/client/chat/message-components.js +17 -1
  642. package/dist/client/chat/message-components.js.map +1 -1
  643. package/dist/client/chat/runtime.d.ts.map +1 -1
  644. package/dist/client/chat/runtime.js +84 -24
  645. package/dist/client/chat/runtime.js.map +1 -1
  646. package/dist/client/chat/tool-call-display.d.ts +8 -1
  647. package/dist/client/chat/tool-call-display.d.ts.map +1 -1
  648. package/dist/client/chat/tool-call-display.js +21 -3
  649. package/dist/client/chat/tool-call-display.js.map +1 -1
  650. package/dist/client/composer/RealtimeVoiceMode.d.ts +54 -0
  651. package/dist/client/composer/RealtimeVoiceMode.d.ts.map +1 -0
  652. package/dist/client/composer/RealtimeVoiceMode.js +63 -0
  653. package/dist/client/composer/RealtimeVoiceMode.js.map +1 -0
  654. package/dist/client/composer/TiptapComposer.d.ts +1 -0
  655. package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
  656. package/dist/client/composer/TiptapComposer.js +17 -20
  657. package/dist/client/composer/TiptapComposer.js.map +1 -1
  658. package/dist/client/composer/VoiceButton.d.ts.map +1 -1
  659. package/dist/client/composer/VoiceButton.js +9 -0
  660. package/dist/client/composer/VoiceButton.js.map +1 -1
  661. package/dist/client/composer/index.d.ts +2 -0
  662. package/dist/client/composer/index.d.ts.map +1 -1
  663. package/dist/client/composer/index.js +2 -0
  664. package/dist/client/composer/index.js.map +1 -1
  665. package/dist/client/composer/useRealtimeVoiceMode.d.ts +56 -0
  666. package/dist/client/composer/useRealtimeVoiceMode.d.ts.map +1 -0
  667. package/dist/client/composer/useRealtimeVoiceMode.js +492 -0
  668. package/dist/client/composer/useRealtimeVoiceMode.js.map +1 -0
  669. package/dist/client/guided-questions.d.ts.map +1 -1
  670. package/dist/client/guided-questions.js +7 -2
  671. package/dist/client/guided-questions.js.map +1 -1
  672. package/dist/client/index.d.ts +1 -1
  673. package/dist/client/index.d.ts.map +1 -1
  674. package/dist/client/index.js +1 -1
  675. package/dist/client/index.js.map +1 -1
  676. package/dist/client/settings/DemoModeSection.d.ts.map +1 -1
  677. package/dist/client/settings/DemoModeSection.js +4 -3
  678. package/dist/client/settings/DemoModeSection.js.map +1 -1
  679. package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
  680. package/dist/client/settings/SettingsPanel.js +4 -0
  681. package/dist/client/settings/SettingsPanel.js.map +1 -1
  682. package/dist/client/settings/SettingsTabsPage.d.ts +10 -3
  683. package/dist/client/settings/SettingsTabsPage.d.ts.map +1 -1
  684. package/dist/client/settings/SettingsTabsPage.js +49 -11
  685. package/dist/client/settings/SettingsTabsPage.js.map +1 -1
  686. package/dist/client/use-chat-models.d.ts.map +1 -1
  687. package/dist/client/use-chat-models.js +6 -14
  688. package/dist/client/use-chat-models.js.map +1 -1
  689. package/dist/client/use-db-sync.d.ts.map +1 -1
  690. package/dist/client/use-db-sync.js +87 -7
  691. package/dist/client/use-db-sync.js.map +1 -1
  692. package/dist/code-agents/background-controller.d.ts +1 -1
  693. package/dist/code-agents/background-controller.d.ts.map +1 -1
  694. package/dist/code-agents/background-controller.js +17 -1
  695. package/dist/code-agents/background-controller.js.map +1 -1
  696. package/dist/collab/struct-routes.d.ts +1 -1
  697. package/dist/collab/ydoc-manager.d.ts +9 -1
  698. package/dist/collab/ydoc-manager.d.ts.map +1 -1
  699. package/dist/collab/ydoc-manager.js +30 -6
  700. package/dist/collab/ydoc-manager.js.map +1 -1
  701. package/dist/db/migrations.d.ts.map +1 -1
  702. package/dist/db/migrations.js +4 -2
  703. package/dist/db/migrations.js.map +1 -1
  704. package/dist/demo/fetch-interceptor.d.ts +5 -1
  705. package/dist/demo/fetch-interceptor.d.ts.map +1 -1
  706. package/dist/demo/fetch-interceptor.js +16 -12
  707. package/dist/demo/fetch-interceptor.js.map +1 -1
  708. package/dist/integrations/adapters/slack.d.ts +2 -0
  709. package/dist/integrations/adapters/slack.d.ts.map +1 -1
  710. package/dist/integrations/adapters/slack.js +38 -2
  711. package/dist/integrations/adapters/slack.js.map +1 -1
  712. package/dist/integrations/awaiting-input-store.d.ts +27 -0
  713. package/dist/integrations/awaiting-input-store.d.ts.map +1 -0
  714. package/dist/integrations/awaiting-input-store.js +112 -0
  715. package/dist/integrations/awaiting-input-store.js.map +1 -0
  716. package/dist/integrations/computer-supervision-store.d.ts +65 -0
  717. package/dist/integrations/computer-supervision-store.d.ts.map +1 -0
  718. package/dist/integrations/computer-supervision-store.js +296 -0
  719. package/dist/integrations/computer-supervision-store.js.map +1 -0
  720. package/dist/integrations/computer-supervision.d.ts +11 -0
  721. package/dist/integrations/computer-supervision.d.ts.map +1 -0
  722. package/dist/integrations/computer-supervision.js +160 -0
  723. package/dist/integrations/computer-supervision.js.map +1 -0
  724. package/dist/integrations/index.d.ts +6 -3
  725. package/dist/integrations/index.d.ts.map +1 -1
  726. package/dist/integrations/index.js +5 -2
  727. package/dist/integrations/index.js.map +1 -1
  728. package/dist/integrations/plugin.d.ts.map +1 -1
  729. package/dist/integrations/plugin.js +205 -3
  730. package/dist/integrations/plugin.js.map +1 -1
  731. package/dist/integrations/remote-commands-store.d.ts +15 -1
  732. package/dist/integrations/remote-commands-store.d.ts.map +1 -1
  733. package/dist/integrations/remote-commands-store.js +273 -3
  734. package/dist/integrations/remote-commands-store.js.map +1 -1
  735. package/dist/integrations/remote-devices-store.d.ts +4 -3
  736. package/dist/integrations/remote-devices-store.d.ts.map +1 -1
  737. package/dist/integrations/remote-devices-store.js +49 -2
  738. package/dist/integrations/remote-devices-store.js.map +1 -1
  739. package/dist/integrations/remote-json-safety.d.ts +6 -0
  740. package/dist/integrations/remote-json-safety.d.ts.map +1 -0
  741. package/dist/integrations/remote-json-safety.js +114 -0
  742. package/dist/integrations/remote-json-safety.js.map +1 -0
  743. package/dist/integrations/remote-run-events-store.d.ts +11 -1
  744. package/dist/integrations/remote-run-events-store.d.ts.map +1 -1
  745. package/dist/integrations/remote-run-events-store.js +85 -17
  746. package/dist/integrations/remote-run-events-store.js.map +1 -1
  747. package/dist/integrations/remote-types.d.ts +54 -3
  748. package/dist/integrations/remote-types.d.ts.map +1 -1
  749. package/dist/integrations/remote-types.js.map +1 -1
  750. package/dist/integrations/webhook-handler.d.ts.map +1 -1
  751. package/dist/integrations/webhook-handler.js +133 -4
  752. package/dist/integrations/webhook-handler.js.map +1 -1
  753. package/dist/localization/default-messages.d.ts +26 -0
  754. package/dist/localization/default-messages.d.ts.map +1 -1
  755. package/dist/localization/default-messages.js +26 -0
  756. package/dist/localization/default-messages.js.map +1 -1
  757. package/dist/mcp-client/config.d.ts.map +1 -1
  758. package/dist/mcp-client/config.js +44 -3
  759. package/dist/mcp-client/config.js.map +1 -1
  760. package/dist/mcp-client/index.d.ts +6 -1
  761. package/dist/mcp-client/index.d.ts.map +1 -1
  762. package/dist/mcp-client/index.js +11 -3
  763. package/dist/mcp-client/index.js.map +1 -1
  764. package/dist/mcp-client/tool-policy.d.ts +24 -0
  765. package/dist/mcp-client/tool-policy.d.ts.map +1 -0
  766. package/dist/mcp-client/tool-policy.js +139 -0
  767. package/dist/mcp-client/tool-policy.js.map +1 -0
  768. package/dist/observability/routes.d.ts +5 -5
  769. package/dist/resources/handlers.d.ts +1 -1
  770. package/dist/secrets/register-framework-secrets.d.ts +3 -4
  771. package/dist/secrets/register-framework-secrets.d.ts.map +1 -1
  772. package/dist/secrets/register-framework-secrets.js +25 -4
  773. package/dist/secrets/register-framework-secrets.js.map +1 -1
  774. package/dist/secrets/routes.d.ts +9 -9
  775. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  776. package/dist/server/agent-chat-plugin.js +53 -6
  777. package/dist/server/agent-chat-plugin.js.map +1 -1
  778. package/dist/server/index.d.ts +2 -1
  779. package/dist/server/index.d.ts.map +1 -1
  780. package/dist/server/index.js +2 -1
  781. package/dist/server/index.js.map +1 -1
  782. package/dist/server/realtime-voice.d.ts +53 -0
  783. package/dist/server/realtime-voice.d.ts.map +1 -0
  784. package/dist/server/realtime-voice.js +404 -0
  785. package/dist/server/realtime-voice.js.map +1 -0
  786. package/dist/server/transcribe-voice.d.ts +1 -1
  787. package/dist/shared/reasoning-effort.d.ts +20 -0
  788. package/dist/shared/reasoning-effort.d.ts.map +1 -1
  789. package/dist/shared/reasoning-effort.js +52 -18
  790. package/dist/shared/reasoning-effort.js.map +1 -1
  791. package/dist/styles/agent-conversation.css +17 -0
  792. package/dist/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +39 -5
  793. package/docs/content/a2a-protocol.mdx +21 -5
  794. package/docs/content/actions.mdx +9 -23
  795. package/docs/content/agent-mentions.mdx +31 -29
  796. package/docs/content/agent-native-toolkit.mdx +15 -6
  797. package/docs/content/agent-surfaces.mdx +9 -13
  798. package/docs/content/agent-teams.mdx +1 -0
  799. package/docs/content/authentication.mdx +10 -3
  800. package/docs/content/automation-connectors.mdx +82 -39
  801. package/docs/content/automations.mdx +17 -3
  802. package/docs/content/blueprint-installer.mdx +11 -4
  803. package/docs/content/cli-adapters.mdx +9 -6
  804. package/docs/content/client.mdx +16 -0
  805. package/docs/content/cloneable-saas.mdx +14 -11
  806. package/docs/content/code-agents-ui.mdx +65 -0
  807. package/docs/content/components.mdx +30 -14
  808. package/docs/content/context-awareness.mdx +27 -15
  809. package/docs/content/creating-templates.mdx +15 -9
  810. package/docs/content/cross-app-sso.mdx +16 -6
  811. package/docs/content/data-programs.mdx +1 -1
  812. package/docs/content/database.mdx +17 -5
  813. package/docs/content/deployment.mdx +19 -18
  814. package/docs/content/dispatch.mdx +6 -2
  815. package/docs/content/drop-in-agent.mdx +10 -4
  816. package/docs/content/durable-background-runs.mdx +9 -5
  817. package/docs/content/durable-resume.mdx +9 -4
  818. package/docs/content/embedding-sdk.mdx +26 -8
  819. package/docs/content/evals.mdx +3 -5
  820. package/docs/content/extensions.mdx +22 -9
  821. package/docs/content/external-agents.mdx +25 -34
  822. package/docs/content/faq.mdx +8 -0
  823. package/docs/content/file-uploads.mdx +12 -3
  824. package/docs/content/frames.mdx +16 -0
  825. package/docs/content/generative-ui.mdx +1 -1
  826. package/docs/content/getting-started.mdx +34 -21
  827. package/docs/content/harness-agents.mdx +8 -4
  828. package/docs/content/human-approval.mdx +8 -3
  829. package/docs/content/internationalization.mdx +9 -4
  830. package/docs/content/key-concepts.mdx +13 -20
  831. package/docs/content/local-file-mode.mdx +14 -8
  832. package/docs/content/locales/ar-SA/actions.mdx +2 -2
  833. package/docs/content/locales/ar-SA/agent-native-toolkit.mdx +2 -2
  834. package/docs/content/locales/ar-SA/agent-surfaces.mdx +8 -10
  835. package/docs/content/locales/ar-SA/agent-teams.mdx +1 -0
  836. package/docs/content/locales/ar-SA/authentication.mdx +1 -1
  837. package/docs/content/locales/ar-SA/components.mdx +11 -1
  838. package/docs/content/locales/ar-SA/creating-templates.mdx +3 -7
  839. package/docs/content/locales/ar-SA/cross-app-sso.mdx +16 -6
  840. package/docs/content/locales/ar-SA/deployment.mdx +8 -0
  841. package/docs/content/locales/ar-SA/external-agents.mdx +2 -7
  842. package/docs/content/locales/ar-SA/key-concepts.mdx +13 -20
  843. package/docs/content/locales/ar-SA/multi-tenancy.mdx +5 -5
  844. package/docs/content/locales/ar-SA/notifications.mdx +18 -10
  845. package/docs/content/locales/ar-SA/processors.mdx +11 -5
  846. package/docs/content/locales/ar-SA/server.mdx +17 -10
  847. package/docs/content/locales/ar-SA/sharing.mdx +10 -10
  848. package/docs/content/locales/ar-SA/skills-guide.mdx +34 -17
  849. package/docs/content/locales/ar-SA/template-assets.mdx +16 -13
  850. package/docs/content/locales/ar-SA/template-brain.mdx +3 -1
  851. package/docs/content/locales/ar-SA/template-clips.mdx +3 -3
  852. package/docs/content/locales/ar-SA/template-design.mdx +3 -1
  853. package/docs/content/locales/ar-SA/template-dispatch.mdx +5 -1
  854. package/docs/content/locales/ar-SA/template-mail.mdx +8 -0
  855. package/docs/content/locales/ar-SA/tracking.mdx +9 -6
  856. package/docs/content/locales/ar-SA/using-your-agent.mdx +0 -7
  857. package/docs/content/locales/ar-SA/voice-input.mdx +6 -0
  858. package/docs/content/locales/ar-SA/workspace-connections.mdx +9 -2
  859. package/docs/content/locales/ar-SA/workspace.mdx +19 -18
  860. package/docs/content/locales/de-DE/actions.mdx +2 -2
  861. package/docs/content/locales/de-DE/agent-native-toolkit.mdx +2 -2
  862. package/docs/content/locales/de-DE/agent-surfaces.mdx +8 -10
  863. package/docs/content/locales/de-DE/agent-teams.mdx +1 -0
  864. package/docs/content/locales/de-DE/authentication.mdx +1 -1
  865. package/docs/content/locales/de-DE/components.mdx +11 -1
  866. package/docs/content/locales/de-DE/creating-templates.mdx +3 -7
  867. package/docs/content/locales/de-DE/cross-app-sso.mdx +16 -6
  868. package/docs/content/locales/de-DE/deployment.mdx +8 -0
  869. package/docs/content/locales/de-DE/external-agents.mdx +3 -7
  870. package/docs/content/locales/de-DE/key-concepts.mdx +13 -20
  871. package/docs/content/locales/de-DE/multi-tenancy.mdx +5 -5
  872. package/docs/content/locales/de-DE/notifications.mdx +18 -10
  873. package/docs/content/locales/de-DE/processors.mdx +11 -5
  874. package/docs/content/locales/de-DE/server.mdx +18 -10
  875. package/docs/content/locales/de-DE/sharing.mdx +10 -10
  876. package/docs/content/locales/de-DE/skills-guide.mdx +34 -17
  877. package/docs/content/locales/de-DE/template-assets.mdx +16 -13
  878. package/docs/content/locales/de-DE/template-brain.mdx +3 -1
  879. package/docs/content/locales/de-DE/template-clips.mdx +3 -3
  880. package/docs/content/locales/de-DE/template-design.mdx +3 -1
  881. package/docs/content/locales/de-DE/template-dispatch.mdx +5 -1
  882. package/docs/content/locales/de-DE/template-mail.mdx +8 -0
  883. package/docs/content/locales/de-DE/tracking.mdx +9 -6
  884. package/docs/content/locales/de-DE/using-your-agent.mdx +0 -7
  885. package/docs/content/locales/de-DE/voice-input.mdx +6 -0
  886. package/docs/content/locales/de-DE/workspace-connections.mdx +9 -2
  887. package/docs/content/locales/de-DE/workspace.mdx +19 -18
  888. package/docs/content/locales/es-ES/actions.mdx +2 -2
  889. package/docs/content/locales/es-ES/agent-native-toolkit.mdx +2 -2
  890. package/docs/content/locales/es-ES/agent-surfaces.mdx +8 -10
  891. package/docs/content/locales/es-ES/agent-teams.mdx +1 -0
  892. package/docs/content/locales/es-ES/authentication.mdx +1 -1
  893. package/docs/content/locales/es-ES/components.mdx +11 -1
  894. package/docs/content/locales/es-ES/creating-templates.mdx +3 -7
  895. package/docs/content/locales/es-ES/cross-app-sso.mdx +16 -6
  896. package/docs/content/locales/es-ES/deployment.mdx +8 -0
  897. package/docs/content/locales/es-ES/external-agents.mdx +3 -7
  898. package/docs/content/locales/es-ES/key-concepts.mdx +13 -20
  899. package/docs/content/locales/es-ES/multi-tenancy.mdx +5 -5
  900. package/docs/content/locales/es-ES/notifications.mdx +18 -10
  901. package/docs/content/locales/es-ES/processors.mdx +11 -5
  902. package/docs/content/locales/es-ES/server.mdx +17 -10
  903. package/docs/content/locales/es-ES/sharing.mdx +10 -10
  904. package/docs/content/locales/es-ES/skills-guide.mdx +34 -17
  905. package/docs/content/locales/es-ES/template-assets.mdx +16 -13
  906. package/docs/content/locales/es-ES/template-brain.mdx +3 -1
  907. package/docs/content/locales/es-ES/template-clips.mdx +3 -3
  908. package/docs/content/locales/es-ES/template-design.mdx +3 -1
  909. package/docs/content/locales/es-ES/template-dispatch.mdx +5 -1
  910. package/docs/content/locales/es-ES/template-mail.mdx +8 -0
  911. package/docs/content/locales/es-ES/tracking.mdx +9 -6
  912. package/docs/content/locales/es-ES/using-your-agent.mdx +0 -7
  913. package/docs/content/locales/es-ES/voice-input.mdx +6 -0
  914. package/docs/content/locales/es-ES/workspace-connections.mdx +9 -2
  915. package/docs/content/locales/es-ES/workspace.mdx +19 -18
  916. package/docs/content/locales/fr-FR/actions.mdx +2 -2
  917. package/docs/content/locales/fr-FR/agent-native-toolkit.mdx +2 -2
  918. package/docs/content/locales/fr-FR/agent-surfaces.mdx +8 -10
  919. package/docs/content/locales/fr-FR/agent-teams.mdx +1 -0
  920. package/docs/content/locales/fr-FR/authentication.mdx +1 -1
  921. package/docs/content/locales/fr-FR/components.mdx +11 -1
  922. package/docs/content/locales/fr-FR/creating-templates.mdx +3 -7
  923. package/docs/content/locales/fr-FR/cross-app-sso.mdx +16 -6
  924. package/docs/content/locales/fr-FR/deployment.mdx +8 -0
  925. package/docs/content/locales/fr-FR/external-agents.mdx +3 -7
  926. package/docs/content/locales/fr-FR/key-concepts.mdx +13 -20
  927. package/docs/content/locales/fr-FR/multi-tenancy.mdx +5 -5
  928. package/docs/content/locales/fr-FR/notifications.mdx +18 -10
  929. package/docs/content/locales/fr-FR/processors.mdx +11 -5
  930. package/docs/content/locales/fr-FR/server.mdx +17 -10
  931. package/docs/content/locales/fr-FR/sharing.mdx +10 -10
  932. package/docs/content/locales/fr-FR/skills-guide.mdx +34 -17
  933. package/docs/content/locales/fr-FR/template-assets.mdx +16 -13
  934. package/docs/content/locales/fr-FR/template-brain.mdx +3 -1
  935. package/docs/content/locales/fr-FR/template-clips.mdx +3 -3
  936. package/docs/content/locales/fr-FR/template-design.mdx +3 -1
  937. package/docs/content/locales/fr-FR/template-dispatch.mdx +5 -1
  938. package/docs/content/locales/fr-FR/template-mail.mdx +8 -0
  939. package/docs/content/locales/fr-FR/tracking.mdx +9 -6
  940. package/docs/content/locales/fr-FR/using-your-agent.mdx +0 -7
  941. package/docs/content/locales/fr-FR/voice-input.mdx +6 -0
  942. package/docs/content/locales/fr-FR/workspace-connections.mdx +9 -2
  943. package/docs/content/locales/fr-FR/workspace.mdx +19 -18
  944. package/docs/content/locales/hi-IN/actions.mdx +2 -2
  945. package/docs/content/locales/hi-IN/agent-native-toolkit.mdx +2 -2
  946. package/docs/content/locales/hi-IN/agent-surfaces.mdx +8 -10
  947. package/docs/content/locales/hi-IN/agent-teams.mdx +1 -0
  948. package/docs/content/locales/hi-IN/authentication.mdx +1 -1
  949. package/docs/content/locales/hi-IN/components.mdx +11 -1
  950. package/docs/content/locales/hi-IN/creating-templates.mdx +3 -7
  951. package/docs/content/locales/hi-IN/cross-app-sso.mdx +16 -6
  952. package/docs/content/locales/hi-IN/deployment.mdx +8 -0
  953. package/docs/content/locales/hi-IN/external-agents.mdx +2 -7
  954. package/docs/content/locales/hi-IN/key-concepts.mdx +13 -20
  955. package/docs/content/locales/hi-IN/multi-tenancy.mdx +5 -5
  956. package/docs/content/locales/hi-IN/notifications.mdx +18 -10
  957. package/docs/content/locales/hi-IN/processors.mdx +11 -5
  958. package/docs/content/locales/hi-IN/server.mdx +17 -10
  959. package/docs/content/locales/hi-IN/sharing.mdx +10 -10
  960. package/docs/content/locales/hi-IN/skills-guide.mdx +34 -17
  961. package/docs/content/locales/hi-IN/template-assets.mdx +16 -13
  962. package/docs/content/locales/hi-IN/template-brain.mdx +3 -1
  963. package/docs/content/locales/hi-IN/template-clips.mdx +3 -3
  964. package/docs/content/locales/hi-IN/template-design.mdx +3 -1
  965. package/docs/content/locales/hi-IN/template-dispatch.mdx +5 -1
  966. package/docs/content/locales/hi-IN/template-mail.mdx +8 -0
  967. package/docs/content/locales/hi-IN/tracking.mdx +9 -6
  968. package/docs/content/locales/hi-IN/using-your-agent.mdx +0 -7
  969. package/docs/content/locales/hi-IN/voice-input.mdx +6 -0
  970. package/docs/content/locales/hi-IN/workspace-connections.mdx +9 -2
  971. package/docs/content/locales/hi-IN/workspace.mdx +19 -18
  972. package/docs/content/locales/ja-JP/actions.mdx +2 -2
  973. package/docs/content/locales/ja-JP/agent-native-toolkit.mdx +2 -2
  974. package/docs/content/locales/ja-JP/agent-surfaces.mdx +8 -10
  975. package/docs/content/locales/ja-JP/agent-teams.mdx +1 -0
  976. package/docs/content/locales/ja-JP/authentication.mdx +1 -1
  977. package/docs/content/locales/ja-JP/components.mdx +11 -1
  978. package/docs/content/locales/ja-JP/creating-templates.mdx +3 -7
  979. package/docs/content/locales/ja-JP/cross-app-sso.mdx +16 -6
  980. package/docs/content/locales/ja-JP/deployment.mdx +8 -0
  981. package/docs/content/locales/ja-JP/external-agents.mdx +2 -7
  982. package/docs/content/locales/ja-JP/key-concepts.mdx +13 -20
  983. package/docs/content/locales/ja-JP/multi-tenancy.mdx +5 -5
  984. package/docs/content/locales/ja-JP/notifications.mdx +18 -10
  985. package/docs/content/locales/ja-JP/processors.mdx +11 -5
  986. package/docs/content/locales/ja-JP/server.mdx +17 -10
  987. package/docs/content/locales/ja-JP/sharing.mdx +10 -10
  988. package/docs/content/locales/ja-JP/skills-guide.mdx +34 -17
  989. package/docs/content/locales/ja-JP/template-assets.mdx +16 -13
  990. package/docs/content/locales/ja-JP/template-brain.mdx +3 -1
  991. package/docs/content/locales/ja-JP/template-clips.mdx +3 -4
  992. package/docs/content/locales/ja-JP/template-design.mdx +3 -1
  993. package/docs/content/locales/ja-JP/template-dispatch.mdx +5 -1
  994. package/docs/content/locales/ja-JP/template-mail.mdx +8 -0
  995. package/docs/content/locales/ja-JP/tracking.mdx +9 -6
  996. package/docs/content/locales/ja-JP/using-your-agent.mdx +0 -7
  997. package/docs/content/locales/ja-JP/voice-input.mdx +6 -0
  998. package/docs/content/locales/ja-JP/workspace-connections.mdx +9 -2
  999. package/docs/content/locales/ja-JP/workspace.mdx +19 -18
  1000. package/docs/content/locales/ko-KR/actions.mdx +2 -2
  1001. package/docs/content/locales/ko-KR/agent-native-toolkit.mdx +2 -2
  1002. package/docs/content/locales/ko-KR/agent-surfaces.mdx +8 -10
  1003. package/docs/content/locales/ko-KR/agent-teams.mdx +1 -0
  1004. package/docs/content/locales/ko-KR/authentication.mdx +1 -1
  1005. package/docs/content/locales/ko-KR/components.mdx +11 -1
  1006. package/docs/content/locales/ko-KR/creating-templates.mdx +3 -7
  1007. package/docs/content/locales/ko-KR/cross-app-sso.mdx +16 -6
  1008. package/docs/content/locales/ko-KR/deployment.mdx +8 -0
  1009. package/docs/content/locales/ko-KR/external-agents.mdx +2 -7
  1010. package/docs/content/locales/ko-KR/key-concepts.mdx +13 -20
  1011. package/docs/content/locales/ko-KR/multi-tenancy.mdx +5 -5
  1012. package/docs/content/locales/ko-KR/notifications.mdx +18 -10
  1013. package/docs/content/locales/ko-KR/processors.mdx +11 -5
  1014. package/docs/content/locales/ko-KR/server.mdx +17 -10
  1015. package/docs/content/locales/ko-KR/sharing.mdx +10 -10
  1016. package/docs/content/locales/ko-KR/skills-guide.mdx +34 -17
  1017. package/docs/content/locales/ko-KR/template-assets.mdx +16 -13
  1018. package/docs/content/locales/ko-KR/template-brain.mdx +3 -1
  1019. package/docs/content/locales/ko-KR/template-clips.mdx +3 -4
  1020. package/docs/content/locales/ko-KR/template-design.mdx +3 -1
  1021. package/docs/content/locales/ko-KR/template-dispatch.mdx +5 -1
  1022. package/docs/content/locales/ko-KR/template-mail.mdx +8 -0
  1023. package/docs/content/locales/ko-KR/tracking.mdx +9 -6
  1024. package/docs/content/locales/ko-KR/using-your-agent.mdx +0 -7
  1025. package/docs/content/locales/ko-KR/voice-input.mdx +6 -0
  1026. package/docs/content/locales/ko-KR/workspace-connections.mdx +9 -2
  1027. package/docs/content/locales/ko-KR/workspace.mdx +19 -18
  1028. package/docs/content/locales/pt-BR/actions.mdx +2 -2
  1029. package/docs/content/locales/pt-BR/agent-native-toolkit.mdx +2 -2
  1030. package/docs/content/locales/pt-BR/agent-surfaces.mdx +8 -10
  1031. package/docs/content/locales/pt-BR/agent-teams.mdx +1 -0
  1032. package/docs/content/locales/pt-BR/authentication.mdx +1 -1
  1033. package/docs/content/locales/pt-BR/components.mdx +11 -1
  1034. package/docs/content/locales/pt-BR/creating-templates.mdx +3 -7
  1035. package/docs/content/locales/pt-BR/cross-app-sso.mdx +16 -6
  1036. package/docs/content/locales/pt-BR/deployment.mdx +8 -0
  1037. package/docs/content/locales/pt-BR/external-agents.mdx +3 -7
  1038. package/docs/content/locales/pt-BR/key-concepts.mdx +13 -20
  1039. package/docs/content/locales/pt-BR/multi-tenancy.mdx +5 -5
  1040. package/docs/content/locales/pt-BR/notifications.mdx +18 -10
  1041. package/docs/content/locales/pt-BR/processors.mdx +11 -5
  1042. package/docs/content/locales/pt-BR/server.mdx +17 -10
  1043. package/docs/content/locales/pt-BR/sharing.mdx +10 -10
  1044. package/docs/content/locales/pt-BR/skills-guide.mdx +34 -17
  1045. package/docs/content/locales/pt-BR/template-assets.mdx +16 -13
  1046. package/docs/content/locales/pt-BR/template-brain.mdx +3 -1
  1047. package/docs/content/locales/pt-BR/template-clips.mdx +3 -3
  1048. package/docs/content/locales/pt-BR/template-design.mdx +3 -1
  1049. package/docs/content/locales/pt-BR/template-dispatch.mdx +5 -1
  1050. package/docs/content/locales/pt-BR/template-mail.mdx +8 -0
  1051. package/docs/content/locales/pt-BR/tracking.mdx +9 -6
  1052. package/docs/content/locales/pt-BR/using-your-agent.mdx +0 -7
  1053. package/docs/content/locales/pt-BR/voice-input.mdx +6 -0
  1054. package/docs/content/locales/pt-BR/workspace-connections.mdx +9 -2
  1055. package/docs/content/locales/pt-BR/workspace.mdx +19 -18
  1056. package/docs/content/locales/zh-CN/actions.mdx +2 -2
  1057. package/docs/content/locales/zh-CN/agent-native-toolkit.mdx +2 -2
  1058. package/docs/content/locales/zh-CN/agent-surfaces.mdx +8 -10
  1059. package/docs/content/locales/zh-CN/agent-teams.mdx +1 -0
  1060. package/docs/content/locales/zh-CN/authentication.mdx +1 -1
  1061. package/docs/content/locales/zh-CN/components.mdx +11 -1
  1062. package/docs/content/locales/zh-CN/creating-templates.mdx +3 -7
  1063. package/docs/content/locales/zh-CN/cross-app-sso.mdx +16 -6
  1064. package/docs/content/locales/zh-CN/deployment.mdx +8 -0
  1065. package/docs/content/locales/zh-CN/external-agents.mdx +2 -7
  1066. package/docs/content/locales/zh-CN/key-concepts.mdx +13 -20
  1067. package/docs/content/locales/zh-CN/multi-tenancy.mdx +5 -5
  1068. package/docs/content/locales/zh-CN/notifications.mdx +18 -10
  1069. package/docs/content/locales/zh-CN/processors.mdx +11 -5
  1070. package/docs/content/locales/zh-CN/server.mdx +16 -10
  1071. package/docs/content/locales/zh-CN/sharing.mdx +10 -10
  1072. package/docs/content/locales/zh-CN/skills-guide.mdx +34 -17
  1073. package/docs/content/locales/zh-CN/template-assets.mdx +16 -13
  1074. package/docs/content/locales/zh-CN/template-brain.mdx +3 -1
  1075. package/docs/content/locales/zh-CN/template-clips.mdx +3 -4
  1076. package/docs/content/locales/zh-CN/template-design.mdx +3 -1
  1077. package/docs/content/locales/zh-CN/template-dispatch.mdx +5 -1
  1078. package/docs/content/locales/zh-CN/template-mail.mdx +8 -0
  1079. package/docs/content/locales/zh-CN/tracking.mdx +9 -6
  1080. package/docs/content/locales/zh-CN/using-your-agent.mdx +0 -7
  1081. package/docs/content/locales/zh-CN/voice-input.mdx +6 -0
  1082. package/docs/content/locales/zh-CN/workspace-connections.mdx +9 -2
  1083. package/docs/content/locales/zh-CN/workspace.mdx +19 -18
  1084. package/docs/content/locales/zh-TW/actions.mdx +2 -2
  1085. package/docs/content/locales/zh-TW/agent-native-toolkit.mdx +2 -2
  1086. package/docs/content/locales/zh-TW/agent-surfaces.mdx +8 -10
  1087. package/docs/content/locales/zh-TW/agent-teams.mdx +1 -0
  1088. package/docs/content/locales/zh-TW/authentication.mdx +1 -1
  1089. package/docs/content/locales/zh-TW/components.mdx +11 -1
  1090. package/docs/content/locales/zh-TW/creating-templates.mdx +3 -7
  1091. package/docs/content/locales/zh-TW/cross-app-sso.mdx +16 -6
  1092. package/docs/content/locales/zh-TW/deployment.mdx +8 -0
  1093. package/docs/content/locales/zh-TW/external-agents.mdx +2 -7
  1094. package/docs/content/locales/zh-TW/key-concepts.mdx +13 -20
  1095. package/docs/content/locales/zh-TW/multi-tenancy.mdx +5 -5
  1096. package/docs/content/locales/zh-TW/notifications.mdx +18 -10
  1097. package/docs/content/locales/zh-TW/processors.mdx +11 -5
  1098. package/docs/content/locales/zh-TW/server.mdx +16 -10
  1099. package/docs/content/locales/zh-TW/sharing.mdx +10 -10
  1100. package/docs/content/locales/zh-TW/skills-guide.mdx +34 -17
  1101. package/docs/content/locales/zh-TW/template-assets.mdx +16 -13
  1102. package/docs/content/locales/zh-TW/template-brain.mdx +3 -1
  1103. package/docs/content/locales/zh-TW/template-clips.mdx +3 -4
  1104. package/docs/content/locales/zh-TW/template-design.mdx +3 -1
  1105. package/docs/content/locales/zh-TW/template-dispatch.mdx +5 -1
  1106. package/docs/content/locales/zh-TW/template-mail.mdx +8 -0
  1107. package/docs/content/locales/zh-TW/tracking.mdx +9 -6
  1108. package/docs/content/locales/zh-TW/using-your-agent.mdx +0 -7
  1109. package/docs/content/locales/zh-TW/voice-input.mdx +6 -0
  1110. package/docs/content/locales/zh-TW/workspace-connections.mdx +9 -2
  1111. package/docs/content/locales/zh-TW/workspace.mdx +19 -18
  1112. package/docs/content/mcp-apps.mdx +14 -32
  1113. package/docs/content/mcp-clients.mdx +48 -54
  1114. package/docs/content/mcp-protocol.mdx +25 -10
  1115. package/docs/content/messaging.mdx +19 -11
  1116. package/docs/content/multi-app-workspace.mdx +11 -96
  1117. package/docs/content/multi-tenancy.mdx +5 -5
  1118. package/docs/content/native-chat-ui.mdx +4 -4
  1119. package/docs/content/notifications.mdx +19 -12
  1120. package/docs/content/observability.mdx +2 -4
  1121. package/docs/content/observational-memory.mdx +7 -3
  1122. package/docs/content/onboarding.mdx +9 -2
  1123. package/docs/content/plan-plugin.mdx +10 -2
  1124. package/docs/content/pr-visual-recap.mdx +1 -1
  1125. package/docs/content/processors.mdx +11 -5
  1126. package/docs/content/pure-agent-apps.mdx +5 -1
  1127. package/docs/content/real-time-collaboration.mdx +30 -67
  1128. package/docs/content/recurring-jobs.mdx +8 -6
  1129. package/docs/content/routing.mdx +3 -4
  1130. package/docs/content/sandbox-adapters.mdx +30 -53
  1131. package/docs/content/security.mdx +8 -0
  1132. package/docs/content/server.mdx +17 -10
  1133. package/docs/content/sharing.mdx +10 -10
  1134. package/docs/content/skills-guide.mdx +35 -16
  1135. package/docs/content/template-analytics.mdx +11 -8
  1136. package/docs/content/template-assets.mdx +16 -13
  1137. package/docs/content/template-brain.mdx +3 -1
  1138. package/docs/content/template-calendar.mdx +12 -4
  1139. package/docs/content/template-chat.mdx +4 -4
  1140. package/docs/content/template-clips.mdx +3 -3
  1141. package/docs/content/template-content.mdx +23 -18
  1142. package/docs/content/template-design.mdx +3 -1
  1143. package/docs/content/template-dispatch.mdx +5 -1
  1144. package/docs/content/template-mail.mdx +14 -2
  1145. package/docs/content/template-plan.mdx +22 -15
  1146. package/docs/content/template-slides.mdx +11 -3
  1147. package/docs/content/toolkit-agent-ux.mdx +46 -3
  1148. package/docs/content/toolkit-collaboration.mdx +58 -4
  1149. package/docs/content/toolkit-command-navigation.mdx +8 -2
  1150. package/docs/content/toolkit-comments-review.mdx +10 -2
  1151. package/docs/content/toolkit-history.mdx +8 -3
  1152. package/docs/content/toolkit-observability.mdx +48 -2
  1153. package/docs/content/toolkit-org-team.mdx +8 -2
  1154. package/docs/content/toolkit-resources.mdx +45 -2
  1155. package/docs/content/toolkit-settings.mdx +8 -2
  1156. package/docs/content/toolkit-setup-connections.mdx +7 -2
  1157. package/docs/content/toolkit-sharing.mdx +46 -3
  1158. package/docs/content/toolkit-ui.mdx +82 -11
  1159. package/docs/content/tracking.mdx +10 -8
  1160. package/docs/content/using-your-agent.mdx +0 -12
  1161. package/docs/content/voice-input.mdx +7 -1
  1162. package/docs/content/what-is-agent-native.mdx +7 -8
  1163. package/docs/content/workspace-connections.mdx +16 -23
  1164. package/docs/content/workspace-management.mdx +16 -4
  1165. package/docs/content/workspace.mdx +19 -18
  1166. package/package.json +1 -1
  1167. package/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +39 -5
  1168. package/corpus/core/docs/content/locales/ar-SA/migration-workbench.mdx +0 -76
  1169. package/corpus/core/docs/content/locales/de-DE/migration-workbench.mdx +0 -76
  1170. package/corpus/core/docs/content/locales/es-ES/migration-workbench.mdx +0 -76
  1171. package/corpus/core/docs/content/locales/fr-FR/migration-workbench.mdx +0 -76
  1172. package/corpus/core/docs/content/locales/hi-IN/migration-workbench.mdx +0 -74
  1173. package/corpus/core/docs/content/locales/ja-JP/migration-workbench.mdx +0 -76
  1174. package/corpus/core/docs/content/locales/ko-KR/migration-workbench.mdx +0 -74
  1175. package/corpus/core/docs/content/locales/pt-BR/migration-workbench.mdx +0 -76
  1176. package/corpus/core/docs/content/locales/zh-CN/migration-workbench.mdx +0 -74
  1177. package/corpus/core/docs/content/locales/zh-TW/migration-workbench.mdx +0 -74
  1178. package/corpus/core/docs/content/migration-workbench.mdx +0 -74
  1179. package/corpus/core/docs/content/toolkit-app-adapters.mdx +0 -55
  1180. package/corpus/core/docs/content/toolkit-collaboration-ui.mdx +0 -60
  1181. package/corpus/core/docs/content/toolkit-sharing-ui.mdx +0 -45
  1182. package/corpus/core/docs/content/toolkit-shell-hooks.mdx +0 -36
  1183. package/docs/content/locales/ar-SA/migration-workbench.mdx +0 -76
  1184. package/docs/content/locales/de-DE/migration-workbench.mdx +0 -76
  1185. package/docs/content/locales/es-ES/migration-workbench.mdx +0 -76
  1186. package/docs/content/locales/fr-FR/migration-workbench.mdx +0 -76
  1187. package/docs/content/locales/hi-IN/migration-workbench.mdx +0 -74
  1188. package/docs/content/locales/ja-JP/migration-workbench.mdx +0 -76
  1189. package/docs/content/locales/ko-KR/migration-workbench.mdx +0 -74
  1190. package/docs/content/locales/pt-BR/migration-workbench.mdx +0 -76
  1191. package/docs/content/locales/zh-CN/migration-workbench.mdx +0 -74
  1192. package/docs/content/locales/zh-TW/migration-workbench.mdx +0 -74
  1193. package/docs/content/migration-workbench.mdx +0 -74
  1194. package/docs/content/toolkit-app-adapters.mdx +0 -55
  1195. package/docs/content/toolkit-collaboration-ui.mdx +0 -60
  1196. package/docs/content/toolkit-sharing-ui.mdx +0 -45
  1197. package/docs/content/toolkit-shell-hooks.mdx +0 -36
@@ -1,5 +1,11 @@
1
1
  import type { StoreWriteOptions } from "../settings/store.js";
2
2
  export declare function appStateGet(sessionId: string, key: string): Promise<Record<string, unknown> | null>;
3
+ /**
4
+ * Read several application-state keys for one session in a single SQL query.
5
+ * Missing keys are returned as `null` so callers can preserve the requested
6
+ * shape without issuing one fallback query per key.
7
+ */
8
+ export declare function appStateGetMany(sessionId: string, keys: readonly string[]): Promise<Record<string, Record<string, unknown> | null>>;
3
9
  export declare function appStatePut(sessionId: string, key: string, value: Record<string, unknown>, options?: StoreWriteOptions): Promise<void>;
4
10
  export declare function appStateDelete(sessionId: string, key: string, options?: StoreWriteOptions): Promise<boolean>;
5
11
  export declare function appStateList(sessionId: string, keyPrefix: string): Promise<Array<{
@@ -1 +1 @@
1
- {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/application-state/store.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAyF9D,wBAAsB,WAAW,CAC/B,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,CAgBzC;AAED,wBAAsB,WAAW,CAC/B,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,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,EAC9B,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAmBf;AAED,wBAAsB,cAAc,CAClC,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,OAAO,CAAC,CAUlB;AAED,wBAAsB,YAAY,CAChC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAAC,CAAC,CAWjE;AAED,wBAAsB,sBAAsB,CAC1C,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,MAAM,CAAC,CAsBjB"}
@@ -98,6 +98,37 @@ export async function appStateGet(sessionId, key) {
98
98
  throw err;
99
99
  }
100
100
  }
101
+ /**
102
+ * Read several application-state keys for one session in a single SQL query.
103
+ * Missing keys are returned as `null` so callers can preserve the requested
104
+ * shape without issuing one fallback query per key.
105
+ */
106
+ export async function appStateGetMany(sessionId, keys) {
107
+ const uniqueKeys = [...new Set(keys)];
108
+ const values = {};
109
+ for (const key of uniqueKeys)
110
+ values[key] = null;
111
+ if (uniqueKeys.length === 0)
112
+ return values;
113
+ try {
114
+ await ensureTable();
115
+ const client = getDbExec();
116
+ const placeholders = uniqueKeys.map(() => "?").join(", ");
117
+ const { rows } = await client.execute({
118
+ sql: `SELECT key, value FROM application_state WHERE session_id = ? AND key IN (${placeholders})`,
119
+ args: [sessionId, ...uniqueKeys],
120
+ });
121
+ for (const row of rows) {
122
+ values[row.key] = JSON.parse(row.value);
123
+ }
124
+ return values;
125
+ }
126
+ catch (err) {
127
+ if (isConnectionError(err))
128
+ return values;
129
+ throw err;
130
+ }
131
+ }
101
132
  export async function appStatePut(sessionId, key, value, options) {
102
133
  await ensureTable();
103
134
  const client = getDbExec();
@@ -1 +1 @@
1
- {"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/application-state/store.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,UAAU,EACV,OAAO,GACR,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEtE,IAAI,YAAuC,CAAC;AAC5C,MAAM,gCAAgC,GAAG,IAAI,GAAG,IAAI,CAAC;AAErD,6EAA6E;AAC7E,+EAA+E;AAC/E,6EAA6E;AAC7E,qEAAqE;AACrE,SAAS,UAAU,CAAC,CAAS;IAC3B,OAAO,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;AACrD,CAAC;AAED,KAAK,UAAU,WAAW;IACxB,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,YAAY,GAAG,CAAC,KAAK,IAAI,EAAE;YACzB,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;YAC3B,MAAM,SAAS,GAAG;;;;;uBAKD,OAAO,EAAE;;;OAGzB,CAAC;YAEF,IAAI,UAAU,EAAE,EAAE,CAAC;gBACjB,mEAAmE;gBACnE,kEAAkE;gBAClE,6DAA6D;gBAC7D,kEAAkE;gBAClE,uEAAuE;gBACvE,oEAAoE;gBACpE,uEAAuE;gBACvE,uEAAuE;gBACvE,wEAAwE;gBACxE,uEAAuE;gBACvE,8CAA8C;gBAC9C,MAAM,iBAAiB,CAAC,mBAAmB,EAAE,SAAS,CAAC,CAAC;gBACxD,0EAA0E;gBAC1E,0EAA0E;gBAC1E,mEAAmE;gBACnE,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IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IAEhC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QAClC,GAAG,EAAE,8EAA8E;QACnF,IAAI,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC;KAC/C,CAAC,CAAC;IAEH,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,kBAAkB,CAAC,GAAG,CAAC,GAAa,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,CAAC,CAAC;IAC3E,CAAC;IAED,OAAO,MAAM,CAAC,YAAY,CAAC;AAC7B,CAAC","sourcesContent":["import {\n getDbExec,\n isLocalDatabase,\n isConnectionError,\n isPostgres,\n intType,\n} from \"../db/client.js\";\nimport { ensureIndexExists, ensureTableExists } from \"../db/ddl-guard.js\";\nimport { widenIntColumnsToBigInt } from \"../db/widen-columns.js\";\nimport type { StoreWriteOptions } from \"../settings/store.js\";\nimport { emitAppStateChange, emitAppStateDelete } from \"./emitter.js\";\n\nlet _initPromise: Promise<void> | undefined;\nconst MAX_HOSTED_APP_STATE_VALUE_BYTES = 1024 * 1024;\n\n// Escapes LIKE wildcards (`%`, `_`) and the escape char itself so a caller's\n// literal prefix is matched verbatim. Used with `ESCAPE '!'` in prefix queries\n// below; without this, a prefix such as `user_settings` would treat `_` as a\n// single-char wildcard and over-match (e.g. delete `userXsettings`).\nfunction escapeLike(s: string): string {\n return s.replace(/[!%_]/g, (match) => `!${match}`);\n}\n\nasync function ensureTable(): Promise<void> {\n if (!_initPromise) {\n _initPromise = (async () => {\n const client = getDbExec();\n const createSql = `\n CREATE TABLE IF NOT EXISTS application_state (\n session_id TEXT NOT NULL,\n key TEXT NOT NULL,\n value TEXT NOT NULL,\n updated_at ${intType()} NOT NULL,\n PRIMARY KEY (session_id, key)\n )\n `;\n\n if (isPostgres()) {\n // Hot path: the `application_state` table and its poll indexes are\n // virtually always already present in production. Issuing `CREATE\n // TABLE`/ `CREATE INDEX` still takes a lock that, in a fresh\n // background-worker process behind a concurrent connection on the\n // shared Neon DB, can block ~indefinitely (ACCESS EXCLUSIVE for CREATE\n // TABLE; a write-blocking SHARE lock for CREATE INDEX). The ensure*\n // wrappers probe `information_schema`/`pg_indexes` first (plain reads,\n // no lock) and run DDL ONLY for what is actually missing, bounded by a\n // transaction-scoped `lock_timeout`. If a swallowed lock-timeout leaves\n // the schema still missing they RE-PROBE and THROW rather than letting\n // init memoize success against absent schema.\n await ensureTableExists(\"application_state\", createSql);\n // Older deployments created `updated_at` as 32-bit `INTEGER`; on Postgres\n // the `Date.now()` written by appStatePut() on every turn overflows int4.\n // Widen it in place (no-op once done / on fresh BIGINT databases).\n await widenIntColumnsToBigInt(\"application_state\", [\"updated_at\"]);\n // Indexes for the two hot poll paths. Probe pg_indexes first (no lock)\n // and skip the SHARE-locking CREATE INDEX when already present.\n await ensureIndexExists(\n \"app_state_updated_at_idx\",\n `CREATE INDEX IF NOT EXISTS app_state_updated_at_idx ON application_state (updated_at)`,\n );\n await ensureIndexExists(\n \"app_state_key_updated_idx\",\n `CREATE INDEX IF NOT EXISTS app_state_key_updated_idx ON application_state (key, updated_at)`,\n );\n return;\n }\n\n // SQLite (local dev): no lock problem — keep the original behaviour.\n await client.execute(createSql);\n // Older deployments created `updated_at` as 32-bit `INTEGER`; on Postgres\n // the `Date.now()` written by appStatePut() on every turn overflows int4.\n // Widen it in place (no-op once done / on fresh BIGINT databases).\n await widenIntColumnsToBigInt(\"application_state\", [\"updated_at\"]);\n // Indexes for the two hot poll paths:\n // - `SELECT … WHERE updated_at > ?` (watermark scan, every poll cycle)\n // - `SELECT … WHERE key = ? … ORDER BY updated_at ASC` (marker lookups)\n // Both are dialect-agnostic (no DESC/partial/PG-only syntax) so they\n // apply identically on SQLite and Postgres. IF NOT EXISTS makes them\n // idempotent across restarts on existing databases.\n for (const ddl of [\n `CREATE INDEX IF NOT EXISTS app_state_updated_at_idx ON application_state (updated_at)`,\n `CREATE INDEX IF NOT EXISTS app_state_key_updated_idx ON application_state (key, updated_at)`,\n ]) {\n try {\n await client.execute(ddl);\n } catch {\n // Index already exists or the dialect rejected a duplicate.\n }\n }\n })().catch((err) => {\n // Retry init on the next call after a failed startup.\n _initPromise = undefined;\n throw err;\n });\n }\n return _initPromise;\n}\n\nexport async function appStateGet(\n sessionId: string,\n key: string,\n): Promise<Record<string, unknown> | null> {\n try {\n await ensureTable();\n const client = getDbExec();\n const { rows } = await client.execute({\n sql: `SELECT value FROM application_state WHERE session_id = ? AND key = ?`,\n args: [sessionId, key],\n });\n if (rows.length === 0) return null;\n return JSON.parse(rows[0].value as string);\n } catch (err) {\n // Transient WS / connection drops (Neon serverless) — caller polls every\n // 2s and will see the value on the next tick. Swallow rather than 500.\n if (isConnectionError(err)) return null;\n throw err;\n }\n}\n\nexport async function appStatePut(\n sessionId: string,\n key: string,\n value: Record<string, unknown>,\n options?: StoreWriteOptions,\n): Promise<void> {\n await ensureTable();\n const client = getDbExec();\n const serialized = JSON.stringify(value);\n if (\n !isLocalDatabase() &&\n Buffer.byteLength(serialized, \"utf8\") > MAX_HOSTED_APP_STATE_VALUE_BYTES\n ) {\n throw new Error(\n `application_state value \"${key}\" is too large for hosted SQL storage. Store large files, base64, or blobs in file storage and write only a URL or handle.`,\n );\n }\n await client.execute({\n sql: isPostgres()\n ? `INSERT INTO application_state (session_id, key, value, updated_at) VALUES (?, ?, ?, ?) ON CONFLICT (session_id, key) DO UPDATE SET value=EXCLUDED.value, updated_at=EXCLUDED.updated_at`\n : `INSERT OR REPLACE INTO application_state (session_id, key, value, updated_at) VALUES (?, ?, ?, ?)`,\n args: [sessionId, key, serialized, Date.now()],\n });\n emitAppStateChange(key, options?.requestSource, sessionId);\n}\n\nexport async function appStateDelete(\n sessionId: string,\n key: string,\n options?: StoreWriteOptions,\n): Promise<boolean> {\n await ensureTable();\n const client = getDbExec();\n const result = await client.execute({\n sql: `DELETE FROM application_state WHERE session_id = ? AND key = ?`,\n args: [sessionId, key],\n });\n const deleted = result.rowsAffected > 0;\n if (deleted) emitAppStateDelete(key, options?.requestSource, sessionId);\n return deleted;\n}\n\nexport async function appStateList(\n sessionId: string,\n keyPrefix: string,\n): Promise<Array<{ key: string; value: Record<string, unknown> }>> {\n await ensureTable();\n const client = getDbExec();\n const { rows } = await client.execute({\n sql: `SELECT key, value FROM application_state WHERE session_id = ? AND key LIKE ? ESCAPE '!'`,\n args: [sessionId, escapeLike(keyPrefix) + \"%\"],\n });\n return rows.map((row) => ({\n key: row.key as string,\n value: JSON.parse(row.value as string),\n }));\n}\n\nexport async function appStateDeleteByPrefix(\n sessionId: string,\n keyPrefix: string,\n options?: StoreWriteOptions,\n): Promise<number> {\n await ensureTable();\n const client = getDbExec();\n\n // Get keys first so we can emit events\n const { rows } = await client.execute({\n sql: `SELECT key FROM application_state WHERE session_id = ? AND key LIKE ? ESCAPE '!'`,\n args: [sessionId, escapeLike(keyPrefix) + \"%\"],\n });\n\n if (rows.length === 0) return 0;\n\n const result = await client.execute({\n sql: `DELETE FROM application_state WHERE session_id = ? AND key LIKE ? ESCAPE '!'`,\n args: [sessionId, escapeLike(keyPrefix) + \"%\"],\n });\n\n for (const row of rows) {\n emitAppStateDelete(row.key as string, options?.requestSource, sessionId);\n }\n\n return result.rowsAffected;\n}\n"]}
1
+ {"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/application-state/store.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,UAAU,EACV,OAAO,GACR,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEtE,IAAI,YAAuC,CAAC;AAC5C,MAAM,gC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S,CAAC,GAAG,GAAG,CAAC;KAC/C,CAAC,CAAC;IACH,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACxB,GAAG,EAAE,GAAG,CAAC,GAAa;QACtB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAe,CAAC;KACvC,CAAC,CAAC,CAAC;AACN,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,SAAiB,EACjB,SAAiB,EACjB,OAA2B;IAE3B,MAAM,WAAW,EAAE,CAAC;IACpB,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,uCAAuC;IACvC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QACpC,GAAG,EAAE,kFAAkF;QACvF,IAAI,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC;KAC/C,CAAC,CAAC;IAEH,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IAEhC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QAClC,GAAG,EAAE,8EAA8E;QACnF,IAAI,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC;KAC/C,CAAC,CAAC;IAEH,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,kBAAkB,CAAC,GAAG,CAAC,GAAa,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,CAAC,CAAC;IAC3E,CAAC;IAED,OAAO,MAAM,CAAC,YAAY,CAAC;AAC7B,CAAC","sourcesContent":["import {\n getDbExec,\n isLocalDatabase,\n isConnectionError,\n isPostgres,\n intType,\n} from \"../db/client.js\";\nimport { ensureIndexExists, ensureTableExists } from \"../db/ddl-guard.js\";\nimport { widenIntColumnsToBigInt } from \"../db/widen-columns.js\";\nimport type { StoreWriteOptions } from \"../settings/store.js\";\nimport { emitAppStateChange, emitAppStateDelete } from \"./emitter.js\";\n\nlet _initPromise: Promise<void> | undefined;\nconst MAX_HOSTED_APP_STATE_VALUE_BYTES = 1024 * 1024;\n\n// Escapes LIKE wildcards (`%`, `_`) and the escape char itself so a caller's\n// literal prefix is matched verbatim. Used with `ESCAPE '!'` in prefix queries\n// below; without this, a prefix such as `user_settings` would treat `_` as a\n// single-char wildcard and over-match (e.g. delete `userXsettings`).\nfunction escapeLike(s: string): string {\n return s.replace(/[!%_]/g, (match) => `!${match}`);\n}\n\nasync function ensureTable(): Promise<void> {\n if (!_initPromise) {\n _initPromise = (async () => {\n const client = getDbExec();\n const createSql = `\n CREATE TABLE IF NOT EXISTS application_state (\n session_id TEXT NOT NULL,\n key TEXT NOT NULL,\n value TEXT NOT NULL,\n updated_at ${intType()} NOT NULL,\n PRIMARY KEY (session_id, key)\n )\n `;\n\n if (isPostgres()) {\n // Hot path: the `application_state` table and its poll indexes are\n // virtually always already present in production. Issuing `CREATE\n // TABLE`/ `CREATE INDEX` still takes a lock that, in a fresh\n // background-worker process behind a concurrent connection on the\n // shared Neon DB, can block ~indefinitely (ACCESS EXCLUSIVE for CREATE\n // TABLE; a write-blocking SHARE lock for CREATE INDEX). The ensure*\n // wrappers probe `information_schema`/`pg_indexes` first (plain reads,\n // no lock) and run DDL ONLY for what is actually missing, bounded by a\n // transaction-scoped `lock_timeout`. If a swallowed lock-timeout leaves\n // the schema still missing they RE-PROBE and THROW rather than letting\n // init memoize success against absent schema.\n await ensureTableExists(\"application_state\", createSql);\n // Older deployments created `updated_at` as 32-bit `INTEGER`; on Postgres\n // the `Date.now()` written by appStatePut() on every turn overflows int4.\n // Widen it in place (no-op once done / on fresh BIGINT databases).\n await widenIntColumnsToBigInt(\"application_state\", [\"updated_at\"]);\n // Indexes for the two hot poll paths. Probe pg_indexes first (no lock)\n // and skip the SHARE-locking CREATE INDEX when already present.\n await ensureIndexExists(\n \"app_state_updated_at_idx\",\n `CREATE INDEX IF NOT EXISTS app_state_updated_at_idx ON application_state (updated_at)`,\n );\n await ensureIndexExists(\n \"app_state_key_updated_idx\",\n `CREATE INDEX IF NOT EXISTS app_state_key_updated_idx ON application_state (key, updated_at)`,\n );\n return;\n }\n\n // SQLite (local dev): no lock problem — keep the original behaviour.\n await client.execute(createSql);\n // Older deployments created `updated_at` as 32-bit `INTEGER`; on Postgres\n // the `Date.now()` written by appStatePut() on every turn overflows int4.\n // Widen it in place (no-op once done / on fresh BIGINT databases).\n await widenIntColumnsToBigInt(\"application_state\", [\"updated_at\"]);\n // Indexes for the two hot poll paths:\n // - `SELECT … WHERE updated_at > ?` (watermark scan, every poll cycle)\n // - `SELECT … WHERE key = ? … ORDER BY updated_at ASC` (marker lookups)\n // Both are dialect-agnostic (no DESC/partial/PG-only syntax) so they\n // apply identically on SQLite and Postgres. IF NOT EXISTS makes them\n // idempotent across restarts on existing databases.\n for (const ddl of [\n `CREATE INDEX IF NOT EXISTS app_state_updated_at_idx ON application_state (updated_at)`,\n `CREATE INDEX IF NOT EXISTS app_state_key_updated_idx ON application_state (key, updated_at)`,\n ]) {\n try {\n await client.execute(ddl);\n } catch {\n // Index already exists or the dialect rejected a duplicate.\n }\n }\n })().catch((err) => {\n // Retry init on the next call after a failed startup.\n _initPromise = undefined;\n throw err;\n });\n }\n return _initPromise;\n}\n\nexport async function appStateGet(\n sessionId: string,\n key: string,\n): Promise<Record<string, unknown> | null> {\n try {\n await ensureTable();\n const client = getDbExec();\n const { rows } = await client.execute({\n sql: `SELECT value FROM application_state WHERE session_id = ? AND key = ?`,\n args: [sessionId, key],\n });\n if (rows.length === 0) return null;\n return JSON.parse(rows[0].value as string);\n } catch (err) {\n // Transient WS / connection drops (Neon serverless) — caller polls every\n // 2s and will see the value on the next tick. Swallow rather than 500.\n if (isConnectionError(err)) return null;\n throw err;\n }\n}\n\n/**\n * Read several application-state keys for one session in a single SQL query.\n * Missing keys are returned as `null` so callers can preserve the requested\n * shape without issuing one fallback query per key.\n */\nexport async function appStateGetMany(\n sessionId: string,\n keys: readonly string[],\n): Promise<Record<string, Record<string, unknown> | null>> {\n const uniqueKeys = [...new Set(keys)];\n const values: Record<string, Record<string, unknown> | null> = {};\n for (const key of uniqueKeys) values[key] = null;\n if (uniqueKeys.length === 0) return values;\n\n try {\n await ensureTable();\n const client = getDbExec();\n const placeholders = uniqueKeys.map(() => \"?\").join(\", \");\n const { rows } = await client.execute({\n sql: `SELECT key, value FROM application_state WHERE session_id = ? AND key IN (${placeholders})`,\n args: [sessionId, ...uniqueKeys],\n });\n for (const row of rows) {\n values[row.key as string] = JSON.parse(row.value as string);\n }\n return values;\n } catch (err) {\n if (isConnectionError(err)) return values;\n throw err;\n }\n}\n\nexport async function appStatePut(\n sessionId: string,\n key: string,\n value: Record<string, unknown>,\n options?: StoreWriteOptions,\n): Promise<void> {\n await ensureTable();\n const client = getDbExec();\n const serialized = JSON.stringify(value);\n if (\n !isLocalDatabase() &&\n Buffer.byteLength(serialized, \"utf8\") > MAX_HOSTED_APP_STATE_VALUE_BYTES\n ) {\n throw new Error(\n `application_state value \"${key}\" is too large for hosted SQL storage. Store large files, base64, or blobs in file storage and write only a URL or handle.`,\n );\n }\n await client.execute({\n sql: isPostgres()\n ? `INSERT INTO application_state (session_id, key, value, updated_at) VALUES (?, ?, ?, ?) ON CONFLICT (session_id, key) DO UPDATE SET value=EXCLUDED.value, updated_at=EXCLUDED.updated_at`\n : `INSERT OR REPLACE INTO application_state (session_id, key, value, updated_at) VALUES (?, ?, ?, ?)`,\n args: [sessionId, key, serialized, Date.now()],\n });\n emitAppStateChange(key, options?.requestSource, sessionId);\n}\n\nexport async function appStateDelete(\n sessionId: string,\n key: string,\n options?: StoreWriteOptions,\n): Promise<boolean> {\n await ensureTable();\n const client = getDbExec();\n const result = await client.execute({\n sql: `DELETE FROM application_state WHERE session_id = ? AND key = ?`,\n args: [sessionId, key],\n });\n const deleted = result.rowsAffected > 0;\n if (deleted) emitAppStateDelete(key, options?.requestSource, sessionId);\n return deleted;\n}\n\nexport async function appStateList(\n sessionId: string,\n keyPrefix: string,\n): Promise<Array<{ key: string; value: Record<string, unknown> }>> {\n await ensureTable();\n const client = getDbExec();\n const { rows } = await client.execute({\n sql: `SELECT key, value FROM application_state WHERE session_id = ? AND key LIKE ? ESCAPE '!'`,\n args: [sessionId, escapeLike(keyPrefix) + \"%\"],\n });\n return rows.map((row) => ({\n key: row.key as string,\n value: JSON.parse(row.value as string),\n }));\n}\n\nexport async function appStateDeleteByPrefix(\n sessionId: string,\n keyPrefix: string,\n options?: StoreWriteOptions,\n): Promise<number> {\n await ensureTable();\n const client = getDbExec();\n\n // Get keys first so we can emit events\n const { rows } = await client.execute({\n sql: `SELECT key FROM application_state WHERE session_id = ? AND key LIKE ? ESCAPE '!'`,\n args: [sessionId, escapeLike(keyPrefix) + \"%\"],\n });\n\n if (rows.length === 0) return 0;\n\n const result = await client.execute({\n sql: `DELETE FROM application_state WHERE session_id = ? AND key LIKE ? ESCAPE '!'`,\n args: [sessionId, escapeLike(keyPrefix) + \"%\"],\n });\n\n for (const row of rows) {\n emitAppStateDelete(row.key as string, options?.requestSource, sessionId);\n }\n\n return result.rowsAffected;\n}\n"]}
@@ -1,3 +1,4 @@
1
+ import type { RemoteComputerCapabilities } from "../integrations/remote-types.js";
1
2
  export interface RemoteCodeAgentDeviceConfig {
2
3
  token: string;
3
4
  relayUrl?: string;
@@ -11,7 +12,15 @@ export interface RunCodeAgentConnectorOptions {
11
12
  signal?: AbortSignal;
12
13
  once?: boolean;
13
14
  }
15
+ export interface LocalComputerBridgeConfig {
16
+ url: string;
17
+ token: string;
18
+ capabilities: RemoteComputerCapabilities;
19
+ }
14
20
  export declare function remoteDeviceConfigPath(): string;
15
21
  export declare function loadRemoteCodeAgentDeviceConfig(configPath?: string): RemoteCodeAgentDeviceConfig | null;
16
22
  export declare function runCodeAgentConnector(options?: RunCodeAgentConnectorOptions): Promise<number>;
23
+ export declare function loadLocalComputerBridgeConfig(env?: NodeJS.ProcessEnv): LocalComputerBridgeConfig | null;
24
+ export declare function callLocalComputerBridgeTool(config: LocalComputerBridgeConfig, toolName: "computer_operation" | "computer_revoke_control", args: Record<string, unknown>, fetchImpl?: typeof fetch): Promise<unknown>;
25
+ export declare function dispatchComputerOperationToLocalBridge(config: LocalComputerBridgeConfig | null, rawEnvelope: unknown, fetchImpl?: typeof fetch): Promise<Record<string, unknown>>;
17
26
  //# sourceMappingURL=code-agent-connector.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"code-agent-connector.d.ts","sourceRoot":"","sources":["../../src/cli/code-agent-connector.ts"],"names":[],"mappings":"AAwBA,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC,cAAc,CAAC;IAC/B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AA6BD,wBAAgB,sBAAsB,IAAI,MAAM,CAK/C;AAED,wBAAgB,+BAA+B,CAC7C,UAAU,SAA2B,GACpC,2BAA2B,GAAG,IAAI,CA0BpC;AAED,wBAAsB,qBAAqB,CACzC,OAAO,GAAE,4BAAiC,GACzC,OAAO,CAAC,MAAM,CAAC,CAmCjB"}
1
+ {"version":3,"file":"code-agent-connector.d.ts","sourceRoot":"","sources":["../../src/cli/code-agent-connector.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAEV,0BAA0B,EAC3B,MAAM,iCAAiC,CAAC;AAoBzC,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,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4
4
  import path from "node:path";
5
+ import { assertValidComputerCommandEnvelope } from "../integrations/computer-supervision.js";
6
+ import { serializeBoundedRemoteJson } from "../integrations/remote-json-safety.js";
5
7
  import { executeDenyCodeAgentApproval, executePendingCodeAgentApproval, } from "./code-agent-executor.js";
6
8
  import { appendCodeAgentTranscriptEvent, codeAgentRunTranscriptPath, codeAgentStoreRoot, createCodeAgentRunRecord, getCodeAgentRunRecord, listCodeAgentRunRecords, normalizeCodeAgentPermissionMode, queueCodeAgentFollowUp, updateCodeAgentRunRecord, } from "./code-agent-runs.js";
7
9
  const DEVICE_PATH_ENV = "AGENT_NATIVE_REMOTE_DEVICE_PATH";
10
+ const COMPUTER_BRIDGE_URL_ENV = "AGENT_NATIVE_COMPUTER_BRIDGE_URL";
11
+ const COMPUTER_BRIDGE_TOKEN_ENV = "AGENT_NATIVE_COMPUTER_BRIDGE_TOKEN";
12
+ const COMPUTER_CAPABILITIES_ENV = "AGENT_NATIVE_COMPUTER_CAPABILITIES";
8
13
  const DEFAULT_POLL_INTERVAL_MS = 2_000;
9
14
  const MAX_POLL_INTERVAL_MS = 30_000;
10
15
  const MAX_TRANSCRIPT_EVENTS_PER_BATCH = 50;
@@ -73,6 +78,7 @@ class RemoteCodeAgentConnector {
73
78
  transcriptCursors = new Map();
74
79
  remoteRunIds = new Set();
75
80
  stopped = false;
81
+ computerBridge = loadLocalComputerBridgeConfig();
76
82
  constructor(config, relayUrl, output) {
77
83
  this.config = config;
78
84
  this.relayUrl = relayUrl;
@@ -115,6 +121,9 @@ class RemoteCodeAgentConnector {
115
121
  }
116
122
  finally {
117
123
  options.signal?.removeEventListener("abort", onAbort);
124
+ if (this.computerBridge) {
125
+ await callLocalComputerBridgeTool(this.computerBridge, "computer_revoke_control", { reason: "connector-stopped" }).catch(() => undefined);
126
+ }
118
127
  }
119
128
  }
120
129
  async pollOnce() {
@@ -130,6 +139,7 @@ class RemoteCodeAgentConnector {
130
139
  "status",
131
140
  "run-events",
132
141
  ],
142
+ computerCapabilities: this.computerBridge?.capabilities ?? {},
133
143
  activeRunIds: Array.from(this.remoteRunIds),
134
144
  });
135
145
  const commands = normalizeCommands(response);
@@ -156,6 +166,8 @@ class RemoteCodeAgentConnector {
156
166
  return this.deny(command);
157
167
  case "stop":
158
168
  return this.stop(command);
169
+ case "computer-operation":
170
+ return this.computerOperation(command);
159
171
  case "status":
160
172
  return this.status(command);
161
173
  default:
@@ -165,6 +177,9 @@ class RemoteCodeAgentConnector {
165
177
  };
166
178
  }
167
179
  }
180
+ async computerOperation(command) {
181
+ return dispatchComputerOperationToLocalBridge(this.computerBridge, command.params.envelope);
182
+ }
168
183
  createRun(command) {
169
184
  const prompt = firstTextValue(command.params.prompt, command.params.message, command.params.input);
170
185
  if (!prompt) {
@@ -307,13 +322,40 @@ class RemoteCodeAgentConnector {
307
322
  const result = await executeDenyCodeAgentApproval(runId);
308
323
  return { ok: true, runId, run: result ?? getCodeAgentRunRecord(runId) };
309
324
  }
310
- stop(command) {
325
+ async stop(command) {
311
326
  const runId = firstStringValue(command.params.runId);
312
- if (!runId)
313
- return { ok: false, error: "Missing runId." };
327
+ const taskId = firstStringValue(command.params.taskId);
328
+ let revokeError;
329
+ if (this.computerBridge) {
330
+ try {
331
+ await callLocalComputerBridgeTool(this.computerBridge, "computer_revoke_control", { taskId, runId, reason: "remote-stop" });
332
+ }
333
+ catch (error) {
334
+ revokeError = error instanceof Error ? error.message : String(error);
335
+ }
336
+ }
337
+ else if (taskId || command.params.computer === true) {
338
+ revokeError = "Local authenticated computer bridge is unavailable.";
339
+ }
340
+ if (!runId) {
341
+ return taskId
342
+ ? {
343
+ ok: !revokeError,
344
+ taskId,
345
+ revoked: !revokeError,
346
+ error: revokeError,
347
+ }
348
+ : { ok: false, error: "Missing runId." };
349
+ }
314
350
  const run = getCodeAgentRunRecord(runId);
315
- if (!run)
316
- return { ok: false, error: `Run not found: ${runId}` };
351
+ if (!run) {
352
+ return {
353
+ ok: !revokeError && Boolean(this.computerBridge),
354
+ runId,
355
+ revoked: !revokeError && Boolean(this.computerBridge),
356
+ error: revokeError ?? `Run not found: ${runId}`,
357
+ };
358
+ }
317
359
  const active = activeRunners.get(runId);
318
360
  const pid = active?.child.pid ?? Number(run.metadata?.runnerPid);
319
361
  let killed = false;
@@ -359,7 +401,14 @@ class RemoteCodeAgentConnector {
359
401
  stopError: killError,
360
402
  },
361
403
  });
362
- return { ok: !killError, runId, run: updated, killed, error: killError };
404
+ return {
405
+ ok: !killError && !revokeError,
406
+ runId,
407
+ run: updated,
408
+ killed,
409
+ controlRevoked: !revokeError && Boolean(this.computerBridge),
410
+ error: revokeError ?? killError,
411
+ };
363
412
  }
364
413
  status(command) {
365
414
  const runId = firstStringValue(command.params.runId);
@@ -458,14 +507,26 @@ class RemoteCodeAgentConnector {
458
507
  }
459
508
  }
460
509
  async postCommandResult(command, result) {
510
+ let safeResult;
511
+ try {
512
+ safeResult = boundedConnectorResult(result);
513
+ }
514
+ catch (error) {
515
+ safeResult = {
516
+ ok: false,
517
+ error: error instanceof Error
518
+ ? `Connector result rejected: ${error.message}`
519
+ : "Connector result rejected as unsafe.",
520
+ };
521
+ }
461
522
  await this.postJson("/_agent-native/integrations/remote/result", {
462
523
  deviceId: this.config.deviceId,
463
524
  commandId: command.id,
464
525
  kind: command.kind,
465
- ok: result.ok !== false,
466
- status: result.ok === false ? "failed" : "completed",
467
- result,
468
- errorMessage: typeof result.error === "string" ? result.error : undefined,
526
+ ok: safeResult.ok !== false,
527
+ status: safeResult.ok === false ? "failed" : "completed",
528
+ result: safeResult,
529
+ errorMessage: typeof safeResult.error === "string" ? safeResult.error : undefined,
469
530
  });
470
531
  }
471
532
  async postJson(pathname, body) {
@@ -664,6 +725,147 @@ function normalizeRelayUrl(value) {
664
725
  return null;
665
726
  }
666
727
  }
728
+ export function loadLocalComputerBridgeConfig(env = process.env) {
729
+ const rawUrl = firstStringValue(env[COMPUTER_BRIDGE_URL_ENV]);
730
+ const token = firstStringValue(env[COMPUTER_BRIDGE_TOKEN_ENV]);
731
+ const rawCapabilities = firstStringValue(env[COMPUTER_CAPABILITIES_ENV]);
732
+ if (!rawUrl || !token || !rawCapabilities)
733
+ return null;
734
+ let url;
735
+ try {
736
+ url = new URL(rawUrl);
737
+ }
738
+ catch {
739
+ return null;
740
+ }
741
+ const host = url.hostname.toLowerCase();
742
+ if ((url.protocol !== "http:" && url.protocol !== "https:") ||
743
+ (host !== "localhost" && host !== "127.0.0.1" && host !== "[::1]")) {
744
+ return null;
745
+ }
746
+ try {
747
+ const value = JSON.parse(rawCapabilities);
748
+ const capabilities = normalizeComputerCapabilities(value);
749
+ if (!hasComputerCapability(capabilities))
750
+ return null;
751
+ return { url: url.toString(), token, capabilities };
752
+ }
753
+ catch {
754
+ return null;
755
+ }
756
+ }
757
+ export async function callLocalComputerBridgeTool(config, toolName, args, fetchImpl = fetch) {
758
+ const response = await fetchImpl(config.url, {
759
+ method: "POST",
760
+ headers: {
761
+ accept: "application/json, text/event-stream",
762
+ authorization: `Bearer ${config.token}`,
763
+ "content-type": "application/json",
764
+ },
765
+ body: JSON.stringify({
766
+ jsonrpc: "2.0",
767
+ id: `computer-bridge-${Date.now()}`,
768
+ method: "tools/call",
769
+ params: { name: toolName, arguments: args },
770
+ }),
771
+ signal: AbortSignal.timeout(30_000),
772
+ });
773
+ if (!response.ok) {
774
+ throw new Error(`Local computer bridge returned ${response.status}`);
775
+ }
776
+ const text = await response.text();
777
+ const payload = parseMcpResponse(text);
778
+ if (!isObject(payload)) {
779
+ throw new Error("Local computer bridge returned an invalid response");
780
+ }
781
+ if (payload.error) {
782
+ const error = isObject(payload.error) ? payload.error : {};
783
+ throw new Error(firstStringValue(error.message) ?? "Local computer bridge rejected call");
784
+ }
785
+ return boundedJsonValue(payload.result, "Local computer bridge result");
786
+ }
787
+ export async function dispatchComputerOperationToLocalBridge(config, rawEnvelope, fetchImpl = fetch) {
788
+ if (!config) {
789
+ throw new Error("Local authenticated computer bridge is unavailable.");
790
+ }
791
+ const envelope = await assertValidComputerCommandEnvelope(rawEnvelope);
792
+ const result = await callLocalComputerBridgeTool(config, "computer_operation", { envelope }, fetchImpl);
793
+ return boundedConnectorResult({
794
+ ok: true,
795
+ taskId: envelope.taskId,
796
+ runId: envelope.runId,
797
+ sequence: envelope.sequence,
798
+ idempotencyKey: envelope.idempotencyKey,
799
+ actionHash: envelope.approval.actionHash,
800
+ operationClass: envelope.operationClass,
801
+ bridgeResult: result,
802
+ });
803
+ }
804
+ function normalizeComputerCapabilities(value) {
805
+ if (!isObject(value))
806
+ return {};
807
+ const browser = isObject(value.browser) ? value.browser : null;
808
+ const desktop = isObject(value.desktop) ? value.desktop : null;
809
+ return {
810
+ ...(browser
811
+ ? {
812
+ browser: {
813
+ observe: browser.observe === true,
814
+ control: browser.control === true,
815
+ provider: firstStringValue(browser.provider) ?? null,
816
+ version: firstStringValue(browser.version) ?? null,
817
+ },
818
+ }
819
+ : {}),
820
+ ...(desktop
821
+ ? {
822
+ desktop: {
823
+ observe: desktop.observe === true,
824
+ control: desktop.control === true,
825
+ accessibility: desktop.accessibility === true,
826
+ screenCapture: desktop.screenCapture === true,
827
+ provider: firstStringValue(desktop.provider) ?? null,
828
+ version: firstStringValue(desktop.version) ?? null,
829
+ },
830
+ }
831
+ : {}),
832
+ };
833
+ }
834
+ function hasComputerCapability(capabilities) {
835
+ return Boolean(capabilities.browser?.observe ||
836
+ capabilities.browser?.control ||
837
+ capabilities.desktop?.observe ||
838
+ capabilities.desktop?.control);
839
+ }
840
+ function parseMcpResponse(text) {
841
+ const trimmed = text.trim();
842
+ if (!trimmed)
843
+ throw new Error("Local computer bridge returned no response");
844
+ if (!trimmed.startsWith("data:"))
845
+ return JSON.parse(trimmed);
846
+ const data = trimmed
847
+ .split(/\r?\n/)
848
+ .filter((line) => line.startsWith("data:"))
849
+ .map((line) => line.slice(5).trim())
850
+ .filter((line) => line && line !== "[DONE]")
851
+ .at(-1);
852
+ if (!data)
853
+ throw new Error("Local computer bridge returned no MCP result");
854
+ return JSON.parse(data);
855
+ }
856
+ function boundedJsonValue(value, label) {
857
+ return JSON.parse(serializeBoundedRemoteJson(value ?? null, {
858
+ label,
859
+ maxBytes: 128_000,
860
+ }));
861
+ }
862
+ function boundedConnectorResult(value) {
863
+ const parsed = boundedJsonValue(value, "Remote connector result");
864
+ if (!isObject(parsed)) {
865
+ throw new Error("Remote connector result must be an object");
866
+ }
867
+ return parsed;
868
+ }
667
869
  function firstStringValue(...values) {
668
870
  for (const value of values) {
669
871
  if (typeof value !== "string")