@agent-native/core 0.6.1 → 0.7.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 (473) hide show
  1. package/README.md +43 -3
  2. package/dist/agent/production-agent.d.ts.map +1 -1
  3. package/dist/agent/production-agent.js +154 -4
  4. package/dist/agent/production-agent.js.map +1 -1
  5. package/dist/agent/types.d.ts +1 -1
  6. package/dist/agent/types.d.ts.map +1 -1
  7. package/dist/cli/create-workspace.d.ts +8 -0
  8. package/dist/cli/create-workspace.d.ts.map +1 -0
  9. package/dist/cli/create-workspace.js +18 -0
  10. package/dist/cli/create-workspace.js.map +1 -0
  11. package/dist/cli/create.d.ts +35 -7
  12. package/dist/cli/create.d.ts.map +1 -1
  13. package/dist/cli/create.js +444 -251
  14. package/dist/cli/create.js.map +1 -1
  15. package/dist/cli/index.js +59 -5
  16. package/dist/cli/index.js.map +1 -1
  17. package/dist/cli/workspacify.d.ts +18 -0
  18. package/dist/cli/workspacify.d.ts.map +1 -0
  19. package/dist/cli/workspacify.js +74 -0
  20. package/dist/cli/workspacify.js.map +1 -0
  21. package/dist/client/AgentPanel.d.ts +1 -1
  22. package/dist/client/AgentPanel.d.ts.map +1 -1
  23. package/dist/client/AgentPanel.js +63 -225
  24. package/dist/client/AgentPanel.js.map +1 -1
  25. package/dist/client/components/CodeRequiredDialog.d.ts.map +1 -1
  26. package/dist/client/components/CodeRequiredDialog.js +86 -5
  27. package/dist/client/components/CodeRequiredDialog.js.map +1 -1
  28. package/dist/client/composer/MentionPopover.d.ts.map +1 -1
  29. package/dist/client/composer/MentionPopover.js +15 -2
  30. package/dist/client/composer/MentionPopover.js.map +1 -1
  31. package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
  32. package/dist/client/composer/TiptapComposer.js +3 -1
  33. package/dist/client/composer/TiptapComposer.js.map +1 -1
  34. package/dist/client/composer/types.d.ts +1 -1
  35. package/dist/client/composer/types.d.ts.map +1 -1
  36. package/dist/client/integrations/IntegrationsPanel.d.ts.map +1 -1
  37. package/dist/client/integrations/IntegrationsPanel.js +22 -9
  38. package/dist/client/integrations/IntegrationsPanel.js.map +1 -1
  39. package/dist/client/onboarding/OnboardingBanner.d.ts +13 -0
  40. package/dist/client/onboarding/OnboardingBanner.d.ts.map +1 -0
  41. package/dist/client/onboarding/OnboardingBanner.js +36 -0
  42. package/dist/client/onboarding/OnboardingBanner.js.map +1 -0
  43. package/dist/client/onboarding/OnboardingPanel.d.ts +16 -0
  44. package/dist/client/onboarding/OnboardingPanel.d.ts.map +1 -0
  45. package/dist/client/onboarding/OnboardingPanel.js +360 -0
  46. package/dist/client/onboarding/OnboardingPanel.js.map +1 -0
  47. package/dist/client/onboarding/SetupButton.d.ts +10 -0
  48. package/dist/client/onboarding/SetupButton.d.ts.map +1 -0
  49. package/dist/client/onboarding/SetupButton.js +26 -0
  50. package/dist/client/onboarding/SetupButton.js.map +1 -0
  51. package/dist/client/onboarding/index.d.ts +12 -0
  52. package/dist/client/onboarding/index.d.ts.map +1 -0
  53. package/dist/client/onboarding/index.js +11 -0
  54. package/dist/client/onboarding/index.js.map +1 -0
  55. package/dist/client/onboarding/use-onboarding.d.ts +34 -0
  56. package/dist/client/onboarding/use-onboarding.d.ts.map +1 -0
  57. package/dist/client/onboarding/use-onboarding.js +101 -0
  58. package/dist/client/onboarding/use-onboarding.js.map +1 -0
  59. package/dist/client/org/TeamPage.d.ts +6 -1
  60. package/dist/client/org/TeamPage.d.ts.map +1 -1
  61. package/dist/client/org/TeamPage.js +85 -14
  62. package/dist/client/org/TeamPage.js.map +1 -1
  63. package/dist/client/resources/ResourceEditor.d.ts.map +1 -1
  64. package/dist/client/resources/ResourceEditor.js +48 -77
  65. package/dist/client/resources/ResourceEditor.js.map +1 -1
  66. package/dist/client/resources/ResourceTree.d.ts.map +1 -1
  67. package/dist/client/resources/ResourceTree.js +16 -3
  68. package/dist/client/resources/ResourceTree.js.map +1 -1
  69. package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
  70. package/dist/client/resources/ResourcesPanel.js +135 -9
  71. package/dist/client/resources/ResourcesPanel.js.map +1 -1
  72. package/dist/client/resources/use-resources.d.ts +5 -0
  73. package/dist/client/resources/use-resources.d.ts.map +1 -1
  74. package/dist/client/resources/use-resources.js.map +1 -1
  75. package/dist/client/settings/AgentsSection.d.ts +2 -0
  76. package/dist/client/settings/AgentsSection.d.ts.map +1 -0
  77. package/dist/client/settings/AgentsSection.js +198 -0
  78. package/dist/client/settings/AgentsSection.js.map +1 -0
  79. package/dist/client/settings/BackgroundAgentSection.d.ts +2 -0
  80. package/dist/client/settings/BackgroundAgentSection.d.ts.map +1 -0
  81. package/dist/client/settings/BackgroundAgentSection.js +46 -0
  82. package/dist/client/settings/BackgroundAgentSection.js.map +1 -0
  83. package/dist/client/settings/BrowserSection.d.ts +2 -0
  84. package/dist/client/settings/BrowserSection.d.ts.map +1 -0
  85. package/dist/client/settings/BrowserSection.js +10 -0
  86. package/dist/client/settings/BrowserSection.js.map +1 -0
  87. package/dist/client/settings/ComingSoonSection.d.ts +13 -0
  88. package/dist/client/settings/ComingSoonSection.d.ts.map +1 -0
  89. package/dist/client/settings/ComingSoonSection.js +9 -0
  90. package/dist/client/settings/ComingSoonSection.js.map +1 -0
  91. package/dist/client/settings/LLMSection.d.ts +2 -0
  92. package/dist/client/settings/LLMSection.d.ts.map +1 -0
  93. package/dist/client/settings/LLMSection.js +64 -0
  94. package/dist/client/settings/LLMSection.js.map +1 -0
  95. package/dist/client/settings/SettingsPanel.d.ts +8 -0
  96. package/dist/client/settings/SettingsPanel.d.ts.map +1 -0
  97. package/dist/client/settings/SettingsPanel.js +118 -0
  98. package/dist/client/settings/SettingsPanel.js.map +1 -0
  99. package/dist/client/settings/SettingsSection.d.ts +19 -0
  100. package/dist/client/settings/SettingsSection.d.ts.map +1 -0
  101. package/dist/client/settings/SettingsSection.js +10 -0
  102. package/dist/client/settings/SettingsSection.js.map +1 -0
  103. package/dist/client/settings/index.d.ts +3 -0
  104. package/dist/client/settings/index.d.ts.map +1 -0
  105. package/dist/client/settings/index.js +3 -0
  106. package/dist/client/settings/index.js.map +1 -0
  107. package/dist/client/settings/useBuilderStatus.d.ts +22 -0
  108. package/dist/client/settings/useBuilderStatus.d.ts.map +1 -0
  109. package/dist/client/settings/useBuilderStatus.js +41 -0
  110. package/dist/client/settings/useBuilderStatus.js.map +1 -0
  111. package/dist/deploy/build.js +198 -54
  112. package/dist/deploy/build.js.map +1 -1
  113. package/dist/deploy/route-discovery.d.ts +5 -0
  114. package/dist/deploy/route-discovery.d.ts.map +1 -1
  115. package/dist/deploy/route-discovery.js +38 -7
  116. package/dist/deploy/route-discovery.js.map +1 -1
  117. package/dist/deploy/workspace-core.d.ts +28 -0
  118. package/dist/deploy/workspace-core.d.ts.map +1 -0
  119. package/dist/deploy/workspace-core.js +223 -0
  120. package/dist/deploy/workspace-core.js.map +1 -0
  121. package/dist/deploy/workspace-deploy.d.ts +11 -0
  122. package/dist/deploy/workspace-deploy.d.ts.map +1 -0
  123. package/dist/deploy/workspace-deploy.js +148 -0
  124. package/dist/deploy/workspace-deploy.js.map +1 -0
  125. package/dist/file-upload/builder.d.ts +11 -0
  126. package/dist/file-upload/builder.d.ts.map +1 -0
  127. package/dist/file-upload/builder.js +53 -0
  128. package/dist/file-upload/builder.js.map +1 -0
  129. package/dist/file-upload/index.d.ts +4 -0
  130. package/dist/file-upload/index.d.ts.map +1 -0
  131. package/dist/file-upload/index.js +3 -0
  132. package/dist/file-upload/index.js.map +1 -0
  133. package/dist/file-upload/registry.d.ts +23 -0
  134. package/dist/file-upload/registry.d.ts.map +1 -0
  135. package/dist/file-upload/registry.js +52 -0
  136. package/dist/file-upload/registry.js.map +1 -0
  137. package/dist/file-upload/types.d.ts +37 -0
  138. package/dist/file-upload/types.d.ts.map +1 -0
  139. package/dist/file-upload/types.js +10 -0
  140. package/dist/file-upload/types.js.map +1 -0
  141. package/dist/integrations/adapters/google-docs.d.ts +89 -0
  142. package/dist/integrations/adapters/google-docs.d.ts.map +1 -0
  143. package/dist/integrations/adapters/google-docs.js +261 -0
  144. package/dist/integrations/adapters/google-docs.js.map +1 -0
  145. package/dist/integrations/adapters/slack.d.ts.map +1 -1
  146. package/dist/integrations/adapters/slack.js +34 -0
  147. package/dist/integrations/adapters/slack.js.map +1 -1
  148. package/dist/integrations/adapters/telegram.d.ts.map +1 -1
  149. package/dist/integrations/adapters/telegram.js +32 -0
  150. package/dist/integrations/adapters/telegram.js.map +1 -1
  151. package/dist/integrations/google-docs-poller.d.ts +54 -0
  152. package/dist/integrations/google-docs-poller.d.ts.map +1 -0
  153. package/dist/integrations/google-docs-poller.js +442 -0
  154. package/dist/integrations/google-docs-poller.js.map +1 -0
  155. package/dist/integrations/index.d.ts +2 -0
  156. package/dist/integrations/index.d.ts.map +1 -1
  157. package/dist/integrations/index.js +3 -0
  158. package/dist/integrations/index.js.map +1 -1
  159. package/dist/integrations/plugin.d.ts.map +1 -1
  160. package/dist/integrations/plugin.js +49 -2
  161. package/dist/integrations/plugin.js.map +1 -1
  162. package/dist/integrations/types.d.ts +33 -0
  163. package/dist/integrations/types.d.ts.map +1 -1
  164. package/dist/integrations/webhook-handler.d.ts +10 -1
  165. package/dist/integrations/webhook-handler.d.ts.map +1 -1
  166. package/dist/integrations/webhook-handler.js +13 -3
  167. package/dist/integrations/webhook-handler.js.map +1 -1
  168. package/dist/jobs/scheduler.d.ts +3 -0
  169. package/dist/jobs/scheduler.d.ts.map +1 -1
  170. package/dist/jobs/scheduler.js +81 -60
  171. package/dist/jobs/scheduler.js.map +1 -1
  172. package/dist/jobs/tools.d.ts.map +1 -1
  173. package/dist/jobs/tools.js +20 -3
  174. package/dist/jobs/tools.js.map +1 -1
  175. package/dist/mcp-client/config.d.ts +46 -0
  176. package/dist/mcp-client/config.d.ts.map +1 -0
  177. package/dist/mcp-client/config.js +152 -0
  178. package/dist/mcp-client/config.js.map +1 -0
  179. package/dist/mcp-client/index.d.ts +17 -0
  180. package/dist/mcp-client/index.d.ts.map +1 -0
  181. package/dist/mcp-client/index.js +53 -0
  182. package/dist/mcp-client/index.js.map +1 -0
  183. package/dist/mcp-client/manager.d.ts +76 -0
  184. package/dist/mcp-client/manager.d.ts.map +1 -0
  185. package/dist/mcp-client/manager.js +212 -0
  186. package/dist/mcp-client/manager.js.map +1 -0
  187. package/dist/oauth-tokens/store.d.ts.map +1 -1
  188. package/dist/oauth-tokens/store.js +3 -1
  189. package/dist/oauth-tokens/store.js.map +1 -1
  190. package/dist/onboarding/default-steps.d.ts +10 -0
  191. package/dist/onboarding/default-steps.d.ts.map +1 -0
  192. package/dist/onboarding/default-steps.js +164 -0
  193. package/dist/onboarding/default-steps.js.map +1 -0
  194. package/dist/onboarding/index.d.ts +12 -0
  195. package/dist/onboarding/index.d.ts.map +1 -0
  196. package/dist/onboarding/index.js +11 -0
  197. package/dist/onboarding/index.js.map +1 -0
  198. package/dist/onboarding/plugin.d.ts +19 -0
  199. package/dist/onboarding/plugin.d.ts.map +1 -0
  200. package/dist/onboarding/plugin.js +147 -0
  201. package/dist/onboarding/plugin.js.map +1 -0
  202. package/dist/onboarding/registry.d.ts +24 -0
  203. package/dist/onboarding/registry.d.ts.map +1 -0
  204. package/dist/onboarding/registry.js +40 -0
  205. package/dist/onboarding/registry.js.map +1 -0
  206. package/dist/onboarding/types.d.ts +71 -0
  207. package/dist/onboarding/types.d.ts.map +1 -0
  208. package/dist/onboarding/types.js +10 -0
  209. package/dist/onboarding/types.js.map +1 -0
  210. package/dist/resources/agents.d.ts +4 -0
  211. package/dist/resources/agents.d.ts.map +1 -0
  212. package/dist/resources/agents.js +44 -0
  213. package/dist/resources/agents.js.map +1 -0
  214. package/dist/resources/handlers.d.ts +17 -0
  215. package/dist/resources/handlers.d.ts.map +1 -1
  216. package/dist/resources/handlers.js +49 -12
  217. package/dist/resources/handlers.js.map +1 -1
  218. package/dist/resources/metadata.d.ts +48 -0
  219. package/dist/resources/metadata.d.ts.map +1 -0
  220. package/dist/resources/metadata.js +150 -0
  221. package/dist/resources/metadata.js.map +1 -0
  222. package/dist/resources/script-helpers.d.ts.map +1 -1
  223. package/dist/resources/script-helpers.js +3 -2
  224. package/dist/resources/script-helpers.js.map +1 -1
  225. package/dist/resources/store.d.ts.map +1 -1
  226. package/dist/resources/store.js +32 -17
  227. package/dist/resources/store.js.map +1 -1
  228. package/dist/scripts/call-agent.d.ts.map +1 -1
  229. package/dist/scripts/call-agent.js +3 -2
  230. package/dist/scripts/call-agent.js.map +1 -1
  231. package/dist/scripts/chat/search-chats.d.ts.map +1 -1
  232. package/dist/scripts/chat/search-chats.js +2 -1
  233. package/dist/scripts/chat/search-chats.js.map +1 -1
  234. package/dist/scripts/core-scripts.d.ts.map +1 -1
  235. package/dist/scripts/core-scripts.js +2 -0
  236. package/dist/scripts/core-scripts.js.map +1 -1
  237. package/dist/scripts/db/scoping.d.ts.map +1 -1
  238. package/dist/scripts/db/scoping.js +3 -2
  239. package/dist/scripts/db/scoping.js.map +1 -1
  240. package/dist/scripts/docs/index.d.ts +2 -0
  241. package/dist/scripts/docs/index.d.ts.map +1 -0
  242. package/dist/scripts/docs/index.js +4 -0
  243. package/dist/scripts/docs/index.js.map +1 -0
  244. package/dist/scripts/docs/search.d.ts +13 -0
  245. package/dist/scripts/docs/search.d.ts.map +1 -0
  246. package/dist/scripts/docs/search.js +130 -0
  247. package/dist/scripts/docs/search.js.map +1 -0
  248. package/dist/scripts/resources/delete-memory.d.ts +7 -0
  249. package/dist/scripts/resources/delete-memory.d.ts.map +1 -0
  250. package/dist/scripts/resources/delete-memory.js +49 -0
  251. package/dist/scripts/resources/delete-memory.js.map +1 -0
  252. package/dist/scripts/resources/delete.d.ts.map +1 -1
  253. package/dist/scripts/resources/delete.js +2 -1
  254. package/dist/scripts/resources/delete.js.map +1 -1
  255. package/dist/scripts/resources/index.d.ts.map +1 -1
  256. package/dist/scripts/resources/index.js +2 -0
  257. package/dist/scripts/resources/index.js.map +1 -1
  258. package/dist/scripts/resources/list.d.ts.map +1 -1
  259. package/dist/scripts/resources/list.js +2 -1
  260. package/dist/scripts/resources/list.js.map +1 -1
  261. package/dist/scripts/resources/migrate-learnings.d.ts.map +1 -1
  262. package/dist/scripts/resources/migrate-learnings.js +2 -1
  263. package/dist/scripts/resources/migrate-learnings.js.map +1 -1
  264. package/dist/scripts/resources/read.d.ts.map +1 -1
  265. package/dist/scripts/resources/read.js +2 -1
  266. package/dist/scripts/resources/read.js.map +1 -1
  267. package/dist/scripts/resources/save-memory.d.ts +9 -0
  268. package/dist/scripts/resources/save-memory.d.ts.map +1 -0
  269. package/dist/scripts/resources/save-memory.js +78 -0
  270. package/dist/scripts/resources/save-memory.js.map +1 -0
  271. package/dist/scripts/resources/write.d.ts.map +1 -1
  272. package/dist/scripts/resources/write.js +2 -1
  273. package/dist/scripts/resources/write.js.map +1 -1
  274. package/dist/scripts/utils.d.ts +10 -1
  275. package/dist/scripts/utils.d.ts.map +1 -1
  276. package/dist/scripts/utils.js +45 -2
  277. package/dist/scripts/utils.js.map +1 -1
  278. package/dist/server/action-discovery.d.ts +5 -0
  279. package/dist/server/action-discovery.d.ts.map +1 -1
  280. package/dist/server/action-discovery.js +51 -20
  281. package/dist/server/action-discovery.js.map +1 -1
  282. package/dist/server/action-routes.d.ts.map +1 -1
  283. package/dist/server/action-routes.js +63 -57
  284. package/dist/server/action-routes.js.map +1 -1
  285. package/dist/server/agent-chat-plugin.d.ts +3 -0
  286. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  287. package/dist/server/agent-chat-plugin.js +363 -48
  288. package/dist/server/agent-chat-plugin.js.map +1 -1
  289. package/dist/server/agent-discovery.d.ts.map +1 -1
  290. package/dist/server/agent-discovery.js +11 -23
  291. package/dist/server/agent-discovery.js.map +1 -1
  292. package/dist/server/agent-teams.d.ts.map +1 -1
  293. package/dist/server/agent-teams.js +2 -1
  294. package/dist/server/agent-teams.js.map +1 -1
  295. package/dist/server/agents-bundle.d.ts +33 -5
  296. package/dist/server/agents-bundle.d.ts.map +1 -1
  297. package/dist/server/agents-bundle.js +108 -64
  298. package/dist/server/agents-bundle.js.map +1 -1
  299. package/dist/server/auth.d.ts +1 -0
  300. package/dist/server/auth.d.ts.map +1 -1
  301. package/dist/server/auth.js +172 -60
  302. package/dist/server/auth.js.map +1 -1
  303. package/dist/server/better-auth-instance.d.ts.map +1 -1
  304. package/dist/server/better-auth-instance.js +202 -6
  305. package/dist/server/better-auth-instance.js.map +1 -1
  306. package/dist/server/builder-browser.d.ts +40 -0
  307. package/dist/server/builder-browser.d.ts.map +1 -0
  308. package/dist/server/builder-browser.js +166 -0
  309. package/dist/server/builder-browser.js.map +1 -0
  310. package/dist/server/core-routes-plugin.d.ts.map +1 -1
  311. package/dist/server/core-routes-plugin.js +152 -6
  312. package/dist/server/core-routes-plugin.js.map +1 -1
  313. package/dist/server/credential-provider.d.ts +37 -0
  314. package/dist/server/credential-provider.d.ts.map +1 -0
  315. package/dist/server/credential-provider.js +49 -0
  316. package/dist/server/credential-provider.js.map +1 -0
  317. package/dist/server/framework-request-handler.d.ts.map +1 -1
  318. package/dist/server/framework-request-handler.js +42 -3
  319. package/dist/server/framework-request-handler.js.map +1 -1
  320. package/dist/server/google-auth-plugin.js +1 -1
  321. package/dist/server/google-oauth.d.ts +1 -1
  322. package/dist/server/google-oauth.d.ts.map +1 -1
  323. package/dist/server/google-oauth.js +15 -10
  324. package/dist/server/google-oauth.js.map +1 -1
  325. package/dist/server/index.d.ts +3 -0
  326. package/dist/server/index.d.ts.map +1 -1
  327. package/dist/server/index.js +3 -0
  328. package/dist/server/index.js.map +1 -1
  329. package/dist/server/oauth-helpers.d.ts +1 -0
  330. package/dist/server/oauth-helpers.d.ts.map +1 -1
  331. package/dist/server/oauth-helpers.js +5 -4
  332. package/dist/server/oauth-helpers.js.map +1 -1
  333. package/dist/server/onboarding-html.d.ts.map +1 -1
  334. package/dist/server/onboarding-html.js +94 -3
  335. package/dist/server/onboarding-html.js.map +1 -1
  336. package/dist/server/request-context.d.ts +20 -0
  337. package/dist/server/request-context.d.ts.map +1 -0
  338. package/dist/server/request-context.js +41 -0
  339. package/dist/server/request-context.js.map +1 -0
  340. package/dist/templates/default/.agents/skills/actions/SKILL.md +2 -1
  341. package/dist/templates/default/.agents/skills/security/SKILL.md +145 -40
  342. package/dist/templates/default/.agents/skills/storing-data/SKILL.md +7 -1
  343. package/dist/templates/default/_gitignore +1 -0
  344. package/dist/templates/default/app/root.tsx +4 -1
  345. package/dist/templates/workspace-core/AGENTS.md +62 -0
  346. package/dist/templates/workspace-core/actions/company-directory.ts +38 -0
  347. package/dist/templates/workspace-core/package.json +39 -0
  348. package/dist/templates/workspace-core/skills/company-policies/SKILL.md +42 -0
  349. package/dist/templates/workspace-core/src/client/AuthenticatedLayout.tsx +37 -0
  350. package/dist/templates/workspace-core/src/client/index.ts +26 -0
  351. package/dist/templates/workspace-core/src/credentials.ts +29 -0
  352. package/dist/templates/workspace-core/src/index.ts +21 -0
  353. package/dist/templates/workspace-core/src/server/agent-chat-plugin.ts +30 -0
  354. package/dist/templates/workspace-core/src/server/auth-plugin.ts +35 -0
  355. package/dist/templates/workspace-core/src/server/index.ts +22 -0
  356. package/dist/templates/workspace-core/tailwind.preset.ts +34 -0
  357. package/dist/templates/workspace-core/tsconfig.json +9 -0
  358. package/dist/templates/workspace-root/.env.example +37 -0
  359. package/dist/templates/workspace-root/README.md +62 -0
  360. package/dist/templates/workspace-root/_gitignore +23 -0
  361. package/dist/templates/workspace-root/package.json +18 -0
  362. package/dist/templates/workspace-root/pnpm-workspace.yaml +3 -0
  363. package/dist/templates/workspace-root/tsconfig.base.json +21 -0
  364. package/dist/vite/agents-bundle-plugin.d.ts.map +1 -1
  365. package/dist/vite/agents-bundle-plugin.js +65 -15
  366. package/dist/vite/agents-bundle-plugin.js.map +1 -1
  367. package/dist/vite/client.d.ts +16 -0
  368. package/dist/vite/client.d.ts.map +1 -1
  369. package/dist/vite/client.js +75 -0
  370. package/dist/vite/client.js.map +1 -1
  371. package/docs/content/a2a-protocol.md +223 -0
  372. package/docs/content/actions.md +129 -0
  373. package/docs/content/agent-mentions.md +171 -0
  374. package/docs/content/authentication.md +155 -0
  375. package/docs/content/cli-adapters.md +244 -0
  376. package/docs/content/client.md +175 -0
  377. package/docs/content/context-awareness.md +168 -0
  378. package/docs/content/creating-templates.md +311 -0
  379. package/docs/content/database.md +82 -0
  380. package/docs/content/deployment.md +180 -0
  381. package/docs/content/enterprise-workspace.md +235 -0
  382. package/docs/content/faq.md +101 -0
  383. package/docs/content/file-uploads.md +102 -0
  384. package/docs/content/frames.md +47 -0
  385. package/docs/content/getting-started.md +104 -0
  386. package/docs/content/integrations.md +198 -0
  387. package/docs/content/key-concepts.md +246 -0
  388. package/docs/content/mcp-clients.md +110 -0
  389. package/docs/content/mcp-protocol.md +168 -0
  390. package/docs/content/onboarding.md +107 -0
  391. package/docs/content/real-time-collaboration.md +185 -0
  392. package/docs/content/resources.md +277 -0
  393. package/docs/content/security.md +158 -0
  394. package/docs/content/server.md +200 -0
  395. package/docs/content/skills-guide.md +107 -0
  396. package/docs/content/what-is-agent-native.md +100 -0
  397. package/docs/content/workspace-management.md +224 -0
  398. package/package.json +12 -2
  399. package/src/templates/default/.agents/skills/actions/SKILL.md +2 -1
  400. package/src/templates/default/.agents/skills/security/SKILL.md +145 -40
  401. package/src/templates/default/.agents/skills/storing-data/SKILL.md +7 -1
  402. package/src/templates/default/_gitignore +1 -0
  403. package/src/templates/default/app/root.tsx +4 -1
  404. package/src/templates/workspace-core/AGENTS.md +62 -0
  405. package/src/templates/workspace-core/actions/company-directory.ts +38 -0
  406. package/src/templates/workspace-core/package.json +39 -0
  407. package/src/templates/workspace-core/skills/company-policies/SKILL.md +42 -0
  408. package/src/templates/workspace-core/src/client/AuthenticatedLayout.tsx +37 -0
  409. package/src/templates/workspace-core/src/client/index.ts +26 -0
  410. package/src/templates/workspace-core/src/credentials.ts +29 -0
  411. package/src/templates/workspace-core/src/index.ts +21 -0
  412. package/src/templates/workspace-core/src/server/agent-chat-plugin.ts +30 -0
  413. package/src/templates/workspace-core/src/server/auth-plugin.ts +35 -0
  414. package/src/templates/workspace-core/src/server/index.ts +22 -0
  415. package/src/templates/workspace-core/tailwind.preset.ts +34 -0
  416. package/src/templates/workspace-core/tsconfig.json +9 -0
  417. package/src/templates/workspace-root/.env.example +37 -0
  418. package/src/templates/workspace-root/README.md +62 -0
  419. package/src/templates/workspace-root/_gitignore +23 -0
  420. package/src/templates/workspace-root/package.json +18 -0
  421. package/src/templates/workspace-root/pnpm-workspace.yaml +3 -0
  422. package/src/templates/workspace-root/tsconfig.base.json +21 -0
  423. package/dist/templates/templates/default/.agents/skills/actions/SKILL.md +0 -142
  424. package/dist/templates/templates/default/.agents/skills/agent-engines/SKILL.md +0 -127
  425. package/dist/templates/templates/default/.agents/skills/capture-learnings/SKILL.md +0 -50
  426. package/dist/templates/templates/default/.agents/skills/create-skill/SKILL.md +0 -167
  427. package/dist/templates/templates/default/.agents/skills/delegate-to-agent/SKILL.md +0 -90
  428. package/dist/templates/templates/default/.agents/skills/frontend-design/SKILL.md +0 -69
  429. package/dist/templates/templates/default/.agents/skills/real-time-collab/SKILL.md +0 -183
  430. package/dist/templates/templates/default/.agents/skills/real-time-sync/SKILL.md +0 -112
  431. package/dist/templates/templates/default/.agents/skills/security/SKILL.md +0 -108
  432. package/dist/templates/templates/default/.agents/skills/self-modifying-code/SKILL.md +0 -79
  433. package/dist/templates/templates/default/.agents/skills/storing-data/SKILL.md +0 -110
  434. package/dist/templates/templates/default/.claude/settings.json +0 -100
  435. package/dist/templates/templates/default/.env.example +0 -5
  436. package/dist/templates/templates/default/.ignore +0 -0
  437. package/dist/templates/templates/default/.prettierrc +0 -5
  438. package/dist/templates/templates/default/AGENTS.md +0 -110
  439. package/dist/templates/templates/default/DEVELOPING.md +0 -117
  440. package/dist/templates/templates/default/_gitignore +0 -37
  441. package/dist/templates/templates/default/actions/hello.ts +0 -20
  442. package/dist/templates/templates/default/actions/navigate.ts +0 -53
  443. package/dist/templates/templates/default/actions/run.ts +0 -2
  444. package/dist/templates/templates/default/actions/view-screen.ts +0 -39
  445. package/dist/templates/templates/default/app/entry.client.tsx +0 -4
  446. package/dist/templates/templates/default/app/entry.server.tsx +0 -56
  447. package/dist/templates/templates/default/app/global.css +0 -95
  448. package/dist/templates/templates/default/app/lib/utils.ts +0 -1
  449. package/dist/templates/templates/default/app/root.tsx +0 -107
  450. package/dist/templates/templates/default/app/routes/_index.tsx +0 -62
  451. package/dist/templates/templates/default/app/routes.ts +0 -4
  452. package/dist/templates/templates/default/app/vite-env.d.ts +0 -6
  453. package/dist/templates/templates/default/components.json +0 -20
  454. package/dist/templates/templates/default/data/.gitkeep +0 -0
  455. package/dist/templates/templates/default/data/sync-config.json +0 -1
  456. package/dist/templates/templates/default/learnings.defaults.md +0 -5
  457. package/dist/templates/templates/default/learnings.md +0 -0
  458. package/dist/templates/templates/default/package.json +0 -46
  459. package/dist/templates/templates/default/postcss.config.js +0 -6
  460. package/dist/templates/templates/default/public/icon-180.svg +0 -4
  461. package/dist/templates/templates/default/public/icon-192.svg +0 -4
  462. package/dist/templates/templates/default/public/icon-512.svg +0 -4
  463. package/dist/templates/templates/default/public/manifest.json +0 -13
  464. package/dist/templates/templates/default/react-router.config.ts +0 -6
  465. package/dist/templates/templates/default/server/middleware/auth.ts +0 -15
  466. package/dist/templates/templates/default/server/plugins/.gitkeep +0 -0
  467. package/dist/templates/templates/default/server/routes/[...page].get.ts +0 -5
  468. package/dist/templates/templates/default/server/routes/api/hello.get.ts +0 -5
  469. package/dist/templates/templates/default/shared/api.ts +0 -6
  470. package/dist/templates/templates/default/ssr-entry.ts +0 -20
  471. package/dist/templates/templates/default/tailwind.config.ts +0 -7
  472. package/dist/templates/templates/default/tsconfig.json +0 -11
  473. package/dist/templates/templates/default/vite.config.ts +0 -6
