@agent-native/core 0.15.13 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (411) hide show
  1. package/README.md +37 -0
  2. package/dist/agent/app-model-defaults.d.ts +37 -0
  3. package/dist/agent/app-model-defaults.d.ts.map +1 -0
  4. package/dist/agent/app-model-defaults.js +136 -0
  5. package/dist/agent/app-model-defaults.js.map +1 -0
  6. package/dist/agent/engine/registry.d.ts +12 -7
  7. package/dist/agent/engine/registry.d.ts.map +1 -1
  8. package/dist/agent/engine/registry.js +28 -8
  9. package/dist/agent/engine/registry.js.map +1 -1
  10. package/dist/agent/production-agent.d.ts +2 -0
  11. package/dist/agent/production-agent.d.ts.map +1 -1
  12. package/dist/agent/production-agent.js +3 -1
  13. package/dist/agent/production-agent.js.map +1 -1
  14. package/dist/browser-sessions/actions.d.ts +7 -0
  15. package/dist/browser-sessions/actions.d.ts.map +1 -0
  16. package/dist/browser-sessions/actions.js +223 -0
  17. package/dist/browser-sessions/actions.js.map +1 -0
  18. package/dist/browser-sessions/routes.d.ts +7 -0
  19. package/dist/browser-sessions/routes.d.ts.map +1 -0
  20. package/dist/browser-sessions/routes.js +159 -0
  21. package/dist/browser-sessions/routes.js.map +1 -0
  22. package/dist/browser-sessions/store.d.ts +33 -0
  23. package/dist/browser-sessions/store.d.ts.map +1 -0
  24. package/dist/browser-sessions/store.js +506 -0
  25. package/dist/browser-sessions/store.js.map +1 -0
  26. package/dist/browser-sessions/types.d.ts +68 -0
  27. package/dist/browser-sessions/types.d.ts.map +1 -0
  28. package/dist/browser-sessions/types.js +2 -0
  29. package/dist/browser-sessions/types.js.map +1 -0
  30. package/dist/cli/code-agent-commands.d.ts +36 -0
  31. package/dist/cli/code-agent-commands.d.ts.map +1 -0
  32. package/dist/cli/code-agent-commands.js +192 -0
  33. package/dist/cli/code-agent-commands.js.map +1 -0
  34. package/dist/cli/code-agent-connector.d.ts +17 -0
  35. package/dist/cli/code-agent-connector.d.ts.map +1 -0
  36. package/dist/cli/code-agent-connector.js +724 -0
  37. package/dist/cli/code-agent-connector.js.map +1 -0
  38. package/dist/cli/code-agent-executor.d.ts +31 -0
  39. package/dist/cli/code-agent-executor.d.ts.map +1 -0
  40. package/dist/cli/code-agent-executor.js +921 -0
  41. package/dist/cli/code-agent-executor.js.map +1 -0
  42. package/dist/cli/code-agent-runs.d.ts +102 -0
  43. package/dist/cli/code-agent-runs.d.ts.map +1 -0
  44. package/dist/cli/code-agent-runs.js +277 -0
  45. package/dist/cli/code-agent-runs.js.map +1 -0
  46. package/dist/cli/code.d.ts +66 -0
  47. package/dist/cli/code.d.ts.map +1 -0
  48. package/dist/cli/code.js +1306 -0
  49. package/dist/cli/code.js.map +1 -0
  50. package/dist/cli/create.d.ts +2 -1
  51. package/dist/cli/create.d.ts.map +1 -1
  52. package/dist/cli/create.js +11 -1
  53. package/dist/cli/create.js.map +1 -1
  54. package/dist/cli/index.js +26 -1
  55. package/dist/cli/index.js.map +1 -1
  56. package/dist/cli/migrate.d.ts +27 -0
  57. package/dist/cli/migrate.d.ts.map +1 -1
  58. package/dist/cli/migrate.js +1328 -20
  59. package/dist/cli/migrate.js.map +1 -1
  60. package/dist/cli/templates-meta.d.ts.map +1 -1
  61. package/dist/cli/templates-meta.js +26 -2
  62. package/dist/cli/templates-meta.js.map +1 -1
  63. package/dist/cli/workspacify.d.ts +2 -0
  64. package/dist/cli/workspacify.d.ts.map +1 -1
  65. package/dist/cli/workspacify.js +2 -1
  66. package/dist/cli/workspacify.js.map +1 -1
  67. package/dist/client/AgentNative.d.ts +32 -0
  68. package/dist/client/AgentNative.d.ts.map +1 -0
  69. package/dist/client/AgentNative.js +79 -0
  70. package/dist/client/AgentNative.js.map +1 -0
  71. package/dist/client/AgentNativeEmbedded.d.ts +47 -0
  72. package/dist/client/AgentNativeEmbedded.d.ts.map +1 -0
  73. package/dist/client/AgentNativeEmbedded.js +148 -0
  74. package/dist/client/AgentNativeEmbedded.js.map +1 -0
  75. package/dist/client/AgentNativeFrame.d.ts +25 -0
  76. package/dist/client/AgentNativeFrame.d.ts.map +1 -0
  77. package/dist/client/AgentNativeFrame.js +68 -0
  78. package/dist/client/AgentNativeFrame.js.map +1 -0
  79. package/dist/client/AgentPanel.d.ts +19 -2
  80. package/dist/client/AgentPanel.d.ts.map +1 -1
  81. package/dist/client/AgentPanel.js +15 -4
  82. package/dist/client/AgentPanel.js.map +1 -1
  83. package/dist/client/AssistantChat.d.ts +1 -1
  84. package/dist/client/AssistantChat.d.ts.map +1 -1
  85. package/dist/client/AssistantChat.js +79 -48
  86. package/dist/client/AssistantChat.js.map +1 -1
  87. package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
  88. package/dist/client/MultiTabAssistantChat.js +2 -1
  89. package/dist/client/MultiTabAssistantChat.js.map +1 -1
  90. package/dist/client/NewWorkspaceAppFlow.d.ts.map +1 -1
  91. package/dist/client/NewWorkspaceAppFlow.js +3 -2
  92. package/dist/client/NewWorkspaceAppFlow.js.map +1 -1
  93. package/dist/client/browser-session-bridge.d.ts +44 -0
  94. package/dist/client/browser-session-bridge.d.ts.map +1 -0
  95. package/dist/client/browser-session-bridge.js +339 -0
  96. package/dist/client/browser-session-bridge.js.map +1 -0
  97. package/dist/client/client-action.d.ts +7 -0
  98. package/dist/client/client-action.d.ts.map +1 -0
  99. package/dist/client/client-action.js +4 -0
  100. package/dist/client/client-action.js.map +1 -0
  101. package/dist/client/components/ui/tooltip.d.ts.map +1 -1
  102. package/dist/client/components/ui/tooltip.js +1 -1
  103. package/dist/client/components/ui/tooltip.js.map +1 -1
  104. package/dist/client/composer/AgentComposerFrame.d.ts +17 -0
  105. package/dist/client/composer/AgentComposerFrame.d.ts.map +1 -0
  106. package/dist/client/composer/AgentComposerFrame.js +14 -0
  107. package/dist/client/composer/AgentComposerFrame.js.map +1 -0
  108. package/dist/client/composer/MentionPopover.d.ts.map +1 -1
  109. package/dist/client/composer/MentionPopover.js +2 -2
  110. package/dist/client/composer/MentionPopover.js.map +1 -1
  111. package/dist/client/composer/PromptComposer.d.ts +35 -2
  112. package/dist/client/composer/PromptComposer.d.ts.map +1 -1
  113. package/dist/client/composer/PromptComposer.js +31 -17
  114. package/dist/client/composer/PromptComposer.js.map +1 -1
  115. package/dist/client/composer/TiptapComposer.d.ts +20 -2
  116. package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
  117. package/dist/client/composer/TiptapComposer.js +112 -22
  118. package/dist/client/composer/TiptapComposer.js.map +1 -1
  119. package/dist/client/composer/index.d.ts +3 -2
  120. package/dist/client/composer/index.d.ts.map +1 -1
  121. package/dist/client/composer/index.js +1 -0
  122. package/dist/client/composer/index.js.map +1 -1
  123. package/dist/client/composer/types.d.ts +1 -0
  124. package/dist/client/composer/types.d.ts.map +1 -1
  125. package/dist/client/composer/types.js.map +1 -1
  126. package/dist/client/extensions/AgentNativeExtensionFrame.d.ts +58 -0
  127. package/dist/client/extensions/AgentNativeExtensionFrame.d.ts.map +1 -0
  128. package/dist/client/extensions/AgentNativeExtensionFrame.e2e-host.d.ts +2 -0
  129. package/dist/client/extensions/AgentNativeExtensionFrame.e2e-host.d.ts.map +1 -0
  130. package/dist/client/extensions/AgentNativeExtensionFrame.e2e-host.js +110 -0
  131. package/dist/client/extensions/AgentNativeExtensionFrame.e2e-host.js.map +1 -0
  132. package/dist/client/extensions/AgentNativeExtensionFrame.js +354 -0
  133. package/dist/client/extensions/AgentNativeExtensionFrame.js.map +1 -0
  134. package/dist/client/extensions/AgentNativeExtensionFrame.spec.d.ts +2 -0
  135. package/dist/client/extensions/AgentNativeExtensionFrame.spec.d.ts.map +1 -0
  136. package/dist/client/extensions/AgentNativeExtensionFrame.spec.js +68 -0
  137. package/dist/client/extensions/AgentNativeExtensionFrame.spec.js.map +1 -0
  138. package/dist/client/extensions/agent-native-extension-runtime.d.ts +69 -0
  139. package/dist/client/extensions/agent-native-extension-runtime.d.ts.map +1 -0
  140. package/dist/client/extensions/agent-native-extension-runtime.js +348 -0
  141. package/dist/client/extensions/agent-native-extension-runtime.js.map +1 -0
  142. package/dist/client/extensions/index.d.ts +2 -0
  143. package/dist/client/extensions/index.d.ts.map +1 -1
  144. package/dist/client/extensions/index.js +2 -0
  145. package/dist/client/extensions/index.js.map +1 -1
  146. package/dist/client/extensions/portable-extension.d.ts +86 -0
  147. package/dist/client/extensions/portable-extension.d.ts.map +1 -0
  148. package/dist/client/extensions/portable-extension.js +480 -0
  149. package/dist/client/extensions/portable-extension.js.map +1 -0
  150. package/dist/client/host-bridge.d.ts +266 -0
  151. package/dist/client/host-bridge.d.ts.map +1 -0
  152. package/dist/client/host-bridge.js +745 -0
  153. package/dist/client/host-bridge.js.map +1 -0
  154. package/dist/client/host-tools.d.ts +40 -0
  155. package/dist/client/host-tools.d.ts.map +1 -0
  156. package/dist/client/host-tools.js +94 -0
  157. package/dist/client/host-tools.js.map +1 -0
  158. package/dist/client/index.d.ts +13 -2
  159. package/dist/client/index.d.ts.map +1 -1
  160. package/dist/client/index.js +11 -2
  161. package/dist/client/index.js.map +1 -1
  162. package/dist/client/resources/BuiltinCapabilityDetail.d.ts +10 -0
  163. package/dist/client/resources/BuiltinCapabilityDetail.d.ts.map +1 -0
  164. package/dist/client/resources/BuiltinCapabilityDetail.js +51 -0
  165. package/dist/client/resources/BuiltinCapabilityDetail.js.map +1 -0
  166. package/dist/client/resources/ResourceEditor.d.ts +3 -1
  167. package/dist/client/resources/ResourceEditor.d.ts.map +1 -1
  168. package/dist/client/resources/ResourceEditor.js +40 -17
  169. package/dist/client/resources/ResourceEditor.js.map +1 -1
  170. package/dist/client/resources/ResourceTree.d.ts.map +1 -1
  171. package/dist/client/resources/ResourceTree.js +23 -2
  172. package/dist/client/resources/ResourceTree.js.map +1 -1
  173. package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
  174. package/dist/client/resources/ResourcesPanel.js +77 -17
  175. package/dist/client/resources/ResourcesPanel.js.map +1 -1
  176. package/dist/client/resources/index.d.ts +1 -0
  177. package/dist/client/resources/index.d.ts.map +1 -1
  178. package/dist/client/resources/index.js +1 -0
  179. package/dist/client/resources/index.js.map +1 -1
  180. package/dist/client/resources/use-builtin-capabilities.d.ts +62 -0
  181. package/dist/client/resources/use-builtin-capabilities.d.ts.map +1 -0
  182. package/dist/client/resources/use-builtin-capabilities.js +54 -0
  183. package/dist/client/resources/use-builtin-capabilities.js.map +1 -0
  184. package/dist/client/resources/use-resources.d.ts +30 -2
  185. package/dist/client/resources/use-resources.d.ts.map +1 -1
  186. package/dist/client/resources/use-resources.js +42 -1
  187. package/dist/client/resources/use-resources.js.map +1 -1
  188. package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
  189. package/dist/client/settings/SettingsPanel.js +151 -2
  190. package/dist/client/settings/SettingsPanel.js.map +1 -1
  191. package/dist/client/use-chat-models.d.ts.map +1 -1
  192. package/dist/client/use-chat-models.js +20 -0
  193. package/dist/client/use-chat-models.js.map +1 -1
  194. package/dist/client/use-chat-threads.d.ts.map +1 -1
  195. package/dist/client/use-chat-threads.js +46 -2
  196. package/dist/client/use-chat-threads.js.map +1 -1
  197. package/dist/client/use-chat-threads.spec.js +77 -0
  198. package/dist/client/use-chat-threads.spec.js.map +1 -1
  199. package/dist/code-agents/index.d.ts +4 -0
  200. package/dist/code-agents/index.d.ts.map +1 -0
  201. package/dist/code-agents/index.js +4 -0
  202. package/dist/code-agents/index.js.map +1 -0
  203. package/dist/connections/catalog.d.ts +134 -0
  204. package/dist/connections/catalog.d.ts.map +1 -0
  205. package/dist/connections/catalog.js +180 -0
  206. package/dist/connections/catalog.js.map +1 -0
  207. package/dist/connections/index.d.ts +2 -0
  208. package/dist/connections/index.d.ts.map +1 -0
  209. package/dist/connections/index.js +2 -0
  210. package/dist/connections/index.js.map +1 -0
  211. package/dist/extensions/change-marker.d.ts +10 -0
  212. package/dist/extensions/change-marker.d.ts.map +1 -0
  213. package/dist/extensions/change-marker.js +42 -0
  214. package/dist/extensions/change-marker.js.map +1 -0
  215. package/dist/extensions/routes.d.ts.map +1 -1
  216. package/dist/extensions/routes.js +1 -7
  217. package/dist/extensions/routes.js.map +1 -1
  218. package/dist/extensions/schema.d.ts +1 -0
  219. package/dist/extensions/schema.d.ts.map +1 -1
  220. package/dist/extensions/schema.js +1 -0
  221. package/dist/extensions/schema.js.map +1 -1
  222. package/dist/extensions/slots/routes.js +1 -1
  223. package/dist/extensions/slots/routes.js.map +1 -1
  224. package/dist/extensions/store.d.ts +3 -0
  225. package/dist/extensions/store.d.ts.map +1 -1
  226. package/dist/extensions/store.js +112 -4
  227. package/dist/extensions/store.js.map +1 -1
  228. package/dist/index.d.ts +4 -1
  229. package/dist/index.d.ts.map +1 -1
  230. package/dist/index.js +6 -1
  231. package/dist/index.js.map +1 -1
  232. package/dist/integrations/adapters/telegram.d.ts.map +1 -1
  233. package/dist/integrations/adapters/telegram.js +1 -0
  234. package/dist/integrations/adapters/telegram.js.map +1 -1
  235. package/dist/integrations/index.d.ts +5 -1
  236. package/dist/integrations/index.d.ts.map +1 -1
  237. package/dist/integrations/index.js +4 -1
  238. package/dist/integrations/index.js.map +1 -1
  239. package/dist/integrations/plugin.d.ts +8 -0
  240. package/dist/integrations/plugin.d.ts.map +1 -1
  241. package/dist/integrations/plugin.js +760 -32
  242. package/dist/integrations/plugin.js.map +1 -1
  243. package/dist/integrations/remote-commands-store.d.ts +36 -0
  244. package/dist/integrations/remote-commands-store.d.ts.map +1 -0
  245. package/dist/integrations/remote-commands-store.js +273 -0
  246. package/dist/integrations/remote-commands-store.js.map +1 -0
  247. package/dist/integrations/remote-devices-store.d.ts +43 -0
  248. package/dist/integrations/remote-devices-store.d.ts.map +1 -0
  249. package/dist/integrations/remote-devices-store.js +315 -0
  250. package/dist/integrations/remote-devices-store.js.map +1 -0
  251. package/dist/integrations/remote-push-store.d.ts +37 -0
  252. package/dist/integrations/remote-push-store.d.ts.map +1 -0
  253. package/dist/integrations/remote-push-store.js +299 -0
  254. package/dist/integrations/remote-push-store.js.map +1 -0
  255. package/dist/integrations/remote-retry-job.d.ts +7 -0
  256. package/dist/integrations/remote-retry-job.d.ts.map +1 -0
  257. package/dist/integrations/remote-retry-job.js +45 -0
  258. package/dist/integrations/remote-retry-job.js.map +1 -0
  259. package/dist/integrations/remote-run-events-store.d.ts +18 -0
  260. package/dist/integrations/remote-run-events-store.d.ts.map +1 -0
  261. package/dist/integrations/remote-run-events-store.js +82 -0
  262. package/dist/integrations/remote-run-events-store.js.map +1 -0
  263. package/dist/integrations/remote-types.d.ts +101 -0
  264. package/dist/integrations/remote-types.d.ts.map +1 -0
  265. package/dist/integrations/remote-types.js +2 -0
  266. package/dist/integrations/remote-types.js.map +1 -0
  267. package/dist/integrations/webhook-handler.d.ts +2 -0
  268. package/dist/integrations/webhook-handler.d.ts.map +1 -1
  269. package/dist/integrations/webhook-handler.js +4 -1
  270. package/dist/integrations/webhook-handler.js.map +1 -1
  271. package/dist/jobs/scheduler.d.ts +4 -2
  272. package/dist/jobs/scheduler.d.ts.map +1 -1
  273. package/dist/jobs/scheduler.js +9 -3
  274. package/dist/jobs/scheduler.js.map +1 -1
  275. package/dist/mcp-client/builtin-capabilities.d.ts +20 -0
  276. package/dist/mcp-client/builtin-capabilities.d.ts.map +1 -0
  277. package/dist/mcp-client/builtin-capabilities.js +75 -0
  278. package/dist/mcp-client/builtin-capabilities.js.map +1 -0
  279. package/dist/mcp-client/builtin-store.d.ts +10 -0
  280. package/dist/mcp-client/builtin-store.d.ts.map +1 -0
  281. package/dist/mcp-client/builtin-store.js +55 -0
  282. package/dist/mcp-client/builtin-store.js.map +1 -0
  283. package/dist/mcp-client/index.d.ts +3 -1
  284. package/dist/mcp-client/index.d.ts.map +1 -1
  285. package/dist/mcp-client/index.js +3 -1
  286. package/dist/mcp-client/index.js.map +1 -1
  287. package/dist/mcp-client/routes.d.ts +28 -0
  288. package/dist/mcp-client/routes.d.ts.map +1 -1
  289. package/dist/mcp-client/routes.js +195 -1
  290. package/dist/mcp-client/routes.js.map +1 -1
  291. package/dist/org/context.d.ts.map +1 -1
  292. package/dist/org/context.js +34 -0
  293. package/dist/org/context.js.map +1 -1
  294. package/dist/resources/handlers.d.ts +4 -0
  295. package/dist/resources/handlers.d.ts.map +1 -1
  296. package/dist/resources/handlers.js +46 -7
  297. package/dist/resources/handlers.js.map +1 -1
  298. package/dist/resources/script-helpers.d.ts +8 -1
  299. package/dist/resources/script-helpers.d.ts.map +1 -1
  300. package/dist/resources/script-helpers.js +18 -8
  301. package/dist/resources/script-helpers.js.map +1 -1
  302. package/dist/resources/store.d.ts +19 -0
  303. package/dist/resources/store.d.ts.map +1 -1
  304. package/dist/resources/store.js +86 -3
  305. package/dist/resources/store.js.map +1 -1
  306. package/dist/scripts/agent-engines/list-agent-engines.d.ts +1 -1
  307. package/dist/scripts/agent-engines/list-agent-engines.d.ts.map +1 -1
  308. package/dist/scripts/agent-engines/list-agent-engines.js +18 -7
  309. package/dist/scripts/agent-engines/list-agent-engines.js.map +1 -1
  310. package/dist/scripts/agent-engines/manage-agent-engine.d.ts.map +1 -1
  311. package/dist/scripts/agent-engines/manage-agent-engine.js +100 -7
  312. package/dist/scripts/agent-engines/manage-agent-engine.js.map +1 -1
  313. package/dist/scripts/resources/delete.d.ts.map +1 -1
  314. package/dist/scripts/resources/delete.js +4 -1
  315. package/dist/scripts/resources/delete.js.map +1 -1
  316. package/dist/scripts/resources/effective.d.ts +11 -0
  317. package/dist/scripts/resources/effective.d.ts.map +1 -0
  318. package/dist/scripts/resources/effective.js +54 -0
  319. package/dist/scripts/resources/effective.js.map +1 -0
  320. package/dist/scripts/resources/index.d.ts.map +1 -1
  321. package/dist/scripts/resources/index.js +1 -0
  322. package/dist/scripts/resources/index.js.map +1 -1
  323. package/dist/scripts/resources/list.d.ts +1 -1
  324. package/dist/scripts/resources/list.d.ts.map +1 -1
  325. package/dist/scripts/resources/list.js +17 -5
  326. package/dist/scripts/resources/list.js.map +1 -1
  327. package/dist/scripts/resources/read.d.ts +1 -1
  328. package/dist/scripts/resources/read.d.ts.map +1 -1
  329. package/dist/scripts/resources/read.js +20 -5
  330. package/dist/scripts/resources/read.js.map +1 -1
  331. package/dist/scripts/resources/write.d.ts.map +1 -1
  332. package/dist/scripts/resources/write.js +4 -1
  333. package/dist/scripts/resources/write.js.map +1 -1
  334. package/dist/scripts/runner.d.ts +11 -1
  335. package/dist/scripts/runner.d.ts.map +1 -1
  336. package/dist/scripts/runner.js +75 -27
  337. package/dist/scripts/runner.js.map +1 -1
  338. package/dist/server/action-discovery.d.ts.map +1 -1
  339. package/dist/server/action-discovery.js +5 -0
  340. package/dist/server/action-discovery.js.map +1 -1
  341. package/dist/server/agent-chat-plugin.d.ts +24 -0
  342. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  343. package/dist/server/agent-chat-plugin.js +608 -54
  344. package/dist/server/agent-chat-plugin.js.map +1 -1
  345. package/dist/server/core-routes-plugin.d.ts.map +1 -1
  346. package/dist/server/core-routes-plugin.js +2 -0
  347. package/dist/server/core-routes-plugin.js.map +1 -1
  348. package/dist/server/embedded.d.ts +72 -0
  349. package/dist/server/embedded.d.ts.map +1 -0
  350. package/dist/server/embedded.js +119 -0
  351. package/dist/server/embedded.js.map +1 -0
  352. package/dist/server/index.d.ts +8 -1
  353. package/dist/server/index.d.ts.map +1 -1
  354. package/dist/server/index.js +7 -1
  355. package/dist/server/index.js.map +1 -1
  356. package/dist/server/poll.d.ts.map +1 -1
  357. package/dist/server/poll.js +184 -13
  358. package/dist/server/poll.js.map +1 -1
  359. package/dist/server/resources-plugin.d.ts.map +1 -1
  360. package/dist/server/resources-plugin.js +11 -2
  361. package/dist/server/resources-plugin.js.map +1 -1
  362. package/dist/sharing/actions/extension-change.d.ts +4 -0
  363. package/dist/sharing/actions/extension-change.d.ts.map +1 -0
  364. package/dist/sharing/actions/extension-change.js +13 -0
  365. package/dist/sharing/actions/extension-change.js.map +1 -0
  366. package/dist/sharing/actions/set-resource-visibility.d.ts.map +1 -1
  367. package/dist/sharing/actions/set-resource-visibility.js +3 -0
  368. package/dist/sharing/actions/set-resource-visibility.js.map +1 -1
  369. package/dist/sharing/actions/share-resource.d.ts.map +1 -1
  370. package/dist/sharing/actions/share-resource.js +4 -0
  371. package/dist/sharing/actions/share-resource.js.map +1 -1
  372. package/dist/sharing/actions/unshare-resource.d.ts.map +1 -1
  373. package/dist/sharing/actions/unshare-resource.js +3 -0
  374. package/dist/sharing/actions/unshare-resource.js.map +1 -1
  375. package/dist/templates/default/AGENTS.md +3 -3
  376. package/dist/templates/workspace-core/AGENTS.md +7 -0
  377. package/dist/templates/workspace-root/AGENTS.md +7 -0
  378. package/dist/templates/workspace-root/README.md +25 -0
  379. package/dist/triggers/dispatcher.d.ts +3 -1
  380. package/dist/triggers/dispatcher.d.ts.map +1 -1
  381. package/dist/triggers/dispatcher.js +9 -3
  382. package/dist/triggers/dispatcher.js.map +1 -1
  383. package/dist/workspace-connections/index.d.ts +2 -0
  384. package/dist/workspace-connections/index.d.ts.map +1 -0
  385. package/dist/workspace-connections/index.js +2 -0
  386. package/dist/workspace-connections/index.js.map +1 -0
  387. package/dist/workspace-connections/store.d.ts +229 -0
  388. package/dist/workspace-connections/store.d.ts.map +1 -0
  389. package/dist/workspace-connections/store.js +938 -0
  390. package/dist/workspace-connections/store.js.map +1 -0
  391. package/docs/content/agent-teams.md +6 -0
  392. package/docs/content/cloneable-saas.md +1 -0
  393. package/docs/content/code-agents-ui.md +261 -0
  394. package/docs/content/dispatch.md +40 -3
  395. package/docs/content/embedding-sdk.md +459 -0
  396. package/docs/content/faq.md +1 -0
  397. package/docs/content/getting-started.md +1 -0
  398. package/docs/content/mcp-clients.md +41 -3
  399. package/docs/content/migration-workbench.md +237 -54
  400. package/docs/content/multi-app-workspace.md +41 -0
  401. package/docs/content/multi-tenancy.md +1 -1
  402. package/docs/content/template-brain.md +418 -0
  403. package/docs/content/template-dispatch.md +30 -0
  404. package/docs/content/workspace-connections.md +509 -0
  405. package/docs/content/workspace-management.md +12 -12
  406. package/docs/content/workspace.md +180 -40
  407. package/package.json +7 -2
  408. package/src/templates/default/AGENTS.md +3 -3
  409. package/src/templates/workspace-core/AGENTS.md +7 -0
  410. package/src/templates/workspace-root/AGENTS.md +7 -0
  411. package/src/templates/workspace-root/README.md +25 -0
