@agent-native/core 0.37.2 → 0.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (377) hide show
  1. package/README.md +19 -6
  2. package/dist/action.d.ts +60 -2
  3. package/dist/action.d.ts.map +1 -1
  4. package/dist/action.js +6 -2
  5. package/dist/action.js.map +1 -1
  6. package/dist/agent/production-agent.d.ts +12 -6
  7. package/dist/agent/production-agent.d.ts.map +1 -1
  8. package/dist/agent/production-agent.js +161 -11
  9. package/dist/agent/production-agent.js.map +1 -1
  10. package/dist/agent/types.d.ts +2 -0
  11. package/dist/agent/types.d.ts.map +1 -1
  12. package/dist/agent/types.js.map +1 -1
  13. package/dist/catalog.json +2 -2
  14. package/dist/cli/connect.d.ts.map +1 -1
  15. package/dist/cli/connect.js +15 -0
  16. package/dist/cli/connect.js.map +1 -1
  17. package/dist/cli/index.js +10 -6
  18. package/dist/cli/index.js.map +1 -1
  19. package/dist/cli/plan-publish-store.d.ts +52 -0
  20. package/dist/cli/plan-publish-store.d.ts.map +1 -0
  21. package/dist/cli/plan-publish-store.js +103 -0
  22. package/dist/cli/plan-publish-store.js.map +1 -0
  23. package/dist/cli/skills.d.ts +29 -0
  24. package/dist/cli/skills.d.ts.map +1 -1
  25. package/dist/cli/skills.js +1349 -544
  26. package/dist/cli/skills.js.map +1 -1
  27. package/dist/cli/templates-meta.js +12 -12
  28. package/dist/cli/templates-meta.js.map +1 -1
  29. package/dist/client/AssistantChat.d.ts +3 -1
  30. package/dist/client/AssistantChat.d.ts.map +1 -1
  31. package/dist/client/AssistantChat.js +65 -15
  32. package/dist/client/AssistantChat.js.map +1 -1
  33. package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
  34. package/dist/client/MultiTabAssistantChat.js +20 -2
  35. package/dist/client/MultiTabAssistantChat.js.map +1 -1
  36. package/dist/client/agent-chat-adapter.d.ts.map +1 -1
  37. package/dist/client/agent-chat-adapter.js +12 -0
  38. package/dist/client/agent-chat-adapter.js.map +1 -1
  39. package/dist/client/agent-engine-key.d.ts +24 -0
  40. package/dist/client/agent-engine-key.d.ts.map +1 -0
  41. package/dist/client/agent-engine-key.js +49 -0
  42. package/dist/client/agent-engine-key.js.map +1 -0
  43. package/dist/client/analytics.d.ts.map +1 -1
  44. package/dist/client/analytics.js +34 -0
  45. package/dist/client/analytics.js.map +1 -1
  46. package/dist/client/blocks/BlockView.d.ts +26 -0
  47. package/dist/client/blocks/BlockView.d.ts.map +1 -0
  48. package/dist/client/blocks/BlockView.js +24 -0
  49. package/dist/client/blocks/BlockView.js.map +1 -0
  50. package/dist/client/blocks/SchemaBlockEditor.d.ts +25 -0
  51. package/dist/client/blocks/SchemaBlockEditor.d.ts.map +1 -0
  52. package/dist/client/blocks/SchemaBlockEditor.js +72 -0
  53. package/dist/client/blocks/SchemaBlockEditor.js.map +1 -0
  54. package/dist/client/blocks/agent.d.ts +30 -0
  55. package/dist/client/blocks/agent.d.ts.map +1 -0
  56. package/dist/client/blocks/agent.js +61 -0
  57. package/dist/client/blocks/agent.js.map +1 -0
  58. package/dist/client/blocks/index.d.ts +34 -0
  59. package/dist/client/blocks/index.d.ts.map +1 -0
  60. package/dist/client/blocks/index.js +42 -0
  61. package/dist/client/blocks/index.js.map +1 -0
  62. package/dist/client/blocks/library/checklist.config.d.ts +36 -0
  63. package/dist/client/blocks/library/checklist.config.d.ts.map +1 -0
  64. package/dist/client/blocks/library/checklist.config.js +25 -0
  65. package/dist/client/blocks/library/checklist.config.js.map +1 -0
  66. package/dist/client/blocks/library/checklist.d.ts +26 -0
  67. package/dist/client/blocks/library/checklist.d.ts.map +1 -0
  68. package/dist/client/blocks/library/checklist.js +76 -0
  69. package/dist/client/blocks/library/checklist.js.map +1 -0
  70. package/dist/client/blocks/library/code-tabs.config.d.ts +36 -0
  71. package/dist/client/blocks/library/code-tabs.config.d.ts.map +1 -0
  72. package/dist/client/blocks/library/code-tabs.config.js +30 -0
  73. package/dist/client/blocks/library/code-tabs.config.js.map +1 -0
  74. package/dist/client/blocks/library/code-tabs.d.ts +3 -0
  75. package/dist/client/blocks/library/code-tabs.d.ts.map +1 -0
  76. package/dist/client/blocks/library/code-tabs.js +165 -0
  77. package/dist/client/blocks/library/code-tabs.js.map +1 -0
  78. package/dist/client/blocks/library/html.config.d.ts +37 -0
  79. package/dist/client/blocks/library/html.config.d.ts.map +1 -0
  80. package/dist/client/blocks/library/html.config.js +46 -0
  81. package/dist/client/blocks/library/html.config.js.map +1 -0
  82. package/dist/client/blocks/library/html.d.ts +21 -0
  83. package/dist/client/blocks/library/html.d.ts.map +1 -0
  84. package/dist/client/blocks/library/html.js +69 -0
  85. package/dist/client/blocks/library/html.js.map +1 -0
  86. package/dist/client/blocks/library/table.config.d.ts +30 -0
  87. package/dist/client/blocks/library/table.config.d.ts.map +1 -0
  88. package/dist/client/blocks/library/table.config.js +22 -0
  89. package/dist/client/blocks/library/table.config.js.map +1 -0
  90. package/dist/client/blocks/library/table.d.ts +8 -0
  91. package/dist/client/blocks/library/table.d.ts.map +1 -0
  92. package/dist/client/blocks/library/table.js +107 -0
  93. package/dist/client/blocks/library/table.js.map +1 -0
  94. package/dist/client/blocks/library/tabs.config.d.ts +56 -0
  95. package/dist/client/blocks/library/tabs.config.d.ts.map +1 -0
  96. package/dist/client/blocks/library/tabs.config.js +36 -0
  97. package/dist/client/blocks/library/tabs.config.js.map +1 -0
  98. package/dist/client/blocks/library/tabs.d.ts +20 -0
  99. package/dist/client/blocks/library/tabs.d.ts.map +1 -0
  100. package/dist/client/blocks/library/tabs.js +123 -0
  101. package/dist/client/blocks/library/tabs.js.map +1 -0
  102. package/dist/client/blocks/mdx.d.ts +74 -0
  103. package/dist/client/blocks/mdx.d.ts.map +1 -0
  104. package/dist/client/blocks/mdx.js +205 -0
  105. package/dist/client/blocks/mdx.js.map +1 -0
  106. package/dist/client/blocks/provider.d.ts +25 -0
  107. package/dist/client/blocks/provider.d.ts.map +1 -0
  108. package/dist/client/blocks/provider.js +19 -0
  109. package/dist/client/blocks/provider.js.map +1 -0
  110. package/dist/client/blocks/registry.d.ts +24 -0
  111. package/dist/client/blocks/registry.d.ts.map +1 -0
  112. package/dist/client/blocks/registry.js +50 -0
  113. package/dist/client/blocks/registry.js.map +1 -0
  114. package/dist/client/blocks/schema-form/introspect.d.ts +31 -0
  115. package/dist/client/blocks/schema-form/introspect.d.ts.map +1 -0
  116. package/dist/client/blocks/schema-form/introspect.js +164 -0
  117. package/dist/client/blocks/schema-form/introspect.js.map +1 -0
  118. package/dist/client/blocks/server.d.ts +22 -0
  119. package/dist/client/blocks/server.d.ts.map +1 -0
  120. package/dist/client/blocks/server.js +25 -0
  121. package/dist/client/blocks/server.js.map +1 -0
  122. package/dist/client/blocks/types.d.ts +212 -0
  123. package/dist/client/blocks/types.d.ts.map +1 -0
  124. package/dist/client/blocks/types.js +5 -0
  125. package/dist/client/blocks/types.js.map +1 -0
  126. package/dist/client/composer/ComposerPlusMenu.js +10 -1
  127. package/dist/client/composer/ComposerPlusMenu.js.map +1 -1
  128. package/dist/client/guided-questions.d.ts +68 -0
  129. package/dist/client/guided-questions.d.ts.map +1 -1
  130. package/dist/client/guided-questions.js +158 -3
  131. package/dist/client/guided-questions.js.map +1 -1
  132. package/dist/client/index.d.ts +5 -1
  133. package/dist/client/index.d.ts.map +1 -1
  134. package/dist/client/index.js +15 -1
  135. package/dist/client/index.js.map +1 -1
  136. package/dist/client/rich-markdown-editor/BubbleToolbar.d.ts +37 -0
  137. package/dist/client/rich-markdown-editor/BubbleToolbar.d.ts.map +1 -0
  138. package/dist/client/rich-markdown-editor/BubbleToolbar.js +161 -0
  139. package/dist/client/rich-markdown-editor/BubbleToolbar.js.map +1 -0
  140. package/dist/client/rich-markdown-editor/ImageExtension.d.ts +63 -0
  141. package/dist/client/rich-markdown-editor/ImageExtension.d.ts.map +1 -0
  142. package/dist/client/rich-markdown-editor/ImageExtension.js +242 -0
  143. package/dist/client/rich-markdown-editor/ImageExtension.js.map +1 -0
  144. package/dist/client/rich-markdown-editor/RichMarkdownEditor.d.ts +51 -0
  145. package/dist/client/rich-markdown-editor/RichMarkdownEditor.d.ts.map +1 -0
  146. package/dist/client/rich-markdown-editor/RichMarkdownEditor.js +37 -0
  147. package/dist/client/rich-markdown-editor/RichMarkdownEditor.js.map +1 -0
  148. package/dist/client/rich-markdown-editor/SharedRichEditor.d.ts +61 -0
  149. package/dist/client/rich-markdown-editor/SharedRichEditor.d.ts.map +1 -0
  150. package/dist/client/rich-markdown-editor/SharedRichEditor.js +121 -0
  151. package/dist/client/rich-markdown-editor/SharedRichEditor.js.map +1 -0
  152. package/dist/client/rich-markdown-editor/SlashCommandMenu.d.ts +36 -0
  153. package/dist/client/rich-markdown-editor/SlashCommandMenu.d.ts.map +1 -0
  154. package/dist/client/rich-markdown-editor/SlashCommandMenu.js +193 -0
  155. package/dist/client/rich-markdown-editor/SlashCommandMenu.js.map +1 -0
  156. package/dist/client/rich-markdown-editor/extensions.d.ts +166 -0
  157. package/dist/client/rich-markdown-editor/extensions.d.ts.map +1 -0
  158. package/dist/client/rich-markdown-editor/extensions.js +222 -0
  159. package/dist/client/rich-markdown-editor/extensions.js.map +1 -0
  160. package/dist/client/rich-markdown-editor/index.d.ts +9 -0
  161. package/dist/client/rich-markdown-editor/index.d.ts.map +1 -0
  162. package/dist/client/rich-markdown-editor/index.js +9 -0
  163. package/dist/client/rich-markdown-editor/index.js.map +1 -0
  164. package/dist/client/rich-markdown-editor/uploadEditorImage.d.ts +18 -0
  165. package/dist/client/rich-markdown-editor/uploadEditorImage.d.ts.map +1 -0
  166. package/dist/client/rich-markdown-editor/uploadEditorImage.js +57 -0
  167. package/dist/client/rich-markdown-editor/uploadEditorImage.js.map +1 -0
  168. package/dist/client/rich-markdown-editor/useCollabReconcile.d.ts +91 -0
  169. package/dist/client/rich-markdown-editor/useCollabReconcile.d.ts.map +1 -0
  170. package/dist/client/rich-markdown-editor/useCollabReconcile.js +342 -0
  171. package/dist/client/rich-markdown-editor/useCollabReconcile.js.map +1 -0
  172. package/dist/client/track.d.ts +25 -0
  173. package/dist/client/track.d.ts.map +1 -0
  174. package/dist/client/track.js +53 -0
  175. package/dist/client/track.js.map +1 -0
  176. package/dist/client/use-action.d.ts.map +1 -1
  177. package/dist/client/use-action.js +6 -0
  178. package/dist/client/use-action.js.map +1 -1
  179. package/dist/client/use-session.d.ts +3 -2
  180. package/dist/client/use-session.d.ts.map +1 -1
  181. package/dist/client/use-session.js +3 -2
  182. package/dist/client/use-session.js.map +1 -1
  183. package/dist/deploy/build.d.ts +5 -0
  184. package/dist/deploy/build.d.ts.map +1 -1
  185. package/dist/deploy/build.js +67 -1
  186. package/dist/deploy/build.js.map +1 -1
  187. package/dist/extensions/schema.d.ts +1 -1
  188. package/dist/mcp/build-server.d.ts.map +1 -1
  189. package/dist/mcp/build-server.js +9 -2
  190. package/dist/mcp/build-server.js.map +1 -1
  191. package/dist/mcp/server.d.ts +1 -1
  192. package/dist/mcp/server.d.ts.map +1 -1
  193. package/dist/mcp/server.js +35 -2
  194. package/dist/mcp/server.js.map +1 -1
  195. package/dist/provider-api/index.d.ts +1 -1
  196. package/dist/provider-api/index.d.ts.map +1 -1
  197. package/dist/scripts/docs/search.d.ts.map +1 -1
  198. package/dist/scripts/docs/search.js +5 -2
  199. package/dist/scripts/docs/search.js.map +1 -1
  200. package/dist/scripts/runner.d.ts.map +1 -1
  201. package/dist/scripts/runner.js +16 -3
  202. package/dist/scripts/runner.js.map +1 -1
  203. package/dist/server/action-discovery.d.ts.map +1 -1
  204. package/dist/server/action-discovery.js +2 -0
  205. package/dist/server/action-discovery.js.map +1 -1
  206. package/dist/server/action-routes.d.ts.map +1 -1
  207. package/dist/server/action-routes.js +30 -4
  208. package/dist/server/action-routes.js.map +1 -1
  209. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  210. package/dist/server/agent-chat-plugin.js +65 -19
  211. package/dist/server/agent-chat-plugin.js.map +1 -1
  212. package/dist/server/agent-teams.d.ts.map +1 -1
  213. package/dist/server/agent-teams.js +8 -1
  214. package/dist/server/agent-teams.js.map +1 -1
  215. package/dist/server/agents-bundle.d.ts +27 -1
  216. package/dist/server/agents-bundle.d.ts.map +1 -1
  217. package/dist/server/agents-bundle.js +41 -3
  218. package/dist/server/agents-bundle.js.map +1 -1
  219. package/dist/server/auth.d.ts.map +1 -1
  220. package/dist/server/auth.js +76 -3
  221. package/dist/server/auth.js.map +1 -1
  222. package/dist/server/core-routes-plugin.d.ts.map +1 -1
  223. package/dist/server/core-routes-plugin.js +60 -0
  224. package/dist/server/core-routes-plugin.js.map +1 -1
  225. package/dist/server/onboarding-html.d.ts.map +1 -1
  226. package/dist/server/onboarding-html.js +160 -22
  227. package/dist/server/onboarding-html.js.map +1 -1
  228. package/dist/server/sentry.d.ts.map +1 -1
  229. package/dist/server/sentry.js +6 -0
  230. package/dist/server/sentry.js.map +1 -1
  231. package/dist/server/social-og-image.d.ts +2 -1
  232. package/dist/server/social-og-image.d.ts.map +1 -1
  233. package/dist/server/social-og-image.js +24 -4
  234. package/dist/server/social-og-image.js.map +1 -1
  235. package/dist/sharing/schema.d.ts +1 -1
  236. package/dist/styles/agent-native.css +1 -0
  237. package/dist/styles/rich-markdown-editor.css +439 -0
  238. package/dist/templates/default/.agents/skills/actions/SKILL.md +4 -1
  239. package/dist/templates/default/.agents/skills/security/SKILL.md +13 -4
  240. package/dist/templates/default/.agents/skills/storing-data/SKILL.md +15 -3
  241. package/dist/templates/default/AGENTS.md +1 -0
  242. package/dist/templates/default/DEVELOPING.md +2 -0
  243. package/dist/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +10 -3
  244. package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +98 -10
  245. package/dist/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +45 -3
  246. package/dist/templates/workspace-core/.agents/skills/address-feedback/SKILL.md +2 -0
  247. package/dist/templates/workspace-core/.agents/skills/authentication/SKILL.md +37 -4
  248. package/dist/templates/workspace-core/.agents/skills/automations/SKILL.md +9 -4
  249. package/dist/templates/workspace-core/.agents/skills/capture-learnings/SKILL.md +2 -0
  250. package/dist/templates/workspace-core/.agents/skills/client-methods/SKILL.md +106 -0
  251. package/dist/templates/workspace-core/.agents/skills/client-methods/references/legacy-client-fetch-audit-2026-06-03.md +53 -0
  252. package/dist/templates/workspace-core/.agents/skills/client-side-routing/SKILL.md +2 -0
  253. package/dist/templates/workspace-core/.agents/skills/context-awareness/SKILL.md +62 -61
  254. package/dist/templates/workspace-core/.agents/skills/context-xray/SKILL.md +47 -0
  255. package/dist/templates/workspace-core/.agents/skills/create-skill/SKILL.md +28 -0
  256. package/dist/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +52 -1
  257. package/dist/templates/workspace-core/.agents/skills/extension-points/SKILL.md +2 -0
  258. package/dist/templates/workspace-core/.agents/skills/extensions/SKILL.md +95 -433
  259. package/dist/templates/workspace-core/.agents/skills/extensions/references/api.md +285 -0
  260. package/dist/templates/workspace-core/.agents/skills/extensions/references/examples.md +259 -0
  261. package/dist/templates/workspace-core/.agents/skills/external-agents/SKILL.md +398 -0
  262. package/dist/templates/workspace-core/.agents/skills/external-agents/references/mcp-apps-embedding.md +157 -0
  263. package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +17 -0
  264. package/dist/templates/workspace-core/.agents/skills/integration-webhooks/SKILL.md +13 -2
  265. package/dist/templates/workspace-core/.agents/skills/mvp-followup/SKILL.md +51 -0
  266. package/dist/templates/workspace-core/.agents/skills/observability/SKILL.md +14 -4
  267. package/dist/templates/workspace-core/.agents/skills/onboarding/SKILL.md +13 -1
  268. package/dist/templates/workspace-core/.agents/skills/portability/SKILL.md +27 -5
  269. package/dist/templates/workspace-core/.agents/skills/qa/SKILL.md +24 -8
  270. package/dist/templates/workspace-core/.agents/skills/real-time-collab/SKILL.md +53 -7
  271. package/dist/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +43 -10
  272. package/dist/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +2 -0
  273. package/dist/templates/workspace-core/.agents/skills/secrets/SKILL.md +43 -14
  274. package/dist/templates/workspace-core/.agents/skills/security/SKILL.md +50 -1
  275. package/dist/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +4 -2
  276. package/dist/templates/workspace-core/.agents/skills/server-plugins/SKILL.md +11 -1
  277. package/dist/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +15 -0
  278. package/dist/templates/workspace-core/.agents/skills/sharing/SKILL.md +5 -1
  279. package/dist/templates/workspace-core/.agents/skills/storing-data/SKILL.md +48 -19
  280. package/dist/templates/workspace-core/.agents/skills/tracking/SKILL.md +7 -3
  281. package/dist/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +13 -6
  282. package/dist/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +236 -0
  283. package/dist/templates/workspace-core/AGENTS.md +5 -1
  284. package/dist/templates/workspace-root/AGENTS.md +5 -2
  285. package/dist/tracking/route.d.ts +43 -0
  286. package/dist/tracking/route.d.ts.map +1 -0
  287. package/dist/tracking/route.js +85 -0
  288. package/dist/tracking/route.js.map +1 -0
  289. package/dist/vite/client.d.ts.map +1 -1
  290. package/dist/vite/client.js +15 -0
  291. package/dist/vite/client.js.map +1 -1
  292. package/docs/content/a2a-protocol.md +18 -4
  293. package/docs/content/actions.md +87 -0
  294. package/docs/content/agent-mentions.md +2 -1
  295. package/docs/content/authentication.md +2 -1
  296. package/docs/content/client.md +64 -13
  297. package/docs/content/cloneable-saas.md +1 -1
  298. package/docs/content/code-agents-ui.md +17 -11
  299. package/docs/content/context-awareness.md +23 -28
  300. package/docs/content/creating-templates.md +1 -1
  301. package/docs/content/drop-in-agent.md +2 -0
  302. package/docs/content/getting-started.md +2 -2
  303. package/docs/content/key-concepts.md +2 -2
  304. package/docs/content/messaging.md +57 -15
  305. package/docs/content/migration-workbench.md +1 -1
  306. package/docs/content/multi-app-workspace.md +1 -1
  307. package/docs/content/multi-tenancy.md +17 -15
  308. package/docs/content/real-time-collaboration.md +1 -1
  309. package/docs/content/recurring-jobs.md +1 -1
  310. package/docs/content/security.md +2 -2
  311. package/docs/content/server.md +4 -4
  312. package/docs/content/skills-guide.md +30 -0
  313. package/docs/content/template-analytics.md +2 -2
  314. package/docs/content/template-assets.md +17 -1
  315. package/docs/content/template-brain.md +2 -2
  316. package/docs/content/template-calendar.md +1 -1
  317. package/docs/content/template-clips.md +3 -3
  318. package/docs/content/template-content.md +2 -2
  319. package/docs/content/template-design.md +2 -2
  320. package/docs/content/template-dispatch.md +3 -3
  321. package/docs/content/template-forms.md +14 -2
  322. package/docs/content/template-mail.md +1 -3
  323. package/docs/content/template-plan.md +118 -0
  324. package/docs/content/template-slides.md +5 -4
  325. package/docs/content/template-starter.md +4 -4
  326. package/docs/content/template-videos.md +6 -11
  327. package/docs/content/tracking.md +21 -1
  328. package/docs/content/visual-plans.md +72 -0
  329. package/docs/content/workspace.md +9 -9
  330. package/package.json +26 -11
  331. package/src/templates/default/.agents/skills/actions/SKILL.md +4 -1
  332. package/src/templates/default/.agents/skills/security/SKILL.md +13 -4
  333. package/src/templates/default/.agents/skills/storing-data/SKILL.md +15 -3
  334. package/src/templates/default/AGENTS.md +1 -0
  335. package/src/templates/default/DEVELOPING.md +2 -0
  336. package/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +10 -3
  337. package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +98 -10
  338. package/src/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +45 -3
  339. package/src/templates/workspace-core/.agents/skills/address-feedback/SKILL.md +2 -0
  340. package/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +37 -4
  341. package/src/templates/workspace-core/.agents/skills/automations/SKILL.md +9 -4
  342. package/src/templates/workspace-core/.agents/skills/capture-learnings/SKILL.md +2 -0
  343. package/src/templates/workspace-core/.agents/skills/client-methods/SKILL.md +106 -0
  344. package/src/templates/workspace-core/.agents/skills/client-methods/references/legacy-client-fetch-audit-2026-06-03.md +53 -0
  345. package/src/templates/workspace-core/.agents/skills/client-side-routing/SKILL.md +2 -0
  346. package/src/templates/workspace-core/.agents/skills/context-awareness/SKILL.md +62 -61
  347. package/src/templates/workspace-core/.agents/skills/context-xray/SKILL.md +47 -0
  348. package/src/templates/workspace-core/.agents/skills/create-skill/SKILL.md +28 -0
  349. package/src/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +52 -1
  350. package/src/templates/workspace-core/.agents/skills/extension-points/SKILL.md +2 -0
  351. package/src/templates/workspace-core/.agents/skills/extensions/SKILL.md +95 -433
  352. package/src/templates/workspace-core/.agents/skills/extensions/references/api.md +285 -0
  353. package/src/templates/workspace-core/.agents/skills/extensions/references/examples.md +259 -0
  354. package/src/templates/workspace-core/.agents/skills/external-agents/SKILL.md +398 -0
  355. package/src/templates/workspace-core/.agents/skills/external-agents/references/mcp-apps-embedding.md +157 -0
  356. package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +17 -0
  357. package/src/templates/workspace-core/.agents/skills/integration-webhooks/SKILL.md +13 -2
  358. package/src/templates/workspace-core/.agents/skills/mvp-followup/SKILL.md +51 -0
  359. package/src/templates/workspace-core/.agents/skills/observability/SKILL.md +14 -4
  360. package/src/templates/workspace-core/.agents/skills/onboarding/SKILL.md +13 -1
  361. package/src/templates/workspace-core/.agents/skills/portability/SKILL.md +27 -5
  362. package/src/templates/workspace-core/.agents/skills/qa/SKILL.md +24 -8
  363. package/src/templates/workspace-core/.agents/skills/real-time-collab/SKILL.md +53 -7
  364. package/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +43 -10
  365. package/src/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +2 -0
  366. package/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +43 -14
  367. package/src/templates/workspace-core/.agents/skills/security/SKILL.md +50 -1
  368. package/src/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +4 -2
  369. package/src/templates/workspace-core/.agents/skills/server-plugins/SKILL.md +11 -1
  370. package/src/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +15 -0
  371. package/src/templates/workspace-core/.agents/skills/sharing/SKILL.md +5 -1
  372. package/src/templates/workspace-core/.agents/skills/storing-data/SKILL.md +48 -19
  373. package/src/templates/workspace-core/.agents/skills/tracking/SKILL.md +7 -3
  374. package/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +13 -6
  375. package/src/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +236 -0
  376. package/src/templates/workspace-core/AGENTS.md +5 -1
  377. package/src/templates/workspace-root/AGENTS.md +5 -2
