@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,30 @@
1
+ /**
2
+ * Workspace-wide agent-chat plugin for @{{APP_NAME}}/core-module.
3
+ *
4
+ * This mounts the framework's default agent-chat plugin so every app in
5
+ * the workspace gets the same chat endpoint, mention providers, and
6
+ * built-in tools. The ENTERPRISE-WIDE system prompt additions — things
7
+ * the agent should know across every app — live in the workspace's
8
+ * AGENTS.md file, which is loaded automatically into the prompt as a
9
+ * `<resource scope="workspace">` block.
10
+ *
11
+ * Customize this wrapper when you need agent behavior that can't be
12
+ * expressed in AGENTS.md — e.g. injecting enterprise-specific mention
13
+ * providers, pre-loading a custom set of MCP servers, or rewriting
14
+ * model choice based on your company's allowlist.
15
+ */
16
+ import { defaultAgentChatPlugin } from "@agent-native/core/server";
17
+
18
+ export const agentChatPlugin = async (nitroApp: any): Promise<void> => {
19
+ await defaultAgentChatPlugin(nitroApp);
20
+
21
+ // Hook for enterprise customization:
22
+ //
23
+ // const chat = createAgentChatPlugin({
24
+ // systemPrompt: (base) => `${base}\n\nCompany policy: …`,
25
+ // mentionProviders: {
26
+ // people: async (query) => searchCompanyDirectory(query),
27
+ // },
28
+ // });
29
+ // await chat(nitroApp);
30
+ };
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Workspace-wide auth plugin for @{{APP_NAME}}/core-module.
3
+ *
4
+ * Today this just re-uses the framework default, which already does the
5
+ * right thing for most enterprises (Better Auth with Google SSO when
6
+ * GOOGLE_CLIENT_ID/SECRET are set, email/password otherwise, local dev
7
+ * bypass via AUTH_MODE=local). Customize it here when your enterprise
8
+ * needs specific behavior — e.g.:
9
+ *
10
+ * - Wrap the default to force a specific SSO provider
11
+ * - Add a callback that provisions users into your directory
12
+ * - Pre-register organizations / role mappings from Okta groups
13
+ * - Fail closed on unauthenticated requests outside dev
14
+ *
15
+ * Every app in the workspace inherits this automatically (as long as the
16
+ * root package.json has `"agent-native": { "workspaceCore": "@{{APP_NAME}}/core-module" }`).
17
+ */
18
+ import { defaultAuthPlugin } from "@agent-native/core/server";
19
+
20
+ export const authPlugin = async (nitroApp: any): Promise<void> => {
21
+ // Run the framework default first so Better Auth, org tables, and session
22
+ // middleware are all set up.
23
+ await defaultAuthPlugin(nitroApp);
24
+
25
+ // Add enterprise-specific post-auth behavior here. Examples:
26
+ //
27
+ // const h3 = getH3App(nitroApp);
28
+ // h3.use(defineEventHandler(async (event) => {
29
+ // const session = await getSession(event);
30
+ // if (session?.email && !session.email.endsWith("@{{APP_NAME}}.com")) {
31
+ // setResponseStatus(event, 403);
32
+ // return { error: "Only @{{APP_NAME}}.com accounts allowed" };
33
+ // }
34
+ // }));
35
+ };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Server-side entry for @{{APP_NAME}}/core-module.
3
+ *
4
+ * Exports plugin overrides for any framework slot you want to customize
5
+ * across every app in this workspace. The agent-native framework looks for
6
+ * these exports by name when deciding what to auto-mount — see the "three
7
+ * layer inheritance" section in the root README.
8
+ *
9
+ * Supported export names (any subset):
10
+ * - authPlugin → overrides @agent-native/core's auth
11
+ * - orgPlugin → overrides @agent-native/core's org
12
+ * - agentChatPlugin → overrides @agent-native/core's agent-chat
13
+ * - coreRoutesPlugin → overrides @agent-native/core's core-routes
14
+ * - integrationsPlugin → overrides @agent-native/core's integrations
15
+ * - resourcesPlugin → overrides @agent-native/core's resources
16
+ * - terminalPlugin → overrides @agent-native/core's terminal
17
+ *
18
+ * Anything you don't export falls through to the framework default.
19
+ */
20
+
21
+ export { authPlugin } from "./auth-plugin.js";
22
+ export { agentChatPlugin } from "./agent-chat-plugin.js";
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Workspace-wide Tailwind preset for @{{APP_NAME}}/core-module.
3
+ *
4
+ * Extends the framework's base preset with enterprise brand tokens. Every
5
+ * app in the workspace should import THIS preset in its own
6
+ * tailwind.config.ts instead of importing @agent-native/core/tailwind
7
+ * directly, so brand updates in one place propagate to all apps.
8
+ *
9
+ * // apps/<name>/tailwind.config.ts
10
+ * import preset from "@{{APP_NAME}}/core-module/tailwind";
11
+ * export default { presets: [preset], content: ["./app/**\/*.{ts,tsx}"] };
12
+ *
13
+ * If your enterprise already has a design-system package with its own
14
+ * Tailwind preset, swap `corePreset` out for that one (or chain both).
15
+ */
16
+ import corePreset from "@agent-native/core/tailwind";
17
+ import type { Config } from "tailwindcss";
18
+
19
+ const preset: Partial<Config> = {
20
+ presets: [corePreset],
21
+ theme: {
22
+ extend: {
23
+ colors: {
24
+ // Replace with your actual brand palette.
25
+ brand: {
26
+ DEFAULT: "#4f46e5",
27
+ foreground: "#ffffff",
28
+ },
29
+ },
30
+ },
31
+ },
32
+ };
33
+
34
+ export default preset;
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "rootDir": "src",
5
+ "outDir": "dist",
6
+ "noEmit": true
7
+ },
8
+ "include": ["src/**/*", "tailwind.preset.ts"]
9
+ }
@@ -0,0 +1,37 @@
1
+ # Shared across every app in this workspace.
2
+ # Copy to .env and fill in values, or override per-app in apps/<app>/.env.
3
+ # Per-app values win on conflict — use workspace-level for shared secrets.
4
+
5
+ # Database shared by every app in the workspace. Leave blank to default to
6
+ # SQLite per app (apps/<app>/data/app.db), or set DATABASE_URL per app.
7
+ DATABASE_URL=
8
+
9
+ # Better Auth — required for login to work. Generate with:
10
+ # openssl rand -hex 32
11
+ BETTER_AUTH_SECRET=
12
+
13
+ # Anthropic API key for the agent chat.
14
+ ANTHROPIC_API_KEY=
15
+
16
+ # Optional: OpenAI key if any app uses OpenAI engines.
17
+ OPENAI_API_KEY=
18
+
19
+ # Builder browser integration (run `agent-native dev` and visit any app,
20
+ # then click "Connect Builder" — these are written automatically by the
21
+ # callback handler to this workspace-level .env).
22
+ BUILDER_PRIVATE_KEY=
23
+ BUILDER_PUBLIC_KEY=
24
+
25
+ # A2A shared secret — required for cross-app JWT verification. Every app
26
+ # in the workspace should use the same value. Generate with:
27
+ # openssl rand -hex 32
28
+ A2A_SECRET=
29
+
30
+ # Google sign-in — optional. Leave blank to use email/password only.
31
+ # Both values come from Google Cloud Console → APIs & Services → Credentials.
32
+ GOOGLE_CLIENT_ID=
33
+ GOOGLE_CLIENT_SECRET=
34
+
35
+ # Optional: GitHub sign-in.
36
+ GITHUB_CLIENT_ID=
37
+ GITHUB_CLIENT_SECRET=
@@ -0,0 +1,62 @@
1
+ # {{APP_TITLE}} — Agent-Native Workspace
2
+
3
+ A monorepo hosting multiple agent-native apps that all inherit from a single
4
+ private **workspace core** package. The core module provides shared auth,
5
+ agent instructions, skills, components, and plugins; each app just ships its
6
+ own screens and template-specific actions.
7
+
8
+ ## Layout
9
+
10
+ ```
11
+ {{APP_NAME}}/
12
+ ├── packages/
13
+ │ └── core-module/ # @{{APP_NAME}}/core-module — the shared mid-layer
14
+ │ ├── src/server/ # Auth / org / agent-chat plugin overrides
15
+ │ ├── src/client/ # Shared React components (org switcher, layouts…)
16
+ │ ├── actions/ # Shared agent-callable actions
17
+ │ ├── skills/ # Shared .agents skills baked into every app
18
+ │ └── AGENTS.md # Enterprise-wide agent instructions
19
+ └── apps/
20
+ └── example/ # Sample app demonstrating inheritance
21
+ ```
22
+
23
+ ## Three-layer inheritance
24
+
25
+ Every app in this workspace inherits cross-cutting behavior automatically:
26
+
27
+ 1. **App local** (highest priority) — anything under `apps/<name>/server/plugins/`,
28
+ `apps/<name>/actions/`, `apps/<name>/.agents/skills/`, `apps/<name>/AGENTS.md`.
29
+ 2. **Workspace core** (middle) — `packages/core-module/src/server/`,
30
+ `packages/core-module/actions/`, `packages/core-module/skills/`,
31
+ `packages/core-module/AGENTS.md`.
32
+ 3. **Framework** (lowest) — `@agent-native/core` defaults.
33
+
34
+ Apps don't need any configuration to opt in. Discovery happens via the
35
+ `agent-native.workspaceCore` field in this root `package.json`, which names
36
+ the workspace core package (`@{{APP_NAME}}/core-module`).
37
+
38
+ ## Getting started
39
+
40
+ ```bash
41
+ pnpm install
42
+ cp .env.example .env # fill in DATABASE_URL, BETTER_AUTH_SECRET, ANTHROPIC_API_KEY
43
+ pnpm dev # starts the example app
44
+ ```
45
+
46
+ ## Adding a new app
47
+
48
+ ```bash
49
+ cd apps
50
+ pnpm exec agent-native create crm
51
+ ```
52
+
53
+ The CLI detects the workspace root and scaffolds a minimal app that already
54
+ depends on `@{{APP_NAME}}/core-module`. Edit only the routes you care about;
55
+ auth, org switching, skills, and instructions come from the core module.
56
+
57
+ ## Editing shared behavior
58
+
59
+ Everything cross-cutting lives in `packages/core-module/`. A change to
60
+ `packages/core-module/src/server/auth-plugin.ts`, for example, is picked up
61
+ by every app in the workspace on the next dev reload — no need to touch any
62
+ individual app.
@@ -0,0 +1,23 @@
1
+ node_modules/
2
+ dist/
3
+ build/
4
+ .deploy-tmp/
5
+
6
+ # Env files — never commit secrets
7
+ .env
8
+ .env.local
9
+ apps/*/.env
10
+ apps/*/.env.local
11
+ packages/*/.env
12
+
13
+ # Editor / OS
14
+ .DS_Store
15
+ .vscode/
16
+ .idea/
17
+
18
+ # pnpm
19
+ .pnpm-store/
20
+ pnpm-debug.log*
21
+
22
+ # Personal agent memory — per-developer, not shared
23
+ learnings.md
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "{{APP_NAME}}",
3
+ "private": true,
4
+ "version": "0.0.0",
5
+ "scripts": {
6
+ "dev": "pnpm --filter example dev",
7
+ "build": "pnpm -r build",
8
+ "typecheck": "pnpm -r typecheck"
9
+ },
10
+ "agent-native": {
11
+ "workspaceCore": "@{{APP_NAME}}/core-module"
12
+ },
13
+ "devDependencies": {
14
+ "prettier": "^3.6.2",
15
+ "typescript": "^5.9.2"
16
+ },
17
+ "packageManager": "pnpm@10.14.0"
18
+ }
@@ -0,0 +1,3 @@
1
+ packages:
2
+ - "packages/*"
3
+ - "apps/*"
@@ -0,0 +1,21 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "Bundler",
6
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
7
+ "types": ["node"],
8
+ "jsx": "react-jsx",
9
+ "strict": true,
10
+ "noUnusedLocals": false,
11
+ "noUnusedParameters": false,
12
+ "noFallthroughCasesInSwitch": true,
13
+ "noImplicitOverride": true,
14
+ "esModuleInterop": true,
15
+ "skipLibCheck": true,
16
+ "resolveJsonModule": true,
17
+ "isolatedModules": true,
18
+ "allowSyntheticDefaultImports": true,
19
+ "forceConsistentCasingInFileNames": true
20
+ }
21
+ }
@@ -1,142 +0,0 @@
1
- ---
2
- name: actions
3
- description: >-
4
- How to create and run agent-callable actions in actions/. Use when creating
5
- a new action, adding an API integration, implementing a complex agent
6
- operation, or running pnpm action commands.
7
- ---
8
-
9
- # Agent Actions
10
-
11
- ## Rule
12
-
13
- Complex operations the agent needs to perform are implemented as actions in `actions/`. The agent runs them via `pnpm action <name>`.
14
-
15
- ## Why
16
-
17
- Actions give the agent callable tools with structured input/output. They keep the agent's chat context clean (no massive code blocks), they're reusable, and they can be tested independently.
18
-
19
- ## How to Create an Action
20
-
21
- Create `actions/my-action.ts`:
22
-
23
- ```ts
24
- import fs from "fs";
25
- import { parseArgs, loadEnv, fail, agentChat } from "@agent-native/core";
26
-
27
- export default async function myAction(args: string[]) {
28
- loadEnv();
29
-
30
- const parsed = parseArgs(args);
31
- const input = parsed.input;
32
- if (!input) fail("--input is required");
33
-
34
- const outputPath = parsed.output ?? "data/result.json";
35
- const raw = fs.readFileSync(input, "utf-8");
36
- const data = JSON.parse(raw) as unknown;
37
-
38
- fs.writeFileSync(outputPath, JSON.stringify(data, null, 2));
39
- agentChat.submit(`Processed ${input}, result saved to ${outputPath}`);
40
- }
41
- ```
42
-
43
- ### Using `defineAction` with Zod schema (recommended for new actions)
44
-
45
- ```ts
46
- import { z } from "zod";
47
- import { defineAction } from "@agent-native/core";
48
-
49
- export default defineAction({
50
- description: "Process some data",
51
- schema: z.object({
52
- input: z.string().describe("Input file path"),
53
- output: z.string().optional().describe("Output file path"),
54
- }),
55
- run: async (args) => {
56
- // args is fully typed: { input: string; output?: string }
57
- // do work
58
- return "Done";
59
- },
60
- });
61
- ```
62
-
63
- The `schema` field accepts a Zod schema (or any Standard Schema-compatible library). It provides runtime validation with clear error messages, TypeScript type inference for `run()` args, and auto-generated JSON Schema for the agent's tool definition. `zod` is a dependency of all templates.
64
-
65
- The legacy `parameters` field (plain JSON Schema object) still works as a fallback.
66
-
67
- ## How to Run
68
-
69
- ```bash
70
- pnpm action my-action --input data/source.json --output data/result.json
71
- ```
72
-
73
- ## Action Dispatcher
74
-
75
- The default template uses core's `runScript()` in `actions/run.ts`:
76
-
77
- ```ts
78
- import { runScript } from "@agent-native/core";
79
- runScript();
80
- ```
81
-
82
- This is the canonical approach for new apps. Action names must be lowercase with hyphens only (e.g., `my-action`).
83
-
84
- ## Guidelines
85
-
86
- - **One action, one job.** Keep actions focused on a single operation. The agent composes multiple action calls for complex operations.
87
- - **Use `parseArgs()`** for structured argument parsing. It converts `--key value` pairs to a `Record<string, string>`.
88
- - **Use `loadEnv()`** if the action needs environment variables (API keys, etc.).
89
- - **Use `fail()`** for user-friendly error messages (exits with message, no stack trace).
90
- - **Write results to the database.** The agent and UI will pick them up via db sync polling.
91
- - **Use `agentChat.submit()`** to report results or errors back to the agent chat.
92
- - **Import from `@agent-native/core`** -- Don't redefine `parseArgs()` or other utilities locally.
93
-
94
- ## Common Patterns
95
-
96
- **API integration action** (e.g., image generation):
97
-
98
- ```ts
99
- import fs from "fs";
100
- import { parseArgs, loadEnv, fail } from "@agent-native/core";
101
-
102
- export default async function generateImage(args: string[]) {
103
- loadEnv();
104
- const parsed = parseArgs(args);
105
- const prompt = parsed.prompt;
106
- if (!prompt) fail("--prompt is required");
107
-
108
- const outputPath = parsed.output ?? "data/generated-image.png";
109
- const imageUrl = await callImageAPI(prompt);
110
- const buffer = await fetch(imageUrl).then((r) => r.arrayBuffer());
111
- fs.writeFileSync(outputPath, Buffer.from(buffer));
112
- }
113
- ```
114
-
115
- **Data processing action:**
116
-
117
- ```ts
118
- import fs from "fs";
119
- import { parseArgs, fail } from "@agent-native/core";
120
-
121
- export default async function transform(args: string[]) {
122
- const parsed = parseArgs(args);
123
- const source = parsed.source;
124
- if (!source) fail("--source is required");
125
-
126
- const data = JSON.parse(fs.readFileSync(source, "utf-8")) as unknown[];
127
- const result = data.map(transformItem);
128
- fs.writeFileSync(source, JSON.stringify(result, null, 2));
129
- }
130
- ```
131
-
132
- ## Troubleshooting
133
-
134
- - **Action not found** -- Check that the filename matches the command name exactly. `pnpm action foo-bar` looks for `actions/foo-bar.ts`.
135
- - **Args not parsing** -- Ensure args use `--key value` or `--key=value` format. Boolean flags use `--flag` (sets value to `"true"`).
136
- - **Action runs but UI doesn't update** -- Make sure results are written to the database so db sync polling picks them up.
137
-
138
- ## Related Skills
139
-
140
- - **storing-data** -- Actions read/write data via SQL
141
- - **delegate-to-agent** -- The agent invokes actions via `pnpm action <name>`
142
- - **real-time-sync** -- Database writes from actions trigger poll events to update the UI
@@ -1,127 +0,0 @@
1
- ---
2
- name: agent-engines
3
- description: >-
4
- How to inspect and configure the AI engine (model provider) powering the
5
- agent. Use when the user asks to switch models, check which engine is active,
6
- test a new provider, or register a custom engine.
7
- ---
8
-
9
- # Agent Engines
10
-
11
- ## Overview
12
-
13
- The framework supports pluggable AI engines beneath the agent loop. The **Anthropic engine** is the default and best-in-class path (Claude models). Additional engines can be added via the Vercel AI SDK (OpenAI, Google Gemini, Groq, Mistral, Cohere, Ollama).
14
-
15
- ## Available Tools
16
-
17
- | Tool | Purpose |
18
- |---|---|
19
- | `list-agent-engines` | List all registered engines, their capabilities, and the current selection |
20
- | `set-agent-engine` | Set the active engine and model (persisted in settings) |
21
- | `test-agent-engine` | Send a trivial prompt to verify the engine works (connectivity + API key) |
22
-
23
- ## Checking the Current Engine
24
-
25
- ```
26
- list-agent-engines
27
- ```
28
-
29
- Returns the registry of all engines (name, label, capabilities, supported models) plus the currently active engine and model.
30
-
31
- ## Switching Engines
32
-
33
- ```
34
- set-agent-engine --engine "ai-sdk:openai" --model "gpt-4o"
35
- ```
36
-
37
- Changes take effect on the next conversation. The setting is persisted via the settings store (`agent-engine` key).
38
-
39
- Resolution order (highest priority first):
40
- 1. Explicit `engine` option passed to `createAgentChatPlugin()` in the server plugin
41
- 2. Settings store (`agent-engine` key)
42
- 3. `AGENT_ENGINE` environment variable
43
- 4. Default: `"anthropic"` (requires `ANTHROPIC_API_KEY`)
44
-
45
- ## Testing a New Engine
46
-
47
- Before switching, verify the engine is working:
48
-
49
- ```
50
- test-agent-engine --engine "ai-sdk:openai" --model "gpt-4o"
51
- ```
52
-
53
- Returns `{ ok, latencyMs, response, capabilities }`. If `ok: false`, the error message explains what's wrong (missing API key, package not installed, etc.).
54
-
55
- ## Built-in Engines
56
-
57
- | Engine Name | Provider | Requires |
58
- |---|---|---|
59
- | `anthropic` | Anthropic Claude SDK | `ANTHROPIC_API_KEY` |
60
- | `ai-sdk:anthropic` | Claude via Vercel AI SDK | `ANTHROPIC_API_KEY` |
61
- | `ai-sdk:openai` | OpenAI via Vercel AI SDK | `OPENAI_API_KEY` |
62
- | `ai-sdk:google` | Google Gemini via Vercel AI SDK | `GOOGLE_GENERATIVE_AI_API_KEY` |
63
- | `ai-sdk:groq` | Groq LPU via Vercel AI SDK | `GROQ_API_KEY` |
64
- | `ai-sdk:mistral` | Mistral via Vercel AI SDK | `MISTRAL_API_KEY` |
65
- | `ai-sdk:cohere` | Cohere via Vercel AI SDK | `COHERE_API_KEY` |
66
- | `ai-sdk:ollama` | Local Ollama via Vercel AI SDK | None (local) |
67
-
68
- ## Engine Capabilities
69
-
70
- Each engine advertises its capabilities:
71
-
72
- | Capability | Anthropic | AI SDK: Anthropic | AI SDK: OpenAI | AI SDK: Google |
73
- |---|---|---|---|---|
74
- | `thinking` | ✓ | ✓ | ✗ | ✓ |
75
- | `promptCaching` | ✓ | ✓ | ✗ | ✗ |
76
- | `vision` | ✓ | ✓ | ✓ | ✓ |
77
- | `computerUse` | ✓ | ✗ | ✗ | ✗ |
78
- | `parallelToolCalls` | ✓ | ✓ | ✓ | ✓ |
79
-
80
- ## Anthropic-Exclusive Features
81
-
82
- When using the `anthropic` engine (or `ai-sdk:anthropic`):
83
-
84
- - **Prompt caching** is applied automatically to the system prompt — cutting latency and cost on repeated turns.
85
- - **Extended thinking** can be enabled via `providerOptions.anthropic.thinking` — the agent reasons longer before responding.
86
-
87
- These features are silently ignored when a non-Anthropic engine is active (capability-gated, no breakage).
88
-
89
- ## Registering a Custom Engine
90
-
91
- Register custom engines in a server plugin at startup:
92
-
93
- ```ts
94
- // server/plugins/my-engine.ts
95
- import { registerAgentEngine } from "@agent-native/core/server";
96
-
97
- registerAgentEngine({
98
- name: "my-engine",
99
- label: "My Custom Engine",
100
- description: "...",
101
- capabilities: {
102
- thinking: false,
103
- promptCaching: false,
104
- vision: false,
105
- computerUse: false,
106
- parallelToolCalls: true,
107
- },
108
- defaultModel: "my-model-v1",
109
- supportedModels: ["my-model-v1", "my-model-v2"],
110
- requiredEnvVars: ["MY_ENGINE_API_KEY"],
111
- create: (config) => new MyEngine(config),
112
- });
113
- ```
114
-
115
- After registering, the engine appears in `list-agent-engines` output and can be selected via `set-agent-engine`.
116
-
117
- ## Env Vars Reference
118
-
119
- | Variable | Purpose |
120
- |---|---|
121
- | `ANTHROPIC_API_KEY` | Required for `anthropic` and `ai-sdk:anthropic` engines |
122
- | `OPENAI_API_KEY` | Required for `ai-sdk:openai` |
123
- | `GOOGLE_GENERATIVE_AI_API_KEY` | Required for `ai-sdk:google` |
124
- | `GROQ_API_KEY` | Required for `ai-sdk:groq` |
125
- | `MISTRAL_API_KEY` | Required for `ai-sdk:mistral` |
126
- | `COHERE_API_KEY` | Required for `ai-sdk:cohere` |
127
- | `AGENT_ENGINE` | Default engine name (overridden by settings store) |
@@ -1,50 +0,0 @@
1
- ---
2
- name: capture-learnings
3
- description: >-
4
- Capture and apply accumulated knowledge in learnings.md. Use when the user
5
- corrects a mistake, when debugging reveals unexpected behavior, or when an
6
- architectural decision should be recorded for future reference.
7
- user-invocable: false
8
- ---
9
-
10
- # Capture Learnings
11
-
12
- This is background knowledge, not a slash command. Read `learnings.md` before starting significant work. Update it when you discover something worth remembering.
13
-
14
- ## When to Capture
15
-
16
- Use judgment, not rules. Capture when:
17
-
18
- - **Surprising behavior** — Something didn't work as expected and you figured out why
19
- - **Repeated friction** — You hit the same issue twice; write it down so there's no third time
20
- - **Architectural decisions** — Why something is done a certain way (the "why" isn't in the code)
21
- - **API/library quirks** — Undocumented behavior, version-specific gotchas
22
- - **Performance insights** — What's slow and what fixed it
23
-
24
- Don't capture:
25
-
26
- - Things that are obvious from reading the code
27
- - Standard language/framework behavior
28
- - Temporary debugging notes
29
-
30
- ## Format
31
-
32
- Add entries to `learnings.md` at the project root. Match the existing format — typically a heading per topic with a brief explanation:
33
-
34
- ```markdown
35
- ## [Topic]
36
-
37
- [What you learned and why it matters. Keep it to 2-3 sentences.]
38
- ```
39
-
40
- ## Graduation
41
-
42
- When a learning is referenced repeatedly, it's outgrowing `learnings.md`. Propose adding it to the relevant skill or creating a new skill via `create-skill`.
43
-
44
- - Updating `learnings.md` is a Tier 1 modification (data — auto-apply)
45
- - Updating a SKILL.md based on learnings is Tier 2 (source — verify after)
46
-
47
- ## Related Skills
48
-
49
- - **self-modifying-code** — Learnings.md updates are Tier 1; skill updates are Tier 2
50
- - **create-skill** — When a learning graduates, create a skill from it