@@ -0,0 +1,459 @@
1
+ ---
2
+ title: "Embedding SDK"
3
+ description: "Embed an Agent-Native sidecar into an existing SaaS app with page context and host commands."
4
+ ---
5
+
6
+ # Embedding SDK
7
+
8
+ The embedding SDK is for the CLAW-style shape: keep your existing SaaS app, add a durable agent sidecar, and let that agent see and operate on the page the user is already using.
9
+
10
+ Use it when you want an assistant that can:
11
+
12
+ - Read current page context: route, selected resource, highlighted text, active filters, user/org, and app-specific state.
13
+ - Call durable backend actions, MCP tools, or integration-backed tools from the sidecar app.
14
+ - Ask the host app to navigate, refresh data, remount a view, or open a resource after durable work completes.
15
+ - Run as an iframe/sidebar now, while leaving room for a no-iframe package or hosted template later.
16
+
17
+ ## Batteries-Included Embedded Mode
18
+
19
+ For most SaaS hosts, use the full embedded runtime. The host mounts Agent-Native server routes into its existing app, passes its logged-in user to Agent-Native, and then renders the React sidebar/surface in the product UI. Agent-Native uses the host deployment, host session, and the configured `DATABASE_URL` to manage its own framework tables: chat threads, settings, application state, extensions, extension data, secrets, browser sessions, and action routes.
20
+
21
+ On the server:
22
+
23
+ ```ts
24
+ // server/plugins/agent-native.ts
25
+ import { createAgentNativeEmbeddedPlugin } from "@agent-native/core/server";
26
+ import { builderActions } from "../agent-native/actions";
27
+ import { getBuilderSession } from "../auth";
28
+
29
+ export default createAgentNativeEmbeddedPlugin({
30
+ databaseUrl: process.env.DATABASE_URL,
31
+ auth: async (event) => {
32
+ const session = await getBuilderSession(event);
33
+ if (!session) return null;
34
+ return {
35
+ userId: session.user.id,
36
+ email: session.user.email,
37
+ name: session.user.name,
38
+ orgId: session.organization.id,
39
+ orgRole: session.organization.role,
40
+ };
41
+ },
42
+ actions: builderActions,
43
+ agentChat: {
44
+ appId: "builder",
45
+ systemPrompt:
46
+ "You are Builder's embedded agent. Use Builder actions for durable work.",
47
+ },
48
+ });
49
+ ```
50
+
51
+ On the client:
52
+
53
+ ```tsx
54
+ import {
55
+ AgentNativeEmbedded,
56
+ defineClientAction,
57
+ } from "@agent-native/core/client";
58
+
59
+ export function BuilderAppShell({ children, content, editor }) {
60
+ return (
61
+ <AgentNativeEmbedded
62
+ defaultOpen
63
+ session={{
64
+ id: browserTabId(),
65
+ label: "Builder editor",
66
+ }}
67
+ getContext={() => ({
68
+ route: {
69
+ name: "builder-editor",
70
+ pathname: window.location.pathname,
71
+ params: { contentId: content.id },
72
+ },
73
+ resource: {
74
+ type: "content",
75
+ id: content.id,
76
+ name: content.name,
77
+ },
78
+ user: currentUser(),
79
+ organization: currentOrganization(),
80
+ })}
81
+ actions={[
82
+ defineClientAction({
83
+ name: "select-element",
84
+ description: "Select an element in the visual editor",
85
+ schema: {
86
+ type: "object",
87
+ properties: { elementId: { type: "string" } },
88
+ required: ["elementId"],
89
+ },
90
+ run: ({ elementId }) => editor.select(elementId),
91
+ }),
92
+ ]}
93
+ onRefresh={() => queryClient.invalidateQueries()}
94
+ onNavigate={(payload) =>
95
+ router.navigate((payload as { path: string }).path)
96
+ }
97
+ onRemount={() => setAppKey((key) => key + 1)}
98
+ >
99
+ {children}
100
+ </AgentNativeEmbedded>
101
+ );
102
+ }
103
+ ```
104
+
105
+ This mode is the recommended default because it reuses the full framework: backend actions are mounted under `/_agent-native/actions`, the agent can call the same actions as the UI, user-created extensions are stored in SQL, `extensionData` is durable and user/org scoped, and browser-session tools let the backend agent inspect or operate the currently open tab.
106
+
107
+ Host auth is server-side. Do not pass identity from the browser as the source of truth; use the host's request/session object or a short-lived server-verified token. If the host does not expose emails, return a stable `userId` and Agent-Native will use it as the owner key.
108
+
109
+ ### Database Isolation
110
+
111
+ Embedded mode manages Agent-Native tables in SQL. For a mature SaaS product, the safest default is **same hosting and auth, dedicated Agent-Native database/schema**:
112
+
113
+ ```ts
114
+ export default createAgentNativeEmbeddedPlugin({
115
+ databaseUrl: process.env.AGENT_NATIVE_DATABASE_URL,
116
+ auth: getHostSession,
117
+ actions: hostActions,
118
+ });
119
+ ```
120
+
121
+ Using the host product's main `DATABASE_URL` is supported, but make that an explicit choice. Agent-Native creates framework tables such as `settings`, `application_state`, `tools`, `tool_data`, browser-session tables, secrets, chat threads, and related indexes. A dedicated DB/schema avoids table-name collisions, keeps ownership of managed tables clear, and makes backup/retention policy easier to reason about. If you intentionally share the host DB, review existing table names first and treat Agent-Native tables as framework-owned.
122
+
123
+ ## Host App
124
+
125
+ For standalone sidecar apps or cross-origin iframes, use the lower-level `<AgentNative />`. It renders the iframe sidecar and wires page context, live client actions, and host refresh/navigation commands in one place:
126
+
127
+ ```tsx
128
+ import { AgentNative, defineClientAction } from "@agent-native/core/client";
129
+
130
+ export function AssistantDock({ customer, sessionToken }) {
131
+ return (
132
+ <AgentNative
133
+ agentUrl="https://agent.example.com/workspaces/acme/sidecar"
134
+ className="h-full w-full"
135
+ session={{ id: browserTabId(), label: "Customer detail" }}
136
+ auth={() => ({ token: sessionToken })}
137
+ screen={{ includeVisibleText: true }}
138
+ getContext={() => ({
139
+ route: {
140
+ name: "customer-detail",
141
+ pathname: window.location.pathname,
142
+ params: { customerId: customer.id },
143
+ },
144
+ resource: {
145
+ type: "customer",
146
+ id: customer.id,
147
+ name: customer.name,
148
+ },
149
+ selection: {
150
+ ids: getSelectedRowIds(),
151
+ text: window.getSelection()?.toString() || undefined,
152
+ },
153
+ user: currentUser(),
154
+ organization: currentOrganization(),
155
+ })}
156
+ actions={[
157
+ defineClientAction<{ contentId: string }, { published: true }>({
158
+ name: "publish-content",
159
+ description: "Publish a Builder content entry",
160
+ schema: {
161
+ type: "object",
162
+ properties: { contentId: { type: "string" } },
163
+ required: ["contentId"],
164
+ },
165
+ destructive: true,
166
+ approval: { title: "Publish this entry?", risk: "medium" },
167
+ run: async ({ contentId }, { refresh }) => {
168
+ await builderApi.publish(contentId);
169
+ await refresh({ queryKey: ["content", contentId] });
170
+ return { published: true };
171
+ },
172
+ }),
173
+ defineClientAction<{ elementId: string }, void>({
174
+ name: "select-element",
175
+ description: "Select an element in the live visual editor",
176
+ schema: {
177
+ type: "object",
178
+ properties: { elementId: { type: "string" } },
179
+ required: ["elementId"],
180
+ },
181
+ run: ({ elementId }) => editor.select(elementId),
182
+ }),
183
+ ]}
184
+ onNavigate={(payload) => {
185
+ const { path } = payload as { path: string };
186
+ router.navigate(path);
187
+ }}
188
+ onRefresh={(payload) => {
189
+ const { queryKey } = payload as { queryKey?: readonly unknown[] };
190
+ queryClient.invalidateQueries({ queryKey });
191
+ }}
192
+ onRemount={() => setAppKey((key) => key + 1)}
193
+ onOpenResource={(payload) => openResource(payload)}
194
+ onRequestApproval={(payload) => approvalDialog.confirm(payload)}
195
+ />
196
+ );
197
+ }
198
+ ```
199
+
200
+ Use `screen={false}` if you only want explicit semantic context. Use `screen={{ includeDomHtml: true }}` as a fallback for apps that have not yet mapped their UI into semantic IDs and selection state. The host bridge only accepts messages from `agentUrl`'s origin by default. Pass `agentOrigin` if the iframe URL is a routed/proxied URL whose trusted origin differs.
201
+
202
+ For non-React hosts, call `createAgentNativeHostBridge()` directly and pass the same `getContext`, `actions`, and `commands` options.
203
+
204
+ ## Iframe Side
205
+
206
+ Inside the Agent-Native sidecar, use the frame helpers to request host context, discover live browser-session actions, run them, or ask the host to do UI work. Always pass the expected `hostOrigin` in production:
207
+
208
+ ```ts
209
+ import {
210
+ announceAgentNativeFrameReady,
211
+ createAgentNativeHostTools,
212
+ requestAgentNativeHostActions,
213
+ requestAgentNativeHostContext,
214
+ runAgentNativeHostAction,
215
+ sendAgentNativeHostCommand,
216
+ } from "@agent-native/core/client";
217
+
218
+ announceAgentNativeFrameReady({ hostOrigin: "https://app.example.com" });
219
+
220
+ const context = await requestAgentNativeHostContext({
221
+ hostOrigin: "https://app.example.com",
222
+ });
223
+
224
+ const liveActions = await requestAgentNativeHostActions({
225
+ hostOrigin: "https://app.example.com",
226
+ });
227
+
228
+ await runAgentNativeHostAction(
229
+ "select-element",
230
+ { elementId: context.selection?.ids?.[0] },
231
+ { hostOrigin: "https://app.example.com" },
232
+ );
233
+
234
+ await sendAgentNativeHostCommand(
235
+ "refreshData",
236
+ { queryKey: ["customer", context.resource?.id] },
237
+ { hostOrigin: "https://app.example.com" },
238
+ );
239
+
240
+ const hostTools = createAgentNativeHostTools({
241
+ hostOrigin: "https://app.example.com",
242
+ });
243
+ ```
244
+
245
+ ## Server-Mediated Tool Bridge
246
+
247
+ For a CLAW-style coworker, the iframe can also register its live browser tab with the sidecar backend. The agent then gets normal backend tools that enqueue a request, the iframe claims it, the host page executes it, and the backend returns the result to the agent.
248
+
249
+ In the sidecar app, start the browser-session bridge once when the iframe mounts:
250
+
251
+ ```tsx
252
+ import { useEffect } from "react";
253
+ import { startAgentNativeBrowserSessionBridge } from "@agent-native/core/client";
254
+
255
+ export function SidecarRuntime() {
256
+ useEffect(() => {
257
+ const bridge = startAgentNativeBrowserSessionBridge({
258
+ hostOrigin: "https://app.example.com",
259
+ label: "Builder editor",
260
+ });
261
+ return () => bridge.stop();
262
+ }, []);
263
+
264
+ return null;
265
+ }
266
+ ```
267
+
268
+ The framework mounts `/_agent-native/browser-sessions` automatically. Once the bridge is running, the sidecar agent can use:
269
+
270
+ | Tool | Purpose |
271
+ | ------------------------------ | --------------------------------------------------------------- |
272
+ | `list-browser-sessions` | See connected host tabs for the current user. |
273
+ | `view-browser-session` | Ask a live tab for current page context and screen snapshot. |
274
+ | `list-browser-session-actions` | Ask a live tab for current client-side action manifests. |
275
+ | `run-browser-session-action` | Run one current client action through the live tab. |
276
+ | `send-browser-session-command` | Ask the host to refresh, navigate, remount, reload, or approve. |
277
+
278
+ This is the bridge to use when the agent is running on the backend, in Slack/Telegram/email, or as an A2A callee but still needs to touch the user's current browser tab when it is open. If the browser is closed, backend actions should still handle durable work and the browser-session tools will report that no active tab is connected.
279
+
280
+ ## Actions
281
+
282
+ There are two action classes:
283
+
284
+ | Action kind | Where it runs | Works when browser is closed? | Best for |
285
+ | -------------- | ----------------------------------------------------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------- |
286
+ | Backend action | Sidecar app, backend API, MCP, or integration adapter | Yes | Durable work like create, update, publish, sync, send, import. |
287
+ | Client action | Current browser tab through `<AgentNative actions={...} />` | No | Ephemeral UI work like select an element, read editor state, scroll to a row, copy current canvas state. |
288
+
289
+ Backend actions should be the default for anything that must survive refreshes, closed browsers, retries, or integration-triggered runs. They belong in the sidecar app's normal Agent-Native action/tool layer, where the agent can call them from chat, automations, Slack/Telegram/email integrations, and background jobs.
290
+
291
+ Client actions are a live bridge to one browser tab. The host advertises them with `source: "client"` and `availability: "browser-session"`, and the sidecar should treat that manifest as temporary. Re-list actions when route or selection changes, and fall back to backend actions when the tab disappears.
292
+
293
+ ## Portable Extensions
294
+
295
+ The SDK also supports user-defined extensions: sandboxed Alpine.js mini-apps that a host SaaS can render in named slots. Use this when the customer wants to build their own small panels, calculators, dashboards, or workflow helpers against the same action/context surface that the agent uses.
296
+
297
+ ```tsx
298
+ import {
299
+ AgentNativeExtensionSlot,
300
+ createHttpAgentNativeExtensionStorage,
301
+ defineClientAction,
302
+ } from "@agent-native/core/client";
303
+
304
+ const storage = createHttpAgentNativeExtensionStorage({
305
+ endpoint: "/api/agent-native/extensions/storage",
306
+ headers: () => ({ Authorization: `Bearer ${sessionToken()}` }),
307
+ });
308
+
309
+ const actions = [
310
+ defineClientAction({
311
+ name: "list-at-risk-customers",
312
+ description: "List customers currently at risk",
313
+ schema: { type: "object", properties: {} },
314
+ run: () => crmApi.customers.list({ status: "at-risk" }),
315
+ }),
316
+ ];
317
+
318
+ const customerHealthExtension = {
319
+ id: "customer-health",
320
+ name: "Customer health",
321
+ description: "Shows at-risk customers and quick notes.",
322
+ manifest: {
323
+ slots: ["crm.customer.sidebar"],
324
+ requestedActions: ["list-at-risk-customers"],
325
+ requestedCommands: ["openResource", "refreshData"],
326
+ storageScopes: ["user", "org"],
327
+ },
328
+ content: `
329
+ <div x-data="{
330
+ customers: [],
331
+ note: '',
332
+ async init() {
333
+ this.customers = await appAction('list-at-risk-customers', {})
334
+ const row = await extensionData.get('notes', slotContext.customerId, { scope: 'user' })
335
+ this.note = row?.data?.text || ''
336
+ },
337
+ async save() {
338
+ await extensionData.set('notes', slotContext.customerId, { text: this.note }, { scope: 'user' })
339
+ await agentNative.refresh({ customerId: slotContext.customerId })
340
+ }
341
+ }" x-init="init()" class="space-y-3">
342
+ <textarea class="w-full rounded-md border bg-background p-2" x-model="note"></textarea>
343
+ <button class="rounded-md bg-primary px-3 py-2 text-primary-foreground" @click="save()">Save</button>
344
+ </div>
345
+ `,
346
+ };
347
+
348
+ export function CustomerSidebar({ customer, userExtensions }) {
349
+ return (
350
+ <AgentNativeExtensionSlot
351
+ id="crm.customer.sidebar"
352
+ extensions={[customerHealthExtension, ...userExtensions]}
353
+ context={{ customerId: customer.id, plan: customer.plan }}
354
+ actions={actions}
355
+ storage={storage}
356
+ storageContext={{
357
+ userId: currentUser().id,
358
+ organizationId: currentOrganization().id,
359
+ }}
360
+ getContext={() => ({
361
+ resource: { type: "customer", id: customer.id, name: customer.name },
362
+ })}
363
+ commands={{
364
+ refreshData: async () => queryClient.invalidateQueries(),
365
+ }}
366
+ />
367
+ );
368
+ }
369
+ ```
370
+
371
+ The manifest is the install contract. When `requestedActions`, `requestedCommands`, or `storageScopes` are present, the SDK enforces them in the host before an iframe request reaches the action bridge or storage adapter. When `slots` is present, `AgentNativeExtensionSlot` only renders the extension in matching slots. Hosts can still override policy per slot with `allowedActions`, `allowedCommands`, and `allowedStorageScopes`.
372
+
373
+ An extension is plain HTML. The iframe runtime provides the same safe bridge primitives to the mini-app:
374
+
375
+ ```html
376
+ <div
377
+ x-data="{ customers: [], async init() { this.customers = await appAction('list-at-risk-customers', {}) } }"
378
+ x-init="init()"
379
+ >
380
+ <template x-for="customer in customers" :key="customer.id">
381
+ <button
382
+ class="block w-full rounded-md px-3 py-2 text-left hover:bg-muted"
383
+ x-text="customer.name"
384
+ @click="agentNative.command('openResource', { type: 'customer', id: customer.id })"
385
+ ></button>
386
+ </template>
387
+ </div>
388
+ ```
389
+
390
+ Available globals inside the iframe:
391
+
392
+ | Helper | Purpose |
393
+ | ------------------------------ | ------------------------------------------------------ |
394
+ | `appAction(name, args)` | Run a host-declared action. |
395
+ | `agentNative.context()` | Read current host page, resource, slot, and user data. |
396
+ | `agentNative.command(name, p)` | Ask the host to navigate, refresh, remount, or open. |
397
+ | `agentNative.refresh(payload)` | Shortcut for `refreshData`. |
398
+ | `extensionData.*` | Persist extension-local data through the host adapter. |
399
+
400
+ By default, `extensionData` uses browser `localStorage`, which is useful for prototypes and local widgets. Production SaaS hosts should pass a backend-backed `storage` adapter so user and org scoped extension data is durable, auditable, and governed by the app's permissions. The generic HTTP adapter sends POST bodies like `{ operation, extensionId, slotId, collection, id, data, options, context }` and expects either `{ result }` or the result JSON directly.
401
+
402
+ This portable SDK layer is separate from the framework's built-in SQL-backed extension store. In an Agent-Native app, use the existing `ExtensionSlot`/`EmbeddedExtension` components and the `create-extension` action. In a hosted SaaS embedding scenario, prefer `createAgentNativeEmbeddedPlugin()` plus `AgentNativeEmbedded` when you want Agent-Native to manage extension definitions, approval, storage, and agent-created extensions out of the box. Use `AgentNativeExtensionSlot` only when the SaaS already owns extension definitions, approval, marketplace, storage, and billing.
403
+
404
+ Security model:
405
+
406
+ - Extension iframes are sandboxed without `allow-same-origin`; the mini-app cannot read the parent DOM, cookies, or app runtime directly.
407
+ - Extensions can only call the actions and commands allowed by the host and extension manifest.
408
+ - Risky actions should set `destructive` or `requiresApproval` so the host can show an approval flow.
409
+ - Treat user-authored extension HTML as untrusted. Review marketplace installs, log action usage, and scope backend storage by user/org.
410
+
411
+ ## Sessions And Tabs
412
+
413
+ The host bridge is scoped to one iframe/host-window pair. If the same user opens multiple tabs, each tab has its own `session`, context, selection, client actions, and pending command responses. Do not assume a client action discovered in one tab can run in another tab, or that it will still exist after navigation.
414
+
415
+ For multi-tab products, keep durable state in SQL/backend actions and use client actions only for the tab-local parts: focusing a row, copying visible editor state, selecting a canvas element, or refreshing the current React Query cache. Include enough `route`, `resource`, and `selection` context for the sidecar to decide whether the current tab is the right place to run a browser-session action.
416
+
417
+ ## Command Model
418
+
419
+ Built-in command names are deliberately app-shaped, not database-shaped:
420
+
421
+ | Command | Purpose |
422
+ | -------------------------------------- | ---------------------------------------------------------------------- |
423
+ | `navigate` | Move the host UI to a path/view/resource. |
424
+ | `refreshData` / `refresh-data` | Ask the host to invalidate client-side data. |
425
+ | `remountView` / `remount-view` | Ask the host to remount a subtree, e.g. `<App key={key} />`. |
426
+ | `hardReload` / `hard-reload` | Full browser reload. |
427
+ | `openResource` / `open-resource` | Open a specific domain object in the host UI. |
428
+ | `requestApproval` / `request-approval` | Ask the host to show a confirmation flow. Register a handler for this. |
429
+
430
+ If no handler is provided, safe defaults dispatch browser events like `agentNative:refresh-data` and `agentNative:remount-view`. `requestApproval` has no default handler; register one before relying on it.
431
+
432
+ ## Approval Guidance
433
+
434
+ Mark risky client actions with `destructive: true` in their manifest and require host approval before running operations that delete, publish, send, charge, invite, share, or otherwise affect users outside the current view. Backend actions should enforce their own authorization and approval checks too; host approval is useful UX, not the security boundary.
435
+
436
+ Prefer this shape:
437
+
438
+ - Durable mutation runs in a backend action with validation, auth, audit logging, and retries.
439
+ - Host command opens an approval UI or focuses the affected resource.
440
+ - Client action handles only the live UI step that cannot happen on the backend.
441
+
442
+ ## Runtime Integration
443
+
444
+ Use `createAgentNativeHostTools()` inside the sidecar iframe when your agent runtime accepts plain tool descriptors. It returns four framework-agnostic tools:
445
+
446
+ | Tool | Purpose |
447
+ | ------------------- | ------------------------------------------------------------------- |
448
+ | `view-host-screen` | Read semantic host context and screen snapshot. |
449
+ | `list-host-actions` | List live browser-session actions exposed by the current tab. |
450
+ | `run-host-action` | Run one live client action by name. |
451
+ | `send-host-command` | Send host commands such as refresh, navigate, remount, or approval. |
452
+
453
+ The helper intentionally returns plain `{ name, description, parameters, execute }` objects so sidecars can adapt them to the AI SDK, Anthropic, OpenAI function calling, or Agent-Native `ActionEntry` shape without coupling this SDK to one runtime.
454
+
455
+ ## Recommended Product Shape
456
+
457
+ Start iframe-first. It works for Builder.io, customer SaaS apps, and internal admin tools without coupling release cycles or CSS/runtime assumptions.
458
+
459
+ The sidecar itself should still be an Agent-Native app/template: actions are the backend API surface, SQL-backed app state is the agent's memory, and integrations such as Slack or Telegram can route into the same durable chat. The embedding SDK supplies the live membrane between that sidecar and the current host page.
@@ -62,6 +62,7 @@ The framework ships with production-ready templates you can use as daily drivers
62
62
 