@@ -2,8 +2,10 @@
2
2
  name: context-awareness
3
3
  description: >-
4
4
  How the agent knows what the user is looking at. Use when exposing UI state to
5
- the agent, implementing view-screen or navigate scripts, wiring navigation
5
+ the agent, implementing view-screen or navigate actions, wiring navigation
6
6
  state, or debugging agent context issues.
7
+ metadata:
8
+ internal: true
7
9
  ---
8
10
 
9
11
  # Context Awareness
@@ -16,34 +18,31 @@ The agent must always know what the user is currently viewing. The UI writes nav
16
18
 
17
19
  Without context awareness, the agent is blind. It asks "which email?" when the user is staring at one. It cannot act on the current selection, cannot provide relevant suggestions, and cannot modify what the user sees. Context awareness is what makes the agent feel like a collaborator rather than a disconnected chatbot.
18
20
 
19
- ## The Three Patterns
21
+ ## The Core Patterns
20
22
 
21
23
  ### 1. Navigation State (`navigation` key)
22
24
 
23
- The UI writes a `navigation` key to application-state on every route change. This tells the agent what view the user is on and what item is selected.
25
+ The UI writes a `navigation` key to application-state on every route change. This tells the agent the semantic screen state: view, open IDs, active tab, and focused object.
24
26
 
