@agent-native/core 0.37.3 → 0.39.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 (476) 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/create.d.ts.map +1 -1
  18. package/dist/cli/create.js +8 -1
  19. package/dist/cli/create.js.map +1 -1
  20. package/dist/cli/index.js +10 -6
  21. package/dist/cli/index.js.map +1 -1
  22. package/dist/cli/plan-publish-store.d.ts +52 -0
  23. package/dist/cli/plan-publish-store.d.ts.map +1 -0
  24. package/dist/cli/plan-publish-store.js +103 -0
  25. package/dist/cli/plan-publish-store.js.map +1 -0
  26. package/dist/cli/skills.d.ts +30 -4
  27. package/dist/cli/skills.d.ts.map +1 -1
  28. package/dist/cli/skills.js +1240 -339
  29. package/dist/cli/skills.js.map +1 -1
  30. package/dist/cli/templates-meta.js +12 -12
  31. package/dist/cli/templates-meta.js.map +1 -1
  32. package/dist/client/AssistantChat.d.ts +3 -1
  33. package/dist/client/AssistantChat.d.ts.map +1 -1
  34. package/dist/client/AssistantChat.js +65 -15
  35. package/dist/client/AssistantChat.js.map +1 -1
  36. package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
  37. package/dist/client/MultiTabAssistantChat.js +20 -2
  38. package/dist/client/MultiTabAssistantChat.js.map +1 -1
  39. package/dist/client/agent-chat-adapter.d.ts.map +1 -1
  40. package/dist/client/agent-chat-adapter.js +12 -0
  41. package/dist/client/agent-chat-adapter.js.map +1 -1
  42. package/dist/client/agent-engine-key.d.ts +24 -0
  43. package/dist/client/agent-engine-key.d.ts.map +1 -0
  44. package/dist/client/agent-engine-key.js +49 -0
  45. package/dist/client/agent-engine-key.js.map +1 -0
  46. package/dist/client/analytics.d.ts.map +1 -1
  47. package/dist/client/analytics.js +34 -0
  48. package/dist/client/analytics.js.map +1 -1
  49. package/dist/client/blocks/BlockView.d.ts +35 -0
  50. package/dist/client/blocks/BlockView.d.ts.map +1 -0
  51. package/dist/client/blocks/BlockView.js +45 -0
  52. package/dist/client/blocks/BlockView.js.map +1 -0
  53. package/dist/client/blocks/SchemaBlockEditor.d.ts +25 -0
  54. package/dist/client/blocks/SchemaBlockEditor.d.ts.map +1 -0
  55. package/dist/client/blocks/SchemaBlockEditor.js +165 -0
  56. package/dist/client/blocks/SchemaBlockEditor.js.map +1 -0
  57. package/dist/client/blocks/agent.d.ts +30 -0
  58. package/dist/client/blocks/agent.d.ts.map +1 -0
  59. package/dist/client/blocks/agent.js +61 -0
  60. package/dist/client/blocks/agent.js.map +1 -0
  61. package/dist/client/blocks/index.d.ts +51 -0
  62. package/dist/client/blocks/index.d.ts.map +1 -0
  63. package/dist/client/blocks/index.js +67 -0
  64. package/dist/client/blocks/index.js.map +1 -0
  65. package/dist/client/blocks/library/AnnotatedCodeBlock.d.ts +6 -0
  66. package/dist/client/blocks/library/AnnotatedCodeBlock.d.ts.map +1 -0
  67. package/dist/client/blocks/library/AnnotatedCodeBlock.js +135 -0
  68. package/dist/client/blocks/library/AnnotatedCodeBlock.js.map +1 -0
  69. package/dist/client/blocks/library/ApiEndpointBlock.d.ts +20 -0
  70. package/dist/client/blocks/library/ApiEndpointBlock.d.ts.map +1 -0
  71. package/dist/client/blocks/library/ApiEndpointBlock.js +131 -0
  72. package/dist/client/blocks/library/ApiEndpointBlock.js.map +1 -0
  73. package/dist/client/blocks/library/DataModelBlock.d.ts +28 -0
  74. package/dist/client/blocks/library/DataModelBlock.d.ts.map +1 -0
  75. package/dist/client/blocks/library/DataModelBlock.js +222 -0
  76. package/dist/client/blocks/library/DataModelBlock.js.map +1 -0
  77. package/dist/client/blocks/library/DiffBlock.d.ts +6 -0
  78. package/dist/client/blocks/library/DiffBlock.d.ts.map +1 -0
  79. package/dist/client/blocks/library/DiffBlock.js +293 -0
  80. package/dist/client/blocks/library/DiffBlock.js.map +1 -0
  81. package/dist/client/blocks/library/FileTreeBlock.d.ts +23 -0
  82. package/dist/client/blocks/library/FileTreeBlock.d.ts.map +1 -0
  83. package/dist/client/blocks/library/FileTreeBlock.js +225 -0
  84. package/dist/client/blocks/library/FileTreeBlock.js.map +1 -0
  85. package/dist/client/blocks/library/JsonExplorerBlock.d.ts +19 -0
  86. package/dist/client/blocks/library/JsonExplorerBlock.d.ts.map +1 -0
  87. package/dist/client/blocks/library/JsonExplorerBlock.js +171 -0
  88. package/dist/client/blocks/library/JsonExplorerBlock.js.map +1 -0
  89. package/dist/client/blocks/library/MermaidBlock.d.ts +17 -0
  90. package/dist/client/blocks/library/MermaidBlock.d.ts.map +1 -0
  91. package/dist/client/blocks/library/MermaidBlock.js +131 -0
  92. package/dist/client/blocks/library/MermaidBlock.js.map +1 -0
  93. package/dist/client/blocks/library/OpenApiSpecBlock.d.ts +19 -0
  94. package/dist/client/blocks/library/OpenApiSpecBlock.d.ts.map +1 -0
  95. package/dist/client/blocks/library/OpenApiSpecBlock.js +494 -0
  96. package/dist/client/blocks/library/OpenApiSpecBlock.js.map +1 -0
  97. package/dist/client/blocks/library/annotated-code.config.d.ts +58 -0
  98. package/dist/client/blocks/library/annotated-code.config.d.ts.map +1 -0
  99. package/dist/client/blocks/library/annotated-code.config.js +53 -0
  100. package/dist/client/blocks/library/annotated-code.config.js.map +1 -0
  101. package/dist/client/blocks/library/api-endpoint.config.d.ts +71 -0
  102. package/dist/client/blocks/library/api-endpoint.config.d.ts.map +1 -0
  103. package/dist/client/blocks/library/api-endpoint.config.js +91 -0
  104. package/dist/client/blocks/library/api-endpoint.config.js.map +1 -0
  105. package/dist/client/blocks/library/checklist.config.d.ts +36 -0
  106. package/dist/client/blocks/library/checklist.config.d.ts.map +1 -0
  107. package/dist/client/blocks/library/checklist.config.js +25 -0
  108. package/dist/client/blocks/library/checklist.config.js.map +1 -0
  109. package/dist/client/blocks/library/checklist.d.ts +26 -0
  110. package/dist/client/blocks/library/checklist.d.ts.map +1 -0
  111. package/dist/client/blocks/library/checklist.js +78 -0
  112. package/dist/client/blocks/library/checklist.js.map +1 -0
  113. package/dist/client/blocks/library/code-tabs.config.d.ts +36 -0
  114. package/dist/client/blocks/library/code-tabs.config.d.ts.map +1 -0
  115. package/dist/client/blocks/library/code-tabs.config.js +30 -0
  116. package/dist/client/blocks/library/code-tabs.config.js.map +1 -0
  117. package/dist/client/blocks/library/code-tabs.d.ts +3 -0
  118. package/dist/client/blocks/library/code-tabs.d.ts.map +1 -0
  119. package/dist/client/blocks/library/code-tabs.js +165 -0
  120. package/dist/client/blocks/library/code-tabs.js.map +1 -0
  121. package/dist/client/blocks/library/data-model.config.d.ts +72 -0
  122. package/dist/client/blocks/library/data-model.config.d.ts.map +1 -0
  123. package/dist/client/blocks/library/data-model.config.js +59 -0
  124. package/dist/client/blocks/library/data-model.config.js.map +1 -0
  125. package/dist/client/blocks/library/dev-doc-ui.d.ts +49 -0
  126. package/dist/client/blocks/library/dev-doc-ui.d.ts.map +1 -0
  127. package/dist/client/blocks/library/dev-doc-ui.js +50 -0
  128. package/dist/client/blocks/library/dev-doc-ui.js.map +1 -0
  129. package/dist/client/blocks/library/diff.config.d.ts +41 -0
  130. package/dist/client/blocks/library/diff.config.d.ts.map +1 -0
  131. package/dist/client/blocks/library/diff.config.js +34 -0
  132. package/dist/client/blocks/library/diff.config.js.map +1 -0
  133. package/dist/client/blocks/library/file-tree.config.d.ts +59 -0
  134. package/dist/client/blocks/library/file-tree.config.d.ts.map +1 -0
  135. package/dist/client/blocks/library/file-tree.config.js +45 -0
  136. package/dist/client/blocks/library/file-tree.config.js.map +1 -0
  137. package/dist/client/blocks/library/html.config.d.ts +37 -0
  138. package/dist/client/blocks/library/html.config.d.ts.map +1 -0
  139. package/dist/client/blocks/library/html.config.js +46 -0
  140. package/dist/client/blocks/library/html.config.js.map +1 -0
  141. package/dist/client/blocks/library/html.d.ts +21 -0
  142. package/dist/client/blocks/library/html.d.ts.map +1 -0
  143. package/dist/client/blocks/library/html.js +72 -0
  144. package/dist/client/blocks/library/html.js.map +1 -0
  145. package/dist/client/blocks/library/json-explorer.config.d.ts +46 -0
  146. package/dist/client/blocks/library/json-explorer.config.d.ts.map +1 -0
  147. package/dist/client/blocks/library/json-explorer.config.js +28 -0
  148. package/dist/client/blocks/library/json-explorer.config.js.map +1 -0
  149. package/dist/client/blocks/library/mermaid.config.d.ts +32 -0
  150. package/dist/client/blocks/library/mermaid.config.d.ts.map +1 -0
  151. package/dist/client/blocks/library/mermaid.config.js +24 -0
  152. package/dist/client/blocks/library/mermaid.config.js.map +1 -0
  153. package/dist/client/blocks/library/openapi-spec.config.d.ts +49 -0
  154. package/dist/client/blocks/library/openapi-spec.config.d.ts.map +1 -0
  155. package/dist/client/blocks/library/openapi-spec.config.js +24 -0
  156. package/dist/client/blocks/library/openapi-spec.config.js.map +1 -0
  157. package/dist/client/blocks/library/server-specs.d.ts +35 -0
  158. package/dist/client/blocks/library/server-specs.d.ts.map +1 -0
  159. package/dist/client/blocks/library/server-specs.js +171 -0
  160. package/dist/client/blocks/library/server-specs.js.map +1 -0
  161. package/dist/client/blocks/library/specs.d.ts +29 -0
  162. package/dist/client/blocks/library/specs.d.ts.map +1 -0
  163. package/dist/client/blocks/library/specs.js +229 -0
  164. package/dist/client/blocks/library/specs.js.map +1 -0
  165. package/dist/client/blocks/library/table.config.d.ts +30 -0
  166. package/dist/client/blocks/library/table.config.d.ts.map +1 -0
  167. package/dist/client/blocks/library/table.config.js +22 -0
  168. package/dist/client/blocks/library/table.config.js.map +1 -0
  169. package/dist/client/blocks/library/table.d.ts +8 -0
  170. package/dist/client/blocks/library/table.d.ts.map +1 -0
  171. package/dist/client/blocks/library/table.js +109 -0
  172. package/dist/client/blocks/library/table.js.map +1 -0
  173. package/dist/client/blocks/library/tabs.config.d.ts +56 -0
  174. package/dist/client/blocks/library/tabs.config.d.ts.map +1 -0
  175. package/dist/client/blocks/library/tabs.config.js +36 -0
  176. package/dist/client/blocks/library/tabs.config.js.map +1 -0
  177. package/dist/client/blocks/library/tabs.d.ts +20 -0
  178. package/dist/client/blocks/library/tabs.d.ts.map +1 -0
  179. package/dist/client/blocks/library/tabs.js +123 -0
  180. package/dist/client/blocks/library/tabs.js.map +1 -0
  181. package/dist/client/blocks/mdx.d.ts +74 -0
  182. package/dist/client/blocks/mdx.d.ts.map +1 -0
  183. package/dist/client/blocks/mdx.js +205 -0
  184. package/dist/client/blocks/mdx.js.map +1 -0
  185. package/dist/client/blocks/provider.d.ts +25 -0
  186. package/dist/client/blocks/provider.d.ts.map +1 -0
  187. package/dist/client/blocks/provider.js +19 -0
  188. package/dist/client/blocks/provider.js.map +1 -0
  189. package/dist/client/blocks/registry.d.ts +32 -0
  190. package/dist/client/blocks/registry.d.ts.map +1 -0
  191. package/dist/client/blocks/registry.js +65 -0
  192. package/dist/client/blocks/registry.js.map +1 -0
  193. package/dist/client/blocks/schema-form/introspect.d.ts +31 -0
  194. package/dist/client/blocks/schema-form/introspect.d.ts.map +1 -0
  195. package/dist/client/blocks/schema-form/introspect.js +164 -0
  196. package/dist/client/blocks/schema-form/introspect.js.map +1 -0
  197. package/dist/client/blocks/server.d.ts +31 -0
  198. package/dist/client/blocks/server.d.ts.map +1 -0
  199. package/dist/client/blocks/server.js +41 -0
  200. package/dist/client/blocks/server.js.map +1 -0
  201. package/dist/client/blocks/types.d.ts +252 -0
  202. package/dist/client/blocks/types.d.ts.map +1 -0
  203. package/dist/client/blocks/types.js +5 -0
  204. package/dist/client/blocks/types.js.map +1 -0
  205. package/dist/client/composer/ComposerPlusMenu.js +10 -1
  206. package/dist/client/composer/ComposerPlusMenu.js.map +1 -1
  207. package/dist/client/guided-questions.d.ts +68 -0
  208. package/dist/client/guided-questions.d.ts.map +1 -1
  209. package/dist/client/guided-questions.js +158 -3
  210. package/dist/client/guided-questions.js.map +1 -1
  211. package/dist/client/index.d.ts +6 -1
  212. package/dist/client/index.d.ts.map +1 -1
  213. package/dist/client/index.js +24 -1
  214. package/dist/client/index.js.map +1 -1
  215. package/dist/client/rich-markdown-editor/BubbleToolbar.d.ts +37 -0
  216. package/dist/client/rich-markdown-editor/BubbleToolbar.d.ts.map +1 -0
  217. package/dist/client/rich-markdown-editor/BubbleToolbar.js +161 -0
  218. package/dist/client/rich-markdown-editor/BubbleToolbar.js.map +1 -0
  219. package/dist/client/rich-markdown-editor/DragHandle.d.ts +52 -0
  220. package/dist/client/rich-markdown-editor/DragHandle.d.ts.map +1 -0
  221. package/dist/client/rich-markdown-editor/DragHandle.js +403 -0
  222. package/dist/client/rich-markdown-editor/DragHandle.js.map +1 -0
  223. package/dist/client/rich-markdown-editor/ImageExtension.d.ts +63 -0
  224. package/dist/client/rich-markdown-editor/ImageExtension.d.ts.map +1 -0
  225. package/dist/client/rich-markdown-editor/ImageExtension.js +242 -0
  226. package/dist/client/rich-markdown-editor/ImageExtension.js.map +1 -0
  227. package/dist/client/rich-markdown-editor/RegistryBlockNode.d.ts +97 -0
  228. package/dist/client/rich-markdown-editor/RegistryBlockNode.d.ts.map +1 -0
  229. package/dist/client/rich-markdown-editor/RegistryBlockNode.js +214 -0
  230. package/dist/client/rich-markdown-editor/RegistryBlockNode.js.map +1 -0
  231. package/dist/client/rich-markdown-editor/RichMarkdownEditor.d.ts +51 -0
  232. package/dist/client/rich-markdown-editor/RichMarkdownEditor.d.ts.map +1 -0
  233. package/dist/client/rich-markdown-editor/RichMarkdownEditor.js +37 -0
  234. package/dist/client/rich-markdown-editor/RichMarkdownEditor.js.map +1 -0
  235. package/dist/client/rich-markdown-editor/RunId.d.ts +28 -0
  236. package/dist/client/rich-markdown-editor/RunId.d.ts.map +1 -0
  237. package/dist/client/rich-markdown-editor/RunId.js +60 -0
  238. package/dist/client/rich-markdown-editor/RunId.js.map +1 -0
  239. package/dist/client/rich-markdown-editor/SharedRichEditor.d.ts +85 -0
  240. package/dist/client/rich-markdown-editor/SharedRichEditor.d.ts.map +1 -0
  241. package/dist/client/rich-markdown-editor/SharedRichEditor.js +130 -0
  242. package/dist/client/rich-markdown-editor/SharedRichEditor.js.map +1 -0
  243. package/dist/client/rich-markdown-editor/SlashCommandMenu.d.ts +36 -0
  244. package/dist/client/rich-markdown-editor/SlashCommandMenu.d.ts.map +1 -0
  245. package/dist/client/rich-markdown-editor/SlashCommandMenu.js +193 -0
  246. package/dist/client/rich-markdown-editor/SlashCommandMenu.js.map +1 -0
  247. package/dist/client/rich-markdown-editor/extensions.d.ts +166 -0
  248. package/dist/client/rich-markdown-editor/extensions.d.ts.map +1 -0
  249. package/dist/client/rich-markdown-editor/extensions.js +222 -0
  250. package/dist/client/rich-markdown-editor/extensions.js.map +1 -0
  251. package/dist/client/rich-markdown-editor/gfmDoc.d.ts +24 -0
  252. package/dist/client/rich-markdown-editor/gfmDoc.d.ts.map +1 -0
  253. package/dist/client/rich-markdown-editor/gfmDoc.js +83 -0
  254. package/dist/client/rich-markdown-editor/gfmDoc.js.map +1 -0
  255. package/dist/client/rich-markdown-editor/index.d.ts +14 -0
  256. package/dist/client/rich-markdown-editor/index.d.ts.map +1 -0
  257. package/dist/client/rich-markdown-editor/index.js +14 -0
  258. package/dist/client/rich-markdown-editor/index.js.map +1 -0
  259. package/dist/client/rich-markdown-editor/registrySlashCommands.d.ts +46 -0
  260. package/dist/client/rich-markdown-editor/registrySlashCommands.d.ts.map +1 -0
  261. package/dist/client/rich-markdown-editor/registrySlashCommands.js +13 -0
  262. package/dist/client/rich-markdown-editor/registrySlashCommands.js.map +1 -0
  263. package/dist/client/rich-markdown-editor/uploadEditorImage.d.ts +18 -0
  264. package/dist/client/rich-markdown-editor/uploadEditorImage.d.ts.map +1 -0
  265. package/dist/client/rich-markdown-editor/uploadEditorImage.js +57 -0
  266. package/dist/client/rich-markdown-editor/uploadEditorImage.js.map +1 -0
  267. package/dist/client/rich-markdown-editor/useCollabReconcile.d.ts +91 -0
  268. package/dist/client/rich-markdown-editor/useCollabReconcile.d.ts.map +1 -0
  269. package/dist/client/rich-markdown-editor/useCollabReconcile.js +375 -0
  270. package/dist/client/rich-markdown-editor/useCollabReconcile.js.map +1 -0
  271. package/dist/client/track.d.ts +25 -0
  272. package/dist/client/track.d.ts.map +1 -0
  273. package/dist/client/track.js +53 -0
  274. package/dist/client/track.js.map +1 -0
  275. package/dist/client/use-action.d.ts.map +1 -1
  276. package/dist/client/use-action.js +6 -0
  277. package/dist/client/use-action.js.map +1 -1
  278. package/dist/client/use-session.d.ts +3 -2
  279. package/dist/client/use-session.d.ts.map +1 -1
  280. package/dist/client/use-session.js +3 -2
  281. package/dist/client/use-session.js.map +1 -1
  282. package/dist/deploy/build.d.ts +5 -0
  283. package/dist/deploy/build.d.ts.map +1 -1
  284. package/dist/deploy/build.js +67 -1
  285. package/dist/deploy/build.js.map +1 -1
  286. package/dist/extensions/schema.d.ts +1 -1
  287. package/dist/mcp/build-server.d.ts.map +1 -1
  288. package/dist/mcp/build-server.js +9 -2
  289. package/dist/mcp/build-server.js.map +1 -1
  290. package/dist/mcp/server.d.ts +1 -1
  291. package/dist/mcp/server.d.ts.map +1 -1
  292. package/dist/mcp/server.js +35 -2
  293. package/dist/mcp/server.js.map +1 -1
  294. package/dist/provider-api/index.d.ts +1 -1
  295. package/dist/provider-api/index.d.ts.map +1 -1
  296. package/dist/scripts/docs/search.d.ts.map +1 -1
  297. package/dist/scripts/docs/search.js +5 -2
  298. package/dist/scripts/docs/search.js.map +1 -1
  299. package/dist/scripts/runner.d.ts.map +1 -1
  300. package/dist/scripts/runner.js +16 -3
  301. package/dist/scripts/runner.js.map +1 -1
  302. package/dist/server/action-discovery.d.ts.map +1 -1
  303. package/dist/server/action-discovery.js +2 -0
  304. package/dist/server/action-discovery.js.map +1 -1
  305. package/dist/server/action-routes.d.ts.map +1 -1
  306. package/dist/server/action-routes.js +30 -4
  307. package/dist/server/action-routes.js.map +1 -1
  308. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  309. package/dist/server/agent-chat-plugin.js +65 -19
  310. package/dist/server/agent-chat-plugin.js.map +1 -1
  311. package/dist/server/agent-teams.d.ts.map +1 -1
  312. package/dist/server/agent-teams.js +8 -1
  313. package/dist/server/agent-teams.js.map +1 -1
  314. package/dist/server/agents-bundle.d.ts +27 -1
  315. package/dist/server/agents-bundle.d.ts.map +1 -1
  316. package/dist/server/agents-bundle.js +41 -3
  317. package/dist/server/agents-bundle.js.map +1 -1
  318. package/dist/server/auth.d.ts.map +1 -1
  319. package/dist/server/auth.js +76 -3
  320. package/dist/server/auth.js.map +1 -1
  321. package/dist/server/core-routes-plugin.d.ts.map +1 -1
  322. package/dist/server/core-routes-plugin.js +60 -0
  323. package/dist/server/core-routes-plugin.js.map +1 -1
  324. package/dist/server/onboarding-html.d.ts.map +1 -1
  325. package/dist/server/onboarding-html.js +160 -22
  326. package/dist/server/onboarding-html.js.map +1 -1
  327. package/dist/server/sentry.d.ts.map +1 -1
  328. package/dist/server/sentry.js +6 -0
  329. package/dist/server/sentry.js.map +1 -1
  330. package/dist/server/social-og-image.d.ts +2 -1
  331. package/dist/server/social-og-image.d.ts.map +1 -1
  332. package/dist/server/social-og-image.js +24 -4
  333. package/dist/server/social-og-image.js.map +1 -1
  334. package/dist/sharing/schema.d.ts +1 -1
  335. package/dist/styles/agent-native.css +1 -0
  336. package/dist/styles/rich-markdown-editor.css +439 -0
  337. package/dist/templates/default/.agents/skills/actions/SKILL.md +4 -1
  338. package/dist/templates/default/.agents/skills/security/SKILL.md +13 -4
  339. package/dist/templates/default/.agents/skills/storing-data/SKILL.md +15 -3
  340. package/dist/templates/default/AGENTS.md +1 -0
  341. package/dist/templates/default/DEVELOPING.md +2 -0
  342. package/dist/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +10 -3
  343. package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +98 -10
  344. package/dist/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +45 -3
  345. package/dist/templates/workspace-core/.agents/skills/address-feedback/SKILL.md +2 -0
  346. package/dist/templates/workspace-core/.agents/skills/authentication/SKILL.md +37 -4
  347. package/dist/templates/workspace-core/.agents/skills/automations/SKILL.md +9 -4
  348. package/dist/templates/workspace-core/.agents/skills/capture-learnings/SKILL.md +2 -0
  349. package/dist/templates/workspace-core/.agents/skills/client-methods/SKILL.md +106 -0
  350. package/dist/templates/workspace-core/.agents/skills/client-methods/references/legacy-client-fetch-audit-2026-06-03.md +53 -0
  351. package/dist/templates/workspace-core/.agents/skills/client-side-routing/SKILL.md +2 -0
  352. package/dist/templates/workspace-core/.agents/skills/context-awareness/SKILL.md +62 -61
  353. package/dist/templates/workspace-core/.agents/skills/context-xray/SKILL.md +47 -0
  354. package/dist/templates/workspace-core/.agents/skills/create-skill/SKILL.md +28 -0
  355. package/dist/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +52 -1
  356. package/dist/templates/workspace-core/.agents/skills/extension-points/SKILL.md +2 -0
  357. package/dist/templates/workspace-core/.agents/skills/extensions/SKILL.md +95 -433
  358. package/dist/templates/workspace-core/.agents/skills/extensions/references/api.md +285 -0
  359. package/dist/templates/workspace-core/.agents/skills/extensions/references/examples.md +259 -0
  360. package/dist/templates/workspace-core/.agents/skills/external-agents/SKILL.md +398 -0
  361. package/dist/templates/workspace-core/.agents/skills/external-agents/references/mcp-apps-embedding.md +157 -0
  362. package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +17 -0
  363. package/dist/templates/workspace-core/.agents/skills/integration-webhooks/SKILL.md +13 -2
  364. package/dist/templates/workspace-core/.agents/skills/mvp-followup/SKILL.md +51 -0
  365. package/dist/templates/workspace-core/.agents/skills/observability/SKILL.md +14 -4
  366. package/dist/templates/workspace-core/.agents/skills/onboarding/SKILL.md +13 -1
  367. package/dist/templates/workspace-core/.agents/skills/portability/SKILL.md +27 -5
  368. package/dist/templates/workspace-core/.agents/skills/qa/SKILL.md +24 -8
  369. package/dist/templates/workspace-core/.agents/skills/real-time-collab/SKILL.md +53 -7
  370. package/dist/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +43 -10
  371. package/dist/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +2 -0
  372. package/dist/templates/workspace-core/.agents/skills/secrets/SKILL.md +43 -14
  373. package/dist/templates/workspace-core/.agents/skills/security/SKILL.md +50 -1
  374. package/dist/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +4 -2
  375. package/dist/templates/workspace-core/.agents/skills/server-plugins/SKILL.md +11 -1
  376. package/dist/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +15 -0
  377. package/dist/templates/workspace-core/.agents/skills/sharing/SKILL.md +5 -1
  378. package/dist/templates/workspace-core/.agents/skills/storing-data/SKILL.md +48 -19
  379. package/dist/templates/workspace-core/.agents/skills/tracking/SKILL.md +7 -3
  380. package/dist/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +13 -6
  381. package/dist/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +236 -0
  382. package/dist/templates/workspace-core/AGENTS.md +5 -1
  383. package/dist/templates/workspace-root/AGENTS.md +5 -2
  384. package/dist/tracking/route.d.ts +43 -0
  385. package/dist/tracking/route.d.ts.map +1 -0
  386. package/dist/tracking/route.js +85 -0
  387. package/dist/tracking/route.js.map +1 -0
  388. package/dist/vite/client.d.ts.map +1 -1
  389. package/dist/vite/client.js +15 -0
  390. package/dist/vite/client.js.map +1 -1
  391. package/docs/content/a2a-protocol.md +18 -4
  392. package/docs/content/actions.md +87 -0
  393. package/docs/content/agent-mentions.md +2 -1
  394. package/docs/content/authentication.md +2 -1
  395. package/docs/content/client.md +64 -13
  396. package/docs/content/cloneable-saas.md +1 -1
  397. package/docs/content/code-agents-ui.md +17 -11
  398. package/docs/content/context-awareness.md +23 -28
  399. package/docs/content/creating-templates.md +1 -1
  400. package/docs/content/drop-in-agent.md +2 -0
  401. package/docs/content/getting-started.md +2 -2
  402. package/docs/content/key-concepts.md +2 -2
  403. package/docs/content/messaging.md +57 -15
  404. package/docs/content/migration-workbench.md +1 -1
  405. package/docs/content/multi-app-workspace.md +1 -1
  406. package/docs/content/multi-tenancy.md +17 -15
  407. package/docs/content/real-time-collaboration.md +1 -1
  408. package/docs/content/recurring-jobs.md +1 -1
  409. package/docs/content/security.md +2 -2
  410. package/docs/content/server.md +4 -4
  411. package/docs/content/skills-guide.md +30 -0
  412. package/docs/content/template-analytics.md +2 -2
  413. package/docs/content/template-assets.md +17 -1
  414. package/docs/content/template-brain.md +2 -2
  415. package/docs/content/template-calendar.md +1 -1
  416. package/docs/content/template-clips.md +3 -3
  417. package/docs/content/template-content.md +2 -2
  418. package/docs/content/template-design.md +2 -2
  419. package/docs/content/template-dispatch.md +3 -3
  420. package/docs/content/template-forms.md +14 -2
  421. package/docs/content/template-mail.md +1 -3
  422. package/docs/content/template-plan.md +133 -0
  423. package/docs/content/template-slides.md +5 -4
  424. package/docs/content/template-starter.md +4 -4
  425. package/docs/content/template-videos.md +6 -11
  426. package/docs/content/tracking.md +21 -1
  427. package/docs/content/visual-plans.md +74 -0
  428. package/docs/content/workspace.md +9 -9
  429. package/package.json +26 -11
  430. package/src/templates/default/.agents/skills/actions/SKILL.md +4 -1
  431. package/src/templates/default/.agents/skills/security/SKILL.md +13 -4
  432. package/src/templates/default/.agents/skills/storing-data/SKILL.md +15 -3
  433. package/src/templates/default/AGENTS.md +1 -0
  434. package/src/templates/default/DEVELOPING.md +2 -0
  435. package/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +10 -3
  436. package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +98 -10
  437. package/src/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +45 -3
  438. package/src/templates/workspace-core/.agents/skills/address-feedback/SKILL.md +2 -0
  439. package/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +37 -4
  440. package/src/templates/workspace-core/.agents/skills/automations/SKILL.md +9 -4
  441. package/src/templates/workspace-core/.agents/skills/capture-learnings/SKILL.md +2 -0
  442. package/src/templates/workspace-core/.agents/skills/client-methods/SKILL.md +106 -0
  443. package/src/templates/workspace-core/.agents/skills/client-methods/references/legacy-client-fetch-audit-2026-06-03.md +53 -0
  444. package/src/templates/workspace-core/.agents/skills/client-side-routing/SKILL.md +2 -0
  445. package/src/templates/workspace-core/.agents/skills/context-awareness/SKILL.md +62 -61
  446. package/src/templates/workspace-core/.agents/skills/context-xray/SKILL.md +47 -0
  447. package/src/templates/workspace-core/.agents/skills/create-skill/SKILL.md +28 -0
  448. package/src/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +52 -1
  449. package/src/templates/workspace-core/.agents/skills/extension-points/SKILL.md +2 -0
  450. package/src/templates/workspace-core/.agents/skills/extensions/SKILL.md +95 -433
  451. package/src/templates/workspace-core/.agents/skills/extensions/references/api.md +285 -0
  452. package/src/templates/workspace-core/.agents/skills/extensions/references/examples.md +259 -0
  453. package/src/templates/workspace-core/.agents/skills/external-agents/SKILL.md +398 -0
  454. package/src/templates/workspace-core/.agents/skills/external-agents/references/mcp-apps-embedding.md +157 -0
  455. package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +17 -0
  456. package/src/templates/workspace-core/.agents/skills/integration-webhooks/SKILL.md +13 -2
  457. package/src/templates/workspace-core/.agents/skills/mvp-followup/SKILL.md +51 -0
  458. package/src/templates/workspace-core/.agents/skills/observability/SKILL.md +14 -4
  459. package/src/templates/workspace-core/.agents/skills/onboarding/SKILL.md +13 -1
  460. package/src/templates/workspace-core/.agents/skills/portability/SKILL.md +27 -5
  461. package/src/templates/workspace-core/.agents/skills/qa/SKILL.md +24 -8
  462. package/src/templates/workspace-core/.agents/skills/real-time-collab/SKILL.md +53 -7
  463. package/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +43 -10
  464. package/src/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +2 -0
  465. package/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +43 -14
  466. package/src/templates/workspace-core/.agents/skills/security/SKILL.md +50 -1
  467. package/src/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +4 -2
  468. package/src/templates/workspace-core/.agents/skills/server-plugins/SKILL.md +11 -1
  469. package/src/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +15 -0
  470. package/src/templates/workspace-core/.agents/skills/sharing/SKILL.md +5 -1
  471. package/src/templates/workspace-core/.agents/skills/storing-data/SKILL.md +48 -19
  472. package/src/templates/workspace-core/.agents/skills/tracking/SKILL.md +7 -3
  473. package/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +13 -6
  474. package/src/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +236 -0
  475. package/src/templates/workspace-core/AGENTS.md +5 -1
  476. package/src/templates/workspace-root/AGENTS.md +5 -2