63
63
  - **[Calendar](/templates/calendar)** — Google Calendar + Calendly-style booking links
64
64
  - **[Content](/templates/content)** — Notion-style documents
65
+ - **[Brain](/templates/brain)** — full-page company chat, cited memory, sources, and review queue
65
66
  - **[Slides](/templates/slides)** — presentation builder
66
67
  - **[Analytics](/templates/analytics)** — data platform (like Amplitude/Mixpanel)
67
68
  - **[Mail](/templates/mail)** — full-featured email client (like Superhuman)
@@ -95,6 +95,7 @@ Each template is a complete app with UI, agent actions, database schema, and AI
95
95
  | ----------------------------------- | ------------------------------------------------ |
96
96
  | [Calendar](/templates/calendar) | Google Calendar, Calendly |
97
97
  | [Content](/templates/content) | Notion, Google Docs |
98
+ | [Brain](/templates/brain) | Company chat, cited memory, and review queue |
98
99
  | [Slides](/templates/slides) | Google Slides, Pitch |
99
100
  | [Analytics](/templates/analytics) | Amplitude, Mixpanel, Looker |
100
101
  | [Mail](/templates/mail) | Superhuman, Gmail |
@@ -7,10 +7,48 @@ description: "Connect your agent-native app to local MCP servers (claude-in-chro
7
7
 
