@agent-native/core 0.47.1 → 0.48.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 (808) hide show
  1. package/bin/agent-native.js +41 -0
  2. package/dist/a2a/handlers.js +2 -2
  3. package/dist/a2a/handlers.js.map +1 -1
  4. package/dist/a2a/server.js +2 -2
  5. package/dist/a2a/server.js.map +1 -1
  6. package/dist/action.d.ts +43 -2
  7. package/dist/action.d.ts.map +1 -1
  8. package/dist/action.js.map +1 -1
  9. package/dist/agent/context-xray/actions/context-evict.d.ts +7 -1
  10. package/dist/agent/context-xray/actions/context-evict.d.ts.map +1 -1
  11. package/dist/agent/context-xray/actions/context-manifest-get.d.ts +4 -1
  12. package/dist/agent/context-xray/actions/context-manifest-get.d.ts.map +1 -1
  13. package/dist/agent/context-xray/actions/context-pin.d.ts +7 -1
  14. package/dist/agent/context-xray/actions/context-pin.d.ts.map +1 -1
  15. package/dist/agent/context-xray/actions/context-report.d.ts +12 -1
  16. package/dist/agent/context-xray/actions/context-report.d.ts.map +1 -1
  17. package/dist/agent/context-xray/actions/context-restore.d.ts +7 -1
  18. package/dist/agent/context-xray/actions/context-restore.d.ts.map +1 -1
  19. package/dist/agent/context-xray/apply-directives.d.ts.map +1 -1
  20. package/dist/agent/context-xray/apply-directives.js.map +1 -1
  21. package/dist/agent/context-xray/schema.d.ts +10 -10
  22. package/dist/agent/engine/ai-sdk-engine.d.ts.map +1 -1
  23. package/dist/agent/engine/ai-sdk-engine.js +26 -3
  24. package/dist/agent/engine/ai-sdk-engine.js.map +1 -1
  25. package/dist/agent/engine/anthropic-engine.d.ts +1 -1
  26. package/dist/agent/engine/anthropic-engine.d.ts.map +1 -1
  27. package/dist/agent/engine/builder-engine.d.ts +1 -1
  28. package/dist/agent/engine/builder-engine.d.ts.map +1 -1
  29. package/dist/agent/engine/builder-engine.js +47 -8
  30. package/dist/agent/engine/builder-engine.js.map +1 -1
  31. package/dist/agent/engine/builtin.js +1 -1
  32. package/dist/agent/engine/builtin.js.map +1 -1
  33. package/dist/agent/engine/output-tokens.d.ts +1 -1
  34. package/dist/agent/engine/output-tokens.d.ts.map +1 -1
  35. package/dist/agent/engine/output-tokens.js +6 -2
  36. package/dist/agent/engine/output-tokens.js.map +1 -1
  37. package/dist/agent/engine/registry.d.ts.map +1 -1
  38. package/dist/agent/engine/registry.js +7 -4
  39. package/dist/agent/engine/registry.js.map +1 -1
  40. package/dist/agent/engine/types.d.ts +19 -0
  41. package/dist/agent/engine/types.d.ts.map +1 -1
  42. package/dist/agent/engine/types.js +6 -0
  43. package/dist/agent/engine/types.js.map +1 -1
  44. package/dist/agent/model-config.d.ts +22 -14
  45. package/dist/agent/model-config.d.ts.map +1 -1
  46. package/dist/agent/model-config.js +113 -8
  47. package/dist/agent/model-config.js.map +1 -1
  48. package/dist/agent/production-agent.d.ts +19 -1
  49. package/dist/agent/production-agent.d.ts.map +1 -1
  50. package/dist/agent/production-agent.js +253 -39
  51. package/dist/agent/production-agent.js.map +1 -1
  52. package/dist/agent/run-loop-with-resume.d.ts.map +1 -1
  53. package/dist/agent/run-loop-with-resume.js +10 -0
  54. package/dist/agent/run-loop-with-resume.js.map +1 -1
  55. package/dist/agent/run-manager.d.ts +1 -0
  56. package/dist/agent/run-manager.d.ts.map +1 -1
  57. package/dist/agent/run-manager.js +36 -9
  58. package/dist/agent/run-manager.js.map +1 -1
  59. package/dist/agent/run-store.d.ts +47 -4
  60. package/dist/agent/run-store.d.ts.map +1 -1
  61. package/dist/agent/run-store.js +154 -4
  62. package/dist/agent/run-store.js.map +1 -1
  63. package/dist/agent/thread-data-builder.d.ts.map +1 -1
  64. package/dist/agent/thread-data-builder.js +57 -2
  65. package/dist/agent/thread-data-builder.js.map +1 -1
  66. package/dist/agent/types.d.ts +3 -0
  67. package/dist/agent/types.d.ts.map +1 -1
  68. package/dist/agent/types.js.map +1 -1
  69. package/dist/agent-web/generator.d.ts +3 -3
  70. package/dist/appearance/actions/change-appearance.d.ts +6 -1
  71. package/dist/appearance/actions/change-appearance.d.ts.map +1 -1
  72. package/dist/application-state/handlers.d.ts +2 -2
  73. package/dist/application-state/handlers.d.ts.map +1 -1
  74. package/dist/application-state/store.d.ts.map +1 -1
  75. package/dist/application-state/store.js +17 -0
  76. package/dist/application-state/store.js.map +1 -1
  77. package/dist/catalog.json +2 -1
  78. package/dist/cli/code-agent-commands.d.ts.map +1 -1
  79. package/dist/cli/code-agent-commands.js +2 -0
  80. package/dist/cli/code-agent-commands.js.map +1 -1
  81. package/dist/cli/code-agent-connector.js +7 -13
  82. package/dist/cli/code-agent-connector.js.map +1 -1
  83. package/dist/cli/code-agent-executor.d.ts +54 -2
  84. package/dist/cli/code-agent-executor.d.ts.map +1 -1
  85. package/dist/cli/code-agent-executor.js +504 -48
  86. package/dist/cli/code-agent-executor.js.map +1 -1
  87. package/dist/cli/code-agent-runs.d.ts +13 -0
  88. package/dist/cli/code-agent-runs.d.ts.map +1 -1
  89. package/dist/cli/code-agent-runs.js +36 -0
  90. package/dist/cli/code-agent-runs.js.map +1 -1
  91. package/dist/cli/code.js +59 -5
  92. package/dist/cli/code.js.map +1 -1
  93. package/dist/cli/connect.js +141 -3
  94. package/dist/cli/connect.js.map +1 -1
  95. package/dist/cli/index.js +0 -0
  96. package/dist/cli/pr-visual-recap-workflow.js +1 -1
  97. package/dist/cli/pr-visual-recap-workflow.js.map +1 -1
  98. package/dist/cli/recap.js +476 -46
  99. package/dist/cli/recap.js.map +1 -1
  100. package/dist/cli/skills.js +298 -179
  101. package/dist/cli/skills.js.map +1 -1
  102. package/dist/client/AgentPanel.d.ts.map +1 -1
  103. package/dist/client/AgentPanel.js +29 -2
  104. package/dist/client/AgentPanel.js.map +1 -1
  105. package/dist/client/AgentTaskCard.d.ts.map +1 -1
  106. package/dist/client/AgentTaskCard.js +17 -2
  107. package/dist/client/AgentTaskCard.js.map +1 -1
  108. package/dist/client/AssistantChat.d.ts +1 -1
  109. package/dist/client/AssistantChat.d.ts.map +1 -1
  110. package/dist/client/AssistantChat.js +310 -1732
  111. package/dist/client/AssistantChat.js.map +1 -1
  112. package/dist/client/CommandMenu.d.ts +1 -1
  113. package/dist/client/CommandMenu.d.ts.map +1 -1
  114. package/dist/client/CommandMenu.js +1 -1
  115. package/dist/client/CommandMenu.js.map +1 -1
  116. package/dist/client/HighlightedCodeBlock.d.ts +40 -0
  117. package/dist/client/HighlightedCodeBlock.d.ts.map +1 -0
  118. package/dist/client/HighlightedCodeBlock.js +110 -0
  119. package/dist/client/HighlightedCodeBlock.js.map +1 -0
  120. package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
  121. package/dist/client/MultiTabAssistantChat.js +8 -1
  122. package/dist/client/MultiTabAssistantChat.js.map +1 -1
  123. package/dist/client/PoweredByBadge.d.ts +2 -2
  124. package/dist/client/PoweredByBadge.d.ts.map +1 -1
  125. package/dist/client/RunStuckBanner.d.ts +1 -1
  126. package/dist/client/RunStuckBanner.d.ts.map +1 -1
  127. package/dist/client/StarfieldBackground.d.ts.map +1 -1
  128. package/dist/client/StarfieldBackground.js +10 -5
  129. package/dist/client/StarfieldBackground.js.map +1 -1
  130. package/dist/client/Turnstile.d.ts +1 -1
  131. package/dist/client/Turnstile.d.ts.map +1 -1
  132. package/dist/client/agent-chat-adapter.d.ts +3 -2
  133. package/dist/client/agent-chat-adapter.d.ts.map +1 -1
  134. package/dist/client/agent-chat-adapter.js +13 -9
  135. package/dist/client/agent-chat-adapter.js.map +1 -1
  136. package/dist/client/app-providers.d.ts +99 -0
  137. package/dist/client/app-providers.d.ts.map +1 -0
  138. package/dist/client/app-providers.js +19 -0
  139. package/dist/client/app-providers.js.map +1 -0
  140. package/dist/client/assistant-ui-recovery.d.ts +1 -1
  141. package/dist/client/auth-redirect-url.d.ts +1 -1
  142. package/dist/client/auth-redirect-url.d.ts.map +1 -1
  143. package/dist/client/blocks/library/AnnotatedCodeBlock.d.ts +0 -19
  144. package/dist/client/blocks/library/AnnotatedCodeBlock.d.ts.map +1 -1
  145. package/dist/client/blocks/library/AnnotatedCodeBlock.js +141 -55
  146. package/dist/client/blocks/library/AnnotatedCodeBlock.js.map +1 -1
  147. package/dist/client/blocks/library/DiffBlock.js +1 -1
  148. package/dist/client/blocks/library/DiffBlock.js.map +1 -1
  149. package/dist/client/blocks/library/FileTreeBlock.d.ts.map +1 -1
  150. package/dist/client/blocks/library/FileTreeBlock.js +1 -1
  151. package/dist/client/blocks/library/FileTreeBlock.js.map +1 -1
  152. package/dist/client/blocks/library/HighlightedCode.d.ts.map +1 -1
  153. package/dist/client/blocks/library/HighlightedCode.js +5 -3
  154. package/dist/client/blocks/library/HighlightedCode.js.map +1 -1
  155. package/dist/client/blocks/library/annotation-rail.d.ts +5 -4
  156. package/dist/client/blocks/library/annotation-rail.d.ts.map +1 -1
  157. package/dist/client/blocks/library/annotation-rail.js +22 -3
  158. package/dist/client/blocks/library/annotation-rail.js.map +1 -1
  159. package/dist/client/blocks/library/diagram.js +1 -1
  160. package/dist/client/blocks/library/diagram.js.map +1 -1
  161. package/dist/client/blocks/library/diff.config.d.ts +3 -2
  162. package/dist/client/blocks/library/diff.config.d.ts.map +1 -1
  163. package/dist/client/blocks/library/diff.config.js +4 -3
  164. package/dist/client/blocks/library/diff.config.js.map +1 -1
  165. package/dist/client/blocks/library/question-form.d.ts.map +1 -1
  166. package/dist/client/blocks/library/question-form.js +2 -1
  167. package/dist/client/blocks/library/question-form.js.map +1 -1
  168. package/dist/client/blocks/library/wireframe-kit.d.ts +1 -1
  169. package/dist/client/blocks/library/wireframe-kit.d.ts.map +1 -1
  170. package/dist/client/blocks/library/wireframe.js +1 -1
  171. package/dist/client/blocks/library/wireframe.js.map +1 -1
  172. package/dist/client/chat/attachment-adapters.d.ts +58 -0
  173. package/dist/client/chat/attachment-adapters.d.ts.map +1 -0
  174. package/dist/client/chat/attachment-adapters.js +331 -0
  175. package/dist/client/chat/attachment-adapters.js.map +1 -0
  176. package/dist/client/chat/index.d.ts +13 -0
  177. package/dist/client/chat/index.d.ts.map +1 -0
  178. package/dist/client/chat/index.js +13 -0
  179. package/dist/client/chat/index.js.map +1 -0
  180. package/dist/client/chat/markdown-renderer.d.ts +49 -0
  181. package/dist/client/chat/markdown-renderer.d.ts.map +1 -0
  182. package/dist/client/chat/markdown-renderer.js +391 -0
  183. package/dist/client/chat/markdown-renderer.js.map +1 -0
  184. package/dist/client/chat/message-components.d.ts +35 -0
  185. package/dist/client/chat/message-components.d.ts.map +1 -0
  186. package/dist/client/chat/message-components.js +452 -0
  187. package/dist/client/chat/message-components.js.map +1 -0
  188. package/dist/client/chat/repo-helpers.d.ts +41 -0
  189. package/dist/client/chat/repo-helpers.d.ts.map +1 -0
  190. package/dist/client/chat/repo-helpers.js +61 -0
  191. package/dist/client/chat/repo-helpers.js.map +1 -0
  192. package/dist/client/chat/run-recovery.d.ts +41 -0
  193. package/dist/client/chat/run-recovery.d.ts.map +1 -0
  194. package/dist/client/chat/run-recovery.js +348 -0
  195. package/dist/client/chat/run-recovery.js.map +1 -0
  196. package/dist/client/chat/tool-call-display.d.ts +34 -0
  197. package/dist/client/chat/tool-call-display.d.ts.map +1 -0
  198. package/dist/client/chat/tool-call-display.js +284 -0
  199. package/dist/client/chat/tool-call-display.js.map +1 -0
  200. package/dist/client/code-agent-chat-adapter.d.ts.map +1 -1
  201. package/dist/client/code-agent-chat-adapter.js +20 -0
  202. package/dist/client/code-agent-chat-adapter.js.map +1 -1
  203. package/dist/client/collab/index.d.ts +10 -0
  204. package/dist/client/collab/index.d.ts.map +1 -0
  205. package/dist/client/collab/index.js +10 -0
  206. package/dist/client/collab/index.js.map +1 -0
  207. package/dist/client/components/AgentPresenceChip.d.ts +1 -1
  208. package/dist/client/components/AgentPresenceChip.d.ts.map +1 -1
  209. package/dist/client/components/ApiKeySettings.d.ts +1 -1
  210. package/dist/client/components/ApiKeySettings.d.ts.map +1 -1
  211. package/dist/client/components/CodeAgentIndicator.d.ts +1 -1
  212. package/dist/client/components/CodeAgentIndicator.d.ts.map +1 -1
  213. package/dist/client/components/CodeRequiredDialog.d.ts +1 -1
  214. package/dist/client/components/CodeRequiredDialog.d.ts.map +1 -1
  215. package/dist/client/components/LiveCursorOverlay.d.ts.map +1 -1
  216. package/dist/client/components/LiveCursorOverlay.js.map +1 -1
  217. package/dist/client/components/PresenceBar.d.ts +1 -1
  218. package/dist/client/components/PresenceBar.d.ts.map +1 -1
  219. package/dist/client/composer/PromptComposer.d.ts.map +1 -1
  220. package/dist/client/composer/PromptComposer.js +6 -26
  221. package/dist/client/composer/PromptComposer.js.map +1 -1
  222. package/dist/client/composer/TiptapComposer.d.ts +8 -2
  223. package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
  224. package/dist/client/composer/TiptapComposer.js +21 -9
  225. package/dist/client/composer/TiptapComposer.js.map +1 -1
  226. package/dist/client/composer/VoiceButton.d.ts +2 -2
  227. package/dist/client/composer/VoiceButton.d.ts.map +1 -1
  228. package/dist/client/composer/index.d.ts +1 -1
  229. package/dist/client/composer/index.d.ts.map +1 -1
  230. package/dist/client/composer/index.js +1 -1
  231. package/dist/client/composer/index.js.map +1 -1
  232. package/dist/client/composer/use-skills.d.ts +1 -1
  233. package/dist/client/context-xray/ContextMeter.d.ts +1 -1
  234. package/dist/client/context-xray/ContextMeter.d.ts.map +1 -1
  235. package/dist/client/context-xray/ContextMeter.js +3 -3
  236. package/dist/client/context-xray/ContextMeter.js.map +1 -1
  237. package/dist/client/context-xray/ContextXRayPanel.d.ts.map +1 -1
  238. package/dist/client/context-xray/ContextXRayPanel.js +4 -3
  239. package/dist/client/context-xray/ContextXRayPanel.js.map +1 -1
  240. package/dist/client/context-xray/format.d.ts +11 -0
  241. package/dist/client/context-xray/format.d.ts.map +1 -1
  242. package/dist/client/context-xray/format.js +16 -0
  243. package/dist/client/context-xray/format.js.map +1 -1
  244. package/dist/client/conversation/AgentConversation.d.ts.map +1 -1
  245. package/dist/client/conversation/AgentConversation.js +8 -53
  246. package/dist/client/conversation/AgentConversation.js.map +1 -1
  247. package/dist/client/conversation/use-near-bottom-autoscroll.d.ts +1 -1
  248. package/dist/client/conversation/use-near-bottom-autoscroll.d.ts.map +1 -1
  249. package/dist/client/conversation/use-near-bottom-autoscroll.js +14 -1
  250. package/dist/client/conversation/use-near-bottom-autoscroll.js.map +1 -1
  251. package/dist/client/create-query-client.d.ts +28 -0
  252. package/dist/client/create-query-client.d.ts.map +1 -0
  253. package/dist/client/create-query-client.js +78 -0
  254. package/dist/client/create-query-client.js.map +1 -0
  255. package/dist/client/db-admin/DevDatabaseLink.d.ts +1 -1
  256. package/dist/client/db-admin/DevDatabaseLink.d.ts.map +1 -1
  257. package/dist/client/db-admin/RowSidePanel.d.ts +1 -1
  258. package/dist/client/db-admin/RowSidePanel.d.ts.map +1 -1
  259. package/dist/client/db-admin/RowSidePanel.js +2 -2
  260. package/dist/client/db-admin/RowSidePanel.js.map +1 -1
  261. package/dist/client/db-admin/TableEditor.d.ts +1 -1
  262. package/dist/client/db-admin/TableEditor.d.ts.map +1 -1
  263. package/dist/client/db-admin/TableEditor.js +1 -1
  264. package/dist/client/db-admin/TableEditor.js.map +1 -1
  265. package/dist/client/db-admin/cell-format.d.ts +1 -1
  266. package/dist/client/db-admin/cell-format.d.ts.map +1 -1
  267. package/dist/client/dev-overlay/DevOverlay.d.ts +1 -1
  268. package/dist/client/dev-overlay/DevOverlay.d.ts.map +1 -1
  269. package/dist/client/editor/index.d.ts +2 -0
  270. package/dist/client/editor/index.d.ts.map +1 -0
  271. package/dist/client/editor/index.js +2 -0
  272. package/dist/client/editor/index.js.map +1 -0
  273. package/dist/client/error-format.d.ts.map +1 -1
  274. package/dist/client/error-format.js +4 -0
  275. package/dist/client/error-format.js.map +1 -1
  276. package/dist/client/extensions/AgentNativeExtensionFrame.d.ts +1 -1
  277. package/dist/client/extensions/AgentNativeExtensionFrame.d.ts.map +1 -1
  278. package/dist/client/extensions/EmbeddedExtension.d.ts +1 -1
  279. package/dist/client/extensions/EmbeddedExtension.d.ts.map +1 -1
  280. package/dist/client/extensions/ExtensionSlot.d.ts +1 -1
  281. package/dist/client/extensions/ExtensionSlot.d.ts.map +1 -1
  282. package/dist/client/extensions/ExtensionViewerPage.d.ts +1 -1
  283. package/dist/client/extensions/ExtensionViewerPage.d.ts.map +1 -1
  284. package/dist/client/guided-questions.d.ts +6 -6
  285. package/dist/client/host-bridge.d.ts.map +1 -1
  286. package/dist/client/host-bridge.js +2 -0
  287. package/dist/client/host-bridge.js.map +1 -1
  288. package/dist/client/index.d.ts +7 -6
  289. package/dist/client/index.d.ts.map +1 -1
  290. package/dist/client/index.js +5 -3
  291. package/dist/client/index.js.map +1 -1
  292. package/dist/client/onboarding/OnboardingBanner.d.ts +1 -1
  293. package/dist/client/onboarding/OnboardingBanner.d.ts.map +1 -1
  294. package/dist/client/onboarding/OnboardingPanel.d.ts +1 -1
  295. package/dist/client/onboarding/OnboardingPanel.d.ts.map +1 -1
  296. package/dist/client/onboarding/SetupButton.d.ts +1 -1
  297. package/dist/client/onboarding/SetupButton.d.ts.map +1 -1
  298. package/dist/client/org/InvitationBanner.d.ts +1 -1
  299. package/dist/client/org/InvitationBanner.d.ts.map +1 -1
  300. package/dist/client/org/OrgSwitcher.d.ts +1 -1
  301. package/dist/client/org/OrgSwitcher.d.ts.map +1 -1
  302. package/dist/client/org/RequireActiveOrg.d.ts +1 -1
  303. package/dist/client/org/RequireActiveOrg.d.ts.map +1 -1
  304. package/dist/client/org/hooks.d.ts +3 -3
  305. package/dist/client/org/hooks.d.ts.map +1 -1
  306. package/dist/client/progress/RunsTray.d.ts +2 -2
  307. package/dist/client/progress/RunsTray.d.ts.map +1 -1
  308. package/dist/client/progress/RunsTray.js +34 -9
  309. package/dist/client/progress/RunsTray.js.map +1 -1
  310. package/dist/client/resources/ResourceEditor.d.ts.map +1 -1
  311. package/dist/client/resources/ResourceEditor.js +1 -1
  312. package/dist/client/resources/ResourceEditor.js.map +1 -1
  313. package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
  314. package/dist/client/resources/ResourcesPanel.js +2 -0
  315. package/dist/client/resources/ResourcesPanel.js.map +1 -1
  316. package/dist/client/rich-markdown-editor/BubbleToolbar.d.ts +1 -1
  317. package/dist/client/rich-markdown-editor/BubbleToolbar.d.ts.map +1 -1
  318. package/dist/client/rich-markdown-editor/CodeBlockNode.d.ts.map +1 -1
  319. package/dist/client/rich-markdown-editor/CodeBlockNode.js +2 -1
  320. package/dist/client/rich-markdown-editor/CodeBlockNode.js.map +1 -1
  321. package/dist/client/rich-markdown-editor/ImageExtension.d.ts.map +1 -1
  322. package/dist/client/rich-markdown-editor/ImageExtension.js +2 -1
  323. package/dist/client/rich-markdown-editor/ImageExtension.js.map +1 -1
  324. package/dist/client/rich-markdown-editor/RegistryBlockNode.d.ts +1 -1
  325. package/dist/client/rich-markdown-editor/RegistryBlockNode.d.ts.map +1 -1
  326. package/dist/client/rich-markdown-editor/RegistryBlockNode.js +1 -1
  327. package/dist/client/rich-markdown-editor/RegistryBlockNode.js.map +1 -1
  328. package/dist/client/rich-markdown-editor/RichMarkdownEditor.d.ts +1 -1
  329. package/dist/client/rich-markdown-editor/SharedRichEditor.d.ts.map +1 -1
  330. package/dist/client/rich-markdown-editor/SharedRichEditor.js +2 -3
  331. package/dist/client/rich-markdown-editor/SharedRichEditor.js.map +1 -1
  332. package/dist/client/rich-markdown-editor/SlashCommandMenu.d.ts +1 -1
  333. package/dist/client/rich-markdown-editor/SlashCommandMenu.d.ts.map +1 -1
  334. package/dist/client/route-state.d.ts +12 -2
  335. package/dist/client/route-state.d.ts.map +1 -1
  336. package/dist/client/route-state.js +1 -1
  337. package/dist/client/route-state.js.map +1 -1
  338. package/dist/client/route-warmup.d.ts +1 -1
  339. package/dist/client/route-warmup.d.ts.map +1 -1
  340. package/dist/client/settings/VoiceTranscriptionSection.js +1 -1
  341. package/dist/client/settings/VoiceTranscriptionSection.js.map +1 -1
  342. package/dist/client/settings/useBuilderStatus.d.ts +2 -2
  343. package/dist/client/sharing/ShareDialog.d.ts +1 -1
  344. package/dist/client/sharing/ShareDialog.d.ts.map +1 -1
  345. package/dist/client/sse-event-processor.d.ts +8 -0
  346. package/dist/client/sse-event-processor.d.ts.map +1 -1
  347. package/dist/client/sse-event-processor.js +33 -10
  348. package/dist/client/sse-event-processor.js.map +1 -1
  349. package/dist/client/terminal/AgentTerminal.d.ts +1 -1
  350. package/dist/client/terminal/AgentTerminal.d.ts.map +1 -1
  351. package/dist/client/terminal/AgentTerminal.js +4 -2
  352. package/dist/client/terminal/AgentTerminal.js.map +1 -1
  353. package/dist/client/tool-cells/BashCell.d.ts +25 -0
  354. package/dist/client/tool-cells/BashCell.d.ts.map +1 -0
  355. package/dist/client/tool-cells/BashCell.js +49 -0
  356. package/dist/client/tool-cells/BashCell.js.map +1 -0
  357. package/dist/client/tool-cells/EditCell.d.ts +24 -0
  358. package/dist/client/tool-cells/EditCell.d.ts.map +1 -0
  359. package/dist/client/tool-cells/EditCell.js +126 -0
  360. package/dist/client/tool-cells/EditCell.js.map +1 -0
  361. package/dist/client/tool-cells/FilesChangedSummary.d.ts +13 -0
  362. package/dist/client/tool-cells/FilesChangedSummary.d.ts.map +1 -0
  363. package/dist/client/tool-cells/FilesChangedSummary.js +98 -0
  364. package/dist/client/tool-cells/FilesChangedSummary.js.map +1 -0
  365. package/dist/client/tool-cells/WriteCell.d.ts +17 -0
  366. package/dist/client/tool-cells/WriteCell.d.ts.map +1 -0
  367. package/dist/client/tool-cells/WriteCell.js +26 -0
  368. package/dist/client/tool-cells/WriteCell.js.map +1 -0
  369. package/dist/client/tool-cells/index.d.ts +8 -0
  370. package/dist/client/tool-cells/index.d.ts.map +1 -0
  371. package/dist/client/tool-cells/index.js +5 -0
  372. package/dist/client/tool-cells/index.js.map +1 -0
  373. package/dist/client/transcription/BuilderTranscriptionCta.d.ts +1 -1
  374. package/dist/client/transcription/BuilderTranscriptionCta.d.ts.map +1 -1
  375. package/dist/client/use-chat-threads.d.ts +1 -1
  376. package/dist/client/use-chat-threads.d.ts.map +1 -1
  377. package/dist/client/use-chat-threads.js +11 -8
  378. package/dist/client/use-chat-threads.js.map +1 -1
  379. package/dist/client/use-db-sync.d.ts +2 -0
  380. package/dist/client/use-db-sync.d.ts.map +1 -1
  381. package/dist/client/use-db-sync.js +329 -302
  382. package/dist/client/use-db-sync.js.map +1 -1
  383. package/dist/code-agents/transcript-normalizer.d.ts +15 -1
  384. package/dist/code-agents/transcript-normalizer.d.ts.map +1 -1
  385. package/dist/code-agents/transcript-normalizer.js +47 -0
  386. package/dist/code-agents/transcript-normalizer.js.map +1 -1
  387. package/dist/coding-tools/index.d.ts +75 -0
  388. package/dist/coding-tools/index.d.ts.map +1 -1
  389. package/dist/coding-tools/index.js +137 -10
  390. package/dist/coding-tools/index.js.map +1 -1
  391. package/dist/collab/client.d.ts.map +1 -1
  392. package/dist/collab/client.js +15 -9
  393. package/dist/collab/client.js.map +1 -1
  394. package/dist/collab/ydoc-manager.d.ts +1 -1
  395. package/dist/collab/ydoc-manager.d.ts.map +1 -1
  396. package/dist/collab/ydoc-manager.js +1 -1
  397. package/dist/collab/ydoc-manager.js.map +1 -1
  398. package/dist/db/client.d.ts +9 -1
  399. package/dist/db/client.d.ts.map +1 -1
  400. package/dist/db/client.js +204 -48
  401. package/dist/db/client.js.map +1 -1
  402. package/dist/db/create-get-db.d.ts +38 -0
  403. package/dist/db/create-get-db.d.ts.map +1 -1
  404. package/dist/db/create-get-db.js +204 -4
  405. package/dist/db/create-get-db.js.map +1 -1
  406. package/dist/db/migrations.d.ts.map +1 -1
  407. package/dist/db/migrations.js +159 -67
  408. package/dist/db/migrations.js.map +1 -1
  409. package/dist/demo/actions/toggle-demo-mode.d.ts +6 -1
  410. package/dist/demo/actions/toggle-demo-mode.d.ts.map +1 -1
  411. package/dist/deploy/build.d.ts.map +1 -1
  412. package/dist/deploy/build.js +80 -39
  413. package/dist/deploy/build.js.map +1 -1
  414. package/dist/deploy/workspace-deploy.js +20 -10
  415. package/dist/deploy/workspace-deploy.js.map +1 -1
  416. package/dist/extensions/schema.d.ts +51 -51
  417. package/dist/extensions/slots/schema.d.ts +13 -13
  418. package/dist/file-upload/actions/upload-image.d.ts +26 -1
  419. package/dist/file-upload/actions/upload-image.d.ts.map +1 -1
  420. package/dist/file-upload/index.d.ts +1 -1
  421. package/dist/file-upload/index.d.ts.map +1 -1
  422. package/dist/file-upload/index.js +1 -1
  423. package/dist/file-upload/index.js.map +1 -1
  424. package/dist/file-upload/pre-upload-attachments.d.ts +37 -0
  425. package/dist/file-upload/pre-upload-attachments.d.ts.map +1 -1
  426. package/dist/file-upload/pre-upload-attachments.js +79 -19
  427. package/dist/file-upload/pre-upload-attachments.js.map +1 -1
  428. package/dist/index.d.ts +1 -1
  429. package/dist/index.d.ts.map +1 -1
  430. package/dist/index.js.map +1 -1
  431. package/dist/integrations/adapters/slack.js +1 -1
  432. package/dist/integrations/adapters/slack.js.map +1 -1
  433. package/dist/integrations/plugin.js +1 -1
  434. package/dist/integrations/plugin.js.map +1 -1
  435. package/dist/jobs/scheduler.js +70 -21
  436. package/dist/jobs/scheduler.js.map +1 -1
  437. package/dist/mcp/actions/create-org-service-token.d.ts +14 -0
  438. package/dist/mcp/actions/create-org-service-token.d.ts.map +1 -0
  439. package/dist/mcp/actions/create-org-service-token.js +74 -0
  440. package/dist/mcp/actions/create-org-service-token.js.map +1 -0
  441. package/dist/mcp/actions/list-org-service-tokens.d.ts +17 -0
  442. package/dist/mcp/actions/list-org-service-tokens.d.ts.map +1 -0
  443. package/dist/mcp/actions/list-org-service-tokens.js +42 -0
  444. package/dist/mcp/actions/list-org-service-tokens.js.map +1 -0
  445. package/dist/mcp/actions/revoke-org-service-token.d.ts +7 -0
  446. package/dist/mcp/actions/revoke-org-service-token.d.ts.map +1 -0
  447. package/dist/mcp/actions/revoke-org-service-token.js +28 -0
  448. package/dist/mcp/actions/revoke-org-service-token.js.map +1 -0
  449. package/dist/mcp/actions/service-token-access.d.ts +24 -0
  450. package/dist/mcp/actions/service-token-access.d.ts.map +1 -0
  451. package/dist/mcp/actions/service-token-access.js +63 -0
  452. package/dist/mcp/actions/service-token-access.js.map +1 -0
  453. package/dist/mcp/build-server.d.ts +42 -11
  454. package/dist/mcp/build-server.d.ts.map +1 -1
  455. package/dist/mcp/build-server.js +53 -3
  456. package/dist/mcp/build-server.js.map +1 -1
  457. package/dist/mcp/connect-route.d.ts +35 -0
  458. package/dist/mcp/connect-route.d.ts.map +1 -1
  459. package/dist/mcp/connect-route.js +57 -2
  460. package/dist/mcp/connect-route.js.map +1 -1
  461. package/dist/mcp/connect-store.d.ts +43 -0
  462. package/dist/mcp/connect-store.d.ts.map +1 -1
  463. package/dist/mcp/connect-store.js +129 -12
  464. package/dist/mcp/connect-store.js.map +1 -1
  465. package/dist/mcp/oauth-token.d.ts +10 -0
  466. package/dist/mcp/oauth-token.d.ts.map +1 -1
  467. package/dist/mcp/oauth-token.js +2 -0
  468. package/dist/mcp/oauth-token.js.map +1 -1
  469. package/dist/mcp/server.d.ts.map +1 -1
  470. package/dist/mcp/server.js +3 -0
  471. package/dist/mcp/server.js.map +1 -1
  472. package/dist/mcp-client/routes.js +1 -1
  473. package/dist/mcp-client/routes.js.map +1 -1
  474. package/dist/org/context.d.ts +4 -0
  475. package/dist/org/context.d.ts.map +1 -1
  476. package/dist/org/context.js +10 -0
  477. package/dist/org/context.js.map +1 -1
  478. package/dist/org/handlers.d.ts +11 -7
  479. package/dist/org/handlers.d.ts.map +1 -1
  480. package/dist/org/handlers.js +0 -8
  481. package/dist/org/handlers.js.map +1 -1
  482. package/dist/org/migrations.d.ts.map +1 -1
  483. package/dist/org/migrations.js +8 -0
  484. package/dist/org/migrations.js.map +1 -1
  485. package/dist/org/schema.d.ts +15 -15
  486. package/dist/progress/actions.d.ts.map +1 -1
  487. package/dist/progress/actions.js +13 -5
  488. package/dist/progress/actions.js.map +1 -1
  489. package/dist/provider-api/actions/delete-staged-dataset.d.ts +9 -0
  490. package/dist/provider-api/actions/delete-staged-dataset.d.ts.map +1 -0
  491. package/dist/provider-api/actions/delete-staged-dataset.js +35 -0
  492. package/dist/provider-api/actions/delete-staged-dataset.js.map +1 -0
  493. package/dist/provider-api/actions/list-staged-datasets.d.ts +15 -0
  494. package/dist/provider-api/actions/list-staged-datasets.d.ts.map +1 -0
  495. package/dist/provider-api/actions/list-staged-datasets.js +41 -0
  496. package/dist/provider-api/actions/list-staged-datasets.js.map +1 -0
  497. package/dist/provider-api/actions/query-staged-dataset.d.ts +29 -0
  498. package/dist/provider-api/actions/query-staged-dataset.d.ts.map +1 -0
  499. package/dist/provider-api/actions/query-staged-dataset.js +116 -0
  500. package/dist/provider-api/actions/query-staged-dataset.js.map +1 -0
  501. package/dist/provider-api/custom-registry.d.ts.map +1 -1
  502. package/dist/provider-api/custom-registry.js.map +1 -1
  503. package/dist/provider-api/index.d.ts +10 -10
  504. package/dist/provider-api/index.js +0 -5
  505. package/dist/provider-api/index.js.map +1 -1
  506. package/dist/provider-api/staged-datasets-aggregate.d.ts +46 -0
  507. package/dist/provider-api/staged-datasets-aggregate.d.ts.map +1 -0
  508. package/dist/provider-api/staged-datasets-aggregate.js +209 -0
  509. package/dist/provider-api/staged-datasets-aggregate.js.map +1 -0
  510. package/dist/provider-api/staged-datasets-store.d.ts +76 -0
  511. package/dist/provider-api/staged-datasets-store.d.ts.map +1 -0
  512. package/dist/provider-api/staged-datasets-store.js +319 -0
  513. package/dist/provider-api/staged-datasets-store.js.map +1 -0
  514. package/dist/provider-api/staging.d.ts +100 -0
  515. package/dist/provider-api/staging.d.ts.map +1 -0
  516. package/dist/provider-api/staging.js +281 -0
  517. package/dist/provider-api/staging.js.map +1 -0
  518. package/dist/resources/handlers.d.ts.map +1 -1
  519. package/dist/resources/handlers.js +13 -1
  520. package/dist/resources/handlers.js.map +1 -1
  521. package/dist/scripts/call-agent.d.ts.map +1 -1
  522. package/dist/scripts/call-agent.js +1 -2
  523. package/dist/scripts/call-agent.js.map +1 -1
  524. package/dist/scripts/resources/migrate-learnings.d.ts +1 -1
  525. package/dist/scripts/resources/migrate-learnings.d.ts.map +1 -1
  526. package/dist/scripts/resources/migrate-learnings.js +1 -1
  527. package/dist/scripts/resources/migrate-learnings.js.map +1 -1
  528. package/dist/secrets/schema.d.ts +7 -7
  529. package/dist/server/action-discovery.d.ts.map +1 -1
  530. package/dist/server/action-discovery.js +14 -0
  531. package/dist/server/action-discovery.js.map +1 -1
  532. package/dist/server/action-routes.d.ts.map +1 -1
  533. package/dist/server/action-routes.js +3 -2
  534. package/dist/server/action-routes.js.map +1 -1
  535. package/dist/server/agent-chat-plugin.d.ts +33 -0
  536. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  537. package/dist/server/agent-chat-plugin.js +251 -180
  538. package/dist/server/agent-chat-plugin.js.map +1 -1
  539. package/dist/server/agent-discovery.d.ts.map +1 -1
  540. package/dist/server/agent-discovery.js +13 -16
  541. package/dist/server/agent-discovery.js.map +1 -1
  542. package/dist/server/agent-teams-run-queue.d.ts +31 -8
  543. package/dist/server/agent-teams-run-queue.d.ts.map +1 -1
  544. package/dist/server/agent-teams-run-queue.js +61 -18
  545. package/dist/server/agent-teams-run-queue.js.map +1 -1
  546. package/dist/server/agent-teams.d.ts +27 -1
  547. package/dist/server/agent-teams.d.ts.map +1 -1
  548. package/dist/server/agent-teams.js +214 -14
  549. package/dist/server/agent-teams.js.map +1 -1
  550. package/dist/server/app-base-path.d.ts +20 -0
  551. package/dist/server/app-base-path.d.ts.map +1 -1
  552. package/dist/server/app-base-path.js +36 -0
  553. package/dist/server/app-base-path.js.map +1 -1
  554. package/dist/server/attachment-actions.d.ts +43 -0
  555. package/dist/server/attachment-actions.d.ts.map +1 -0
  556. package/dist/server/attachment-actions.js +214 -0
  557. package/dist/server/attachment-actions.js.map +1 -0
  558. package/dist/server/auth.js +1 -1
  559. package/dist/server/auth.js.map +1 -1
  560. package/dist/server/complete-text.d.ts +56 -0
  561. package/dist/server/complete-text.d.ts.map +1 -0
  562. package/dist/server/complete-text.js +147 -0
  563. package/dist/server/complete-text.js.map +1 -0
  564. package/dist/server/core-routes-plugin.d.ts +1 -0
  565. package/dist/server/core-routes-plugin.d.ts.map +1 -1
  566. package/dist/server/core-routes-plugin.js +37 -27
  567. package/dist/server/core-routes-plugin.js.map +1 -1
  568. package/dist/server/cors-origins.d.ts.map +1 -1
  569. package/dist/server/cors-origins.js +6 -1
  570. package/dist/server/cors-origins.js.map +1 -1
  571. package/dist/server/create-server.d.ts.map +1 -1
  572. package/dist/server/create-server.js +2 -1
  573. package/dist/server/create-server.js.map +1 -1
  574. package/dist/server/csrf.d.ts +1 -1
  575. package/dist/server/csrf.d.ts.map +1 -1
  576. package/dist/server/email-actions.d.ts +19 -0
  577. package/dist/server/email-actions.d.ts.map +1 -0
  578. package/dist/server/email-actions.js +191 -0
  579. package/dist/server/email-actions.js.map +1 -0
  580. package/dist/server/embed-route.js +1 -1
  581. package/dist/server/embed-route.js.map +1 -1
  582. package/dist/server/embed-session.d.ts.map +1 -1
  583. package/dist/server/embed-session.js +5 -1
  584. package/dist/server/embed-session.js.map +1 -1
  585. package/dist/server/entry-server.d.ts +24 -0
  586. package/dist/server/entry-server.d.ts.map +1 -0
  587. package/dist/server/entry-server.js +54 -0
  588. package/dist/server/entry-server.js.map +1 -0
  589. package/dist/server/framework-request-handler.d.ts.map +1 -1
  590. package/dist/server/framework-request-handler.js +2 -10
  591. package/dist/server/framework-request-handler.js.map +1 -1
  592. package/dist/server/google-oauth.d.ts.map +1 -1
  593. package/dist/server/google-oauth.js +2 -9
  594. package/dist/server/google-oauth.js.map +1 -1
  595. package/dist/server/google-realtime-session.d.ts.map +1 -1
  596. package/dist/server/google-realtime-session.js +6 -4
  597. package/dist/server/google-realtime-session.js.map +1 -1
  598. package/dist/server/h3-helpers.d.ts +39 -0
  599. package/dist/server/h3-helpers.d.ts.map +1 -1
  600. package/dist/server/h3-helpers.js +104 -1
  601. package/dist/server/h3-helpers.js.map +1 -1
  602. package/dist/server/index.d.ts +2 -1
  603. package/dist/server/index.d.ts.map +1 -1
  604. package/dist/server/index.js +2 -1
  605. package/dist/server/index.js.map +1 -1
  606. package/dist/server/onboarding-html.d.ts.map +1 -1
  607. package/dist/server/onboarding-html.js +1 -8
  608. package/dist/server/onboarding-html.js.map +1 -1
  609. package/dist/server/open-route.d.ts.map +1 -1
  610. package/dist/server/open-route.js +1 -0
  611. package/dist/server/open-route.js.map +1 -1
  612. package/dist/server/prompts/framework-core-compact.d.ts +19 -0
  613. package/dist/server/prompts/framework-core-compact.d.ts.map +1 -0
  614. package/dist/server/prompts/framework-core-compact.js +69 -0
  615. package/dist/server/prompts/framework-core-compact.js.map +1 -0
  616. package/dist/server/prompts/framework-core.d.ts +26 -0
  617. package/dist/server/prompts/framework-core.d.ts.map +1 -0
  618. package/dist/server/prompts/framework-core.js +130 -0
  619. package/dist/server/prompts/framework-core.js.map +1 -0
  620. package/dist/server/prompts/index.d.ts +9 -0
  621. package/dist/server/prompts/index.d.ts.map +1 -0
  622. package/dist/server/prompts/index.js +9 -0
  623. package/dist/server/prompts/index.js.map +1 -0
  624. package/dist/server/prompts/model-overlays.d.ts +18 -0
  625. package/dist/server/prompts/model-overlays.d.ts.map +1 -0
  626. package/dist/server/prompts/model-overlays.js +46 -0
  627. package/dist/server/prompts/model-overlays.js.map +1 -0
  628. package/dist/server/prompts/shared-rules.d.ts +29 -0
  629. package/dist/server/prompts/shared-rules.d.ts.map +1 -0
  630. package/dist/server/prompts/shared-rules.js +54 -0
  631. package/dist/server/prompts/shared-rules.js.map +1 -0
  632. package/dist/server/security-headers.d.ts +7 -1
  633. package/dist/server/security-headers.d.ts.map +1 -1
  634. package/dist/server/security-headers.js +11 -0
  635. package/dist/server/security-headers.js.map +1 -1
  636. package/dist/server/ssr-handler.d.ts.map +1 -1
  637. package/dist/server/ssr-handler.js +135 -46
  638. package/dist/server/ssr-handler.js.map +1 -1
  639. package/dist/server/transcribe-voice.d.ts.map +1 -1
  640. package/dist/server/transcribe-voice.js +7 -4
  641. package/dist/server/transcribe-voice.js.map +1 -1
  642. package/dist/settings/store.d.ts.map +1 -1
  643. package/dist/settings/store.js +9 -0
  644. package/dist/settings/store.js.map +1 -1
  645. package/dist/shared/markdown-block-split.d.ts +39 -0
  646. package/dist/shared/markdown-block-split.d.ts.map +1 -0
  647. package/dist/shared/markdown-block-split.js +97 -0
  648. package/dist/shared/markdown-block-split.js.map +1 -0
  649. package/dist/shared/reasoning-effort.js +13 -1
  650. package/dist/shared/reasoning-effort.js.map +1 -1
  651. package/dist/shared/streaming-text-smoothing.d.ts +18 -0
  652. package/dist/shared/streaming-text-smoothing.d.ts.map +1 -1
  653. package/dist/shared/streaming-text-smoothing.js +70 -4
  654. package/dist/shared/streaming-text-smoothing.js.map +1 -1
  655. package/dist/sharing/actions/list-resource-shares.d.ts +24 -1
  656. package/dist/sharing/actions/list-resource-shares.d.ts.map +1 -1
  657. package/dist/sharing/actions/set-resource-visibility.d.ts +8 -1
  658. package/dist/sharing/actions/set-resource-visibility.d.ts.map +1 -1
  659. package/dist/sharing/actions/share-resource.d.ts +12 -1
  660. package/dist/sharing/actions/share-resource.d.ts.map +1 -1
  661. package/dist/sharing/actions/unshare-resource.d.ts +8 -1
  662. package/dist/sharing/actions/unshare-resource.d.ts.map +1 -1
  663. package/dist/sharing/schema.d.ts +10 -10
  664. package/dist/styles/agent-conversation.css +239 -0
  665. package/dist/templates/default/.agents/skills/delegate-to-agent/SKILL.md +50 -2
  666. package/dist/templates/default/AGENTS.md +1 -1
  667. package/dist/templates/default/DEVELOPING.md +19 -0
  668. package/dist/templates/default/app/entry.client.tsx +4 -1
  669. package/dist/templates/default/app/entry.server.tsx +4 -56
  670. package/dist/templates/default/app/global.css +3 -2
  671. package/dist/templates/default/app/root.tsx +8 -24
  672. package/dist/templates/default/app/routes/_index.tsx +0 -13
  673. package/dist/templates/default/package.json +6 -5
  674. package/dist/templates/default/tsconfig.json +2 -1
  675. package/dist/templates/starter-shell-sync.spec.ts +118 -0
  676. package/dist/templates/ui-primitives-sync.spec.ts +399 -0
  677. package/dist/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +50 -2
  678. package/dist/terminal/pty-server.js +1 -1
  679. package/dist/terminal/pty-server.js.map +1 -1
  680. package/dist/triggers/dispatcher.js +1 -1
  681. package/dist/triggers/dispatcher.js.map +1 -1
  682. package/dist/usage/store.d.ts.map +1 -1
  683. package/dist/usage/store.js +60 -7
  684. package/dist/usage/store.js.map +1 -1
  685. package/dist/vite/client.d.ts.map +1 -1
  686. package/dist/vite/client.js +44 -12
  687. package/dist/vite/client.js.map +1 -1
  688. package/dist/workspace-files/schema.d.ts +8 -8
  689. package/dist/workspace-files/tool.d.ts.map +1 -1
  690. package/dist/workspace-files/tool.js +0 -1
  691. package/dist/workspace-files/tool.js.map +1 -1
  692. package/docs/content/a2a-protocol.md +18 -12
  693. package/docs/content/actions.md +42 -10
  694. package/docs/content/agent-mentions.md +7 -8
  695. package/docs/content/agent-teams.md +23 -37
  696. package/docs/content/agent-web-surfaces.md +18 -9
  697. package/docs/content/authentication.md +6 -17
  698. package/docs/content/automations.md +43 -15
  699. package/docs/content/cli-adapters.md +25 -24
  700. package/docs/content/client.md +66 -17
  701. package/docs/content/cloneable-saas.md +19 -23
  702. package/docs/content/code-agents-ui.md +3 -31
  703. package/docs/content/components.md +308 -0
  704. package/docs/content/context-awareness.md +4 -0
  705. package/docs/content/creating-templates.md +4 -2
  706. package/docs/content/cross-app-sso.md +45 -19
  707. package/docs/content/database.md +26 -1
  708. package/docs/content/deployment.md +3 -1
  709. package/docs/content/dispatch.md +9 -37
  710. package/docs/content/drop-in-agent.md +123 -2
  711. package/docs/content/embedding-sdk.md +35 -0
  712. package/docs/content/extensions.md +2 -2
  713. package/docs/content/external-agents.md +86 -171
  714. package/docs/content/faq.md +6 -27
  715. package/docs/content/frames.md +9 -12
  716. package/docs/content/getting-started.md +80 -77
  717. package/docs/content/key-concepts.md +29 -19
  718. package/docs/content/mcp-apps.md +103 -0
  719. package/docs/content/mcp-clients.md +2 -2
  720. package/docs/content/mcp-protocol.md +40 -17
  721. package/docs/content/messaging.md +11 -4
  722. package/docs/content/migration-workbench.md +4 -47
  723. package/docs/content/multi-app-workspace.md +48 -17
  724. package/docs/content/multi-tenancy.md +1 -1
  725. package/docs/content/notifications.md +8 -6
  726. package/docs/content/observability.md +26 -15
  727. package/docs/content/onboarding.md +7 -1
  728. package/docs/content/pr-visual-recap.md +203 -23
  729. package/docs/content/progress.md +5 -5
  730. package/docs/content/pure-agent-apps.md +3 -1
  731. package/docs/content/real-time-collaboration.md +106 -0
  732. package/docs/content/recurring-jobs.md +17 -1
  733. package/docs/content/security.md +17 -3
  734. package/docs/content/server.md +39 -3
  735. package/docs/content/sharing.md +20 -1
  736. package/docs/content/skills-guide.md +151 -125
  737. package/docs/content/template-analytics.md +8 -0
  738. package/docs/content/template-assets.md +2 -0
  739. package/docs/content/template-brain.md +59 -3
  740. package/docs/content/template-calendar.md +8 -0
  741. package/docs/content/template-clips.md +11 -2
  742. package/docs/content/template-content.md +24 -4
  743. package/docs/content/template-design.md +19 -17
  744. package/docs/content/template-dispatch.md +2 -0
  745. package/docs/content/template-forms.md +28 -1
  746. package/docs/content/template-mail.md +17 -0
  747. package/docs/content/template-plan.md +177 -10
  748. package/docs/content/template-slides.md +51 -12
  749. package/docs/content/template-videos.md +17 -0
  750. package/docs/content/tracking.md +17 -13
  751. package/docs/content/using-your-agent.md +15 -5
  752. package/docs/content/voice-input.md +1 -1
  753. package/docs/content/what-is-agent-native.md +5 -6
  754. package/docs/content/workspace-connections.md +138 -424
  755. package/docs/content/workspace-management.md +12 -128
  756. package/docs/content/workspace.md +125 -199
  757. package/docs/content/writing-agent-instructions.md +17 -1
  758. package/package.json +25 -6
  759. package/src/templates/default/.agents/skills/delegate-to-agent/SKILL.md +50 -2
  760. package/src/templates/default/AGENTS.md +1 -1
  761. package/src/templates/default/DEVELOPING.md +19 -0
  762. package/src/templates/default/app/entry.client.tsx +4 -1
  763. package/src/templates/default/app/entry.server.tsx +4 -56
  764. package/src/templates/default/app/global.css +3 -2
  765. package/src/templates/default/app/root.tsx +8 -24
  766. package/src/templates/default/app/routes/_index.tsx +0 -13
  767. package/src/templates/default/package.json +6 -5
  768. package/src/templates/default/tsconfig.json +2 -1
  769. package/src/templates/starter-shell-sync.spec.ts +118 -0
  770. package/src/templates/ui-primitives-sync.spec.ts +399 -0
  771. package/src/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +50 -2
  772. package/tsconfig.base.json +2 -10
  773. package/dist/cli/app-skill.d.ts +0 -157
  774. package/dist/cli/app-skill.d.ts.map +0 -1
  775. package/dist/cli/audit-agent-web.d.ts +0 -2
  776. package/dist/cli/audit-agent-web.d.ts.map +0 -1
  777. package/dist/cli/code-agent-connector.d.ts +0 -17
  778. package/dist/cli/code-agent-connector.d.ts.map +0 -1
  779. package/dist/cli/code.d.ts +0 -66
  780. package/dist/cli/code.d.ts.map +0 -1
  781. package/dist/cli/connect.d.ts +0 -140
  782. package/dist/cli/connect.d.ts.map +0 -1
  783. package/dist/cli/context-xray-local.d.ts +0 -16
  784. package/dist/cli/context-xray-local.d.ts.map +0 -1
  785. package/dist/cli/create-workspace.d.ts +0 -8
  786. package/dist/cli/create-workspace.d.ts.map +0 -1
  787. package/dist/cli/index.d.ts +0 -3
  788. package/dist/cli/index.d.ts.map +0 -1
  789. package/dist/cli/info.d.ts +0 -2
  790. package/dist/cli/info.d.ts.map +0 -1
  791. package/dist/cli/mcp-config-writers.d.ts +0 -82
  792. package/dist/cli/mcp-config-writers.d.ts.map +0 -1
  793. package/dist/cli/mcp.d.ts +0 -16
  794. package/dist/cli/mcp.d.ts.map +0 -1
  795. package/dist/cli/migrate.d.ts +0 -38
  796. package/dist/cli/migrate.d.ts.map +0 -1
  797. package/dist/cli/plan-local.d.ts +0 -43
  798. package/dist/cli/plan-local.d.ts.map +0 -1
  799. package/dist/cli/plan-publish-store.d.ts +0 -62
  800. package/dist/cli/plan-publish-store.d.ts.map +0 -1
  801. package/dist/cli/pr-visual-recap-workflow.d.ts +0 -11
  802. package/dist/cli/pr-visual-recap-workflow.d.ts.map +0 -1
  803. package/dist/cli/recap.d.ts +0 -297
  804. package/dist/cli/recap.d.ts.map +0 -1
  805. package/dist/cli/skills.d.ts +0 -162
  806. package/dist/cli/skills.d.ts.map +0 -1
  807. package/dist/cli/workspace-dev.d.ts +0 -96
  808. package/dist/cli/workspace-dev.d.ts.map +0 -1