25
- **UI side** — the `use-navigation-state.ts` hook:
27
+ **UI side** — `useNavigationState`, an app-owned hook (not a framework import) that every template ships at `app/hooks/use-navigation-state.ts`. It is a thin wrapper around the framework primitive `useAgentRouteState`, handling both directions: writing `navigation` on route change and consuming the agent's `navigate` command.
26
28
 
27
- ```ts
29
+ ```tsx
28
30
  // app/hooks/use-navigation-state.ts
29
- import { useEffect, useCallback } from "react";
30
- import { useLocation } from "react-router";
31
- import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
31
+ import { useAgentRouteState } from "@agent-native/core/client";
32
+ import { TAB_ID } from "@/lib/tab-id";
32
33
 
33
34
  export function useNavigationState() {
34
- const location = useLocation();
35
-
36
- // Sync route to app-state on every navigation
37
- useEffect(() => {
38
- const state = deriveNavigationState(location.pathname);
39
- fetch("/_agent-native/application-state/navigation", {
40
- method: "PUT",
41
- headers: { "Content-Type": "application/json" },
42
- body: JSON.stringify(state),
43
- }).catch(() => {});
44
- }, [location.pathname]);
45
-
46
- // ... also listen for navigate commands (pattern 3)
35
+ useAgentRouteState({
36
+ browserTabId: TAB_ID,
37
+ requestSource: TAB_ID,
38
+ getNavigationState: ({ pathname, searchParams }) => ({
39
+ view: pathname === "/" ? "home" : pathname.slice(1),
40
+ // Optional semantic alias. Raw query params are already exposed in
41
+ // <current-url> and controllable with set-search-params.
42
+ label: searchParams.get("label"),
43
+ }),
44
+ getCommandPath: (command: any) => command.path ?? "/",
45
+ });
47
46
  }