8
8
  Agent-native apps can also act as MCP **clients** — connecting to locally installed MCP servers and exposing their tools to the agent chat. This is the symmetric counterpart to the [MCP Protocol](./mcp-protocol.md) (which makes your app an MCP server).
9
9
 
10
- With one config file, every agent-native app in your workspace gains access to tools provided by MCP servers on your machine: `claude-in-chrome` for browser automation, `@modelcontextprotocol/server-filesystem` for reading files, `@modelcontextprotocol/server-playwright` for browser testing, and anything else that speaks MCP.
10
+ With one config file, every agent-native app in your workspace gains access to tools provided by MCP servers on your machine: `claude-in-chrome` for browser automation, `@modelcontextprotocol/server-filesystem` for reading files, `@playwright/mcp` for browser testing, and anything else that speaks MCP.
11
11
 
12
12
  You can also [connect remote (HTTP) MCP servers at runtime](#remote-via-ui) — individual users or whole organizations — without editing a config file.
13
13
 
14
+ ## Built-in browser and computer-use capabilities {#built-in-capabilities}
15
+
16
+ Agent-native includes built-in toggles for common local MCP servers. They are off by default and can be enabled per user or per organization:
17
+
18
+ | Capability | Server id | Command |
19
+ | ------------------ | ----------------- | ----------------------------------------------------------------------- |
20
+ | Chrome DevTools | `chrome-devtools` | `npx -y chrome-devtools-mcp@0.26.0 --autoConnect --no-usage-statistics` |
21
+ | Playwright Browser | `playwright` | `npx -y @playwright/mcp@0.0.75` |
22
+ | Computer Use | `computer-use` | `npx -y computer-use-mcp@1.8.0` |
23
+
24
+ Only one browser capability can be enabled in a scope at a time. Enabling Chrome DevTools disables Playwright for that same user or org, and enabling Playwright disables Chrome DevTools.
25
+
26
+ Computer Use is macOS-only. On other platforms it is listed as unavailable and is skipped even if an old setting row contains it.
27
+
28
+ Chrome DevTools uses `--autoConnect` by default. That attaches to an eligible running Chrome instance; it does not create an isolated browser profile or sign into the user's regular profile for you. It requires Chrome 144+ with remote debugging enabled. A manual `browser-url` configuration can be added later when a deployment needs a specific debugging endpoint.
29
+
30
+ Built-ins are persisted in the framework's `settings` table under `u:<email>:mcp-builtin-capabilities` for personal toggles and `o:<orgId>:mcp-builtin-capabilities` for team toggles. When enabled, they merge into the runtime MCP manager with the same scoped visibility format as remote servers, for example `mcp__user_<emailhash>_playwright__*` or `mcp__org_<orgId>_chrome-devtools__*`.
31
+
32
+ ### User-facing setup notes
33
+
34
+ Use concise, explicit setup copy for the sensitive built-ins:
35
+
36
+ - **Chrome DevTools** attaches to a running Chrome debugging target. Tell users
37
+ it is intended for browser testing and logged-in verification, and that it
38
+ may require enabling Chrome remote debugging before tools appear.
39
+ - **Playwright** launches an isolated browser. Recommend it for deterministic
40
+ QA when the user's live Chrome profile is not required.
41
+ - **Computer Use** can operate local apps. Keep it off by default, explain the
42
+ macOS Screen Recording and Accessibility prompts, and ask before taking
43
+ sensitive actions such as purchases, financial changes, or account changes.
44
+
45
+ ### Built-in endpoints
46
+
47
+ | Method | Route | Purpose |
48
+ | ------ | ---------------------------- | -------------------------------------------------------------------------- |
49
+ | GET | `/_agent-native/mcp/builtin` | List built-in capabilities, enabled scopes, merged ids, and live status. |
50
+ | POST | `/_agent-native/mcp/builtin` | Update a scope. Body: `{ scope, enabledIds }` or `{ scope, id, enabled }`. |
51
+
14
52
  ## Adding a local MCP server {#adding-a-server}
15
53
 
16
54
  Create `mcp.config.json` at your workspace root (or at an individual app root — workspace root wins when both exist):
@@ -26,7 +64,7 @@ Create `mcp.config.json` at your workspace root (or at an individual app root
26
64
  },
27
65
  "playwright": {
28
66
  "command": "npx",
29
- "args": ["-y", "@modelcontextprotocol/server-playwright"],
67
+ "args": ["-y", "@playwright/mcp@0.0.75"],
30
68
  },
31
69
  "filesystem": {
32
70
  "command": "npx",
@@ -64,7 +102,7 @@ MCP configuration is resolved in this order, first match wins:
64
102
  For production deploys set the full config shape (or the inner server map) as an environment variable:
65
103
 
66
104
  ```bash
67
- MCP_SERVERS='{"servers":{"playwright":{"command":"npx","args":["-y","@modelcontextprotocol/server-playwright"]}}}'
105
+ MCP_SERVERS='{"servers":{"playwright":{"command":"npx","args":["-y","@playwright/mcp@0.0.75"]}}}'
68
106
  ```
69
107
 
70
108
  MCP tools only activate in Node runtimes — Cloudflare Workers and other edge targets silently skip MCP and continue with the rest of the app working normally.