@@ -228,38 +228,39 @@ Actions can use CLI adapters directly for structured access:
228
228
 
229
229
  ```ts
230
230
  // actions/list-prs.ts
231
+ import { defineAction } from "@agent-native/core/server";
231
232
  import { ShellCliAdapter } from "@agent-native/core/adapters/cli";
233
+ import { z } from "zod";
232
234
 
233
235
  const gh = new ShellCliAdapter({
234
236
  command: "gh",
235
237
  description: "GitHub CLI",
236
238
  });
237
239
 
238
- export default async function listPrs() {
239
- if (!(await gh.isAvailable())) {
240
- console.error("GitHub CLI not installed. Run: brew install gh");
241
- process.exit(1);
242
- }
240
+ export default defineAction({
241
+ description: "List open pull requests via the GitHub CLI.",
242
+ schema: z.object({}),
243
+ async run() {
244
+ if (!(await gh.isAvailable())) {
245
+ throw new Error("GitHub CLI not installed. Run: brew install gh");
246
+ }
243
247
 
244
- const result = await gh.execute([
245
- "pr",
246
- "list",
247
- "--json",
248
- "title,url,state",
249
- "--limit",
250
- "10",
251
- ]);
252
-
253
- if (result.exitCode !== 0) {
254
- console.error(result.stderr);
255
- process.exit(1);
256
- }
248
+ const result = await gh.execute([
249
+ "pr",
250
+ "list",
251
+ "--json",
252
+ "title,url,state",
253
+ "--limit",
254
+ "10",
255
+ ]);
256
+
257
+ if (result.exitCode !== 0) {
258
+ throw new Error(result.stderr || "gh pr list failed");
259
+ }
257
260
 
258
- const prs = JSON.parse(result.stdout);
259
- console.error(`Fetched ${prs.length} PRs`);
260
- // Return the data (or persist it to SQL) — don't write durable state to data/.
261
- return prs;
262
- }
261
+ return JSON.parse(result.stdout);
262
+ },
263
+ });
263
264
  ```