48
47
  ```
49
48
 
@@ -60,12 +59,24 @@ const navigation = await readAppState("navigation");
60
59
 
61
60
  - `view` — the current page/section (e.g., "inbox", "form-builder", "dashboard")
62
61
  - Item IDs — the selected/open item (e.g., `threadId`, `formId`, `issueKey`)
63
- - Filter state — active search, label, or category filters
64
- - Any selection — focused item, selected text range, active tab
62
+ - Semantic aliaseslabel names, active tabs, focused row, or stable filter names the agent should reason about
63
+ - Any durable selection — focused item, selected text range, active tab
64
+
65
+ Raw URL query params are already synced by the framework to `__url__` and shown to the built-in agent as `<current-url>`. Keep shareable filters in URL state, then use `view-screen` to summarize important query params as `activeFilters` when helpful.
66
+
67
+ ### 2. Current URL (`__url__` key)
65
68
 
66
- ### 2. The `view-screen` Script
69
+ `AgentPanel` automatically writes `__url__` with `{ pathname, search, hash, searchParams }`. The built-in agent sees it as a `<current-url>` block in every turn.
67
70
 
68
- Every template should have a `view-screen` script. It reads navigation state, fetches the relevant data from the API, and returns a snapshot of what the user sees. This is the agent's eyes.
71
+ Use this for URL-reachable filters and search state. The agent can update it with the built-in `set-search-params` and `set-url-path` tools; do not duplicate the whole query string into `navigation`.
72
+
73
+ ### 3. The `view-screen` Script
74
+
75
+ Every template should have a `view-screen` script. It reads navigation state,
76
+ the current URL if filters matter, and selection state. It fetches the relevant
77
+ data from existing domain actions, shared data helpers, or Drizzle queries, and
78
+ returns a snapshot of what the user sees. Do not add REST wrappers just so
79
+ `view-screen` can read app data. This is the agent's eyes.
69
80
 
70
81
  ```ts
