@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,46 @@
1
+ import { z } from "zod";
2
+ import type { BlockMdxConfig } from "../types.js";
3
+ /**
4
+ * Pure (React-free) part of the PLAN-SPECIFIC `json-explorer` block: its data
5
+ * schema and MDX round-trip config. Shared by the server MDX adapter
6
+ * (`plan-mdx.ts` via `plan-block-registry.ts`) and the client spec
7
+ * (`planBlocks.tsx`). Keeping this React-free means importing it into a server
8
+ * module never pulls React into the Nitro/SSR bundle.
9
+ *
10
+ * The block renders a browser-devtools / Postman-style collapsible JSON tree:
11
+ * object/array nodes show a chevron + a one-line summary ("{…} 3 keys" /
12
+ * "[…] 5 items") and expand/collapse; leaf values are type-colored (string =
13
+ * green, number = blue, boolean = violet, null = muted). The raw JSON TEXT is
14
+ * the source of truth (`json`), so authoring round-trips losslessly even when
15
+ * the JSON is invalid — the reader parses defensively and falls back to the raw
16
+ * text on a parse error rather than throwing.
17
+ *
18
+ * The schema MUST stay data-compatible with the inline `json-explorer` member of
19
+ * `planBlockSchema` (`plan-content.ts`), and the MDX `tag` (`Json`) +
20
+ * attribute shape MUST match the `<Json title json collapsedDepth />` encoding so
21
+ * stored `.mdx` round-trips. `json` lives in the `json` ATTRIBUTE (not MDX
22
+ * children) — the shared `prop()` encoder round-trips multiline strings cleanly,
23
+ * and keeping it an attribute avoids the payload being reflowed as prose.
24
+ */
25
+ export interface JsonExplorerData {
26
+ /** Optional heading shown above the tree. */
27
+ title?: string;
28
+ /** Raw JSON text — the source of truth, parsed defensively at render time. */
29
+ json: string;
30
+ /**
31
+ * Depth beyond which nodes start collapsed (default 1). Nodes at a depth `<`
32
+ * this value render expanded; deeper nodes render collapsed until clicked.
33
+ */
34
+ collapsedDepth?: number;
35
+ }
36
+ export declare const jsonExplorerSchema: z.ZodType<JsonExplorerData>;
37
+ /**
38
+ * MDX config: `title`, `json`, and `collapsedDepth` are flat attributes — the
39
+ * `<Json id … title json collapsedDepth />` self-closing form. Insertion order
40
+ * of `toAttrs` is the on-disk attribute order (`title` → `json` →
41
+ * `collapsedDepth`). `fromAttrs` mirrors a forgiving parse (`json ?? ""`,
42
+ * `title`/`collapsedDepth` undefined when absent) so a plan missing an attribute
43
+ * still parses.
44
+ */
45
+ export declare const jsonExplorerMdx: BlockMdxConfig<JsonExplorerData>;
46
+ //# sourceMappingURL=json-explorer.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-explorer.config.d.ts","sourceRoot":"","sources":["../../../../src/client/blocks/library/json-explorer.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8EAA8E;IAC9E,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,kBAAkB,EAId,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAE7C;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,EAAE,cAAc,CAAC,gBAAgB,CAY5D,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { z } from "zod";
2
+ export const jsonExplorerSchema = z.object({
3
+ title: z.string().trim().max(200).optional(),
4
+ json: z.string().max(200_000),
5
+ collapsedDepth: z.number().int().min(0).max(20).optional(),
6
+ });
7
+ /**
8
+ * MDX config: `title`, `json`, and `collapsedDepth` are flat attributes — the
9
+ * `<Json id … title json collapsedDepth />` self-closing form. Insertion order
10
+ * of `toAttrs` is the on-disk attribute order (`title` → `json` →
11
+ * `collapsedDepth`). `fromAttrs` mirrors a forgiving parse (`json ?? ""`,
12
+ * `title`/`collapsedDepth` undefined when absent) so a plan missing an attribute
13
+ * still parses.
14
+ */
15
+ export const jsonExplorerMdx = {
16
+ tag: "Json",
17
+ toAttrs: (data) => ({
18
+ title: data.title,
19
+ json: data.json,
20
+ collapsedDepth: data.collapsedDepth,
21
+ }),
22
+ fromAttrs: (attrs) => ({
23
+ json: attrs.string("json") ?? "",
24
+ title: attrs.string("title"),
25
+ collapsedDepth: attrs.number("collapsedDepth"),
26
+ }),
27
+ };
28
+ //# sourceMappingURL=json-explorer.config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-explorer.config.js","sourceRoot":"","sources":["../../../../src/client/blocks/library/json-explorer.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAsCxB,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IAC5C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC;IAC7B,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC3D,CAA2C,CAAC;AAE7C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,eAAe,GAAqC;IAC/D,GAAG,EAAE,MAAM;IACX,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAClB,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,cAAc,EAAE,IAAI,CAAC,cAAc;KACpC,CAAC;IACF,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACrB,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE;QAChC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC;QAC5B,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC;KAC/C,CAAC;CACH,CAAC","sourcesContent":["import { z } from \"zod\";\nimport type { BlockMdxConfig } from \"../types.js\";\n\n/**\n * Pure (React-free) part of the PLAN-SPECIFIC `json-explorer` block: its data\n * schema and MDX round-trip config. Shared by the server MDX adapter\n * (`plan-mdx.ts` via `plan-block-registry.ts`) and the client spec\n * (`planBlocks.tsx`). Keeping this React-free means importing it into a server\n * module never pulls React into the Nitro/SSR bundle.\n *\n * The block renders a browser-devtools / Postman-style collapsible JSON tree:\n * object/array nodes show a chevron + a one-line summary (\"{…} 3 keys\" /\n * \"[…] 5 items\") and expand/collapse; leaf values are type-colored (string =\n * green, number = blue, boolean = violet, null = muted). The raw JSON TEXT is\n * the source of truth (`json`), so authoring round-trips losslessly even when\n * the JSON is invalid — the reader parses defensively and falls back to the raw\n * text on a parse error rather than throwing.\n *\n * The schema MUST stay data-compatible with the inline `json-explorer` member of\n * `planBlockSchema` (`plan-content.ts`), and the MDX `tag` (`Json`) +\n * attribute shape MUST match the `<Json title json collapsedDepth />` encoding so\n * stored `.mdx` round-trips. `json` lives in the `json` ATTRIBUTE (not MDX\n * children) — the shared `prop()` encoder round-trips multiline strings cleanly,\n * and keeping it an attribute avoids the payload being reflowed as prose.\n */\n\nexport interface JsonExplorerData {\n /** Optional heading shown above the tree. */\n title?: string;\n /** Raw JSON text — the source of truth, parsed defensively at render time. */\n json: string;\n /**\n * Depth beyond which nodes start collapsed (default 1). Nodes at a depth `<`\n * this value render expanded; deeper nodes render collapsed until clicked.\n */\n collapsedDepth?: number;\n}\n\nexport const jsonExplorerSchema = z.object({\n title: z.string().trim().max(200).optional(),\n json: z.string().max(200_000),\n collapsedDepth: z.number().int().min(0).max(20).optional(),\n}) as unknown as z.ZodType<JsonExplorerData>;\n\n/**\n * MDX config: `title`, `json`, and `collapsedDepth` are flat attributes — the\n * `<Json id … title json collapsedDepth />` self-closing form. Insertion order\n * of `toAttrs` is the on-disk attribute order (`title` → `json` →\n * `collapsedDepth`). `fromAttrs` mirrors a forgiving parse (`json ?? \"\"`,\n * `title`/`collapsedDepth` undefined when absent) so a plan missing an attribute\n * still parses.\n */\nexport const jsonExplorerMdx: BlockMdxConfig<JsonExplorerData> = {\n tag: \"Json\",\n toAttrs: (data) => ({\n title: data.title,\n json: data.json,\n collapsedDepth: data.collapsedDepth,\n }),\n fromAttrs: (attrs) => ({\n json: attrs.string(\"json\") ?? \"\",\n title: attrs.string(\"title\"),\n collapsedDepth: attrs.number(\"collapsedDepth\"),\n }),\n};\n"]}
@@ -0,0 +1,32 @@
1
+ import { z } from "zod";
2
+ import type { BlockMdxConfig } from "../types.js";
3
+ /**
4
+ * Pure (React-free) part of the PLAN-SPECIFIC mermaid block: its data schema and
5
+ * MDX round-trip config. Shared by the server MDX adapter (`plan-mdx.ts` via
6
+ * `plan-block-registry.ts`) and the client spec (`planBlocks.tsx`). Keeping this
7
+ * React-free means importing it into a server module never pulls React (or the
8
+ * client-only `mermaid` runtime) into the Nitro/SSR bundle.
9
+ *
10
+ * The schema MUST stay data-compatible with the `mermaid` branch of
11
+ * `planBlockSchema` (`plan-content.ts`), and the MDX `tag` + flat `source` /
12
+ * `caption` attribute shape MUST match the `<Mermaid source caption />` encoding
13
+ * so stored `.mdx` round-trips. The diagram code lives in the `source` ATTRIBUTE
14
+ * (not MDX children) — the shared `prop()` encoder round-trips multiline strings
15
+ * cleanly, and keeping it an attribute avoids the source being reflowed as prose.
16
+ */
17
+ export interface MermaidData {
18
+ /** Mermaid diagram definition (flowchart/sequence/etc.) edited as raw text. */
19
+ source: string;
20
+ /** Optional short caption rendered (muted) under the diagram. */
21
+ caption?: string;
22
+ }
23
+ export declare const mermaidSchema: z.ZodType<MermaidData>;
24
+ /**
25
+ * MDX config: `source` and `caption` are flat attributes — the `<Mermaid id …
26
+ * source caption />` self-closing form. Insertion order of `toAttrs` is the
27
+ * on-disk attribute order (`source` → `caption`). `fromAttrs` mirrors a
28
+ * forgiving parse (`source ?? ""`, `caption` undefined when absent) so a plan
29
+ * missing the attribute still parses.
30
+ */
31
+ export declare const mermaidMdx: BlockMdxConfig<MermaidData>;
32
+ //# sourceMappingURL=mermaid.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mermaid.config.d.ts","sourceRoot":"","sources":["../../../../src/client/blocks/library/mermaid.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD;;;;;;;;;;;;;GAaG;AAEH,MAAM,WAAW,WAAW;IAC1B,+EAA+E;IAC/E,MAAM,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,aAAa,EAGT,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;AAExC;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,EAAE,cAAc,CAAC,WAAW,CAUlD,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { z } from "zod";
2
+ export const mermaidSchema = z.object({
3
+ source: z.string().max(50_000),
4
+ caption: z.string().trim().max(400).optional(),
5
+ });
6
+ /**
7
+ * MDX config: `source` and `caption` are flat attributes — the `<Mermaid id …
8
+ * source caption />` self-closing form. Insertion order of `toAttrs` is the
9
+ * on-disk attribute order (`source` → `caption`). `fromAttrs` mirrors a
10
+ * forgiving parse (`source ?? ""`, `caption` undefined when absent) so a plan
11
+ * missing the attribute still parses.
12
+ */
13
+ export const mermaidMdx = {
14
+ tag: "Mermaid",
15
+ toAttrs: (data) => ({
16
+ source: data.source,
17
+ caption: data.caption,
18
+ }),
19
+ fromAttrs: (attrs) => ({
20
+ source: attrs.string("source") ?? "",
21
+ caption: attrs.string("caption"),
22
+ }),
23
+ };
24
+ //# sourceMappingURL=mermaid.config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mermaid.config.js","sourceRoot":"","sources":["../../../../src/client/blocks/library/mermaid.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAyBxB,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC;IAC9B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;CAC/C,CAAsC,CAAC;AAExC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,UAAU,GAAgC;IACrD,GAAG,EAAE,SAAS;IACd,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAClB,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,OAAO,EAAE,IAAI,CAAC,OAAO;KACtB,CAAC;IACF,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACrB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;QACpC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC;KACjC,CAAC;CACH,CAAC","sourcesContent":["import { z } from \"zod\";\nimport type { BlockMdxConfig } from \"../types.js\";\n\n/**\n * Pure (React-free) part of the PLAN-SPECIFIC mermaid block: its data schema and\n * MDX round-trip config. Shared by the server MDX adapter (`plan-mdx.ts` via\n * `plan-block-registry.ts`) and the client spec (`planBlocks.tsx`). Keeping this\n * React-free means importing it into a server module never pulls React (or the\n * client-only `mermaid` runtime) into the Nitro/SSR bundle.\n *\n * The schema MUST stay data-compatible with the `mermaid` branch of\n * `planBlockSchema` (`plan-content.ts`), and the MDX `tag` + flat `source` /\n * `caption` attribute shape MUST match the `<Mermaid source caption />` encoding\n * so stored `.mdx` round-trips. The diagram code lives in the `source` ATTRIBUTE\n * (not MDX children) — the shared `prop()` encoder round-trips multiline strings\n * cleanly, and keeping it an attribute avoids the source being reflowed as prose.\n */\n\nexport interface MermaidData {\n /** Mermaid diagram definition (flowchart/sequence/etc.) edited as raw text. */\n source: string;\n /** Optional short caption rendered (muted) under the diagram. */\n caption?: string;\n}\n\nexport const mermaidSchema = z.object({\n source: z.string().max(50_000),\n caption: z.string().trim().max(400).optional(),\n}) as unknown as z.ZodType<MermaidData>;\n\n/**\n * MDX config: `source` and `caption` are flat attributes — the `<Mermaid id …\n * source caption />` self-closing form. Insertion order of `toAttrs` is the\n * on-disk attribute order (`source` → `caption`). `fromAttrs` mirrors a\n * forgiving parse (`source ?? \"\"`, `caption` undefined when absent) so a plan\n * missing the attribute still parses.\n */\nexport const mermaidMdx: BlockMdxConfig<MermaidData> = {\n tag: \"Mermaid\",\n toAttrs: (data) => ({\n source: data.source,\n caption: data.caption,\n }),\n fromAttrs: (attrs) => ({\n source: attrs.string(\"source\") ?? \"\",\n caption: attrs.string(\"caption\"),\n }),\n};\n"]}
@@ -0,0 +1,49 @@
1
+ import { z } from "zod";
2
+ import type { BlockMdxConfig } from "../types.js";
3
+ /**
4
+ * Pure (React-free) part of the PLAN-SPECIFIC `openapi-spec` block: its data
5
+ * schema and MDX round-trip config. Shared by the server MDX adapter
6
+ * (`plan-mdx.ts` via `plan-block-registry.ts`) and the client spec
7
+ * (`planBlocks.tsx`). Keeping this React-free means importing it into a server
8
+ * module never pulls React into the Nitro/SSR bundle.
9
+ *
10
+ * This is the WHOLE-DOCUMENT counterpart to the single-endpoint `api-endpoint`
11
+ * block: instead of one operation, it carries a complete OpenAPI 3 / Swagger 2
12
+ * document (the `spec` string) and the reader renders a Redoc / Swagger-UI-style
13
+ * reference — operations grouped by tag, each a collapsible row (colored method
14
+ * pill + path + summary) expanding to params / request body / per-status
15
+ * responses, with `$ref` models resolved. The raw `spec` TEXT is the source of
16
+ * truth, so authoring round-trips losslessly even when the spec is malformed —
17
+ * the reader parses defensively and falls back to a graceful error rather than
18
+ * throwing.
19
+ *
20
+ * v1 supports JSON specs only. A YAML parser (`yaml`) is NOT a declared
21
+ * dependency of this package, so to avoid pulling in an undeclared/transitive
22
+ * module the reader parses JSON (a superset of nothing — pure `JSON.parse`).
23
+ * The Edit form documents the JSON-only constraint inline. When `yaml` is later
24
+ * added as a real dependency, the reader's `parseSpec` is the single seam to
25
+ * extend.
26
+ *
27
+ * The schema MUST stay data-compatible with the inline `openapi-spec` member of
28
+ * `planBlockSchema` (`plan-content.ts`), and the MDX `tag` (`OpenApi`) +
29
+ * attribute shape MUST match the `<OpenApi title spec />` encoding so stored
30
+ * `.mdx` round-trips. `spec` lives in the `spec` ATTRIBUTE (not MDX children) —
31
+ * the shared `prop()` encoder round-trips multiline strings cleanly, and keeping
32
+ * it an attribute avoids the payload being reflowed as prose.
33
+ */
34
+ export interface OpenApiSpecData {
35
+ /** Raw OpenAPI 3 / Swagger 2 document text (JSON in v1). Source of truth. */
36
+ spec: string;
37
+ /** Optional heading shown above the reference. */
38
+ title?: string;
39
+ }
40
+ export declare const openApiSpecSchema: z.ZodType<OpenApiSpecData>;
41
+ /**
42
+ * MDX config: `title` and `spec` are flat attributes — the `<OpenApi id … title
43
+ * spec />` self-closing form. Insertion order of `toAttrs` is the on-disk
44
+ * attribute order (`title` → `spec`). `fromAttrs` mirrors a forgiving parse
45
+ * (`spec ?? ""`, `title` undefined when absent) so a plan missing an attribute
46
+ * still parses.
47
+ */
48
+ export declare const openApiSpecMdx: BlockMdxConfig<OpenApiSpecData>;
49
+ //# sourceMappingURL=openapi-spec.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openapi-spec.config.d.ts","sourceRoot":"","sources":["../../../../src/client/blocks/library/openapi-spec.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,MAAM,WAAW,eAAe;IAC9B,6EAA6E;IAC7E,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,iBAAiB,EAGb,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;AAE5C;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,EAAE,cAAc,CAAC,eAAe,CAU1D,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { z } from "zod";
2
+ export const openApiSpecSchema = z.object({
3
+ spec: z.string().max(400_000),
4
+ title: z.string().trim().max(200).optional(),
5
+ });
6
+ /**
7
+ * MDX config: `title` and `spec` are flat attributes — the `<OpenApi id … title
8
+ * spec />` self-closing form. Insertion order of `toAttrs` is the on-disk
9
+ * attribute order (`title` → `spec`). `fromAttrs` mirrors a forgiving parse
10
+ * (`spec ?? ""`, `title` undefined when absent) so a plan missing an attribute
11
+ * still parses.
12
+ */
13
+ export const openApiSpecMdx = {
14
+ tag: "OpenApi",
15
+ toAttrs: (data) => ({
16
+ title: data.title,
17
+ spec: data.spec,
18
+ }),
19
+ fromAttrs: (attrs) => ({
20
+ spec: attrs.string("spec") ?? "",
21
+ title: attrs.string("title"),
22
+ }),
23
+ };
24
+ //# sourceMappingURL=openapi-spec.config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openapi-spec.config.js","sourceRoot":"","sources":["../../../../src/client/blocks/library/openapi-spec.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA0CxB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC;IAC7B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;CAC7C,CAA0C,CAAC;AAE5C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAoC;IAC7D,GAAG,EAAE,SAAS;IACd,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAClB,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,IAAI,EAAE,IAAI,CAAC,IAAI;KAChB,CAAC;IACF,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACrB,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE;QAChC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC;KAC7B,CAAC;CACH,CAAC","sourcesContent":["import { z } from \"zod\";\nimport type { BlockMdxConfig } from \"../types.js\";\n\n/**\n * Pure (React-free) part of the PLAN-SPECIFIC `openapi-spec` block: its data\n * schema and MDX round-trip config. Shared by the server MDX adapter\n * (`plan-mdx.ts` via `plan-block-registry.ts`) and the client spec\n * (`planBlocks.tsx`). Keeping this React-free means importing it into a server\n * module never pulls React into the Nitro/SSR bundle.\n *\n * This is the WHOLE-DOCUMENT counterpart to the single-endpoint `api-endpoint`\n * block: instead of one operation, it carries a complete OpenAPI 3 / Swagger 2\n * document (the `spec` string) and the reader renders a Redoc / Swagger-UI-style\n * reference — operations grouped by tag, each a collapsible row (colored method\n * pill + path + summary) expanding to params / request body / per-status\n * responses, with `$ref` models resolved. The raw `spec` TEXT is the source of\n * truth, so authoring round-trips losslessly even when the spec is malformed —\n * the reader parses defensively and falls back to a graceful error rather than\n * throwing.\n *\n * v1 supports JSON specs only. A YAML parser (`yaml`) is NOT a declared\n * dependency of this package, so to avoid pulling in an undeclared/transitive\n * module the reader parses JSON (a superset of nothing — pure `JSON.parse`).\n * The Edit form documents the JSON-only constraint inline. When `yaml` is later\n * added as a real dependency, the reader's `parseSpec` is the single seam to\n * extend.\n *\n * The schema MUST stay data-compatible with the inline `openapi-spec` member of\n * `planBlockSchema` (`plan-content.ts`), and the MDX `tag` (`OpenApi`) +\n * attribute shape MUST match the `<OpenApi title spec />` encoding so stored\n * `.mdx` round-trips. `spec` lives in the `spec` ATTRIBUTE (not MDX children) —\n * the shared `prop()` encoder round-trips multiline strings cleanly, and keeping\n * it an attribute avoids the payload being reflowed as prose.\n */\n\nexport interface OpenApiSpecData {\n /** Raw OpenAPI 3 / Swagger 2 document text (JSON in v1). Source of truth. */\n spec: string;\n /** Optional heading shown above the reference. */\n title?: string;\n}\n\nexport const openApiSpecSchema = z.object({\n spec: z.string().max(400_000),\n title: z.string().trim().max(200).optional(),\n}) as unknown as z.ZodType<OpenApiSpecData>;\n\n/**\n * MDX config: `title` and `spec` are flat attributes — the `<OpenApi id … title\n * spec />` self-closing form. Insertion order of `toAttrs` is the on-disk\n * attribute order (`title` → `spec`). `fromAttrs` mirrors a forgiving parse\n * (`spec ?? \"\"`, `title` undefined when absent) so a plan missing an attribute\n * still parses.\n */\nexport const openApiSpecMdx: BlockMdxConfig<OpenApiSpecData> = {\n tag: \"OpenApi\",\n toAttrs: (data) => ({\n title: data.title,\n spec: data.spec,\n }),\n fromAttrs: (attrs) => ({\n spec: attrs.string(\"spec\") ?? \"\",\n title: attrs.string(\"title\"),\n }),\n};\n"]}
@@ -0,0 +1,35 @@
1
+ import { type BlockSpec } from "../types.js";
2
+ import { type BlockRegistry } from "../registry.js";
3
+ /**
4
+ * Canonical React-free specs for the standard library, used by BOTH apps' server
5
+ * / shared registries (`plan-block-registry.ts`, `nfm-registry.ts`). Each carries
6
+ * only the parts the server path touches — `schema` + `mdx` + metadata for the
7
+ * agent schema export — with a render-only `Read` stub. The full client specs
8
+ * (with real React `Read`/`Edit`) live in `./specs.tsx`; both share the identical
9
+ * `schema`/`mdx` config so inline source can never drift from what renders.
10
+ *
11
+ * `table` keeps the core default `type` here; content's server registry renames
12
+ * it to `table-block` via {@link LibraryBlockConfigOverrides}. The descriptions
13
+ * are the neutral agent-schema phrasing; an app that curates a longer
14
+ * description for a block (e.g. plan's hand-drawn Mermaid, plan's detailed file
15
+ * tree) passes an override rather than re-authoring the spec.
16
+ */
17
+ export declare const libraryBlockConfigs: BlockSpec<any>[];
18
+ /**
19
+ * Per-block overrides for {@link registerLibraryBlockConfigs}, keyed by canonical
20
+ * `type`. Servers tweak only the agent-facing fields that legitimately differ:
21
+ * content re-types `table` → `table-block`; plan curates a longer Mermaid and
22
+ * file-tree description. The `schema` / `mdx` config always stays shared.
23
+ */
24
+ export type LibraryBlockConfigOverrides = Record<string, Partial<Pick<BlockSpec<any>, "type" | "label" | "description" | "notionCompatible">>>;
25
+ /**
26
+ * Register the React-free standard-library config stubs into a server / shared
27
+ * {@link BlockRegistry}. Both `plan-block-registry.ts` and `nfm-registry.ts` call
28
+ * this, then register only their app-specific block configs (plan adds callout /
29
+ * diagram / wireframe / question-form) on top — so the shared library lives in
30
+ * exactly one place across browser AND server registries.
31
+ */
32
+ export declare function registerLibraryBlockConfigs(registry: BlockRegistry, options?: {
33
+ overrides?: LibraryBlockConfigOverrides;
34
+ }): void;
35
+ //# sourceMappingURL=server-specs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server-specs.d.ts","sourceRoot":"","sources":["../../../../src/client/blocks/library/server-specs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAkB,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AA0DpE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,CAAC,GAAG,CAAC,EAqI/C,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAC9C,MAAM,EACN,OAAO,CACL,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,aAAa,GAAG,kBAAkB,CAAC,CAC5E,CACF,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,aAAa,EACvB,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,2BAA2B,CAAA;CAAO,GACxD,IAAI,CAON"}
@@ -0,0 +1,171 @@
1
+ import { defineBlock } from "../types.js";
2
+ import { registerBlocks } from "../registry.js";
3
+ // React-free schema + MDX config for the standard library. The matching React
4
+ // `Read`/`Edit` live in the full client entry; the server path only ever touches
5
+ // `spec.schema` / `spec.mdx`, so these configs register with a render-only stub.
6
+ import { checklistSchema, checklistMdx, } from "./checklist.config.js";
7
+ import { tableSchema, tableMdx } from "./table.config.js";
8
+ import { codeTabsSchema, codeTabsMdx, } from "./code-tabs.config.js";
9
+ import { htmlSchema, htmlMdx } from "./html.config.js";
10
+ import { tabsSchema, tabsMdx } from "./tabs.config.js";
11
+ import { mermaidSchema, mermaidMdx, } from "./mermaid.config.js";
12
+ import { apiEndpointSchema, apiEndpointMdx, } from "./api-endpoint.config.js";
13
+ import { openApiSpecSchema, openApiSpecMdx, } from "./openapi-spec.config.js";
14
+ import { dataModelSchema, dataModelMdx, } from "./data-model.config.js";
15
+ import { diffSchema, diffMdx } from "./diff.config.js";
16
+ import { fileTreeSchema, fileTreeMdx, } from "./file-tree.config.js";
17
+ import { jsonExplorerSchema, jsonExplorerMdx, } from "./json-explorer.config.js";
18
+ import { annotatedCodeSchema, annotatedCodeMdx, } from "./annotated-code.config.js";
19
+ /** Render-only stub for server / agent registries (never invoked off-browser). */
20
+ const ServerReadStub = () => null;
21
+ /**
22
+ * Canonical React-free specs for the standard library, used by BOTH apps' server
23
+ * / shared registries (`plan-block-registry.ts`, `nfm-registry.ts`). Each carries
24
+ * only the parts the server path touches — `schema` + `mdx` + metadata for the
25
+ * agent schema export — with a render-only `Read` stub. The full client specs
26
+ * (with real React `Read`/`Edit`) live in `./specs.tsx`; both share the identical
27
+ * `schema`/`mdx` config so inline source can never drift from what renders.
28
+ *
29
+ * `table` keeps the core default `type` here; content's server registry renames
30
+ * it to `table-block` via {@link LibraryBlockConfigOverrides}. The descriptions
31
+ * are the neutral agent-schema phrasing; an app that curates a longer
32
+ * description for a block (e.g. plan's hand-drawn Mermaid, plan's detailed file
33
+ * tree) passes an override rather than re-authoring the spec.
34
+ */
35
+ export const libraryBlockConfigs = [
36
+ defineBlock({
37
+ type: "checklist",
38
+ schema: checklistSchema,
39
+ mdx: checklistMdx,
40
+ Read: ServerReadStub,
41
+ placement: ["block"],
42
+ notionCompatible: true,
43
+ label: "Checklist",
44
+ description: "A list of toggleable items, each with a label and an optional note.",
45
+ }),
46
+ defineBlock({
47
+ type: "table",
48
+ schema: tableSchema,
49
+ mdx: tableMdx,
50
+ Read: ServerReadStub,
51
+ placement: ["block"],
52
+ notionCompatible: true,
53
+ label: "Table",
54
+ description: "A simple grid with header columns and string rows for comparisons, parameters, or structured lists.",
55
+ }),
56
+ defineBlock({
57
+ type: "code-tabs",
58
+ schema: codeTabsSchema,
59
+ mdx: codeTabsMdx,
60
+ Read: ServerReadStub,
61
+ placement: ["block"],
62
+ label: "Code tabs",
63
+ description: "A vertical file tab rail of syntax-highlighted code snippets, one tab per file with an optional language and caption.",
64
+ }),
65
+ defineBlock({
66
+ type: "custom-html",
67
+ schema: htmlSchema,
68
+ mdx: htmlMdx,
69
+ Read: ServerReadStub,
70
+ placement: ["block"],
71
+ label: "HTML / Tailwind",
72
+ description: "An author-supplied HTML (with optional CSS) fragment rendered in a sandboxed iframe, with inline source editing.",
73
+ }),
74
+ defineBlock({
75
+ type: "tabs",
76
+ schema: tabsSchema,
77
+ mdx: tabsMdx,
78
+ Read: ServerReadStub,
79
+ placement: ["block", "inline"],
80
+ label: "Tabs",
81
+ description: "A horizontal pill-tab container; each tab holds its own list of blocks.",
82
+ }),
83
+ defineBlock({
84
+ type: "mermaid",
85
+ schema: mermaidSchema,
86
+ mdx: mermaidMdx,
87
+ Read: ServerReadStub,
88
+ placement: ["block"],
89
+ label: "Diagram (Mermaid)",
90
+ description: "A Mermaid diagram (flowchart, sequence, etc.) defined as text and rendered as a diagram.",
91
+ }),
92
+ defineBlock({
93
+ type: "api-endpoint",
94
+ schema: apiEndpointSchema,
95
+ mdx: apiEndpointMdx,
96
+ Read: ServerReadStub,
97
+ placement: ["block"],
98
+ label: "API endpoint",
99
+ description: "A Swagger-style API endpoint reference: a colored method pill + path, collapsed by default, expanding to params, request body, and per-status response examples.",
100
+ }),
101
+ defineBlock({
102
+ type: "openapi-spec",
103
+ schema: openApiSpecSchema,
104
+ mdx: openApiSpecMdx,
105
+ Read: ServerReadStub,
106
+ placement: ["block"],
107
+ label: "OpenAPI spec",
108
+ description: "A whole-document Redoc / Swagger-UI-style API reference rendered from a complete OpenAPI 3 / Swagger 2 spec (JSON).",
109
+ }),
110
+ defineBlock({
111
+ type: "data-model",
112
+ schema: dataModelSchema,
113
+ mdx: dataModelMdx,
114
+ Read: ServerReadStub,
115
+ placement: ["block"],
116
+ label: "Data model",
117
+ description: "An ERD / dbdiagram-style data model: entity cards with typed fields (PK/FK/nullable flags) and interactive foreign-key relations.",
118
+ }),
119
+ defineBlock({
120
+ type: "diff",
121
+ schema: diffSchema,
122
+ mdx: diffMdx,
123
+ Read: ServerReadStub,
124
+ placement: ["block"],
125
+ label: "Diff",
126
+ description: "A GitHub-style before/after line diff for a file, with unified or split view and added/removed line highlighting.",
127
+ }),
128
+ defineBlock({
129
+ type: "file-tree",
130
+ schema: fileTreeSchema,
131
+ mdx: fileTreeMdx,
132
+ Read: ServerReadStub,
133
+ placement: ["block"],
134
+ label: "File tree",
135
+ description: "A VS Code / GitHub-explorer file and change tree with per-file change badges, notes, and code snippets.",
136
+ }),
137
+ defineBlock({
138
+ type: "json-explorer",
139
+ schema: jsonExplorerSchema,
140
+ mdx: jsonExplorerMdx,
141
+ Read: ServerReadStub,
142
+ placement: ["block"],
143
+ label: "JSON explorer",
144
+ description: "A collapsible browser-devtools / Postman-style JSON tree with type-colored values and expand/collapse.",
145
+ }),
146
+ defineBlock({
147
+ type: "annotated-code",
148
+ schema: annotatedCodeSchema,
149
+ mdx: annotatedCodeMdx,
150
+ Read: ServerReadStub,
151
+ placement: ["block"],
152
+ label: "Annotated code",
153
+ description: "A line-numbered code walkthrough whose line ranges carry anchored explanatory notes.",
154
+ }),
155
+ ];
156
+ /**
157
+ * Register the React-free standard-library config stubs into a server / shared
158
+ * {@link BlockRegistry}. Both `plan-block-registry.ts` and `nfm-registry.ts` call
159
+ * this, then register only their app-specific block configs (plan adds callout /
160
+ * diagram / wireframe / question-form) on top — so the shared library lives in
161
+ * exactly one place across browser AND server registries.
162
+ */
163
+ export function registerLibraryBlockConfigs(registry, options = {}) {
164
+ const overrides = options.overrides ?? {};
165
+ const specs = libraryBlockConfigs.map((spec) => {
166
+ const override = overrides[spec.type];
167
+ return override ? { ...spec, ...override } : spec;
168
+ });
169
+ registerBlocks(registry, specs);
170
+ }
171
+ //# sourceMappingURL=server-specs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server-specs.js","sourceRoot":"","sources":["../../../../src/client/blocks/library/server-specs.ts"],"names":[],"mappings":"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","sourcesContent":["import { defineBlock, type BlockSpec } from \"../types.js\";\nimport { registerBlocks, type BlockRegistry } from \"../registry.js\";\n\n// React-free schema + MDX config for the standard library. The matching React\n// `Read`/`Edit` live in the full client entry; the server path only ever touches\n// `spec.schema` / `spec.mdx`, so these configs register with a render-only stub.\nimport {\n checklistSchema,\n checklistMdx,\n type ChecklistData,\n} from \"./checklist.config.js\";\nimport { tableSchema, tableMdx, type TableData } from \"./table.config.js\";\nimport {\n codeTabsSchema,\n codeTabsMdx,\n type CodeTabsData,\n} from \"./code-tabs.config.js\";\nimport { htmlSchema, htmlMdx, type HtmlBlockData } from \"./html.config.js\";\nimport { tabsSchema, tabsMdx, type TabsData } from \"./tabs.config.js\";\nimport {\n mermaidSchema,\n mermaidMdx,\n type MermaidData,\n} from \"./mermaid.config.js\";\nimport {\n apiEndpointSchema,\n apiEndpointMdx,\n type ApiEndpointData,\n} from \"./api-endpoint.config.js\";\nimport {\n openApiSpecSchema,\n openApiSpecMdx,\n type OpenApiSpecData,\n} from \"./openapi-spec.config.js\";\nimport {\n dataModelSchema,\n dataModelMdx,\n type DataModelData,\n} from \"./data-model.config.js\";\nimport { diffSchema, diffMdx, type DiffData } from \"./diff.config.js\";\nimport {\n fileTreeSchema,\n fileTreeMdx,\n type FileTreeData,\n} from \"./file-tree.config.js\";\nimport {\n jsonExplorerSchema,\n jsonExplorerMdx,\n type JsonExplorerData,\n} from \"./json-explorer.config.js\";\nimport {\n annotatedCodeSchema,\n annotatedCodeMdx,\n type AnnotatedCodeData,\n} from \"./annotated-code.config.js\";\n\n/** Render-only stub for server / agent registries (never invoked off-browser). */\nconst ServerReadStub = () => null;\n\n/**\n * Canonical React-free specs for the standard library, used by BOTH apps' server\n * / shared registries (`plan-block-registry.ts`, `nfm-registry.ts`). Each carries\n * only the parts the server path touches — `schema` + `mdx` + metadata for the\n * agent schema export — with a render-only `Read` stub. The full client specs\n * (with real React `Read`/`Edit`) live in `./specs.tsx`; both share the identical\n * `schema`/`mdx` config so inline source can never drift from what renders.\n *\n * `table` keeps the core default `type` here; content's server registry renames\n * it to `table-block` via {@link LibraryBlockConfigOverrides}. The descriptions\n * are the neutral agent-schema phrasing; an app that curates a longer\n * description for a block (e.g. plan's hand-drawn Mermaid, plan's detailed file\n * tree) passes an override rather than re-authoring the spec.\n */\nexport const libraryBlockConfigs: BlockSpec<any>[] = [\n defineBlock<ChecklistData>({\n type: \"checklist\",\n schema: checklistSchema,\n mdx: checklistMdx,\n Read: ServerReadStub,\n placement: [\"block\"],\n notionCompatible: true,\n label: \"Checklist\",\n description:\n \"A list of toggleable items, each with a label and an optional note.\",\n }),\n defineBlock<TableData>({\n type: \"table\",\n schema: tableSchema,\n mdx: tableMdx,\n Read: ServerReadStub,\n placement: [\"block\"],\n notionCompatible: true,\n label: \"Table\",\n description:\n \"A simple grid with header columns and string rows for comparisons, parameters, or structured lists.\",\n }),\n defineBlock<CodeTabsData>({\n type: \"code-tabs\",\n schema: codeTabsSchema,\n mdx: codeTabsMdx,\n Read: ServerReadStub,\n placement: [\"block\"],\n label: \"Code tabs\",\n description:\n \"A vertical file tab rail of syntax-highlighted code snippets, one tab per file with an optional language and caption.\",\n }),\n defineBlock<HtmlBlockData>({\n type: \"custom-html\",\n schema: htmlSchema,\n mdx: htmlMdx,\n Read: ServerReadStub,\n placement: [\"block\"],\n label: \"HTML / Tailwind\",\n description:\n \"An author-supplied HTML (with optional CSS) fragment rendered in a sandboxed iframe, with inline source editing.\",\n }),\n defineBlock<TabsData>({\n type: \"tabs\",\n schema: tabsSchema,\n mdx: tabsMdx,\n Read: ServerReadStub,\n placement: [\"block\", \"inline\"],\n label: \"Tabs\",\n description:\n \"A horizontal pill-tab container; each tab holds its own list of blocks.\",\n }),\n defineBlock<MermaidData>({\n type: \"mermaid\",\n schema: mermaidSchema,\n mdx: mermaidMdx,\n Read: ServerReadStub,\n placement: [\"block\"],\n label: \"Diagram (Mermaid)\",\n description:\n \"A Mermaid diagram (flowchart, sequence, etc.) defined as text and rendered as a diagram.\",\n }),\n defineBlock<ApiEndpointData>({\n type: \"api-endpoint\",\n schema: apiEndpointSchema,\n mdx: apiEndpointMdx,\n Read: ServerReadStub,\n placement: [\"block\"],\n label: \"API endpoint\",\n description:\n \"A Swagger-style API endpoint reference: a colored method pill + path, collapsed by default, expanding to params, request body, and per-status response examples.\",\n }),\n defineBlock<OpenApiSpecData>({\n type: \"openapi-spec\",\n schema: openApiSpecSchema,\n mdx: openApiSpecMdx,\n Read: ServerReadStub,\n placement: [\"block\"],\n label: \"OpenAPI spec\",\n description:\n \"A whole-document Redoc / Swagger-UI-style API reference rendered from a complete OpenAPI 3 / Swagger 2 spec (JSON).\",\n }),\n defineBlock<DataModelData>({\n type: \"data-model\",\n schema: dataModelSchema,\n mdx: dataModelMdx,\n Read: ServerReadStub,\n placement: [\"block\"],\n label: \"Data model\",\n description:\n \"An ERD / dbdiagram-style data model: entity cards with typed fields (PK/FK/nullable flags) and interactive foreign-key relations.\",\n }),\n defineBlock<DiffData>({\n type: \"diff\",\n schema: diffSchema,\n mdx: diffMdx,\n Read: ServerReadStub,\n placement: [\"block\"],\n label: \"Diff\",\n description:\n \"A GitHub-style before/after line diff for a file, with unified or split view and added/removed line highlighting.\",\n }),\n defineBlock<FileTreeData>({\n type: \"file-tree\",\n schema: fileTreeSchema,\n mdx: fileTreeMdx,\n Read: ServerReadStub,\n placement: [\"block\"],\n label: \"File tree\",\n description:\n \"A VS Code / GitHub-explorer file and change tree with per-file change badges, notes, and code snippets.\",\n }),\n defineBlock<JsonExplorerData>({\n type: \"json-explorer\",\n schema: jsonExplorerSchema,\n mdx: jsonExplorerMdx,\n Read: ServerReadStub,\n placement: [\"block\"],\n label: \"JSON explorer\",\n description:\n \"A collapsible browser-devtools / Postman-style JSON tree with type-colored values and expand/collapse.\",\n }),\n defineBlock<AnnotatedCodeData>({\n type: \"annotated-code\",\n schema: annotatedCodeSchema,\n mdx: annotatedCodeMdx,\n Read: ServerReadStub,\n placement: [\"block\"],\n label: \"Annotated code\",\n description:\n \"A line-numbered code walkthrough whose line ranges carry anchored explanatory notes.\",\n }),\n];\n\n/**\n * Per-block overrides for {@link registerLibraryBlockConfigs}, keyed by canonical\n * `type`. Servers tweak only the agent-facing fields that legitimately differ:\n * content re-types `table` → `table-block`; plan curates a longer Mermaid and\n * file-tree description. The `schema` / `mdx` config always stays shared.\n */\nexport type LibraryBlockConfigOverrides = Record<\n string,\n Partial<\n Pick<BlockSpec<any>, \"type\" | \"label\" | \"description\" | \"notionCompatible\">\n >\n>;\n\n/**\n * Register the React-free standard-library config stubs into a server / shared\n * {@link BlockRegistry}. Both `plan-block-registry.ts` and `nfm-registry.ts` call\n * this, then register only their app-specific block configs (plan adds callout /\n * diagram / wireframe / question-form) on top — so the shared library lives in\n * exactly one place across browser AND server registries.\n */\nexport function registerLibraryBlockConfigs(\n registry: BlockRegistry,\n options: { overrides?: LibraryBlockConfigOverrides } = {},\n): void {\n const overrides = options.overrides ?? {};\n const specs = libraryBlockConfigs.map((spec) => {\n const override = overrides[spec.type];\n return override ? ({ ...spec, ...override } as BlockSpec<any>) : spec;\n });\n registerBlocks(registry, specs);\n}\n"]}
@@ -0,0 +1,29 @@
1
+ import { type BlockSpec } from "../types.js";
2
+ import { type BlockRegistry } from "../registry.js";
3
+ /**
4
+ * The full standard library spec set, in registration order: the five fully
5
+ * pre-built specs (checklist, table, code-tabs, html, tabs) followed by the
6
+ * eight dev-doc specs. This is the single list both the plan and content browser
7
+ * registries register — adding a 14th library block here lands in both apps.
8
+ */
9
+ export declare const libraryBlockSpecs: BlockSpec<any>[];
10
+ /**
11
+ * Per-block metadata overrides for {@link registerLibraryBlocks}, keyed by the
12
+ * canonical block `type`. Lets an app tweak the few fields that legitimately
13
+ * differ (a `type` rename, a tweaked `description` or `empty` seed) without
14
+ * re-authoring the spec. Anything omitted keeps the canonical value, so the
15
+ * schema / MDX config and the React `Read`/`Edit` renderers always stay shared.
16
+ */
17
+ export type LibraryBlockOverrides = Record<string, Partial<Pick<BlockSpec<any>, "type" | "label" | "description" | "empty">>>;
18
+ /**
19
+ * Register the standard library block specs into a {@link BlockRegistry}. Both
20
+ * the plan and content browser registries call this, then register only their
21
+ * own app-specific blocks on top — so the shared library lives in exactly one
22
+ * place. Pass `overrides` (keyed by canonical `type`) for the small per-app
23
+ * differences (content re-types `table` → `table-block`; each app phrases the
24
+ * Mermaid description and seeds the OpenAPI example a little differently).
25
+ */
26
+ export declare function registerLibraryBlocks(registry: BlockRegistry, options?: {
27
+ overrides?: LibraryBlockOverrides;
28
+ }): void;
29
+ //# sourceMappingURL=specs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"specs.d.ts","sourceRoot":"","sources":["../../../../src/client/blocks/library/specs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAkB,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAsPpE;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,CAAC,GAAG,CAAC,EAO7C,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,CACxC,MAAM,EACN,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,aAAa,GAAG,OAAO,CAAC,CAAC,CAC1E,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,aAAa,EACvB,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,qBAAqB,CAAA;CAAO,GAClD,IAAI,CAON"}