@@ -0,0 +1,65 @@
1
+ /**
2
+ * In-memory block registry. Holds two lookups: by runtime `type` (render +
3
+ * serialize side) and by MDX `tag` (parse side). The registry is a plain object
4
+ * usable both inside React (via the context provider) and outside it (the
5
+ * server MDX serializer/parser, agent schema export) — mirroring how the legacy
6
+ * `BLOCK_COMPONENTS` set and `serializeBlock`/`parseBlock` are plain functions.
7
+ */
8
+ export class BlockRegistry {
9
+ byType = new Map();
10
+ byTag = new Map();
11
+ register(spec) {
12
+ if (this.byType.has(spec.type)) {
13
+ throw new Error(`Block type "${spec.type}" is already registered.`);
14
+ }
15
+ if (this.byTag.has(spec.mdx.tag)) {
16
+ throw new Error(`Block MDX tag "${spec.mdx.tag}" is already registered.`);
17
+ }
18
+ this.byType.set(spec.type, spec);
19
+ this.byTag.set(spec.mdx.tag, spec);
20
+ }
21
+ get(type) {
22
+ return this.byType.get(type);
23
+ }
24
+ getByTag(tag) {
25
+ return this.byTag.get(tag);
26
+ }
27
+ has(type) {
28
+ return this.byType.has(type);
29
+ }
30
+ hasTag(tag) {
31
+ return this.byTag.has(tag);
32
+ }
33
+ /** All registered MDX tags — replaces the hardcoded `BLOCK_COMPONENTS` set. */
34
+ tags() {
35
+ return new Set(this.byTag.keys());
36
+ }
37
+ /**
38
+ * The set of registered block `type`s whose specs declare
39
+ * `notionCompatible: true` — i.e. they round-trip to Notion-Flavored Markdown
40
+ * and may sync to Notion. Apps use this as the registry-backed part of their
41
+ * Notion gating allowlist; prose-only NFM analogs that are not registry atoms
42
+ * (rich-text, callout) are NOT in here — apps union those in separately.
43
+ */
44
+ notionCompatibleTypes() {
45
+ const types = new Set();
46
+ for (const spec of this.byType.values()) {
47
+ if (spec.notionCompatible)
48
+ types.add(spec.type);
49
+ }
50
+ return types;
51
+ }
52
+ /** All registered specs, optionally filtered by placement. */
53
+ list(placement) {
54
+ const all = [...this.byType.values()];
55
+ return placement
56
+ ? all.filter((spec) => spec.placement.includes(placement))
57
+ : all;
58
+ }
59
+ }
60
+ /** Register a batch of specs in order. */
61
+ export function registerBlocks(registry, specs) {
62
+ for (const spec of specs)
63
+ registry.register(spec);
64
+ }
65
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/client/blocks/registry.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,OAAO,aAAa;IAChB,MAAM,GAAG,IAAI,GAAG,EAA0B,CAAC;IAC3C,KAAK,GAAG,IAAI,GAAG,EAA0B,CAAC;IAElD,QAAQ,CAAC,IAAoB;QAC3B,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YAC/B,MAAM,IAAI,KAAK,CAAC,eAAe,IAAI,CAAC,IAAI,0BAA0B,CAAC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8DAA8D;IAC9D,IAAI,CAAC,SAA0B;QAC7B,MAAM,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;QACtC,OAAO,SAAS;YACd,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;YAC1D,CAAC,CAAC,GAAG,CAAC;IACV,CAAC;CACF;AAED,0CAA0C;AAC1C,MAAM,UAAU,cAAc,CAC5B,QAAuB,EACvB,KAAuB;IAEvB,KAAK,MAAM,IAAI,IAAI,KAAK;QAAE,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACpD,CAAC","sourcesContent":["import type { BlockSpec, BlockPlacement } from \"./types.js\";\n\n/**\n * In-memory block registry. Holds two lookups: by runtime `type` (render +\n * serialize side) and by MDX `tag` (parse side). The registry is a plain object\n * usable both inside React (via the context provider) and outside it (the\n * server MDX serializer/parser, agent schema export) — mirroring how the legacy\n * `BLOCK_COMPONENTS` set and `serializeBlock`/`parseBlock` are plain functions.\n */\nexport class BlockRegistry {\n private byType = new Map<string, BlockSpec<any>>();\n private byTag = new Map<string, BlockSpec<any>>();\n\n register(spec: BlockSpec<any>): void {\n if (this.byType.has(spec.type)) {\n throw new Error(`Block type \"${spec.type}\" is already registered.`);\n }\n if (this.byTag.has(spec.mdx.tag)) {\n throw new Error(`Block MDX tag \"${spec.mdx.tag}\" is already registered.`);\n }\n this.byType.set(spec.type, spec);\n this.byTag.set(spec.mdx.tag, spec);\n }\n\n get(type: string): BlockSpec<any> | undefined {\n return this.byType.get(type);\n }\n\n getByTag(tag: string): BlockSpec<any> | undefined {\n return this.byTag.get(tag);\n }\n\n has(type: string): boolean {\n return this.byType.has(type);\n }\n\n hasTag(tag: string): boolean {\n return this.byTag.has(tag);\n }\n\n /** All registered MDX tags — replaces the hardcoded `BLOCK_COMPONENTS` set. */\n tags(): Set<string> {\n return new Set(this.byTag.keys());\n }\n\n /**\n * The set of registered block `type`s whose specs declare\n * `notionCompatible: true` — i.e. they round-trip to Notion-Flavored Markdown\n * and may sync to Notion. Apps use this as the registry-backed part of their\n * Notion gating allowlist; prose-only NFM analogs that are not registry atoms\n * (rich-text, callout) are NOT in here — apps union those in separately.\n */\n notionCompatibleTypes(): Set<string> {\n const types = new Set<string>();\n for (const spec of this.byType.values()) {\n if (spec.notionCompatible) types.add(spec.type);\n }\n return types;\n }\n\n /** All registered specs, optionally filtered by placement. */\n list(placement?: BlockPlacement): BlockSpec<any>[] {\n const all = [...this.byType.values()];\n return placement\n ? all.filter((spec) => spec.placement.includes(placement))\n : all;\n }\n}\n\n/** Register a batch of specs in order. */\nexport function registerBlocks(\n registry: BlockRegistry,\n specs: BlockSpec<any>[],\n): void {\n for (const spec of specs) registry.register(spec);\n}\n"]}
@@ -0,0 +1,31 @@
1
+ import { type ZodType, type ZodTypeAny } from "zod";
2
+ /**
3
+ * Tag a string schema so the auto-editor renders it with the shared inline
4
+ * rich-markdown editor (Notion-style editing) instead of a plain textarea.
5
+ * Survives `.optional()` because `unwrap` reads the inner description.
6
+ */
7
+ export declare function markdown(schema?: ZodTypeAny): ZodTypeAny;
8
+ /** Alias for {@link markdown} — tags a string field as rich text. */
9
+ export declare function richtext(schema?: ZodTypeAny): ZodTypeAny;
10
+ export type FieldKind = "markdown" | "richtext" | "text" | "longtext" | "number" | "boolean" | "enum" | "array" | "object" | "unsupported";
11
+ export interface FieldDescriptor {
12
+ key: string;
13
+ /** Humanized key for the field label. */
14
+ label: string;
15
+ kind: FieldKind;
16
+ optional: boolean;
17
+ enumValues?: string[];
18
+ /** Element schema for arrays / inner schema for objects. */
19
+ inner?: ZodTypeAny;
20
+ /** Element descriptors for object fields (one level of nesting). */
21
+ fields?: FieldDescriptor[];
22
+ /** Description tag, when present (used to detect markdown/richtext). */
23
+ description?: string;
24
+ }
25
+ /**
26
+ * Introspect a block's `data` schema into a flat list of field descriptors. The
27
+ * input is unwrapped to its object schema first (so an `.optional()`-wrapped or
28
+ * `.refine()`-wrapped object still yields its fields).
29
+ */
30
+ export declare function introspect(schema: ZodType<unknown>): FieldDescriptor[];
31
+ //# sourceMappingURL=introspect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"introspect.d.ts","sourceRoot":"","sources":["../../../../src/client/blocks/schema-form/introspect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAK,KAAK,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,KAAK,CAAC;AAiBvD;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,MAAM,GAAE,UAAuB,GAAG,UAAU,CAEpE;AAED,qEAAqE;AACrE,wBAAgB,QAAQ,CAAC,MAAM,GAAE,UAAuB,GAAG,UAAU,CAEpE;AAED,MAAM,MAAM,SAAS,GACjB,UAAU,GACV,UAAU,GACV,MAAM,GACN,UAAU,GACV,QAAQ,GACR,SAAS,GACT,MAAM,GACN,OAAO,GACP,QAAQ,GACR,aAAa,CAAC;AAElB,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,oEAAoE;IACpE,MAAM,CAAC,EAAE,eAAe,EAAE,CAAC;IAC3B,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAsID;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,eAAe,EAAE,CAKtE"}
@@ -0,0 +1,164 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Schema introspection for the auto-editor. Walks a block's zod `data` schema
4
+ * and classifies each top-level field into a {@link FieldKind} the
5
+ * `SchemaBlockEditor` knows how to render.
6
+ *
7
+ * zod v4 note: schemas expose `_def.type` (a string discriminator) rather than
8
+ * v3's `typeName`. Object shape is `_def.shape`, array element is `_def.element`,
9
+ * enum options are `.options`. `.describe()` does NOT propagate through
10
+ * `.optional()`/`.default()`/`.nullable()` to the outer schema, so `unwrap`
11
+ * inherits the innermost description while peeling wrapper layers.
12
+ */
13
+ const MD_TAG = "x-an-field:markdown";
14
+ const RT_TAG = "x-an-field:richtext";
15
+ /**
16
+ * Tag a string schema so the auto-editor renders it with the shared inline
17
+ * rich-markdown editor (Notion-style editing) instead of a plain textarea.
18
+ * Survives `.optional()` because `unwrap` reads the inner description.
19
+ */
20
+ export function markdown(schema = z.string()) {
21
+ return schema.describe(MD_TAG);
22
+ }
23
+ /** Alias for {@link markdown} — tags a string field as rich text. */
24
+ export function richtext(schema = z.string()) {
25
+ return schema.describe(RT_TAG);
26
+ }
27
+ function defType(schema) {
28
+ return schema?._def?.type;
29
+ }
30
+ /** Peel optional/default/nullable/refine wrappers; keep the innermost description. */
31
+ function unwrap(schema) {
32
+ let current = schema;
33
+ let optional = false;
34
+ let description = current?.description;
35
+ // Bound the loop so a malformed schema can never spin forever.
36
+ for (let i = 0; i < 12; i++) {
37
+ const type = defType(current);
38
+ const inner = current._def
39
+ ?.innerType;
40
+ if (type === "optional" || type === "nullable" || type === "nullish") {
41
+ optional = true;
42
+ }
43
+ else if (type === "default" || type === "catch" || type === "readonly") {
44
+ // not optional per se, but a wrapper to peel
45
+ }
46
+ else {
47
+ break;
48
+ }
49
+ if (!inner)
50
+ break;
51
+ current = inner;
52
+ description = description ?? current.description;
53
+ }
54
+ return { schema: current, optional, description };
55
+ }
56
+ function humanize(key) {
57
+ return key
58
+ .replace(/[_-]+/g, " ")
59
+ .replace(/([a-z])([A-Z])/g, "$1 $2")
60
+ .replace(/^\w/, (c) => c.toUpperCase());
61
+ }
62
+ function classify(schema, description) {
63
+ if (description === MD_TAG)
64
+ return "markdown";
65
+ if (description === RT_TAG)
66
+ return "richtext";
67
+ const type = defType(schema);
68
+ switch (type) {
69
+ case "string": {
70
+ // A long max length implies a textarea; otherwise a single-line input.
71
+ const checks = schema._def
72
+ ?.checks;
73
+ const max = readMaxLength(checks);
74
+ return max !== undefined && max > 240 ? "longtext" : "text";
75
+ }
76
+ case "number":
77
+ case "bigint":
78
+ return "number";
79
+ case "boolean":
80
+ return "boolean";
81
+ case "enum":
82
+ return "enum";
83
+ case "array":
84
+ return "array";
85
+ case "object":
86
+ return "object";
87
+ default:
88
+ return "unsupported";
89
+ }
90
+ }
91
+ function readMaxLength(checks) {
92
+ if (!checks)
93
+ return undefined;
94
+ for (const check of checks) {
95
+ const def = check?._zod?.def;
96
+ if (def?.check === "max_length" && typeof def.maximum === "number") {
97
+ return def.maximum;
98
+ }
99
+ // Fallback for shapes that expose the bound directly.
100
+ const direct = check;
101
+ if (direct?.kind === "max" && typeof direct.value === "number") {
102
+ return direct.value;
103
+ }
104
+ if (typeof direct?.maximum === "number")
105
+ return direct.maximum;
106
+ }
107
+ return undefined;
108
+ }
109
+ function objectShape(schema) {
110
+ const rawShape = schema._def?.shape;
111
+ if (!rawShape)
112
+ return null;
113
+ const shape = typeof rawShape === "function" ? rawShape() : rawShape;
114
+ return shape && typeof shape === "object"
115
+ ? shape
116
+ : null;
117
+ }
118
+ function describeField(key, raw) {
119
+ const { schema, optional, description } = unwrap(raw);
120
+ const kind = classify(schema, description);
121
+ const descriptor = {
122
+ key,
123
+ label: humanize(key),
124
+ kind,
125
+ optional,
126
+ description,
127
+ };
128
+ if (kind === "enum") {
129
+ const options = schema.options;
130
+ descriptor.enumValues = Array.isArray(options)
131
+ ? options.map((value) => String(value))
132
+ : [];
133
+ }
134
+ else if (kind === "array") {
135
+ const element = schema._def
136
+ ?.element;
137
+ descriptor.inner = element;
138
+ const elementShape = element ? objectShape(unwrap(element).schema) : null;
139
+ if (elementShape) {
140
+ descriptor.fields = Object.entries(elementShape).map(([childKey, child]) => describeField(childKey, child));
141
+ }
142
+ }
143
+ else if (kind === "object") {
144
+ descriptor.inner = schema;
145
+ const shape = objectShape(schema);
146
+ if (shape) {
147
+ descriptor.fields = Object.entries(shape).map(([childKey, child]) => describeField(childKey, child));
148
+ }
149
+ }
150
+ return descriptor;
151
+ }
152
+ /**
153
+ * Introspect a block's `data` schema into a flat list of field descriptors. The
154
+ * input is unwrapped to its object schema first (so an `.optional()`-wrapped or
155
+ * `.refine()`-wrapped object still yields its fields).
156
+ */
157
+ export function introspect(schema) {
158
+ const { schema: unwrapped } = unwrap(schema);
159
+ const shape = objectShape(unwrapped);
160
+ if (!shape)
161
+ return [];
162
+ return Object.entries(shape).map(([key, child]) => describeField(key, child));
163
+ }
164
+ //# sourceMappingURL=introspect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"introspect.js","sourceRoot":"","sources":["../../../../src/client/blocks/schema-form/introspect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAiC,MAAM,KAAK,CAAC;AAEvD;;;;;;;;;;GAUG;AAEH,MAAM,MAAM,GAAG,qBAAqB,CAAC;AACrC,MAAM,MAAM,GAAG,qBAAqB,CAAC;AAErC;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CAAC,SAAqB,CAAC,CAAC,MAAM,EAAE;IACtD,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,QAAQ,CAAC,SAAqB,CAAC,CAAC,MAAM,EAAE;IACtD,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC;AA6BD,SAAS,OAAO,CAAC,MAAkB;IACjC,OAAQ,MAAM,EAAE,IAAsC,EAAE,IAAI,CAAC;AAC/D,CAAC;AAED,sFAAsF;AACtF,SAAS,MAAM,CAAC,MAAkB;IAKhC,IAAI,OAAO,GAAG,MAAM,CAAC;IACrB,IAAI,QAAQ,GAAG,KAAK,CAAC;IACr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to-editor. Walks a block's zod `data` schema\n * and classifies each top-level field into a {@link FieldKind} the\n * `SchemaBlockEditor` knows how to render.\n *\n * zod v4 note: schemas expose `_def.type` (a string discriminator) rather than\n * v3's `typeName`. Object shape is `_def.shape`, array element is `_def.element`,\n * enum options are `.options`. `.describe()` does NOT propagate through\n * `.optional()`/`.default()`/`.nullable()` to the outer schema, so `unwrap`\n * inherits the innermost description while peeling wrapper layers.\n */\n\nconst MD_TAG = \"x-an-field:markdown\";\nconst RT_TAG = \"x-an-field:richtext\";\n\n/**\n * Tag a string schema so the auto-editor renders it with the shared inline\n * rich-markdown editor (Notion-style editing) instead of a plain textarea.\n * Survives `.optional()` because `unwrap` reads the inner description.\n */\nexport function markdown(schema: ZodTypeAny = z.string()): ZodTypeAny {\n return schema.describe(MD_TAG);\n}\n\n/** Alias for {@link markdown} — tags a string field as rich text. */\nexport function richtext(schema: ZodTypeAny = z.string()): ZodTypeAny {\n return schema.describe(RT_TAG);\n}\n\nexport type FieldKind =\n | \"markdown\"\n | \"richtext\"\n | \"text\"\n | \"longtext\"\n | \"number\"\n | \"boolean\"\n | \"enum\"\n | \"array\"\n | \"object\"\n | \"unsupported\";\n\nexport interface FieldDescriptor {\n key: string;\n /** Humanized key for the field label. */\n label: string;\n kind: FieldKind;\n optional: boolean;\n enumValues?: string[];\n /** Element schema for arrays / inner schema for objects. */\n inner?: ZodTypeAny;\n /** Element descriptors for object fields (one level of nesting). */\n fields?: FieldDescriptor[];\n /** Description tag, when present (used to detect markdown/richtext). */\n description?: string;\n}\n\nfunction defType(schema: ZodTypeAny): string | undefined {\n return (schema?._def as { type?: string } | undefined)?.type;\n}\n\n/** Peel optional/default/nullable/refine wrappers; keep the innermost description. */\nfunction unwrap(schema: ZodTypeAny): {\n schema: ZodTypeAny;\n optional: boolean;\n description?: string;\n} {\n let current = schema;\n let optional = false;\n let description: string | undefined = current?.description;\n // Bound the loop so a malformed schema can never spin forever.\n for (let i = 0; i < 12; i++) {\n const type = defType(current);\n const inner = (current._def as { innerType?: ZodTypeAny } | undefined)\n ?.innerType;\n if (type === \"optional\" || type === \"nullable\" || type === \"nullish\") {\n optional = true;\n } else if (type === \"default\" || type === \"catch\" || type === \"readonly\") {\n // not optional per se, but a wrapper to peel\n } else {\n break;\n }\n if (!inner) break;\n current = inner;\n description = description ?? current.description;\n }\n return { schema: current, optional, description };\n}\n\nfunction humanize(key: string): string {\n return key\n .replace(/[_-]+/g, \" \")\n .replace(/([a-z])([A-Z])/g, \"$1 $2\")\n .replace(/^\\w/, (c) => c.toUpperCase());\n}\n\nfunction classify(schema: ZodTypeAny, description?: string): FieldKind {\n if (description === MD_TAG) return \"markdown\";\n if (description === RT_TAG) return \"richtext\";\n const type = defType(schema);\n switch (type) {\n case \"string\": {\n // A long max length implies a textarea; otherwise a single-line input.\n const checks = (schema._def as { checks?: unknown[] } | undefined)\n ?.checks;\n const max = readMaxLength(checks);\n return max !== undefined && max > 240 ? \"longtext\" : \"text\";\n }\n case \"number\":\n case \"bigint\":\n return \"number\";\n case \"boolean\":\n return \"boolean\";\n case \"enum\":\n return \"enum\";\n case \"array\":\n return \"array\";\n case \"object\":\n return \"object\";\n default:\n return \"unsupported\";\n }\n}\n\nfunction readMaxLength(checks: unknown[] | undefined): number | undefined {\n if (!checks) return undefined;\n for (const check of checks) {\n const def = (\n check as { _zod?: { def?: { check?: string; maximum?: number } } }\n )?._zod?.def;\n if (def?.check === \"max_length\" && typeof def.maximum === \"number\") {\n return def.maximum;\n }\n // Fallback for shapes that expose the bound directly.\n const direct = check as { kind?: string; value?: number; maximum?: number };\n if (direct?.kind === \"max\" && typeof direct.value === \"number\") {\n return direct.value;\n }\n if (typeof direct?.maximum === \"number\") return direct.maximum;\n }\n return undefined;\n}\n\nfunction objectShape(schema: ZodTypeAny): Record<string, ZodTypeAny> | null {\n const rawShape = (schema._def as { shape?: unknown } | undefined)?.shape;\n if (!rawShape) return null;\n const shape = typeof rawShape === \"function\" ? rawShape() : rawShape;\n return shape && typeof shape === \"object\"\n ? (shape as Record<string, ZodTypeAny>)\n : null;\n}\n\nfunction describeField(key: string, raw: ZodTypeAny): FieldDescriptor {\n const { schema, optional, description } = unwrap(raw);\n const kind = classify(schema, description);\n const descriptor: FieldDescriptor = {\n key,\n label: humanize(key),\n kind,\n optional,\n description,\n };\n if (kind === \"enum\") {\n const options = (schema as { options?: unknown[] }).options;\n descriptor.enumValues = Array.isArray(options)\n ? options.map((value) => String(value))\n : [];\n } else if (kind === \"array\") {\n const element = (schema._def as { element?: ZodTypeAny } | undefined)\n ?.element;\n descriptor.inner = element;\n const elementShape = element ? objectShape(unwrap(element).schema) : null;\n if (elementShape) {\n descriptor.fields = Object.entries(elementShape).map(\n ([childKey, child]) => describeField(childKey, child),\n );\n }\n } else if (kind === \"object\") {\n descriptor.inner = schema;\n const shape = objectShape(schema);\n if (shape) {\n descriptor.fields = Object.entries(shape).map(([childKey, child]) =>\n describeField(childKey, child),\n );\n }\n }\n return descriptor;\n}\n\n/**\n * Introspect a block's `data` schema into a flat list of field descriptors. The\n * input is unwrapped to its object schema first (so an `.optional()`-wrapped or\n * `.refine()`-wrapped object still yields its fields).\n */\nexport function introspect(schema: ZodType<unknown>): FieldDescriptor[] {\n const { schema: unwrapped } = unwrap(schema as ZodTypeAny);\n const shape = objectShape(unwrapped);\n if (!shape) return [];\n return Object.entries(shape).map(([key, child]) => describeField(key, child));\n}\n"]}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * `@agent-native/core/blocks/server` — the React-free subset of the block
3
+ * registry for server / agent code (MDX serialize/parse, the registry, schema
4
+ * introspection, the `markdown()` helper, agent schema export). Importing this
5
+ * entry never pulls React into the server bundle.
6
+ *
7
+ * A `BlockSpec` carries React (`Read`/`Edit`) and pure (`schema`/`mdx`) parts in
8
+ * the same object; the server path only touches `spec.schema` / `spec.mdx`. The
9
+ * app's registry module is shared by browser and server, but the server only
10
+ * ever calls these React-free functions on it.
11
+ */
12
+ export { defineBlock, type BlockSpec, type BlockPlacement, type BlockMdxConfig, type BlockAttrReader, type MdxAttrValue, type NestedBlock, } from "./types.js";
13
+ export { BlockRegistry, registerBlocks } from "./registry.js";
14
+ export { markdown, richtext, introspect, type FieldKind, type FieldDescriptor, } from "./schema-form/introspect.js";
15
+ export { prop, escapeAttr, jsonExpression, attributeValue, createAttrReader, serializeSpecBlock, parseSpecBlock, type MdxJsxNode, type MdxAttrNode, type SerializableBlock, type ParsedBlockBase, } from "./mdx.js";
16
+ export { describeBlocksForAgent, renderBlockVocabularyReference, type BlockAgentDoc, } from "./agent.js";
17
+ export { libraryBlockConfigs, registerLibraryBlockConfigs, type LibraryBlockConfigOverrides, } from "./library/server-specs.js";
18
+ export { checklistSchema, checklistMdx, type ChecklistData, type ChecklistItem, } from "./library/checklist.config.js";
19
+ export { tableSchema, tableMdx, type TableData, } from "./library/table.config.js";
20
+ export { codeTabsSchema, codeTabsMdx, type CodeTabsData, type CodeTabsTab, } from "./library/code-tabs.config.js";
21
+ export { htmlSchema, htmlMdx, type HtmlBlockData, } from "./library/html.config.js";
22
+ export { tabsSchema, tabsMdx, type TabsData, type TabsTab, } from "./library/tabs.config.js";
23
+ export { mermaidSchema, mermaidMdx, type MermaidData, } from "./library/mermaid.config.js";
24
+ export { apiEndpointSchema, apiEndpointMdx, API_ENDPOINT_METHODS, API_PARAM_LOCATIONS, type ApiEndpointData, type ApiEndpointMethod, type ApiEndpointParam, type ApiEndpointRequest, type ApiEndpointResponse, type ApiParamLocation, } from "./library/api-endpoint.config.js";
25
+ export { dataModelSchema, dataModelMdx, DATA_MODEL_RELATION_KINDS, type DataModelData, type DataModelEntity, type DataModelField, type DataModelRelation, type DataModelRelationKind, } from "./library/data-model.config.js";
26
+ export { diffSchema, diffMdx, type DiffData, type DiffMode, } from "./library/diff.config.js";
27
+ export { fileTreeSchema, fileTreeMdx, FILE_TREE_CHANGES, type FileTreeData, type FileTreeEntry, type FileTreeChange, } from "./library/file-tree.config.js";
28
+ export { jsonExplorerSchema, jsonExplorerMdx, type JsonExplorerData, } from "./library/json-explorer.config.js";
29
+ export { annotatedCodeSchema, annotatedCodeMdx, type AnnotatedCodeData, type AnnotatedCodeAnnotation, } from "./library/annotated-code.config.js";
30
+ export { openApiSpecSchema, openApiSpecMdx, type OpenApiSpecData, } from "./library/openapi-spec.config.js";
31
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/client/blocks/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,WAAW,EACX,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,WAAW,GACjB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE9D,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,KAAK,SAAS,EACd,KAAK,eAAe,GACrB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,IAAI,EACJ,UAAU,EACV,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,eAAe,GACrB,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,sBAAsB,EACtB,8BAA8B,EAC9B,KAAK,aAAa,GACnB,MAAM,YAAY,CAAC;AAMpB,OAAO,EACL,mBAAmB,EACnB,2BAA2B,EAC3B,KAAK,2BAA2B,GACjC,MAAM,2BAA2B,CAAC;AAKnC,OAAO,EACL,eAAe,EACf,YAAY,EACZ,KAAK,aAAa,EAClB,KAAK,aAAa,GACnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,WAAW,EACX,QAAQ,EACR,KAAK,SAAS,GACf,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,cAAc,EACd,WAAW,EACX,KAAK,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server` — the React-free subset of the block
3
+ * registry for server / agent code (MDX serialize/parse, the registry, schema
4
+ * introspection, the `markdown()` helper, agent schema export). Importing this
5
+ * entry never pulls React into the server bundle.
6
+ *
7
+ * A `BlockSpec` carries React (`Read`/`Edit`) and pure (`schema`/`mdx`) parts in
8
+ * the same object; the server path only touches `spec.schema` / `spec.mdx`. The
9
+ * app's registry module is shared by browser and server, but the server only
10
+ * ever calls these React-free functions on it.
11
+ */
12
+ export { defineBlock, } from "./types.js";
13
+ export { BlockRegistry, registerBlocks } from "./registry.js";
14
+ export { markdown, richtext, introspect, } from "./schema-form/introspect.js";
15
+ export { prop, escapeAttr, jsonExpression, attributeValue, createAttrReader, serializeSpecBlock, parseSpecBlock, } from "./mdx.js";
16
+ export { describeBlocksForAgent, renderBlockVocabularyReference, } from "./agent.js";
17
+ // Standard library registration (React-free). Server / shared registries call
18
+ // `registerLibraryBlockConfigs(registry)` to register the whole standard library
19
+ // as `Read: () => null` config stubs in one place, then add their app-specific
20
+ // block configs on top. `libraryBlockConfigs` is the underlying ordered array.
21
+ export { libraryBlockConfigs, registerLibraryBlockConfigs, } from "./library/server-specs.js";
22
+ // Standard block library — React-free schema + MDX config only. The React
23
+ // `Read`/`Edit` live in `./library/checklist.tsx` (imported from the full
24
+ // `@agent-native/core/blocks` entry), never from here.
25
+ export { checklistSchema, checklistMdx, } from "./library/checklist.config.js";
26
+ export { tableSchema, tableMdx, } from "./library/table.config.js";
27
+ export { codeTabsSchema, codeTabsMdx, } from "./library/code-tabs.config.js";
28
+ export { htmlSchema, htmlMdx, } from "./library/html.config.js";
29
+ export { tabsSchema, tabsMdx, } from "./library/tabs.config.js";
30
+ // Dev-doc block library — React-free schema + MDX config only. The React
31
+ // `Read`/`Edit` live in the matching `./library/<Name>Block.tsx` (imported from
32
+ // the full `@agent-native/core/blocks` entry), never from here.
33
+ export { mermaidSchema, mermaidMdx, } from "./library/mermaid.config.js";
34
+ export { apiEndpointSchema, apiEndpointMdx, API_ENDPOINT_METHODS, API_PARAM_LOCATIONS, } from "./library/api-endpoint.config.js";
35
+ export { dataModelSchema, dataModelMdx, DATA_MODEL_RELATION_KINDS, } from "./library/data-model.config.js";
36
+ export { diffSchema, diffMdx, } from "./library/diff.config.js";
37
+ export { fileTreeSchema, fileTreeMdx, FILE_TREE_CHANGES, } from "./library/file-tree.config.js";
38
+ export { jsonExplorerSchema, jsonExplorerMdx, } from "./library/json-explorer.config.js";
39
+ export { annotatedCodeSchema, annotatedCodeMdx, } from "./library/annotated-code.config.js";
40
+ export { openApiSpecSchema, openApiSpecMdx, } from "./library/openapi-spec.config.js";
41
+ //# sourceMappingURL=server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.js","sourceRoot":"","sources":["../../../src/client/blocks/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,WAAW,GAOZ,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE9D,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,UAAU,GAGX,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,IAAI,EACJ,UAAU,EACV,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,GAKf,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,sBAAsB,EACtB,8BAA8B,GAE/B,MAAM,YAAY,CAAC;AAEpB,8EAA8E;AAC9E,iFAAiF;AACjF,+EAA+E;AAC/E,+EAA+E;AAC/E,OAAO,EACL,mBAAmB,EACnB,2BAA2B,GAE5B,MAAM,2BAA2B,CAAC;AAEnC,0EAA0E;AAC1E,0EAA0E;AAC1E,uDAAuD;AACvD,OAAO,EACL,eAAe,EACf,YAAY,GAGb,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,WAAW,EACX,QAAQ,GAET,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,cAAc,EACd,WAAW,GAGZ,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,UAAU,EACV,OAAO,GAER,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,UAAU,EACV,OAAO,GAGR,MAAM,0BAA0B,CAAC;AAElC,yEAAyE;AACzE,gFAAgF;AAChF,gEAAgE;AAChE,OAAO,EACL,aAAa,EACb,UAAU,GAEX,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,mBAAmB,GAOpB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,eAAe,EACf,YAAY,EACZ,yBAAyB,GAM1B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,UAAU,EACV,OAAO,GAGR,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,cAAc,EACd,WAAW,EACX,iBAAiB,GAIlB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,kBAAkB,EAClB,eAAe,GAEhB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,mBAAmB,EACnB,gBAAgB,GAGjB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,iBAAiB,EACjB,cAAc,GAEf,MAAM,kCAAkC,CAAC","sourcesContent":["/**\n * `@agent-native/core/blocks/server` — the React-free subset of the block\n * registry for server / agent code (MDX serialize/parse, the registry, schema\n * introspection, the `markdown()` helper, agent schema export). Importing this\n * entry never pulls React into the server bundle.\n *\n * A `BlockSpec` carries React (`Read`/`Edit`) and pure (`schema`/`mdx`) parts in\n * the same object; the server path only touches `spec.schema` / `spec.mdx`. The\n * app's registry module is shared by browser and server, but the server only\n * ever calls these React-free functions on it.\n */\n\nexport {\n defineBlock,\n type BlockSpec,\n type BlockPlacement,\n type BlockMdxConfig,\n type BlockAttrReader,\n type MdxAttrValue,\n type NestedBlock,\n} from \"./types.js\";\n\nexport { BlockRegistry, registerBlocks } from \"./registry.js\";\n\nexport {\n markdown,\n richtext,\n introspect,\n type FieldKind,\n type FieldDescriptor,\n} from \"./schema-form/introspect.js\";\n\nexport {\n prop,\n escapeAttr,\n jsonExpression,\n attributeValue,\n createAttrReader,\n serializeSpecBlock,\n parseSpecBlock,\n type MdxJsxNode,\n type MdxAttrNode,\n type SerializableBlock,\n type ParsedBlockBase,\n} from \"./mdx.js\";\n\nexport {\n describeBlocksForAgent,\n renderBlockVocabularyReference,\n type BlockAgentDoc,\n} from \"./agent.js\";\n\n// Standard library registration (React-free). Server / shared registries call\n// `registerLibraryBlockConfigs(registry)` to register the whole standard library\n// as `Read: () => null` config stubs in one place, then add their app-specific\n// block configs on top. `libraryBlockConfigs` is the underlying ordered array.\nexport {\n libraryBlockConfigs,\n registerLibraryBlockConfigs,\n type LibraryBlockConfigOverrides,\n} from \"./library/server-specs.js\";\n\n// Standard block library — React-free schema + MDX config only. The React\n// `Read`/`Edit` live in `./library/checklist.tsx` (imported from the full\n// `@agent-native/core/blocks` entry), never from here.\nexport {\n checklistSchema,\n checklistMdx,\n type ChecklistData,\n type ChecklistItem,\n} from \"./library/checklist.config.js\";\nexport {\n tableSchema,\n tableMdx,\n type TableData,\n} from \"./library/table.config.js\";\nexport {\n codeTabsSchema,\n codeTabsMdx,\n type CodeTabsData,\n type CodeTabsTab,\n} from \"./library/code-tabs.config.js\";\nexport {\n htmlSchema,\n htmlMdx,\n type HtmlBlockData,\n} from \"./library/html.config.js\";\nexport {\n tabsSchema,\n tabsMdx,\n type TabsData,\n type TabsTab,\n} from \"./library/tabs.config.js\";\n\n// Dev-doc block library — React-free schema + MDX config only. The React\n// `Read`/`Edit` live in the matching `./library/<Name>Block.tsx` (imported from\n// the full `@agent-native/core/blocks` entry), never from here.\nexport {\n mermaidSchema,\n mermaidMdx,\n type MermaidData,\n} from \"./library/mermaid.config.js\";\nexport {\n apiEndpointSchema,\n apiEndpointMdx,\n API_ENDPOINT_METHODS,\n API_PARAM_LOCATIONS,\n type ApiEndpointData,\n type ApiEndpointMethod,\n type ApiEndpointParam,\n type ApiEndpointRequest,\n type ApiEndpointResponse,\n type ApiParamLocation,\n} from \"./library/api-endpoint.config.js\";\nexport {\n dataModelSchema,\n dataModelMdx,\n DATA_MODEL_RELATION_KINDS,\n type DataModelData,\n type DataModelEntity,\n type DataModelField,\n type DataModelRelation,\n type DataModelRelationKind,\n} from \"./library/data-model.config.js\";\nexport {\n diffSchema,\n diffMdx,\n type DiffData,\n type DiffMode,\n} from \"./library/diff.config.js\";\nexport {\n fileTreeSchema,\n fileTreeMdx,\n FILE_TREE_CHANGES,\n type FileTreeData,\n type FileTreeEntry,\n type FileTreeChange,\n} from \"./library/file-tree.config.js\";\nexport {\n jsonExplorerSchema,\n jsonExplorerMdx,\n type JsonExplorerData,\n} from \"./library/json-explorer.config.js\";\nexport {\n annotatedCodeSchema,\n annotatedCodeMdx,\n type AnnotatedCodeData,\n type AnnotatedCodeAnnotation,\n} from \"./library/annotated-code.config.js\";\nexport {\n openApiSpecSchema,\n openApiSpecMdx,\n type OpenApiSpecData,\n} from \"./library/openapi-spec.config.js\";\n"]}