264
265
 
265
- Or skip the adapter entirely and call the CLI directly in a script — adapters are useful when you want discovery, availability checks, and consistent error handling, but they're not required. Use whichever approach fits.
266
+ Or use CLI adapters directly in a script under `scripts/` — adapters are useful when you want discovery, availability checks, and consistent error handling, but `defineAction` is required when the code runs inside the server action surface. Never call `process.exit` in an action; throw an error instead.
@@ -11,19 +11,43 @@ These client/React APIs are exported from both `@agent-native/core` and `@agent-
11
11
 
12
12
  ## File-Based Routing {#file-based-routing}
13
13
 
14
- Agent-native apps use **React Router v7** with file-based routing. Every file in `app/routes/` becomes a URL.
14
+ Agent-native apps use **React Router v7** with file-based routing via `flatRoutes()` from `@react-router/fs-routes`. Every file in `app/routes/` becomes a URL. Templates use the dot-notation convention — dots separate URL segments inside a single filename.
15
15
 
16
16
  ### File → URL mapping
17
17
 
18
- | File | URL |
19
- | -------------------------------- | ------------------------------------- |
20
- | `app/routes/_index.tsx` | `/` |
21
- | `app/routes/settings.tsx` | `/settings` |
22
- | `app/routes/inbox/index.tsx` | `/inbox` |
23
- | `app/routes/inbox/$threadId.tsx` | `/inbox/:threadId` |
24
- | `app/routes/inbox.$threadId.tsx` | `/inbox/:threadId` (flat alternative) |
18
+ | File | URL | Notes |
19
+ | --------------------- | ------------------ | -------------------------------------- |
20
+ | `_index.tsx` | `/` | Index route |
21
+ | `settings.tsx` | `/settings` | Simple page |
22
+ | `inbox.$threadId.tsx` | `/inbox/:threadId` | Dot = `/`, `$` = dynamic param |
23
+ | `_app.tsx` | (no URL segment) | Pathless layout — prefix with `_` |
24
+ | `inbox/route.tsx` | `/inbox` | Folder form — `route.tsx` is the index |
25
25
 
26
- Prefix a segment with `$` for dynamic params. Prefix with `_` to make it a pathless layout route (doesn't add a URL segment). `_index.tsx` is the index route for its folder.
26
+ Prefix a segment with `$` for a dynamic param. Prefix with `_` to make it a pathless layout route (no URL segment). Templates use `flatRoutes()` the dot-notation file above is primary; the nested-folder form `inbox/route.tsx` also works.
27
+
28
+ ## Fetching and Mutating Data {#fetching-mutating}
29
+
30
+ The primary way to read and write app data from the browser is through the action hooks. Never hand-write `fetch` calls to `/_agent-native/*` routes — use the named helpers instead (see [Actions](/docs/actions)).
31
+
32
+ ```tsx
33
+ import {
34
+ useActionQuery,
35
+ useActionMutation,
36
+ callAction,
37
+ } from "@agent-native/core/client";
38
+
39
+ // Read: auto-cached, auto-invalidated on mutations
40
+ const { data, isLoading } = useActionQuery("get-lead", { leadId });
41
+
42
+ // Mutate: emits a change event so query caches refetch
43
+ const { mutate, isPending } = useActionMutation("create-lead");
44
+ mutate({ name: "Alice", company: "Acme" });
45
+
46
+ // Imperative: for one-off calls outside a component
47
+ await callAction("archive-lead", { leadId });
48
+ ```
49
+
50
+ ---
27
51
 
28
52
  ### Adding a new page
29
53
 
@@ -106,6 +130,28 @@ sendToAgentChat({
106
130
  });
107
131
  ```
108
132
 
133
+ ### Silent background sends {#background-send}
134
+
135
+ Use `background: true` when a UI action should kick off real agent work without
136
+ opening or focusing the sidebar. This still creates a normal chat thread/run,
137
+ uses the agent's tools/actions/context, and keeps the work observable through
138
+ the runs tray; it is not a raw one-shot model call.
139
+
140
+ ```ts
141
+ const tabId = sendToAgentChat({
142
+ message: "Analyze this import and create any missing records",
143
+ context: `Import batch id: ${batchId}`,
144
+ submit: true,
145
+ newTab: true,
146
+ background: true,
147
+ openSidebar: false,
148
+ });
149
+ ```
150
+
151
+ `background` is intended to be paired with `newTab` so the hidden work does not
152
+ overwrite the user's active conversation. Use the returned `tabId` if the UI
153
+ needs to correlate follow-up status or deep-link into the run later.
154
+
109
155
  ### AgentChatMessage {#agentchatmessage}
110
156
 
111
157
  | Option | Type | Description |
@@ -326,14 +372,17 @@ function App() {
326
372
 
327
373
  ### Options {#usedbsync-options}
328
374
 
329
- | Option | Type | Description |
330
- | -------------- | ------------------ | -------------------------------------------------------------------------------------- |
331
- | `queryClient` | `QueryClient?` | React-query client for cache invalidation |
332
- | `queryKeys` | `string[]?` | Deprecated and ignored; kept for old call sites |
333
- | `pollUrl` | `string?` | Poll endpoint URL. Default: `"/_agent-native/poll"` |
334
- | `sseUrl` | `string \| false?` | SSE endpoint URL. Default: `"/_agent-native/events"`; pass `false` to use polling only |
335
- | `ignoreSource` | `string?` | Per-tab request source to ignore so a tab does not refetch from its own writes |
336
- | `onEvent` | `(data) => void` | Optional callback when SSE/polling receives a change event |
375
+ | Option | Type | Description |
376
+ | ------------------ | ------------------ | -------------------------------------------------------------------------------------- |
377
+ | `queryClient` | `QueryClient?` | React-query client for cache invalidation |
378
+ | `queryKeys` | `string[]?` | Deprecated and ignored; kept for old call sites |
379
+ | `pollUrl` | `string?` | Poll endpoint URL. Default: `"/_agent-native/poll"` |
380
+ | `sseUrl` | `string \| false?` | SSE endpoint URL. Default: `"/_agent-native/events"`; pass `false` to use polling only |
381
+ | `interval` | `number?` | Polling interval in ms. Default: `2000` |
382
+ | `fallbackInterval` | `number?` | Fallback polling interval when SSE is unavailable. Default: `15000` |
383
+ | `pauseWhenHidden` | `boolean?` | Pause polling when the browser tab is hidden. Default: `true` |
384
+ | `ignoreSource` | `string?` | Per-tab request source to ignore so a tab does not refetch from its own writes |
385
+ | `onEvent` | `(data) => void` | Optional callback when SSE/polling receives a change event |
337
386
 
338
387
  For normal CRUD, prefer `useActionQuery` and `useActionMutation`; mutating actions emit `source: "action"` and those hooks refetch automatically.
339
388
 
@@ -13,21 +13,23 @@ Most "templates" give you a blank scaffold and a long TODO list. Agent-native fl
13
13
 
14
14
  Each one is a real app you could use today, and the launching pad for your own version of it.
15
15
 
16
- | Template | What it is |
17
- | ------------- | -------------------------------------------------------------------------------------------------------------- |
18
- | **Mail** | An agent-native Superhuman. Inbox, labels, AI triage, keyboard-first, drafts and sends through the agent. |
19
- | **Calendar** | An agent-native Google Calendar. Events, sync, public booking links, agent-driven scheduling. |
20
- | **Content** | An agent-native Notion / Google Docs. Markdown + Tiptap editor, Notion sync, real-time multi-user collab. |
21
- | **Brain** | Clean company chat backed by cited institutional memory, approved sources, review gates, and citations. |
22
- | **Assets** | Digital asset manager for brand libraries, uploads, references, and on-brand image/video generation. |
23
- | **Slides** | An agent-native Google Slides. React-based decks the agent generates and edits directly. |
24
- | **Video** | An agent-native video editor on Remotion. Prompt for a cut, the agent assembles it. |
25
- | **Analytics** | An agent-native Amplitude/Mixpanel. Connect data sources, prompt for charts, pin to dashboards. |
26
- | **Clips** | Replaces Loom — async screen + camera recording with transcription, chapters, AI summaries. |
27
- | **Design** | Agent-native HTML prototyping studio for interactive Alpine/Tailwind designs. |
28
- | **Forms** | An agent-native Typeform. Build, share, collect, and route submissions to Slack, Sheets, webhooks, or Discord. |
29
- | **Dispatch** | The workspace control plane: shared secrets, reusable integrations, Slack/Telegram, scheduled jobs. |
30
- | **Starter** | The minimal scaffold. Agent chat plus the architecture, nothing else. Build something new. |
16
+ | Template | What it is |
17
+ | ----------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
18
+ | [**Mail**](/docs/template-mail) | An agent-native Superhuman. Inbox, labels, AI triage, keyboard-first, drafts and sends through the agent. |
19
+ | [**Calendar**](/docs/template-calendar) | An agent-native Google Calendar. Events, sync, public booking links, agent-driven scheduling. |
20
+ | [**Content**](/docs/template-content) | An agent-native Notion / Google Docs. Markdown + Tiptap editor, Notion sync, real-time multi-user collab. |
21
+ | [**Brain**](/docs/template-brain) | Clean company chat backed by cited institutional memory, approved sources, review gates, and citations. |
22
+ | [**Assets**](/docs/template-assets) | Digital asset manager for brand libraries, uploads, references, and on-brand image/video generation. |
23
+ | [**Slides**](/docs/template-slides) | An agent-native Google Slides. React-based decks the agent generates and edits directly. |
24
+ | [**Video**](/docs/template-videos) | Programmatic motion graphics and product-demo videos on Remotion. |
25
+ | [**Analytics**](/docs/template-analytics) | An agent-native Amplitude/Mixpanel. Connect data sources, prompt for charts, pin to dashboards. |
26
+ | [**Clips**](/docs/template-clips) | Async screen + camera recording with transcription, chapters, and AI summaries. |
27
+ | [**Design**](/docs/template-design) | Agent-native HTML prototyping studio for interactive Alpine/Tailwind designs. |
28
+ | [**Forms**](/docs/template-forms) | An agent-native Typeform. Build, share, collect, and route submissions to Slack, Sheets, webhooks, or Discord. |
29
+ | [**Plan**](/docs/template-plan) | Visual plans and PR recaps with diagrams, wireframes, and annotations. |
30
+ | [**Dispatch**](/docs/template-dispatch) | The workspace control plane: shared secrets, reusable integrations, Slack/Telegram, scheduled jobs. |
31
+
32
+ Don't want a domain template? See [Pure-Agent Apps / Starter](/docs/pure-agent-apps) for the minimal scaffold.
31
33
 
32
34
  See the full catalog under [Templates](/templates), or jump straight to one — for example, [Dispatch](/docs/template-dispatch) is a great place to start if you want a workspace-style app.
33
35
 
@@ -70,13 +72,7 @@ You don't have to. Every template is also available as a hosted app on `agent-na
70
72
 
71
73
  ## Try it with a skill {#try-with-a-skill}
72
74
 
73
- Don't want to scaffold a whole app yet? Add agent-native superpowers to a coding agent you already use — Claude Code, Codex, or Cursor — with a single command. Installing the **Plans** skill turns the plans your agent writes into structured, reviewable docs with diagrams, wireframes, and inline comments:
74
-
75
- ```bash
76
- npx @agent-native/core@latest skills add visual-plan
77
- ```
78
-
79
- That one command installs the skill instructions, registers the hosted MCP connector, and signs you in — no marketplace browsing, no manual OAuth. Then run `/visual-plan` in your agent. See the [Skills Guide](/docs/skills-guide#app-backed-skills) for more skills, local/offline installs, and how app-backed skills work.
75
+ Not ready to scaffold? You can add agent-native superpowers to a coding agent you already use with a single command no app needed. See [Try it with a skill](/docs/getting-started#try-with-a-skill) in Getting Started.
80
76
 
81
77
  ## Building on this
82
78
 
@@ -91,7 +87,7 @@ That one command installs the skill instructions, registers the hosted MCP conne
91
87
  If you're scaffolding now, the CLI command is:
92
88
 
93
89
  ```bash
94
- pnpm dlx @agent-native/core create my-platform
90
+ npx @agent-native/core create my-platform
95
91
  ```
96
92
 
97
93
  You'll get a multi-select picker. Pick one app (standalone) or several (workspace — apps share auth, brand, agent config, and database). Each picked template is scaffolded into `apps/<name>/` with every file you need.
@@ -13,13 +13,7 @@ There are three layers:
13
13
  - **Desktop**: the left-sidebar Code tab adds native terminal launch, app webviews, and desktop deep links while using the same run model.
14
14
  - **Shared UI**: `@agent-native/code-agents-ui` renders the reusable React surface.
15
15
 
16
- The current split is intentionally converging: the standard agent sidebar and
17
- Agent Teams run on the core `run-manager` lifecycle, while Agent-Native Code
18
- uses local long-running sessions backed by the file-based Code run store and the
19
- shared background-run controller vocabulary. New surfaces should build on the
20
- shared background-run adapter/foundation instead of inventing another
21
- lifecycle, so CLI, Desktop, background sessions, and sub-agents keep moving
22
- toward one run model.
16
+ The current split is intentionally converging: the standard agent sidebar and Agent Teams run on the core `run-manager` lifecycle, while Agent-Native Code uses local long-running sessions backed by the file-based Code run store and the shared background-run controller vocabulary.
23
17
 
24
18
  The shared UI is host-driven. It does not know whether it is running in Electron, a browser template, or a future hosted shell. Hosts provide a `CodeAgentsHost` implementation.
25
19
 
@@ -106,10 +100,6 @@ agent-native "fix the failing auth tests"
106
100
  agent-native code
107
101
  ```
108
102
 
109
- Inside the framework checkout, use `pnpm dev:cli ...` to exercise the source
110
- CLI before a build, for example `pnpm dev:cli --help` or
111
- `pnpm dev:cli code goals`.
112
-
113
103
  Use `agent-native code` when you want the explicit namespace. Built-in slash
114
104
  goals and project commands can run inside the interactive workspace or directly
115
105
  from the shell:
@@ -221,7 +211,8 @@ Browser hosts should return a graceful `openTerminal` error instead of trying to
221
211
  ## Shared Composer
222
212
 
223
213
  Agent-Native Code uses the same `AgentComposerFrame` + `PromptComposer` /
224
- `TiptapComposer` stack as the framework agent sidebar. Do not fork a separate
214
+ `TiptapComposer` stack exported from `@agent-native/core/client/composer` as the
215
+ framework agent sidebar. Do not fork a separate
225
216
  textarea, coding-tool picker, upload picker, voice button, model picker, or Enter-to-submit
226
217
  implementation for Code-like surfaces. If a host needs one extra control, pass
227
218
  it through the shared composer extension points so the sidebar, Code UI, and
@@ -300,11 +291,6 @@ Do not add a parallel background-agent runner just because a new surface needs a
300
291
  different layout. Build a host adapter or UI slot on top of the shared
301
292
  run-manager foundation instead.
302
293
 
303
- Regression rule for new prompt or background surfaces: Code, Brain, and the
304
- standard sidebar must keep using `PromptComposer` through the shared composer
305
- stack, and background work must use the Code run store, the background-run
306
- adapter, `run-manager`, or `agent-teams` rather than a bespoke queue/runner.
307
-
308
294
  ## Follow-Ups
309
295
 
310
296
  Follow-ups on active runs support two delivery modes:
@@ -365,20 +351,6 @@ Telegram uses the same relay through Dispatch. Supported commands are:
365
351
  /code stop <run>
366
352
  ```
367
353
 
368
- ### Smoke checklist
369
-
370
- Before shipping a remote-control change, run the automated relay route smoke in
371
- `remote-plugin.spec.ts`, then do one real-device pass:
372
-
373
- 1. Pair Desktop from Settings and confirm the host appears in mobile Sessions.
374
- 2. Start a session from mobile and confirm Desktop claims it.
375
- 3. Send `/code <prompt>` from Telegram and confirm it queues to the same host.
376
- 4. Verify transcript mirroring, follow-up, approve or deny, and stop.
377
- 5. Revoke the host from mobile and confirm new commands stay queued/offline
378
- instead of being sent to the revoked device.
379
- 6. Enable mobile push alerts and confirm command completion creates a push
380
- outbox row.
381
-
382
354
  ## Styling
383
355
 
384
356
  Import the package stylesheet:
@@ -0,0 +1,308 @@
1
+ ---
2
+ title: "Component API"
3
+ description: "Public React building blocks for custom agent UI, chat fields, conversation rendering, realtime presence, sharing, progress, and rich editors."
4
+ ---
5
+
6
+ # Component API
7
+
8
+ Agent-Native ships a full sidebar, but the sidebar is not the contract. The
9
+ contract is the runtime: chat streaming, thread state, actions, context,
10
+ attachments, model selection, runs, and SQL-backed sync. Use the stock
11
+ components when you can, and drop down a layer when you need custom product UI.
12
+
13
+ Import browser UI from focused client subpaths:
14
+
15
+ ```tsx
16
+ import { AgentSidebar } from "@agent-native/core/client";
17
+ import { PromptComposer } from "@agent-native/core/client/composer";
18
+ import { AgentConversation } from "@agent-native/core/client/conversation";
19
+ import { usePresence } from "@agent-native/core/client/collab";
20
+ import { SharedRichEditor } from "@agent-native/core/client/editor";
21
+ import { ResourcesPanel } from "@agent-native/core/client/resources";
22
+ ```
23
+
24
+ Avoid importing UI components from the bare `@agent-native/core` package. Use
25
+ `@agent-native/core/client` or a focused `@agent-native/core/client/*` subpath
26
+ so bundlers choose the browser-safe entry.
27
+
28
+ ## Agent And Chat UI {#agent-chat-ui}
29
+
30
+ | API | Import path | Use when |
31
+ | -------------------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------ |
32
+ | `<AgentSidebar>` | `@agent-native/core/client` or `/client/chat` | You want the complete sidebar around your app. |
33
+ | `<AgentToggleButton>` | `@agent-native/core/client` or `/client/chat` | You render your own header button for the sidebar. |
34
+ | `<AgentPanel>` | `@agent-native/core/client` or `/client/chat` | You want the full panel in your own layout, route, dialog, or side column. |
35
+ | `<AgentChatSurface>` | `@agent-native/core/client` or `/client/chat` | You want chat in panel or page mode without the sidebar wrapper. |
36
+ | `<AssistantChat>` | `@agent-native/core/client` or `/client/chat` | You want to own surrounding chrome while keeping the standard conversation and composer runtime. |
37
+ | `<MultiTabAssistantChat>` | `@agent-native/core/client` or `/client/chat` | You want the framework's thread tabs without `AgentPanel` chrome. |
38
+ | `createAgentChatAdapter()` | `@agent-native/core/client` or `/client/chat` | You are building a custom assistant-ui runtime and need the Agent-Native chat transport. |
39
+ | `useChatThreads()` | `@agent-native/core/client` or `/client/chat` | You need a custom thread list, history picker, or scoped chat UI. |
40
+ | `sendToAgentChat()` | `@agent-native/core/client` or `/client/chat` | A product action should hand work to the agent chat. |
41
+
42
+ The shortest custom route is still a pre-wired surface:
43
+
44
+ ```tsx
45
+ import { AgentChatSurface } from "@agent-native/core/client/chat";
46
+
47
+ export default function ChatRoute() {
48
+ return <AgentChatSurface mode="page" className="h-screen" />;
49
+ }
50
+ ```
51
+
52
+ For custom chrome around the standard runtime:
53
+
54
+ ```tsx
55
+ import { AssistantChat, useChatThreads } from "@agent-native/core/client/chat";
56
+
57
+ function CustomChat({ projectSlug }: { projectSlug: string }) {
58
+ const threads = useChatThreads(undefined, projectSlug);
59
+ const threadId = threads.activeThreadId ?? undefined;
60
+
61
+ return (
62
+ <section className="grid h-full grid-cols-[260px_1fr]">
63
+ <ThreadList
64
+ threads={threads.threads}
65
+ activeThreadId={threadId}
66
+ onSelect={threads.switchThread}
67
+ />
68
+ <AssistantChat threadId={threadId} />
69
+ </section>
70
+ );
71
+ }
72
+ ```
73
+
74
+ ## Chat Field And Composer {#composer}
75
+
76
+ Use `@agent-native/core/client/composer` when you need to place the same chat
77
+ field used by the sidebar inside custom UI.
78
+
79
+ | API | Use when |
80
+ | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
81
+ | `<PromptComposer>` | You need a ready-to-submit chat field with attachments, slash commands, references, pasted-text handling, draft persistence, voice input, and submission semantics. |
82
+ | `<AgentComposerFrame>` | You want the standard visual shell around a custom composer body. |
83
+ | `<TiptapComposer>` | You need the lowest-level rich chat field. It must be rendered inside an assistant-ui `ThreadPrimitive.Root` / composer runtime. |
84
+ | `buildPromptComposerSubmission()` | You need the same attachment and pasted-text normalization before calling your own submit handler. |
85
+ | `formatPromptWithAttachments()` | You need to render hidden attachment metadata into a prompt string. |
86
+
87
+ Most custom UIs should start with `PromptComposer`:
88
+
89
+ ```tsx
90
+ import { PromptComposer } from "@agent-native/core/client/composer";
91
+
92
+ <PromptComposer
93
+ placeholder="Ask the agent..."
94
+ onSubmit={async (text, files, references, options) => {
95
+ await sendMessageToYourRuntime({ text, files, references, options });
96
+ }}
97
+ />;
98
+ ```
99
+
100
+ Use `TiptapComposer` only if you are already wiring assistant-ui primitives
101
+ yourself. It is the field, not the whole chat runtime.
102
+
103
+ ## Conversation Rendering {#conversation}
104
+
105
+ Use `@agent-native/core/client/conversation` for transcript-style rendering
106
+ outside the full agent runtime.
107
+
108
+ | API | Use when |
109
+ | ----------------------------------------------- | ---------------------------------------------------------------- |
110
+ | `<AgentConversation>` | Render a list of normalized agent messages. |
111
+ | `<AgentConversationMessageView>` | Render one normalized message. |
112
+ | `normalizeCodeAgentTranscriptForConversation()` | Convert code-agent transcript events into conversation messages. |
113
+ | `useNearBottomAutoscroll()` | Keep a custom transcript pinned to the bottom while streaming. |
114
+
115
+ This layer is intentionally data-first: you own where messages come from, and
116
+ the renderer owns consistent markdown, attachments, notices, artifacts, and
117
+ tool-call display.
118
+
119
+ ## Realtime Collab And Presence {#collab-presence}
120
+
121
+ Use `@agent-native/core/client/collab` for Liveblocks-style presence and
122
+ collaborative document hooks.
123
+
124
+ | API | Use when |
125
+ | --------------------------------------------------- | ------------------------------------------------------------------------------------------- |
126
+ | `useCollaborativeDoc()` | Bind a rich text editor or custom Yjs surface to `/_agent-native/collab`. |
127
+ | `usePresence()` | Publish and render arbitrary awareness fields: cursors, selections, viewport, mode. |
128
+ | `<PresenceBar>` | Show active human and agent collaborators. |
129
+ | `<LiveCursorOverlay>` | Render remote cursor labels over a positioned container. |
130
+ | `<RemoteSelectionRings>` | Render remote selection outlines over DOM elements. |
131
+ | `useFollowUser()` | Follow another participant's viewport or selection. |
132
+ | `useCollaborativeMap()` / `useCollaborativeArray()` | Experiment with structured Y.Map/Y.Array state when rich-text body collab is the wrong fit. |
133
+ | `dedupeCollabUsersByEmail()` | Build a custom avatar stack without duplicate tabs for the same user. |
134
+
135
+ Server-side agent actions that want to appear as a live participant use the
136
+ lower-level `@agent-native/core/collab` agent presence helpers:
137
+
138
+ ```ts
139
+ import {
140
+ agentEnterDocument,
141
+ agentLeaveDocument,
142
+ agentUpdateSelection,
143
+ } from "@agent-native/core/collab";
144
+ ```
145
+
146
+ ## Rich Editor {#rich-editor}
147
+
148
+ Use `@agent-native/core/client/editor` when you need the shared markdown editor
149
+ surface used by plans, content, resources, and collaborative document
150
+ experiences.
151
+
152
+ | API | Use when |
153
+ | -------------------------------- | ---------------------------------------------------------------------------------------------------- |
154
+ | `<SharedRichEditor>` | You need the current, configurable editor with markdown serialization, optional Yjs, and app extras. |
155
+ | `<RichMarkdownEditor>` | You need the backwards-compatible alias for the shared rich editor. |
156
+ | `createSharedEditorExtensions()` | You are building your own Tiptap editor but want the framework schema and markdown dialects. |
157
+ | `<SlashCommandMenu>` | You need the shared slash-command UI for a custom Tiptap surface. |
158
+ | `<BubbleToolbar>` | You need the shared selection toolbar for marks, links, and custom inline actions. |
159
+ | `createRegistryBlockNode()` | You need registry-backed block nodes inside a rich editor. |
160
+ | `uploadEditorImage()` | You want the framework upload-image action behind the editor's shared image block. |
161
+ | `useCollabReconcile()` | You are binding a custom editor surface to a Yjs doc while preserving markdown as saved state. |
162
+
163
+ The basic controlled editor is just markdown in and markdown out:
164
+
165
+ ```tsx
166
+ import { SharedRichEditor } from "@agent-native/core/client/editor";
167
+
168
+ <SharedRichEditor
169
+ value={markdown}
170
+ onChange={setMarkdown}
171
+ placeholder="Write notes..."
172
+ features={{ tables: true, tasks: true, link: true }}
173
+ />;
174
+ ```
175
+
176
+ For realtime editing, pair it with the collab subpath:
177
+
178
+ ```tsx
179
+ import {
180
+ emailToColor,
181
+ useCollaborativeDoc,
182
+ } from "@agent-native/core/client/collab";
183
+ import { SharedRichEditor } from "@agent-native/core/client/editor";
184
+
185
+ const editorUser = {
186
+ name: user.name,
187
+ email: user.email,
188
+ color: emailToColor(user.email),
189
+ };
190
+ const collab = useCollaborativeDoc({
191
+ docId,
192
+ user: editorUser,
193
+ });
194
+
195
+ <SharedRichEditor
196
+ value={markdown}
197
+ onChange={setMarkdown}
198
+ ydoc={collab.ydoc}
199
+ awareness={collab.awareness}
200
+ user={editorUser}
201
+ />;
202
+ ```
203
+
204
+ ## Workspace Resources {#resources}
205
+
206
+ Use `@agent-native/core/client/resources` when you want to expose the same
207
+ workspace resource model that powers the agent panel's Workspace tab.
208
+
209
+ | API | Use when |
210
+ | --------------------------------------------------------------------- | ----------------------------------------------------------------------- |
211
+ | `<ResourcesPanel>` | You want the complete Workspace tab as a page, drawer, or custom panel. |
212
+ | `<ResourceTree>` | You want to render your own resource browser around framework data. |
213
+ | `<ResourceEditor>` | You want the framework editor for a selected resource. |
214
+ | `useResourceTree()` | You need a scoped tree for personal, shared, or workspace resources. |
215
+ | `useResource()` | You need the content and metadata for one selected resource. |
216
+ | `useCreateResource()` / `useUpdateResource()` / `useDeleteResource()` | You need custom controls around the resource lifecycle. |
217
+ | `useUploadResource()` | You need file upload into the framework resource store. |
218
+
219
+ The complete panel needs no props:
220
+
221
+ ```tsx
222
+ import { ResourcesPanel } from "@agent-native/core/client/resources";
223
+
224
+ <ResourcesPanel />;
225
+ ```
226
+
227
+ For custom resource chrome, keep the hooks and primitives together:
228
+
229
+ ```tsx
230
+ import { useState } from "react";
231
+ import {
232
+ ResourceEditor,
233
+ ResourceTree,
234
+ useResource,
235
+ useResourceTree,
236
+ useUpdateResource,
237
+ } from "@agent-native/core/client/resources";
238
+
239
+ function WorkspaceResources() {
240
+ const tree = useResourceTree("workspace");
241
+ const updateResource = useUpdateResource();
242
+ const [selectedId, setSelectedId] = useState<string | null>(null);
243
+ const resource = useResource(selectedId);
244
+
245
+ return (
246
+ <div className="grid h-full grid-cols-[260px_1fr]">
247
+ <ResourceTree
248
+ tree={tree.data ?? []}
249
+ selectedId={selectedId}
250
+ onSelect={(item) => setSelectedId(item.id)}
251
+ onCreateFile={() => {}}
252
+ onCreateFolder={() => {}}
253
+ onDelete={() => {}}
254
+ onRename={() => {}}
255
+ onDrop={() => {}}
256
+ />
257
+ {resource.data ? (
258
+ <ResourceEditor
259
+ resource={resource.data}
260
+ onSave={(content) =>
261
+ updateResource.mutate({ id: resource.data.id, content })
262
+ }
263
+ />
264
+ ) : null}
265
+ </div>
266
+ );
267
+ }
268
+ ```
269
+
270
+ ## Other Public UI {#other-ui}
271
+
272
+ | Area | APIs | Import path |
273
+ | ------------- | ------------------------------------------------------ | ----------------------------------------- |
274
+ | Sharing | `<ShareButton>`, `<ShareDialog>`, `<VisibilityBadge>` | `@agent-native/core/client/sharing` |
275
+ | Notifications | `<NotificationsBell>` | `@agent-native/core/client/notifications` |
276
+ | Progress | `<RunsTray>`, progress hooks and types | `@agent-native/core/client/progress` |
277
+ | Onboarding | `useOnboarding()`, onboarding panel hooks | `@agent-native/core/client/onboarding` |
278
+ | Observability | `<ObservabilityDashboard>`, `<ThumbsFeedback>` | `@agent-native/core/client/observability` |
279
+ | Resources | `<ResourcesPanel>`, `<ResourceTree>`, resource hooks | `@agent-native/core/client/resources` |
280
+ | Rich editor | `<SharedRichEditor>`, slash commands, block node hooks | `@agent-native/core/client/editor` |
281
+
282
+ ## One-Off Text Completion {#one-off-text-completion}
283
+
284
+ If you truly need raw text-in/text-out, keep it server-side and use
285
+ `completeText()` from `@agent-native/core/server`. Wrap user-facing usage in an
286
+ action so the UI and agent share the same capability.
287
+
288
+ ```ts
289
+ import { defineAction } from "@agent-native/core";
290
+ import { completeText } from "@agent-native/core/server";
291
+
292
+ export default defineAction({
293
+ description: "Classify a short message",
294
+ run: async ({ body }: { body: string }) => {
295
+ const result = await completeText({
296
+ systemPrompt: "Return exactly one label.",
297
+ input: body,
298
+ maxOutputTokens: 12,
299
+ temperature: 0,
300
+ });
301
+ return { label: result.text.trim() };
302
+ },
303
+ });
304
+ ```
305
+
306
+ Use `sendToAgentChat({ background: true, openSidebar: false })` instead when
307
+ the work needs tools, state, auditability, user steering, or multi-step
308
+ reasoning.
@@ -5,12 +5,16 @@ description: "How the agent knows what the user is looking at: navigation state,
5
5
 
6
6
  # Context Awareness
7
7
 
8
+ > **Developer page.** This page is for developers wiring the app's context layer. For the end-user experience — how the agent uses that context in conversation — see [Using Your Agent](/docs/using-your-agent).
9
+
8
10
  How the agent knows what the user is looking at -- and how the agent can control what the user sees.
9
11
 
10
12
  ## Overview {#overview}
11
13
 
12
14
  Without context awareness, the agent is blind. It asks "which email?" when the user is staring at one. It cannot act on the current selection, cannot provide relevant suggestions, and cannot modify what the user sees. With context awareness, the user can click a row, highlight a paragraph, select a slide element, or press Cmd+I, then say "summarize this" and the agent already knows what "this" means.
13
15
 
16
+ Six patterns solve this. To understand what to put in which surface (AGENTS.md vs. skills vs. application_state), see [Writing Agent Instructions — The four surfaces the agent sees](/docs/writing-agent-instructions#four-surfaces).
17
+
14
18
  Six patterns solve this:
15
19
 
16
20
  1. **Navigation state** -- the UI writes a `navigation` key to application-state on every route change