@@ -0,0 +1,200 @@
1
+ ---
2
+ title: "Server"
3
+ description: "Nitro server layer with file-based routing, server plugins, SSE handlers, and production agent configuration."
4
+ ---
5
+
6
+ # Server
7
+
8
+ Agent-native apps use [Nitro](https://nitro.build) for the server layer. Nitro is included automatically via the `defineConfig()` Vite plugin — you get file-based API routing, server plugins, and deploy-anywhere presets out of the box.
9
+
10
+ ## File-Based Routing {#file-based-routing}
11
+
12
+ API routes live in `server/routes/`. Nitro auto-discovers them based on file name and path:
13
+
14
+ ```text
15
+ server/routes/
16
+ api/
17
+ hello.get.ts → GET /api/hello
18
+ items/
19
+ index.get.ts → GET /api/items
20
+ index.post.ts → POST /api/items
21
+ [id].get.ts → GET /api/items/:id
22
+ [id].delete.ts → DELETE /api/items/:id
23
+ [id]/
24
+ archive.patch.ts → PATCH /api/items/:id/archive
25
+ ```
26
+
27
+ Each route file exports a default `defineEventHandler`:
28
+
29
+ ```ts
30
+ // server/routes/api/items/index.get.ts
31
+ import { defineEventHandler } from "h3";
32
+ import fs from "fs/promises";
33
+
34
+ export default defineEventHandler(async () => {
35
+ const files = await fs.readdir("./data/items");
36
+ const items = await Promise.all(
37
+ files
38
+ .filter((f) => f.endsWith(".json"))
39
+ .map(async (f) =>
40
+ JSON.parse(await fs.readFile(`./data/items/${f}`, "utf-8")),
41
+ ),
42
+ );
43
+ return items;
44
+ });
45
+ ```
46
+
47
+ ### Route naming conventions {#route-naming-conventions}
48
+
49
+ | File name pattern | HTTP method | Example path |
50
+ | ------------------ | ----------- | -------------------------- |
51
+ | `index.get.ts` | GET | `/api/items` |
52
+ | `index.post.ts` | POST | `/api/items` |
53
+ | `[id].get.ts` | GET | `/api/items/:id` |
54
+ | `[id].patch.ts` | PATCH | `/api/items/:id` |
55
+ | `[id].delete.ts` | DELETE | `/api/items/:id` |
56
+ | `[...slug].get.ts` | GET | `/api/items/* (catch-all)` |
57
+
58
+ ### Accessing route parameters {#accessing-route-parameters}
59
+
60
+ ```ts
61
+ import { defineEventHandler, getRouterParam, readBody, getQuery } from "h3";
62
+
63
+ // GET /api/items/:id
64
+ export default defineEventHandler(async (event) => {
65
+ const id = getRouterParam(event, "id");
66
+ const { filter } = getQuery(event);
67
+ // ...
68
+ });
69
+ ```
70
+
71
+ ## Server Plugins {#server-plugins}
72
+
73
+ Cross-cutting concerns — file watchers, file sync, scheduled jobs, auth — go in `server/plugins/`. Nitro runs these at startup before serving requests:
74
+
75
+ ```ts
76
+ // server/plugins/file-sync.ts
77
+ import { defineNitroPlugin } from "@agent-native/core";
78
+ import { createFileSync } from "@agent-native/core/adapters/sync";
79
+
80
+ export default defineNitroPlugin(async () => {
81
+ const result = await createFileSync({ contentRoot: "./data" });
82
+ if (result.status === "error") {
83
+ console.warn(`[app] File sync failed: ${result.reason}`);
84
+ }
85
+ });
86
+ ```
87
+
88
+ ## Shared State Between Plugins and Routes {#shared-state}
89
+
90
+ Use a shared module in `server/lib/` to pass state from plugins to route handlers:
91
+
92
+ ```ts
93
+ // server/lib/watcher.ts
94
+ import { createFileWatcher } from "@agent-native/core";
95
+ import type { SSEHandlerOptions } from "@agent-native/core";
96
+
97
+ export const watcher = createFileWatcher("./data");
98
+ export const sseExtraEmitters: NonNullable<SSEHandlerOptions["extraEmitters"]> =
99
+ [];
100
+
101
+ export let syncResult: any = { status: "disabled" };
102
+ export function setSyncResult(result: any) {
103
+ syncResult = result;
104
+ if (result.status === "ready" && result.sseEmitter) {
105
+ sseExtraEmitters.push(result.sseEmitter);
106
+ }
107
+ }
108
+ ```
109
+
110
+ The plugin populates the state at startup; route handlers read it at request time.
111
+
112
+ ## createFileWatcher(dir, options?) {#createfilewatcher}
113
+
114
+ Creates a chokidar file watcher for real-time file change detection:
115
+
116
+ ```ts
117
+ import { createFileWatcher } from "@agent-native/core";
118
+
119
+ const watcher = createFileWatcher("./data");
120
+ // watcher emits "all" events: (eventName, filePath)
121
+ ```
122
+
123
+ ### Options {#filewatcher-options}
124
+
125
+ | Option | Type | Description |
126
+ | ------------- | ------- | ------------------------------------------------- |
127
+ | `ignored` | any | Glob patterns or regex to ignore |
128
+ | `emitInitial` | boolean | Emit events for initial file scan. Default: false |
129
+
130
+ ## createSSEHandler(watcher, options?) {#createssehandler}
131
+
132
+ Creates an H3 event handler that streams file changes as Server-Sent Events:
133
+
134
+ ```ts
135
+ // server/routes/_agent-native/events.get.ts
136
+ import { createSSEHandler } from "@agent-native/core";
137
+ import { watcher, sseExtraEmitters } from "../../lib/watcher.js";
138
+
139
+ export default createSSEHandler(watcher, {
140
+ extraEmitters: sseExtraEmitters,
141
+ contentRoot: "./data",
142
+ });
143
+ ```
144
+
145
+ Each SSE message is JSON: `{ "type": "change", "path": "data/file.json" }`
146
+
147
+ ### Options {#ssehandler-options}
148
+
149
+ | Option | Type | Description |
150
+ | ------------- | --------------------------- | ------------------------------------------------- |
151
+ | extraEmitters | `Array<{ emitter, event }>` | Additional EventEmitters to stream |
152
+ | contentRoot | string | Root directory used to relativize paths in events |
153
+
154
+ ## createServer(options?) {#createserver}
155
+
156
+ Optional helper that creates a pre-configured H3 app with CORS middleware and a health-check route. Returns `{ app, router }`. Useful for programmatic route registration when file-based routing doesn't fit:
157
+
158
+ ```ts
159
+ import { createServer } from "@agent-native/core";
160
+ import { defineEventHandler } from "h3";
161
+
162
+ const { app, router } = createServer();
163
+ router.get("/api/items", defineEventHandler(listItems));
164
+ ```
165
+
166
+ ## mountAuthMiddleware(app, accessToken) {#mountauthmiddleware}
167
+
168
+ Mounts session-cookie authentication onto an H3 app. Serves a login page for unauthenticated browser requests and returns 401 for unauthenticated API requests.
169
+
170
+ ```ts
171
+ import { mountAuthMiddleware } from "@agent-native/core";
172
+
173
+ mountAuthMiddleware(app, process.env.ACCESS_TOKEN!);
174
+ ```
175
+
176
+ Adds two routes automatically: `POST /api/auth/login` and `POST /api/auth/logout`.
177
+
178
+ ## createProductionAgentHandler(options) {#createproductionagenthandler}
179
+
180
+ Creates an H3 SSE handler at `POST /_agent-native/agent-chat` that runs an agentic tool loop using Claude. Each script's `run()` function is registered as a tool the agent can invoke.
181
+
182
+ ```ts
183
+ import { createProductionAgentHandler } from "@agent-native/core";
184
+ import { scripts } from "./scripts/registry.js";
185
+ import { readFileSync } from "fs";
186
+
187
+ const agent = createProductionAgentHandler({
188
+ scripts,
189
+ systemPrompt: readFileSync("agents/system-prompt.md", "utf-8"),
190
+ });
191
+ ```
192
+
193
+ ### Options {#agent-handler-options}
194
+
195
+ | Option | Type | Description |
196
+ | -------------- | ----------------------------- | ------------------------------------------------- |
197
+ | `scripts` | `Record<string, ScriptEntry>` | Map of script name → { tool, run } entries |
198
+ | `systemPrompt` | string | System prompt for the embedded agent |
199
+ | `apiKey` | string | Anthropic API key. Default: ANTHROPIC_API_KEY env |
200
+ | `model` | string | Model to use. Default: claude-sonnet-4-6 |
@@ -0,0 +1,107 @@
1
+ ---
2
+ title: "Skills Guide"
3
+ description: "How skills work in agent-native: framework skills, domain skills, and creating custom skills."
4
+ ---
5
+
6
+ # Skills Guide
7
+
8
+ Skills are Markdown files that give the agent deep knowledge about specific patterns and workflows.
9
+
10
+ ## What are skills {#what-are-skills}
11
+
12
+ Skills live at `.agents/skills/<name>/SKILL.md` and contain detailed guidance for the agent. Each skill focuses on one concern — how to store data, how to sync state, how to delegate work to the agent chat.
13
+
14
+ The agent reads skills when it needs to follow a specific pattern. Skills are referenced in `AGENTS.md` and triggered by the agent's tool system when relevant.
15
+
16
+ ## Framework skills {#framework-skills}
17
+
18
+ These skills ship with the framework and apply to all agent-native apps:
19
+
20
+ | Skill | When to use |
21
+ | --------------------- | ------------------------------------------------------ |
22
+ | `storing-data` | Adding data models, reading/writing config or state |
23
+ | `real-time-sync` | Wiring polling sync, debugging UI not updating |
24
+ | `delegate-to-agent` | Delegating AI work from UI or actions to the agent |
25
+ | `actions` | Creating or running agent actions |
26
+ | `self-modifying-code` | Editing app source, components, or styles |
27
+ | `create-skill` | Adding new skills for the agent |
28
+ | `capture-learnings` | Recording corrections and patterns |
29
+ | `frontend-design` | Building or styling any web UI, components, or pages |
30
+ | `adding-a-feature` | The four-area checklist: UI, script, skills, app-state |
31
+ | `context-awareness` | Exposing UI state to the agent, view-screen, navigate |
32
+ | `a2a-protocol` | Inter-agent communication via JSON-RPC |
33
+
34
+ ## Domain skills {#domain-skills}
35
+
36
+ Templates include skills specific to their domain. These live in the same `.agents/skills/` directory but cover template-specific patterns:
37
+
38
+ - **Mail template** — email-drafts, thread-management, label-system
39
+ - **Forms template** — form-building, field-types, submission-handling
40
+ - **Analytics template** — chart-types, data-connectors, query-patterns
41
+ - **Slides template** — deck-management, slide-layouts, theme-system
42
+
43
+ Domain skills follow the same format as framework skills. They encode patterns specific to the template that the agent needs to follow.
44
+
45
+ ## Creating custom skills {#creating-skills}
46
+
47
+ Create a skill when:
48
+
49
+ - There's a pattern the agent should follow repeatedly
50
+ - A workflow needs step-by-step guidance
51
+ - You want to scaffold files from a template
52
+
53
+ Don't create a skill when:
54
+
55
+ - The guidance already exists in another skill — extend it instead
56
+ - The guidance is a one-off — put it in `AGENTS.md` or `learnings.md` instead
57
+
58
+ ## Skill format {#skill-format}
59
+
60
+ Each skill is a Markdown file with YAML frontmatter:
61
+
62
+ ```markdown
63
+ ---
64
+ name: my-skill
65
+ description: >-
66
+ One-line description of what this skill covers and when
67
+ the agent should use it.
68
+ ---
69
+
70
+ # Skill Title
71
+
72
+ ## Rule
73
+
74
+ The core invariant — what must always be true.
75
+
76
+ ## Why
77
+
78
+ Why this rule exists. Motivates the agent to follow it.
79
+
80
+ ## How
81
+
82
+ Step-by-step instructions with code examples.
83
+
84
+ ## Do
85
+
86
+ - Concrete actions the agent should take
87
+
88
+ ## Don't
89
+
90
+ - Anti-patterns to avoid
91
+
92
+ ## Related Skills
93
+
94
+ - **other-skill** — How it relates
95
+ ```
96
+
97
+ The frontmatter `name` and `description` are used by the agent's tool system for skill discovery. The description should state when the skill triggers — be specific about the situations.
98
+
99
+ Save the file at `.agents/skills/my-skill/SKILL.md`. The directory name should match the `name` in frontmatter.
100
+
101
+ ## Skills vs AGENTS.md {#skills-vs-agents-md}
102
+
103
+ > **AGENTS.md** — The overview. Lists all scripts, describes the data model, explains the app architecture. The agent reads this first to understand the app.
104
+ >
105
+ > **Skills** — Deep dives. Each skill focuses on one pattern with detailed rules, code examples, and do/don't lists. The agent reads these when it needs to follow a specific pattern.
106
+
107
+ `AGENTS.md` tells the agent _what_ the app does. Skills tell the agent _how_ to do specific things correctly. Both are needed — `AGENTS.md` for orientation, skills for execution.
@@ -0,0 +1,100 @@
1
+ ---
2
+ title: "What Is Agent-Native?"
3
+ description: "What agent-native apps are, what agent-native development means, and why every AI agent needs a management interface."
4
+ ---
5
+
6
+ # What Is Agent-Native?
7
+
8
+ Agent-native is a way of building software where the AI agent and the UI are equal partners. Everything the agent can do, the UI can do. Everything the UI can do, the agent can do.
9
+
10
+ ## What is an agent-native app? {#what-is-an-agent-native-app}
11
+
12
+ Think of agent-native apps as a layer on top of AI agents. An agent has skills, instructions, and tools. It can be autonomous and general purpose. The application sits on top of that and gives it structure.
13
+
14
+ Importantly, agent-native does **not** mean "app that calls an LLM." That's the anti-pattern. A text box that sends a prompt and returns a response gives you no ability to give feedback, no way to understand what the agent is doing, and no way to customize its behavior with instructions and skills.
15
+
16
+ An agent-native app gives you everything good about traditional applications — databases, dashboards, workflows, persistence, shareability — plus everything good about AI agents. The agent can do anything the UI can do, and the things it does persist to the UI so you can inspect them, visualize them, and share them.
17
+
18
+ ## Not just a chatbot {#not-just-a-chatbot}
19
+
20
+ A chat interface alone isn't enough. When you're building tools for people to actually use, you need more than a box for them to type a prompt into:
21
+
22
+ - **Discoverability** — users need to know what the app can do without guessing prompts
23
+ - **Workflows** — structured flows for common tasks like composing emails, creating events, or building forms
24
+ - **Visualization** — charts, calendars, email threads, and slide decks are better as visual interfaces than text
25
+ - **Persistence** — a dashboard to come back to, data that doesn't disappear between sessions
26
+ - **Shareability** — share a form link, a slide deck URL, or a report with your team
27
+ - **Speed** — clicking a button is faster than typing a prompt for routine tasks
28
+
29
+ Agent-native apps give you all of this while keeping the full power of the AI agent. The agent is always there — you can ask it to do anything. But the UI makes common workflows fast, visual, and accessible to everyone on the team.
30
+
31
+ ## Agent + UI parity {#agent-ui-parity}
32
+
33
+ This is the defining principle. Any application functionality should be able to be done by the agent _or_ the UI:
34
+
35
+ > **From the UI** — Click buttons, fill forms, navigate views. The UI writes to the database and the agent can see the results.
36
+ >
37
+ > **From the agent** — Natural language, other agents via A2A, Slack, Telegram. The agent writes to the database and the UI updates automatically.
38
+
39
+ When the agent creates a draft email, it appears in the UI. When the user clicks "Send," the agent knows it was sent. There's no separate "agent world" and "UI world" — it's one system.
40
+
41
+ ## What makes it different {#what-makes-it-different}
42
+
43
+ Every agent ultimately needs a management interface. At the minimum, you need to understand what it's doing, inspect the data it's creating, and debug when things go wrong. That's just called an application.
44
+
45
+ | Approach | Description |
46
+ | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
47
+ | **Traditional apps with AI bolted on** | The AI is an afterthought. Limited to autocomplete, summaries, or a chat sidebar that can't actually do anything in the app. |
48
+ | **Agent-native apps** | The agent is a first-class citizen. It shares the same database, the same state, and can do everything the UI can do — and vice versa. |
49
+ | **Pure chat/agent interfaces** | Powerful but inaccessible. No dashboards, no workflows, no persistence. Non-developers can't use them effectively. |
50
+ | **Agent-native apps** | Full application UI with discoverability, workflows, and visualization — plus the agent for anything that needs AI. |
51
+
52
+ The argument is simple: make your agents composable, think of them as applications. An analytics application, a slide generation application, a document application. Each one is a complete tool that humans and agents can both use.
53
+
54
+ ## What is agent-native development? {#what-is-agent-native-development}
55
+
56
+ Agent-native development means building with agents first. You build projects that work great when prompted from AI coding tools like Claude Code, Codex, Cursor, Windsurf, and Builder.io.
57
+
58
+ The idea is that you build instructions and skills into the project as prerequisites. The agent will tend to do _better_ than a human developer because you can encode rules like "when you add a feature, also add a skill for it" — things that humans will tend to forget or skip reading the docs for.
59
+
60
+ ## Agents as first-class developers {#agents-as-first-class-developers}
61
+
62
+ In an agent-native project:
63
+
64
+ - **AGENTS.md** gives every AI coding tool the same instructions — Claude Code, Cursor, Windsurf, and others all read the same file
65
+ - **Skills** teach the agent patterns for specific tasks — adding features, storing data, wiring real-time sync
66
+ - **Agent PR reviewers** can validate that the four-area checklist was followed, that skills were updated, and that the code matches the project's conventions
67
+ - **Auto-maintained docs and tests** — agents can be instructed to keep documentation up to date and tests passing, making it easier for humans to contribute
68
+
69
+ This is similar to the shift from desktop-first to mobile-first development. Mobile-first didn't mean "no desktop" — it meant designing for mobile constraints first and then scaling up. Agent-native development means designing for agent workflows first and then making sure humans can work effectively too.
70
+
71
+ ## Whole-team development {#whole-team-development}
72
+
73
+ Agent-native development isn't just for developers. The goal is actual agent-native development as a team:
74
+
75
+ - **Designers** can update designs directly in the code through the agent
76
+ - **Product managers** can update functionalities and requirements
77
+ - **QA** can test and prompt for fixes
78
+ - **Anyone on the team** can contribute through natural language
79
+
80
+ The vision is to reduce handoffs and enable one-person-to-full-team productivity using real collaboration between humans and agents.
81
+
82
+ ## Fork and customize {#fork-and-customize}
83
+
84
+ Agent-native apps follow a fork-and-customize model. You start from a template — mail, calendar, analytics, slides — and make it yours:
85
+
86
+ 1. Pick a template on [agentnative.com](/templates)
87
+ 2. Start using it immediately as a hosted app (e.g. mail.agentnative.com)
88
+ 3. Fork it when you want to customize — "connect to our Stripe account", "add a cohort chart"
89
+ 4. The agent modifies the code to match your needs
90
+ 5. Deploy your fork to your own domain
91
+
92
+ Because it's your app — not shared infrastructure — the agent can safely evolve the code over time. Your app keeps improving as you use it.
93
+
94
+ ## Composable agents {#composable-agents}
95
+
96
+ Agent-native apps can communicate with each other using the [A2A protocol](/docs/a2a-protocol). From the mail app, you can tag the analytics agent to query data and include results in a draft. An agent discovers what other agents are available, calls them over the protocol, and shows results in the UI.
97
+
98
+ This is why agent-native is a **framework and not a library**. The architecture — shared database, polling sync, actions, application state — needs to be built in from the ground up. You can migrate existing apps, but the best practice is to build agent-native from the start.
99
+
100
+ See the [Key Concepts](/docs/key-concepts) doc for the full technical details.
@@ -0,0 +1,224 @@
1
+ ---
2
+ title: "Workspace Management"
3
+ description: "Branching strategies, code ownership, PR review, and governance practices for agent-native workspaces."
4
+ ---
5
+
6
+ # Workspace Management
7
+
8
+ This guide covers the operational side of running an agent-native workspace — how to branch, who reviews what, how to set up code ownership, and how the dispatch control plane fits into your governance model.
9
+
10
+ For workspace setup, shared auth, and deployment, see [Enterprise Workspace](/docs/enterprise-workspace).
11
+
12
+ ## Branching
13
+
14
+ ### Feature Branches
15
+
16
+ Use short-lived feature branches for all work:
17
+
18
+ ```
19
+ main ← production
20
+ ├── feat/mail-filters ← single-app change
21
+ ├── feat/core-oauth-refresh ← framework change
22
+ ├── fix/analytics-chart ← targeted bug fix
23
+ └── feat/vault-encryption ← dispatch/infra change
24
+ ```
25
+
26
+ **Naming conventions:**
27
+
28
+ - **Single-app changes:** `feat/<app>-<description>` or `fix/<app>-<description>` — e.g. `feat/mail-thread-search`, `fix/recruiting-resume-parse`
29
+ - **Framework changes:** `feat/core-<description>` or `fix/core-<description>` — e.g. `feat/core-polling-v2`
30
+ - **Dispatch changes:** `feat/dispatch-<description>` — e.g. `feat/dispatch-vault-policies`
31
+ - **Cross-app changes:** if a framework change requires template updates, do both in one branch so they ship atomically
32
+
33
+ Keep branches short-lived. Long-lived branches diverge from main and create painful merges — especially in a monorepo where multiple teams push daily.
34
+
35
+ ### Non-Developer Branching
36
+
37
+ Not everyone who needs to make changes is comfortable with git. For teams with designers, product managers, or content editors who need to make visual changes:
38
+
39
+ [Builder.io](https://www.builder.io) supports a visual branching model that maps to git branches under the hood:
40
+
41
+ - Create branches from Builder's dashboard — no terminal needed
42
+ - Edit content, components, layouts, and configuration visually
43
+ - Preview changes in isolation before merging
44
+ - Changes map to git branches, so developer and non-developer work converges
45
+
46
+ This is useful for content and copy changes, layout adjustments, design iterations, and A/B testing — work that shouldn't require a dev environment. Developer code changes and Builder visual changes can coexist on the same branch.
47
+
48
+ ## Code Ownership
49
+
50
+ GitHub's CODEOWNERS file auto-assigns reviewers to PRs based on which files changed. In a monorepo with many apps, this is how you make sure the right people review the right code without everyone reviewing everything.
51
+
52
+ ### Example CODEOWNERS
53
+
54
+ Create `.github/CODEOWNERS` at the repo root:
55
+
56
+ ```
57
+ # Framework core — platform/infra team reviews all changes here
58
+ # because they affect every app in the workspace
59
+ packages/core/ @your-org/platform-team
60
+
61
+ # Desktop app shell
62
+ packages/desktop-app/ @your-org/platform-team
63
+
64
+ # Dispatch control plane — secrets, integrations, workspace resources
65
+ templates/dispatcher/ @your-org/platform-team
66
+
67
+ # Per-app ownership — each team reviews their own app
68
+ templates/mail/ @your-org/mail-team
69
+ templates/analytics/ @your-org/analytics-team
70
+ templates/calendar/ @your-org/calendar-team
71
+ templates/content/ @your-org/content-team
72
+ templates/recruiting/ @your-org/recruiting-team
73
+ templates/forms/ @your-org/forms-team
74
+ templates/issues/ @your-org/issues-team
75
+ templates/slides/ @your-org/slides-team
76
+ templates/videos/ @your-org/videos-team
77
+
78
+ # Workspace-level config — broad review since it affects everyone
79
+ .github/ @your-org/platform-team
80
+ package.json @your-org/platform-team
81
+ pnpm-workspace.yaml @your-org/platform-team
82
+ .env.example @your-org/platform-team
83
+ ```
84
+
85
+ ### Tips
86
+
87
+ - **Use GitHub teams, not individuals.** `@org/analytics-team` survives people changing roles. `@jdoe` doesn't.
88
+ - **Framework changes need platform review.** A one-line change in `packages/core/` can break every app. The platform team should always see these.
89
+ - **App teams own their templates.** The people who built and maintain an app understand its domain — they should review changes to it.
90
+ - **Dispatch is infrastructure.** Treat it like core. It manages secrets and resources that affect the whole workspace.
91
+ - **You can narrow with globs.** `templates/mail/**/*.tsx` if you want to assign frontend-specific reviewers for UI-only changes.
92
+ - **Multiple owners are fine.** List both the app team and a senior engineer for critical paths like DB schemas or auth.
93
+
94
+ ### Enabling Required Reviews
95
+
96
+ 1. Create `.github/CODEOWNERS` with the patterns above
97
+ 2. In GitHub → Settings → Branches → Branch protection for `main`:
98
+ - Enable **Require a pull request before merging**
99
+ - Enable **Require review from Code Owners**
100
+ - Set minimum required approvals (1 is usually fine, 2 for regulated environments)
101
+ 3. Create the GitHub teams referenced in CODEOWNERS
102
+
103
+ Once enabled, GitHub won't let a PR merge until each CODEOWNERS-matched team has approved. A PR that touches `templates/mail/` and `packages/core/` requires approval from both `@your-org/mail-team` and `@your-org/platform-team`.
104
+
105
+ ## PR Labeling
106
+
107
+ Auto-labeling PRs by app makes it easy to filter and prioritize reviews. Add `.github/labeler.yml`:
108
+
109
+ ```yaml
110
+ app:mail:
111
+ - changed-files:
112
+ - any-glob-to-any-file: templates/mail/**
113
+
114
+ app:analytics:
115
+ - changed-files:
116
+ - any-glob-to-any-file: templates/analytics/**
117
+
118
+ app:calendar:
119
+ - changed-files:
120
+ - any-glob-to-any-file: templates/calendar/**
121
+
122
+ app:recruiting:
123
+ - changed-files:
124
+ - any-glob-to-any-file: templates/recruiting/**
125
+
126
+ dispatch:
127
+ - changed-files:
128
+ - any-glob-to-any-file: templates/dispatcher/**
129
+
130
+ core:
131
+ - changed-files:
132
+ - any-glob-to-any-file: packages/core/**
133
+ ```
134
+
135
+ Then add the [actions/labeler](https://github.com/actions/labeler) GitHub Action to `.github/workflows/labeler.yml`:
136
+
137
+ ```yaml
138
+ name: Label PRs
139
+ on:
140
+ pull_request:
141
+ types: [opened, synchronize]
142
+
143
+ jobs:
144
+ label:
145
+ runs-on: ubuntu-latest
146
+ permissions:
147
+ contents: read
148
+ pull-requests: write
149
+ steps:
150
+ - uses: actions/labeler@v5
151
+ ```
152
+
153
+ Labels apply automatically when PRs are opened or updated. Teams can then filter their review queue by label.
154
+
155
+ ## PR Review Guidelines
156
+
157
+ ### By Change Type
158
+
159
+ | Change type | Who reviews | What to watch for |
160
+ | --------------------------------- | ------------------------------------- | ------------------------------------------------------------------------- |
161
+ | **App-only** (`templates/<app>/`) | Owning app team | Domain correctness, action schemas |
162
+ | **Framework** (`packages/core/`) | Platform team + one affected app team | Breaking changes, performance, backwards compat |
163
+ | **Schema migrations** | Platform team + senior engineer | Data safety, dialect agnosticism (SQLite + Postgres) |
164
+ | **Actions** | Owning team | Actions are both agent tools AND HTTP endpoints — review from both angles |
165
+ | **Cross-app A2A** | Both app teams | If you change an A2A interface, the callers need to know |
166
+ | **Dispatch vault/resources** | Platform team | Secret access, grant scope, who gets what |
167
+
168
+ ### Concurrent Agent Work
169
+
170
+ Agent-native workspaces often have multiple AI agents working on the same branch simultaneously. This is by design — the agents share a branch and push independently.
171
+
172
+ When reviewing PRs in this environment:
173
+
174
+ - **Don't revert changes you didn't make** unless they're clearly broken
175
+ - **Files may be modified by multiple agents** in the same PR — this is normal
176
+ - **Run `pnpm run prep`** (typecheck + test + format) before pushing to catch integration issues between agents' changes
177
+ - **If two agents touch the same file,** the later commit wins. Conflicts surface at review time, not at commit time
178
+ - **Fix bugs in any code in the PR,** regardless of which agent wrote it. The PR is reviewed as a whole.
179
+
180
+ ## Dispatch as Governance
181
+
182
+ The dispatch app is the workspace's runtime control plane. It complements git-level governance with runtime governance:
183
+
184
+ | Concern | Git / GitHub | Dispatch |
185
+ | ------------------------------- | ----------------------------- | ------------------------------------------ |
186
+ | Who can change code | CODEOWNERS, branch protection | — |
187
+ | Who can access secrets | — | Vault grants + request workflow |
188
+ | What instructions agents follow | — | Workspace resources (skills, instructions) |
189
+ | Which agents are shared | — | Workspace agent profiles |
190
+ | Integration inventory | — | Integrations catalog |
191
+ | Runtime change approval | — | Dispatch approval flow |
192
+ | Audit trail | `git log` / `git blame` | Vault audit + dispatch audit logs |
193
+ | Messaging & routing | — | Slack / Telegram integration |
194
+
195
+ **Git handles code governance. Dispatch handles runtime governance.** Don't try to replicate git workflows inside dispatch or vice versa. They cover different surfaces.
196
+
197
+ ### What Dispatch Manages
198
+
199
+ - **Vault** — store credentials centrally, grant them to specific apps, sync on demand. Non-admins can request access; admins approve.
200
+ - **Integrations catalog** — see which credentials each app needs, what's configured, what's missing, what's granted from the vault.
201
+ - **Workspace resources** — share skills, behavioral instructions, and reusable agent profiles across apps. Scope to all apps or grant per-app.
202
+ - **Approvals** — require review before runtime changes (destinations, settings) take effect.
203
+ - **Audit** — full history of secret access, grants, syncs, and changes.
204
+
205
+ ## Setup Checklist
206
+
207
+ For a new workspace, after running `agent-native create`:
208
+
209
+ **Git & GitHub:**
210
+
211
+ - [ ] Create `.github/CODEOWNERS` with per-app team ownership
212
+ - [ ] Enable branch protection on `main` with required code owner reviews
213
+ - [ ] Add `.github/labeler.yml` for auto-labeling PRs by app
214
+ - [ ] Create GitHub teams for each app and the platform team
215
+
216
+ **Dispatch:**
217
+
218
+ - [ ] Add shared secrets to the vault (API keys, OAuth credentials, etc.)
219
+ - [ ] Grant secrets to the apps that need them
220
+ - [ ] Sync granted secrets to push them to apps
221
+ - [ ] Add workspace-wide skills and instructions via the Resources page
222
+ - [ ] Configure the approval policy and approver emails
223
+ - [ ] Set up SendGrid (`SENDGRID_API_KEY`, `SENDGRID_FROM_EMAIL`) for admin notifications
224
+ - [ ] Connect Slack or Telegram for workspace messaging