71
82
  // actions/view-screen.ts
@@ -73,8 +84,15 @@ import { readAppState } from "@agent-native/core/application-state";
73
84
 
74
85
  export default async function main() {
75
86
  const navigation = await readAppState("navigation");
87
+ const url = (await readAppState("__url__")) as {
88
+ searchParams?: Record<string, string>;
89
+ } | null;
76
90
  const screen: Record<string, unknown> = { navigation };
77
91
 
92
+ if (url?.searchParams) {
93
+ screen.activeFilters = url.searchParams;
94
+ }
95
+
78
96
  // Fetch data based on what the user is viewing
79
97
  if (navigation?.view === "inbox") {
80
98
  const emails = await fetchEmailList(navigation.label);
@@ -91,7 +109,7 @@ export default async function main() {
91
109
 
92
110
  **Navigation state is auto-injected into every user message as a `<current-screen>` block**, so the agent always has basic context without calling any tool. The `view-screen` action is still useful when you need a richer snapshot (e.g., fetching the full email thread or form data for the current view).
93
111
 
94
- ### 3. The `navigate` Script
112
+ ### 4. The `navigate` Script
95
113
 
96
114
  The agent writes a one-shot `navigate` command to application-state. The UI reads it, performs the navigation, and deletes the entry.
97
115
 
@@ -104,74 +122,56 @@ import { writeAppState } from "@agent-native/core/application-state";
104
122
  await writeAppState("navigate", { view: "inbox", threadId: "abc123" });
105
123
  ```
106
124
 
107
- **UI side** — the hook polls for the command:
108
-
109
- ```ts
110
- const { data: navCommand } = useQuery({
111
- queryKey: ["navigate-command"],
112
- queryFn: async () => {
113
- const res = await fetch("/_agent-native/application-state/navigate");
114
- if (!res.ok) return null;
115
- const data = await res.json();
116
- if (data) {
117
- // Delete the one-shot command after reading
118
- fetch("/_agent-native/application-state/navigate", { method: "DELETE" });
119
- return data;
120
- }
121
- return null;
122
- },
123
- staleTime: 2_000,
124
- });
125
-
126
- useEffect(() => {
127
- if (navCommand) {
128
- router.navigate(buildPath(navCommand));
129
- }
130
- }, [navCommand]);
131
- ```
125
+ **UI side** — use `useAgentRouteState`, shown above. It polls command keys,
126
+ dedupes `_writeId`, deletes consumed commands, and applies app-local routing.
132
127
 
133
128
  ## Jitter Prevention
134
129
 
135
130
  When the agent writes to application-state via script helpers (`writeAppState`), the write is tagged with `requestSource: "agent"`. The UI uses the `ignoreSource` option on `useDbSync()` with a per-tab ID so it ignores its own writes while still picking up changes from agents, other tabs, and scripts.
136
131
 
132
+ Client code can use `useAgentRouteState`, `useSemanticNavigationState`, `setClientAppState`, `writeClientAppState`, `readClientAppState`, and `deleteClientAppState` from `@agent-native/core/client` instead of hand-written `fetch` calls. Pass `{ requestSource: TAB_ID }` on UI writes when pairing with `useDbSync({ ignoreSource: TAB_ID })`; pass `{ keepalive: true }` for short-lived writes such as selection cleanup during unload.
133
+
137
134
  ```ts
138
135
  // app/root.tsx
139
136
  import { TAB_ID } from "@/lib/tab-id";
140
137
 
141
138
  useDbSync({
142
139
  queryClient,
143
- queryKeys: ["app-state", "settings"],
144
140
  ignoreSource: TAB_ID, // ignore events from this tab's own writes
145
141
  });
146
142
  ```
147
143
 
148
- The UI sends its tab ID via `X-Request-Source` header on PUT/DELETE requests. The server stores this as the event's `requestSource`. When polling, the UI filters out events matching its own `ignoreSource` value. This prevents the UI from refetching data it just wrote.
144
+ The UI sends its tab ID via `X-Request-Source` header on PUT/DELETE requests. The server stores this as the event's `requestSource`. When processing sync events, the UI filters out events matching its own `ignoreSource` value. This prevents the UI from refetching data it just wrote.
149
145
 
150
146
  ## Gold-Standard Example: Mail Template
151
147
 
152
- The mail template demonstrates all three patterns working together:
148
+ The mail template demonstrates these patterns working together:
153
149
 
154
150
  **Navigation state shape:**
155
151
  ```json
156
- { "view": "inbox", "threadId": "thread-123", "focusedEmailId": "msg-456", "search": "budget", "label": "important" }
152
+ { "view": "inbox", "threadId": "thread-123", "focusedEmailId": "msg-456", "label": "important" }
157
153
  ```
158
154
 
159
155
  **view-screen output:**
160
156
  - Reads navigation state
161
- - Fetches email list matching current view/search/label filters
157
+ - Reads `__url__` if URL query filters matter
158
+ - Fetches email list matching current view/filter state
162
159
  - Fetches thread messages if a thread is open
163
160
  - Returns everything as a single JSON snapshot
164
161
 
165
162
  **navigate command:**
166
163
  - `{ "view": "starred" }` — switch to starred view
167
164
  - `{ "view": "inbox", "threadId": "thread-123" }` — open a specific thread
165
+ - For pure query-filter changes, use `set-search-params`
168
166
 
169
167
  ## Do
170
168
 
171
169
  - Use the auto-injected `<current-screen>` block for basic context — call `view-screen` only when you need richer data
172
- - Include all relevant selection state in the `navigation` key (view, item IDs, filters)
170
+ - Include semantic route state in the `navigation` key (view, item IDs, active tab, focused row)
171
+ - Keep shareable filters in URL query params so `<current-url>` and `set-search-params` work
173
172
  - Update `view-screen` when adding new features — it should return data for every view
174
- - Use the one-shot `navigate` command pattern for agent-initiated navigation
173
+ - Use `useAgentRouteState` or `useSemanticNavigationState` for UI-side navigation sync and command consumption
174
+ - Use the one-shot `navigate` command pattern for semantic agent-initiated navigation
175
175
  - Tag agent writes with `requestSource: "agent"` (the script helpers do this automatically)
176
176
 
177
177
  ## Don't
@@ -180,11 +180,12 @@ The mail template demonstrates all three patterns working together:
180
180
  - Don't hardcode navigation paths in scripts — read the current state and branch
181
181
  - Don't write to the `navigation` key from the agent — it belongs to the UI. Use `navigate` instead.
182
182
  - Don't ignore the `<current-screen>` block — it tells you where the user is
183
- - Don't store fetched data in navigation state — it holds IDs and filters only. The `view-screen` script fetches the actual data.
183
+ - Don't duplicate whole URL query strings into `navigation` when `<current-url>` already exposes them
184
+ - Don't store fetched data in navigation state — it holds IDs and semantic UI state only. The `view-screen` script fetches the actual data.
184
185
 
185
186
  ## Related Skills
186
187
 
187
188
  - **adding-a-feature** — Context awareness is area 4 of the four-area checklist
188
- - **real-time-sync** — How polling and `useDbSync` deliver app-state changes to the UI
189
- - **scripts** — How to create the `view-screen` and `navigate` scripts
189
+ - **real-time-sync** — How `useDbSync` delivers app-state changes to the UI
190
+ - **actions** — How to create the `view-screen` and `navigate` actions
190
191
  - **storing-data** — Application-state is one of the core SQL stores
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: context-xray
3
+ description: >-
4
+ Inspect and manage the live agent context window with Context X-Ray. Use when
5
+ context is getting large, the user asks what is in context, or stale tool
6
+ results/files should be pinned, evicted, restored, or reported by an external
7
+ host.
8
+ metadata:
9
+ internal: true
10
+ ---
11
+
12
+ # Context X-Ray
13
+
14
+ Context X-Ray is the framework's context garbage-collection surface. It shows
15
+ the current thread's model-bound context as content-derived segments with token
16
+ counts, then lets the user or agent pin, evict, or restore individual segments.
17
+
18
+ ## Actions
19
+
20
+ | Action | When to use |
21
+ | --- | --- |
22
+ | `context-manifest-get` | Read the current manifest for a thread. Returns token totals, segment status, source, and whether changes are enforceable. |
23
+ | `context-pin` | Preserve a segment across future compaction/model calls. Use for task specs, acceptance criteria, user constraints, and other durable context. |
24
+ | `context-evict` | Exclude a stale or irrelevant segment from future model calls. Eviction is reversible and never deletes chat history. |
25
+ | `context-restore` | Undo a pin, evict, or summarize directive for a segment. |
26
+ | `context-report` | External hosts can report their visible context inventory. These manifests are advisory unless Agent-Native owns the emitted content. |
27
+
28
+ ## Rules
29
+
30
+ - Never evict or summarize protected segments. The manifest marks active-turn
31
+ user/tool/thinking context as `protected`.
32
+ - Prefer pinning the user's task, requirements, and decisions before evicting
33
+ large stale tool results.
34
+ - Eviction excludes content from future model calls; it does not delete the
35
+ canonical transcript or files.
36
+ - In external/advisory mode, be honest: recorded directives are intent for the
37
+ host except for Agent-Native-originated content we can actually withhold.
38
+ - If token counts are estimated, describe reclaim as approximate.
39
+
40
+ ## Typical Flow
41
+
42
+ 1. Call `context-manifest-get` with the active `threadId`.
43
+ 2. Sort segments by `tokenCount` and inspect large stale `Tool results` or
44
+ `Files read` entries.
45
+ 3. Call `context-pin` for essential specs or user instructions.
46
+ 4. Call `context-evict` for large irrelevant segments.
47
+ 5. Offer `context-restore` if the user wants undo.
@@ -4,6 +4,8 @@ description: >-
4
4
  How to create new skills for an agent-native app. Use when adding a new
5
5
  skill, documenting a pattern the agent should follow, or creating reusable
6
6
  guidance for the agent.
7
+ metadata:
8
+ internal: true
7
9
  ---
8
10
 
9
11
  # Create a Skill
@@ -148,6 +150,32 @@ description: >-
148
150
  - Workflow/generator skills: verb-noun (`create-skill`, `capture-learnings`).
149
151
  - The directory name must match the `name` in frontmatter.
150
152
 
153
+ ## Skill Scope (runtime vs dev)
154
+
155
+ An optional `scope` frontmatter field controls which agent loads the skill:
156
+
157
+ - `both` (default when omitted) — loaded by the in-app runtime agent. Use for
158
+ any skill the runtime agent should follow.
159
+ - `runtime` — loaded only by the in-app runtime agent.
160
+ - `dev` — meant for the human's coding agent (e.g. Claude Code) only. **Excluded
161
+ from the runtime agent everywhere**: not in the system-prompt skills block and
162
+ not in `docs-search` results.
163
+
164
+ ```markdown
165
+ ---
166
+ name: release-checklist
167
+ description: >-
168
+ Steps for cutting a release. Use when preparing or publishing a new version.
169
+ scope: dev
170
+ ---
171
+ ```
172
+
173
+ Leave `scope` off for normal skills — the default (`both`) keeps them loading at
174
+ runtime, so this is fully backward compatible. To make a dev-only skill visible
175
+ to your coding agent but hidden from the runtime agent, mark it `scope: dev` and
176
+ optionally mirror it under `.claude/skills/<name>/SKILL.md` (Claude Code reads
177
+ `.claude/skills/` independently of the runtime's `.agents/skills/`).
178
+
151
179
  ## Tips
152
180
 
153
181
  - **Keep descriptions under 40 words** — they load into context on every
@@ -5,6 +5,8 @@ description: >-
5
5
  from UI or scripts to the agent, when a user asks for agent behavior or
6
6
  LLM-powered features, when tempted to add inline LLM calls, or when sending
7
7
  messages to the agent from application code.
8
+ metadata:
9
+ internal: true
8
10
  ---
9
11
 
10
12
  # Delegate All AI to the Agent
@@ -124,6 +126,55 @@ Buttons that produce new content ("New Design", "Create Dashboard", "Make Deck",
124
126
 
125
127
  If you find yourself writing `submit: true` with a hardcoded creative verb (`"design a..."`, `"write a..."`, `"build a..."`), stop and add a Popover.
126
128
 
129
+ ## Delegating to a Sub-Agent (Agent Teams)
130
+
131
+ `sendToAgentChat()` delegates from app code _to_ the agent. The other axis of
132
+ delegation is the agent handing work _to a sub-agent_ through the Agent Teams
133
+ run-manager. The main chat stays the orchestrator: it spawns sub-agents, then
134
+ reads and integrates their results.
135
+
136
+ ### When to spawn a sub-agent vs do it yourself
137
+
138
+ - **Do it yourself** when the work is small, on the critical path, or tightly
139
+ coupled to what you're already doing. Sub-agent overhead and coordination risk
140
+ outweigh the benefit.
141
+ - **Spawn a sub-agent** for a self-contained unit of work that can run
142
+ independently — a disjoint investigation, an isolated implementation slice, a
143
+ long-running search — especially when it frees the main thread to keep
144
+ orchestrating.
145
+
146
+ ### Briefing contract
147
+
148
+ Every sub-agent brief must specify four things, or the sub-agent will guess:
149
+
150
+ - **Objective** — the one concrete outcome it owns, in a sentence.
151
+ - **Context** — the facts it needs (paths, prior findings, constraints) so it
152
+ doesn't re-derive them.
153
+ - **Output** — the exact shape you want back (a summary, a file edited, a list
154
+ of paths, a yes/no with rationale).
155
+ - **Boundaries** — what it must NOT touch (files, branches, side effects) and
156
+ when to stop and report rather than push forward.
157
+
158
+ ### Fan-out discipline
159
+
160
+ - **Default to a single sub-agent.** Most delegation is one focused task.
161
+ - **Spawn multiple only for genuinely independent units** that don't share state
162
+ or files. Never parallelize coupled work — if B needs A's output, run them in
163
+ sequence.
164
+ - **Cap parallel fan-out at ~3.** More sub-agents means more synthesis cost and
165
+ more chance of conflicting edits to the same area.
166
+
167
+ ### Synthesis discipline
168
+
169
+ - **Read every result** before concluding — don't act on the first one back.
170
+ - **Reconcile conflicts** between sub-agent findings explicitly; decide which is
171
+ right rather than averaging or ignoring.
172
+ - **Integrate into one answer.** The main thread produces the single coherent
173
+ result; it never just forwards raw sub-agent transcripts to the user.
174
+
175
+ Background sub-agents must use the core run-manager / Agent Teams infrastructure
176
+ rather than ad-hoc LLM calls.
177
+
127
178
  ## Don't
128
179
 
129
180
  - Don't `import Anthropic from "@anthropic-ai/sdk"` in client or server code
@@ -157,7 +208,7 @@ See the **a2a-protocol** skill for the full pattern.
157
208
  ## Related Skills
158
209
 
159
210
  - **a2a-protocol** — When the work goes to a different agent, not the local one
160
- - **scripts** — The agent invokes scripts via `pnpm action <name>` to perform complex operations
211
+ - **actions** — The agent invokes actions via `pnpm action <name>` to perform complex operations
161
212
  - **self-modifying-code** — The agent operates through the chat bridge to make code changes
162
213
  - **storing-data** — The agent writes results to the database after processing requests
163
214
  - **real-time-sync** — The UI updates automatically when the agent writes data
@@ -6,6 +6,8 @@ description: >-
6
6
  custom widget to an app surface (e.g. "add a sticky-note widget to my mail
7
7
  contact sidebar"), when wiring an ExtensionSlot in a template, or when
8
8
  marking an extension as installable into a slot.
9
+ metadata:
10
+ internal: true
9
11
  ---
10
12
 
11
13
  # Extension Points