@astryxdesign/cli 0.7.17-canary.g5a3fd39 → 0.7.17-canary.g5cf5d69

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 (426) hide show
  1. package/README.md +64 -63
  2. package/api/build/_adapter.d.mts +51 -0
  3. package/api/build/_adapter.mjs +122 -6
  4. package/api/build/build.doc.mjs +1 -1
  5. package/api/build/build.mjs +23 -14
  6. package/api/build/build.type.d.mts +1 -1
  7. package/api/build/build.type.mjs +3 -3
  8. package/api/build/help/help.d.mts +15 -14
  9. package/api/build/help/help.mjs +62 -3
  10. package/api/build/kit/answer.mjs +2 -3
  11. package/api/build/kit/signals.d.mts +10 -0
  12. package/api/build/kit/signals.mjs +15 -2
  13. package/api/component/detail/blocks/blocks.mjs +2 -1
  14. package/api/discover/_adapter.d.mts +57 -6
  15. package/api/discover/_adapter.mjs +278 -49
  16. package/api/discover/_catalog-view.d.mts +7 -0
  17. package/api/discover/_catalog-view.mjs +10 -1
  18. package/api/discover/detail/detail.d.mts +3 -2
  19. package/api/discover/detail/detail.mjs +3 -2
  20. package/api/discover/detail/doc/doc.mjs +1 -1
  21. package/api/discover/discover.d.mts +24 -0
  22. package/api/discover/discover.doc.mjs +1 -1
  23. package/api/discover/discover.mjs +146 -25
  24. package/api/discover/discover.type.d.mts +6 -4
  25. package/api/discover/discover.type.mjs +6 -4
  26. package/api/discover/search/search.d.mts +22 -0
  27. package/api/discover/search/search.mjs +290 -70
  28. package/api/docs/_entry-names.mjs +4 -3
  29. package/api/doctor/_adapter.d.mts +43 -3
  30. package/api/doctor/_adapter.mjs +142 -18
  31. package/api/doctor/built-checks.d.mts +30 -3
  32. package/api/doctor/built-checks.mjs +132 -5
  33. package/api/doctor/doctor.d.mts +93 -6
  34. package/api/doctor/doctor.doc.mjs +2 -2
  35. package/api/doctor/doctor.mjs +524 -33
  36. package/api/doctor/doctor.type.d.mts +2 -1
  37. package/api/doctor/doctor.type.mjs +2 -1
  38. package/api/doctor/theme-checks.d.mts +19 -0
  39. package/api/doctor/theme-checks.mjs +74 -6
  40. package/api/hook/hook.type.d.mts +1 -1
  41. package/api/hook/hook.type.mjs +1 -1
  42. package/api/hook/list/list.mjs +11 -7
  43. package/api/icon/_adapter.d.mts +2 -1
  44. package/api/icon/_adapter.mjs +10 -15
  45. package/api/icon/_records.d.mts +3 -1
  46. package/api/icon/_records.mjs +30 -3
  47. package/api/icon/exportIconIndex.doc.mjs +1 -1
  48. package/api/icon/icon.doc.mjs +3 -3
  49. package/api/icon/icon.type.d.mts +32 -1
  50. package/api/icon/icon.type.mjs +19 -3
  51. package/api/icon/list/list.mjs +4 -1
  52. package/api/icon/rankIconIndex.doc.mjs +1 -1
  53. package/api/icon/search/icon-index.mjs +18 -8
  54. package/api/icon/search/search.d.mts +26 -3
  55. package/api/icon/search/search.mjs +155 -9
  56. package/api/init/_adapter.d.mts +14 -0
  57. package/api/init/_adapter.mjs +26 -4
  58. package/api/init/init.d.mts +1 -1
  59. package/api/init/init.doc.mjs +2 -2
  60. package/api/init/init.mjs +1 -1
  61. package/api/init/init.type.d.mts +29 -1
  62. package/api/init/init.type.mjs +14 -1
  63. package/api/init/run/run.d.mts +11 -1
  64. package/api/init/run/run.mjs +84 -5
  65. package/api/integration/_adapter.d.mts +5 -4
  66. package/api/integration/_adapter.mjs +7 -5
  67. package/api/integration/integrationCheck.doc.mjs +1 -1
  68. package/api/integration/pack-check.mjs +8 -9
  69. package/api/integration/validate-integration.d.mts +1 -1
  70. package/api/integration/validate-integration.mjs +26 -24
  71. package/api/integration/validate-integration.type.d.mts +5 -2
  72. package/api/integration/validate-integration.type.mjs +5 -2
  73. package/api/integration/validateIntegration.doc.mjs +1 -1
  74. package/api/render/_adapter.d.mts +4 -2
  75. package/api/render/_adapter.mjs +62 -21
  76. package/api/render/render.doc.mjs +8 -5
  77. package/api/render/render.mjs +1 -1
  78. package/api/render/render.type.d.mts +2 -0
  79. package/api/render/render.type.mjs +2 -0
  80. package/api/search/ORDERING.md +2 -2
  81. package/api/search/_candidate-score.d.mts +3 -0
  82. package/api/search/_candidate-score.mjs +36 -3
  83. package/api/search/_gather-docs.mjs +29 -2
  84. package/api/search/_gather-templates.mjs +2 -1
  85. package/api/search/_main-searcher.mjs +13 -0
  86. package/api/search/_named-keywords.d.mts +2 -1
  87. package/api/search/_named-keywords.mjs +48 -6
  88. package/api/search/_order.d.mts +36 -1
  89. package/api/search/_order.mjs +141 -3
  90. package/api/swizzle/list/list.mjs +8 -1
  91. package/api/swizzle/swizzle.type.d.mts +1 -1
  92. package/api/swizzle/swizzle.type.mjs +1 -1
  93. package/api/template/copy/copy.mjs +3 -4
  94. package/api/template/list/list.mjs +2 -1
  95. package/api/template/show/show.mjs +2 -1
  96. package/api/template/skeleton/skeleton.mjs +2 -1
  97. package/api/template/template.doc.mjs +1 -1
  98. package/api/template/template.mjs +19 -1
  99. package/api/template/template.type.d.mts +1 -0
  100. package/api/template/template.type.mjs +2 -1
  101. package/api/theme/_adapter.d.mts +1 -0
  102. package/api/theme/_adapter.mjs +3 -5
  103. package/api/theme/_app-provider.d.mts +42 -0
  104. package/api/theme/_app-provider.mjs +61 -27
  105. package/api/theme/build/build.d.mts +4 -10
  106. package/api/theme/build/build.mjs +165 -116
  107. package/api/theme/build/input-fields.d.mts +9 -0
  108. package/api/theme/build/input-fields.mjs +155 -16
  109. package/api/theme/build/radius-values.d.mts +18 -0
  110. package/api/theme/build/radius-values.mjs +76 -0
  111. package/api/theme/build/typography-values.mjs +7 -23
  112. package/api/theme/build/written-values.d.mts +18 -0
  113. package/api/theme/build/written-values.mjs +107 -31
  114. package/api/theme/eject/eject.mjs +6 -1
  115. package/api/theme/palette/generate/generator.mjs +24 -0
  116. package/api/theme/theme.type.d.mts +4 -2
  117. package/api/theme/theme.type.mjs +3 -2
  118. package/api/theme/themeBuild.doc.mjs +2 -2
  119. package/api/theme/themeEject.doc.mjs +1 -1
  120. package/api/theme-edit/_catalog.d.mts +40 -0
  121. package/api/theme-edit/_catalog.mjs +100 -22
  122. package/api/theme-edit/_check.mjs +213 -43
  123. package/api/theme-edit/_color.d.mts +14 -0
  124. package/api/theme-edit/_color.mjs +22 -0
  125. package/api/theme-edit/_compiler.mjs +52 -0
  126. package/api/theme-edit/_context.d.mts +20 -2
  127. package/api/theme-edit/_context.mjs +157 -29
  128. package/api/theme-edit/_edit.mjs +426 -58
  129. package/api/theme-edit/_how-question.d.mts +14 -0
  130. package/api/theme-edit/_how-question.mjs +1541 -127
  131. package/api/theme-edit/_how.mjs +43 -0
  132. package/api/theme-edit/_missed.mjs +107 -27
  133. package/api/theme-edit/_normal.d.mts +18 -4
  134. package/api/theme-edit/_normal.mjs +84 -3
  135. package/api/theme-edit/_palette.d.mts +9 -0
  136. package/api/theme-edit/_palette.mjs +158 -33
  137. package/api/theme-edit/_part-words.mjs +16 -3
  138. package/api/theme-edit/_parts.d.mts +8 -0
  139. package/api/theme-edit/_parts.mjs +120 -36
  140. package/api/theme-edit/_png.d.mts +24 -0
  141. package/api/theme-edit/_png.mjs +99 -0
  142. package/api/theme-edit/_preview-app.d.mts +16 -0
  143. package/api/theme-edit/_preview-app.mjs +52 -18
  144. package/api/theme-edit/_preview.d.mts +44 -26
  145. package/api/theme-edit/_preview.mjs +255 -67
  146. package/api/theme-edit/_project.d.mts +12 -1
  147. package/api/theme-edit/_project.mjs +16 -1
  148. package/api/theme-edit/_settings.d.mts +116 -0
  149. package/api/theme-edit/_settings.mjs +1197 -58
  150. package/api/theme-edit/_tables.d.mts +16 -0
  151. package/api/theme-edit/_tables.mjs +34 -4
  152. package/api/theme-edit/theme-edit.type.d.mts +15 -2
  153. package/api/theme-edit/theme-edit.type.mjs +8 -6
  154. package/api/upgrade/_adapter.d.mts +46 -7
  155. package/api/upgrade/_adapter.mjs +110 -15
  156. package/api/upgrade/registry/registry.d.mts +6 -3
  157. package/api/upgrade/registry/registry.mjs +21 -6
  158. package/api/upgrade/run/run.mjs +23 -11
  159. package/api/upgrade/upgrade.doc.mjs +4 -3
  160. package/assets/component-list.generated.json +1 -1
  161. package/assets/docs/tree/agent-guidance.doc.mjs +3 -2
  162. package/assets/docs/tree/checks.doc.mjs +2 -2
  163. package/assets/docs/tree/host-entry.doc.mjs +4 -0
  164. package/assets/docs/tree/icon-definitions.doc.mjs +3 -3
  165. package/assets/docs/tree/icon-sets.doc.mjs +6 -6
  166. package/assets/docs/tree/problems.doc.mjs +3 -3
  167. package/assets/docs/tree/render-pages.doc.mjs +17 -3
  168. package/assets/docs/tree/share-a-page.doc.mjs +5 -5
  169. package/assets/docs/tree/short-and-findable.doc.mjs +3 -3
  170. package/assets/docs/tree/troubleshooting.doc.mjs +8 -0
  171. package/assets/docs/tree/updates.doc.mjs +1 -1
  172. package/assets/docs/tree/versioning.doc.mjs +1 -1
  173. package/assets/docs/working-with-ai.doc.mjs +40 -5
  174. package/assets/docs-routes.generated.json +1 -1
  175. package/assets/docs.generated.json +2 -2
  176. package/assets/icons/installed-icon-set.doc.mjs +30 -0
  177. package/assets/search-catalog.generated.json +2 -2
  178. package/assets/self-audit.generated.json +1 -1
  179. package/assets/templates/blocks/components/Avatar/AvatarInteractive.tsx +6 -1
  180. package/assets/templates/blocks/components/CodeBlock/CodeBlockTerminal.tsx +1 -1
  181. package/assets/templates/blocks/components/LinkProvider/LinkProviderCustomLink.tsx +3 -1
  182. package/assets/templates/components.generated.json +1 -1
  183. package/assets/templates/pages/ai-chat/page.tsx +6 -2
  184. package/assets/templates/pages/ai-chat-landing/page.tsx +1 -1
  185. package/assets/templates/pages/blank/page.tsx +4 -2
  186. package/assets/templates/pages/canvas-editor/page.tsx +3 -1
  187. package/assets/templates/pages/centered-hero/page.tsx +1 -1
  188. package/assets/templates/pages/checkout-wizard/page.tsx +1 -1
  189. package/assets/templates/pages/classic-gallery/page.tsx +1 -1
  190. package/assets/templates/pages/contact-form/page.tsx +2 -2
  191. package/assets/templates/pages/course-detail/page.tsx +1 -1
  192. package/assets/templates/pages/dashboard/page.tsx +24 -8
  193. package/assets/templates/pages/dashboard-alert-rail/page.tsx +4 -2
  194. package/assets/templates/pages/dashboard-cohort-funnel/page.tsx +7 -3
  195. package/assets/templates/pages/dashboard-comparison/page.tsx +5 -2
  196. package/assets/templates/pages/dashboard-composition/page.tsx +10 -4
  197. package/assets/templates/pages/dashboard-progress/page.tsx +6 -3
  198. package/assets/templates/pages/dashboard-scorecard/page.tsx +17 -8
  199. package/assets/templates/pages/detail-page/page.tsx +22 -5
  200. package/assets/templates/pages/documentation/page.tsx +4 -2
  201. package/assets/templates/pages/documentation-design/page.tsx +5 -2
  202. package/assets/templates/pages/documentation-technical/page.tsx +4 -2
  203. package/assets/templates/pages/editor/page.tsx +28 -9
  204. package/assets/templates/pages/file-explorer/page.tsx +3 -1
  205. package/assets/templates/pages/form-two-column/page.tsx +1 -1
  206. package/assets/templates/pages/form-wizard/page.tsx +1 -1
  207. package/assets/templates/pages/form-wizard-dialog/page.tsx +3 -1
  208. package/assets/templates/pages/form-wizard-inline/page.tsx +1 -1
  209. package/assets/templates/pages/form-wizard-vertical/page.tsx +1 -1
  210. package/assets/templates/pages/gallery-hero/page.tsx +1 -1
  211. package/assets/templates/pages/ide/page.tsx +7 -2
  212. package/assets/templates/pages/kanban-board/page.tsx +10 -4
  213. package/assets/templates/pages/library/page.tsx +31 -61
  214. package/assets/templates/pages/login/page.tsx +4 -2
  215. package/assets/templates/pages/login-card/page.tsx +4 -2
  216. package/assets/templates/pages/login-split/page.tsx +3 -2
  217. package/assets/templates/pages/login-sso/page.tsx +4 -4
  218. package/assets/templates/pages/mixed-gallery/page.tsx +1 -1
  219. package/assets/templates/pages/payment-form/page.tsx +1 -1
  220. package/assets/templates/pages/product-detail/page.tsx +16 -4
  221. package/assets/templates/pages/product-gallery/page.tsx +1 -1
  222. package/assets/templates/pages/settings/page.tsx +10 -4
  223. package/assets/templates/pages/settings-dialog/page.tsx +5 -6
  224. package/assets/templates/pages/settings-sidebar/page.tsx +39 -13
  225. package/assets/templates/pages/side-gallery/page.tsx +1 -1
  226. package/assets/templates/pages/table/page.tsx +2 -2
  227. package/assets/templates/pages/table-filter/page.tsx +21 -6
  228. package/assets/templates/pages/table-grouped/page.tsx +23 -2
  229. package/assets/templates/pages/table-inbox/page.tsx +82 -32
  230. package/assets/templates/pages/theme-showcase/page.tsx +3 -2
  231. package/assets/templates/themes/butter/butterPaletteRefs.generated.ts +12 -12
  232. package/assets/templates/themes/butter/butterTheme.ts +197 -4
  233. package/assets/templates/themes/chocolate/chocolateTheme.ts +72 -8
  234. package/assets/templates/themes/gothic/gothicPaletteRefs.generated.ts +3 -3
  235. package/assets/templates/themes/gothic/gothicTheme.ts +114 -4
  236. package/assets/templates/themes/matcha/matchaPaletteRefs.generated.ts +8 -8
  237. package/assets/templates/themes/matcha/matchaTheme.ts +48 -12
  238. package/assets/templates/themes/neutral/neutralTheme.ts +29 -0
  239. package/assets/templates/themes/stone/stonePaletteRefs.generated.ts +2 -2
  240. package/assets/templates/themes/stone/stoneTheme.ts +69 -0
  241. package/assets/templates/themes/y2k/y2kPaletteRefs.generated.ts +9 -9
  242. package/assets/templates/themes/y2k/y2kTheme.ts +249 -14
  243. package/authoring/codemod/parse.d.mts +0 -36
  244. package/authoring/codemod/parse.mjs +62 -41
  245. package/authoring/config/config.doc.mjs +1 -1
  246. package/authoring/config/parse.d.mts +0 -47
  247. package/authoring/config/parse.mjs +128 -103
  248. package/authoring/config/type.ts +4 -3
  249. package/authoring/debug/parse.d.mts +2 -2
  250. package/authoring/discover/parse.d.mts +2 -2
  251. package/authoring/discover/parse.mjs +52 -38
  252. package/authoring/discover/type.ts +2 -1
  253. package/authoring/doctypes/_schema.d.mts +834 -950
  254. package/authoring/doctypes/_schema.mjs +863 -825
  255. package/authoring/doctypes/command/parse.mjs +2 -2
  256. package/authoring/doctypes/component/parse.mjs +2 -2
  257. package/authoring/doctypes/enum/parse.mjs +2 -2
  258. package/authoring/doctypes/hook/parse.mjs +2 -2
  259. package/authoring/doctypes/icon-definition/icon-definition.doc.mjs +1 -1
  260. package/authoring/doctypes/icon-definition/parse.d.mts +0 -24
  261. package/authoring/doctypes/icon-definition/parse.mjs +59 -43
  262. package/authoring/doctypes/icon-set/parse.d.mts +0 -75
  263. package/authoring/doctypes/icon-set/parse.mjs +239 -210
  264. package/authoring/doctypes/legacy.mjs +3 -3
  265. package/authoring/doctypes/namespace/parse.mjs +2 -2
  266. package/authoring/doctypes/reference/parse.mjs +2 -2
  267. package/authoring/doctypes/schema/parse.mjs +2 -2
  268. package/authoring/doctypes/template/parse.d.mts +0 -101
  269. package/authoring/doctypes/template/parse.mjs +131 -106
  270. package/authoring/doctypes/theme/parse.d.mts +0 -23
  271. package/authoring/doctypes/theme/parse.mjs +52 -36
  272. package/authoring/gap-report/parse.d.mts +1 -1
  273. package/authoring/integration/integration.doc.mjs +8 -0
  274. package/authoring/integration/schema.d.mts +14 -3
  275. package/authoring/integration/schema.mjs +20 -2
  276. package/authoring/integration/type.ts +14 -0
  277. package/clients/cli/build-id.generated.json +1 -1
  278. package/clients/cli/commands/build.mjs +27 -13
  279. package/clients/cli/commands/component.mjs +14 -3
  280. package/clients/cli/commands/discover.doc.mjs +2 -2
  281. package/clients/cli/commands/discover.mjs +20 -3
  282. package/clients/cli/commands/docs.doc.mjs +11 -9
  283. package/clients/cli/commands/docs.mjs +50 -21
  284. package/clients/cli/commands/experimental/icon.mjs +330 -227
  285. package/clients/cli/commands/experimental/render.mjs +16 -1
  286. package/clients/cli/commands/experimental/theme.mjs +42 -17
  287. package/clients/cli/commands/experimental-icon-add.doc.mjs +1 -1
  288. package/clients/cli/commands/experimental-icon-map.doc.mjs +4 -1
  289. package/clients/cli/commands/experimental-icon-new-definition.doc.mjs +4 -1
  290. package/clients/cli/commands/experimental-icon-new-set.doc.mjs +4 -1
  291. package/clients/cli/commands/experimental-icon-use.doc.mjs +1 -1
  292. package/clients/cli/commands/experimental-icon.doc.mjs +1 -1
  293. package/clients/cli/commands/experimental-render.doc.mjs +3 -3
  294. package/clients/cli/commands/experimental-theme-compile.doc.mjs +1 -1
  295. package/clients/cli/commands/experimental-theme-editor-new.doc.mjs +1 -1
  296. package/clients/cli/commands/experimental-theme-editor-set.doc.mjs +1 -1
  297. package/clients/cli/commands/experimental-theme-editor-show.doc.mjs +1 -1
  298. package/clients/cli/commands/experimental-theme-editor-undo.doc.mjs +1 -1
  299. package/clients/cli/commands/init.doc.mjs +36 -24
  300. package/clients/cli/commands/integration-check.doc.mjs +1 -1
  301. package/clients/cli/commands/mcp.doc.mjs +53 -0
  302. package/clients/cli/commands/mcp.mjs +51 -0
  303. package/clients/cli/commands/search.mjs +46 -9
  304. package/clients/cli/commands/template.mjs +3 -2
  305. package/clients/cli/commands/theme-build.doc.mjs +1 -1
  306. package/clients/cli/commands/theme.mjs +12 -2
  307. package/clients/cli/commands/upgrade.doc.mjs +3 -2
  308. package/clients/cli/commands.generated.json +1 -1
  309. package/clients/cli/formatters/index.mjs +52 -6
  310. package/clients/cli/index.mjs +23 -17
  311. package/clients/cli/lib/base-gate.mjs +37 -5
  312. package/clients/cli/lib/define-command.mjs +82 -4
  313. package/clients/cli/lib/json-shim.mjs +61 -4
  314. package/clients/cli/lib/manifest.mjs +9 -1
  315. package/clients/cli/lib/mcp-server.mjs +286 -0
  316. package/clients/cli/lib/mcp-tools.mjs +405 -0
  317. package/clients/cli/lib/other-cli-words.mjs +99 -0
  318. package/clients/cli/lib/stray-option.mjs +27 -1
  319. package/clients/cli/lib/unknown-command.mjs +326 -11
  320. package/clients/cli/manifest.generated.json +1 -1
  321. package/clients/cli/run.mjs +1 -1
  322. package/foundation/agent-docs/agent-docs.d.mts +49 -1
  323. package/foundation/agent-docs/agent-docs.mjs +108 -7
  324. package/foundation/agent-docs/computer-agent-text.mjs +1 -1
  325. package/foundation/bases/core.d.mts +1 -1
  326. package/foundation/bases/core.mjs +3 -3
  327. package/foundation/bases/resolve.d.mts +4 -8
  328. package/foundation/bases/resolve.mjs +15 -21
  329. package/foundation/bases/state.d.mts +15 -9
  330. package/foundation/bases/state.mjs +33 -6
  331. package/foundation/config/project.d.mts +5 -4
  332. package/foundation/config/project.mjs +33 -17
  333. package/foundation/discovery/component-discovery.mjs +15 -28
  334. package/foundation/discovery/icon-imports.d.mts +66 -0
  335. package/foundation/discovery/icon-imports.mjs +225 -0
  336. package/foundation/discovery/icon-ranking.d.mts +12 -2
  337. package/foundation/discovery/icon-ranking.mjs +197 -10
  338. package/foundation/discovery/icon-set-checks.mjs +2 -1
  339. package/foundation/discovery/icon-set-discovery.d.mts +28 -0
  340. package/foundation/discovery/icon-set-discovery.mjs +42 -0
  341. package/foundation/discovery/icon-set-writer.d.mts +2 -11
  342. package/foundation/discovery/icon-set-writer.mjs +3 -29
  343. package/foundation/discovery/module-exports.d.mts +1 -1
  344. package/foundation/discovery/module-exports.mjs +136 -33
  345. package/foundation/discovery/name-roots.d.mts +5 -0
  346. package/foundation/discovery/name-roots.mjs +11 -0
  347. package/foundation/discovery/runner-allowlist.d.mts +1 -0
  348. package/foundation/discovery/runner-allowlist.mjs +2 -0
  349. package/foundation/discovery/runner-commands.mjs +1 -0
  350. package/foundation/discovery/template-adapter.d.mts +1 -1
  351. package/foundation/discovery/template-destination.d.mts +14 -6
  352. package/foundation/discovery/template-destination.mjs +42 -8
  353. package/foundation/discovery/template-icons.d.mts +45 -2
  354. package/foundation/discovery/template-icons.mjs +26 -54
  355. package/foundation/discovery/template-needs.d.mts +28 -2
  356. package/foundation/discovery/template-needs.mjs +92 -11
  357. package/foundation/discovery/theme-discovery.d.mts +8 -0
  358. package/foundation/discovery/theme-discovery.mjs +23 -6
  359. package/foundation/discovery/theme-imports.mjs +2 -4
  360. package/foundation/doc-compiler/parse-readable.mjs +4 -3
  361. package/foundation/doc-compiler/stored-docs.d.mts +13 -0
  362. package/foundation/doc-compiler/stored-docs.mjs +74 -3
  363. package/foundation/env/cli-command.d.mts +68 -10
  364. package/foundation/env/cli-command.mjs +116 -22
  365. package/foundation/env/project-scope.d.mts +9 -0
  366. package/foundation/env/project-scope.mjs +28 -2
  367. package/foundation/fs/gather-cache.d.mts +23 -0
  368. package/foundation/fs/gather-cache.mjs +94 -2
  369. package/foundation/fs/module-loader.d.mts +3 -1
  370. package/foundation/fs/module-loader.mjs +85 -5
  371. package/foundation/fs/read-record.mjs +9 -5
  372. package/foundation/identity/package-names.d.mts +18 -0
  373. package/foundation/identity/package-names.mjs +19 -0
  374. package/foundation/identity/providers.mjs +3 -2
  375. package/foundation/integrations/icon-features.d.mts +63 -0
  376. package/foundation/integrations/icon-features.mjs +54 -0
  377. package/foundation/integrations/integrations.d.mts +13 -1
  378. package/foundation/integrations/integrations.mjs +47 -6
  379. package/foundation/integrations/pack-state.d.mts +21 -0
  380. package/foundation/integrations/pack-state.mjs +42 -19
  381. package/foundation/integrations/validate-contributions.d.mts +11 -3
  382. package/foundation/integrations/validate-contributions.mjs +51 -13
  383. package/foundation/release/cache.d.mts +13 -1
  384. package/foundation/release/cache.mjs +94 -14
  385. package/foundation/release/notices.d.mts +15 -0
  386. package/foundation/release/notices.mjs +111 -7
  387. package/foundation/release/project.d.mts +3 -4
  388. package/foundation/release/project.mjs +5 -6
  389. package/foundation/render/client-bundle.d.mts +126 -0
  390. package/foundation/render/client-bundle.mjs +565 -0
  391. package/foundation/render/cut-short.d.mts +7 -1
  392. package/foundation/render/cut-short.mjs +46 -6
  393. package/foundation/render/embedded-imports.d.mts +4 -3
  394. package/foundation/render/embedded-imports.mjs +13 -8
  395. package/foundation/render/esbuild-dependency.d.mts +14 -0
  396. package/foundation/render/esbuild-dependency.mjs +41 -0
  397. package/foundation/render/file-header.mjs +5 -4
  398. package/foundation/render/page-worker.mjs +562 -86
  399. package/foundation/render/picture-chrome.mjs +54 -29
  400. package/foundation/render/picture-playwright.mjs +78 -42
  401. package/foundation/render/picture-window.d.mts +33 -0
  402. package/foundation/render/picture-window.mjs +78 -0
  403. package/foundation/render/render-page.d.mts +55 -4
  404. package/foundation/render/render-page.mjs +199 -28
  405. package/foundation/render/restore-folder.d.mts +13 -0
  406. package/foundation/render/restore-folder.mjs +30 -0
  407. package/foundation/render/served-packages.d.mts +2 -1
  408. package/foundation/render/served-packages.mjs +5 -3
  409. package/foundation/render/ts-paths.d.mts +11 -0
  410. package/foundation/render/ts-paths.mjs +27 -2
  411. package/foundation/render/value-uses.d.mts +43 -0
  412. package/foundation/render/value-uses.mjs +110 -0
  413. package/foundation/response/error-codes.d.mts +2 -1
  414. package/foundation/response/error-codes.doc.mjs +7 -1
  415. package/foundation/response/error-codes.mjs +10 -2
  416. package/foundation/response/response-types.doc.mjs +12 -12
  417. package/foundation/runtime/package-root.d.mts +8 -0
  418. package/foundation/runtime/package-root.mjs +20 -0
  419. package/foundation/suggest/other-command.d.mts +11 -0
  420. package/foundation/suggest/other-command.mjs +1 -1
  421. package/foundation/text/icon-id.d.mts +20 -0
  422. package/foundation/text/icon-id.mjs +40 -0
  423. package/foundation/text/icon-set-next.d.mts +25 -0
  424. package/foundation/text/icon-set-next.mjs +29 -0
  425. package/foundation/xle/browser.d.mts +2 -2
  426. package/package.json +7 -6
@@ -22,12 +22,21 @@ import {CLI_ROOT} from '../../../foundation/fs/paths.mjs';
22
22
  import {PathSafetyError, assertWithin} from '../../../foundation/fs/path-safety.mjs';
23
23
  import {getCliInvocation} from '../../../foundation/env/package-manager.mjs';
24
24
  import {isOutsideProject} from '../../../foundation/env/project-scope.mjs';
25
+ import {AGENT_DOC_PATHS} from '../../../foundation/agent-docs/agent-doc-state.mjs';
26
+ import {
27
+ STARTER_THEME,
28
+ inspectAgentDocs,
29
+ projectInstallStep,
30
+ resolveAgentPaths,
31
+ } from '../_adapter.mjs';
25
32
  import {
26
33
  AgentDocsHomeError,
27
34
  assertAgentDocsTarget,
28
35
  installAgentDocs,
29
36
  renderAgentDocsBlock,
30
37
  agentDocsTargetDir,
38
+ readAgentDocTexts,
39
+ agentDocChange,
31
40
  } from '../../../foundation/agent-docs/agent-docs.mjs';
32
41
  import {themeTemplate} from '../../theme/template/template.mjs';
33
42
  import {listTemplates} from '../../template/template.mjs';
@@ -46,9 +55,11 @@ const VALID_AGENTS = ['claude', 'cursor', 'codex', 'hermes', 'muse', 'all'];
46
55
  * app imports that module once and passes its default to <Theme>.
47
56
  *
48
57
  * @param {string} invocation install-aware CLI invocation stem (e.g. `pnpm exec astryx`, `yarn astryx`, or `npx @astryxdesign/cli` for one-off runs)
58
+ * @param {string} [cwd] the project folder; its integrations' install guidance, else its package manager, names the theme install step
49
59
  * @returns {string[]} ordered list of human-facing lines
50
60
  */
51
- export function getNextSteps(invocation) {
61
+ export function getNextSteps(invocation, cwd = process.cwd()) {
62
+ const install = projectInstallStep([STARTER_THEME.package], cwd);
52
63
  return [
53
64
  '',
54
65
  ' Next steps:',
@@ -58,8 +69,9 @@ export function getNextSteps(invocation) {
58
69
  " and import '@astryxdesign/core/astryx.css'",
59
70
  " 3. Import components: import { Button } from '@astryxdesign/core/Button'",
60
71
  ' 4. Add and wire a theme:',
61
- ' npm install @astryxdesign/theme-neutral',
62
- ` ${invocation} theme add neutral`,
72
+ ` ${install.line}`,
73
+ ...(install.note ? [` (${install.note})`] : []),
74
+ ` ${invocation} theme add ${STARTER_THEME.slug}`,
63
75
  " import { Theme } from '@astryxdesign/core/theme'",
64
76
  " import { themes, defaultThemeSlug } from './astryx-themes'",
65
77
  ' <Theme theme={themes[defaultThemeSlug]}>...</Theme>',
@@ -70,6 +82,25 @@ export function getNextSteps(invocation) {
70
82
  ];
71
83
  }
72
84
 
85
+ /**
86
+ * The lines printed instead of "Next steps" when the project's agent files
87
+ * already held the Astryx block: the app is set up, so it needs the commands
88
+ * to build with, not the install steps.
89
+ *
90
+ * @param {string} invocation install-aware CLI invocation stem
91
+ * @returns {string[]} ordered list of human-facing lines
92
+ */
93
+ export function getWorkflowSteps(invocation) {
94
+ return [
95
+ '',
96
+ ' Astryx is already set up here. To build UI:',
97
+ ` ${invocation} build "<what you're building>" the template to start a page from`,
98
+ ` ${invocation} search <query> find components, docs, and templates`,
99
+ ` Setting up a new app instead: ${invocation} docs getting-started`,
100
+ '',
101
+ ];
102
+ }
103
+
73
104
  /**
74
105
  * Whether two paths name one folder, links resolved.
75
106
  * @param {string} a
@@ -88,6 +119,20 @@ function sameFolder(a, b) {
88
119
  return real(a) === real(b);
89
120
  }
90
121
 
122
+ /**
123
+ * One receipt line for one agent-doc file.
124
+ * @param {import('../init.type.mjs').InitDocsChange} change
125
+ * @returns {string}
126
+ */
127
+ function changeLine({path: shown, change, from, to}) {
128
+ const version = to ? ` (Astryx ${to})` : '';
129
+ if (change === 'removed') return `${shown}: Astryx block removed, another agent file holds it`;
130
+ if (change === 'created') return `${shown} created${version}`;
131
+ if (change === 'unchanged') return `${shown} already current${version}, nothing changed`;
132
+ if (from && to && from !== to) return `${shown} updated (Astryx ${from} -> ${to})`;
133
+ return `${shown} updated${version}`;
134
+ }
135
+
91
136
  /**
92
137
  * Install the agent-docs block; records the outcome (or soft error) on `data`.
93
138
  * Mirrors the CLI's historical soft-error policy: a PathSafetyError surfaces its
@@ -124,6 +169,18 @@ async function applyAgents(cwd, options, invocation, data) {
124
169
  // With explicit paths, installAgentDocs checks each file's own folder.
125
170
  if (!paths) assertAgentDocsTarget(targetDir);
126
171
  const renderedBlock = await renderAgentDocsBlock(root);
172
+ const before = readAgentDocTexts(targetDir, paths ?? AGENT_DOC_PATHS);
173
+ // Read-only, before the write: whether the project's agent docs were
174
+ // already current, so default mode can tell a set-up app from a new one.
175
+ // The files this run writes: the named ones, the preset's, or (with
176
+ // neither) every agent doc found at the root.
177
+ const preset = !paths && options.agent ? resolveAgentPaths(root, options.agent) : null;
178
+ data.agentDocsStatus = inspectAgentDocs(
179
+ paths ? targetDir : root,
180
+ undefined,
181
+ renderedBlock,
182
+ {paths: paths ?? (preset ? [...preset.inject, ...preset.create] : undefined)},
183
+ ).status;
127
184
  /** @type {string[]} */
128
185
  const skipped = [];
129
186
  const files = installAgentDocs(targetDir, {
@@ -144,7 +201,16 @@ async function applyAgents(cwd, options, invocation, data) {
144
201
  path.relative(cwd, path.join(targetDir, rel)).split(path.sep).join('/'),
145
202
  );
146
203
  data.docsWritten = written;
147
- logger.log(`[ok] AI agent docs installed -> ${written.join(', ')}`);
204
+ const after = readAgentDocTexts(targetDir, files);
205
+ // The receipt names each file from the project root; the line names it
206
+ // from where init ran, as docsWritten does.
207
+ data.docsChanges = files.map(rel => ({
208
+ path: path.relative(root, path.join(targetDir, rel)).split(path.sep).join('/'),
209
+ ...agentDocChange(before.get(rel) ?? null, after.get(rel) ?? null),
210
+ }));
211
+ data.docsChanges.forEach((change, i) => {
212
+ logger.log(`[ok] AI agent docs: ${changeLine({...change, path: written[i]})}`);
213
+ });
148
214
  // A file 0.7.1 did not write (GEMINI.md, or a project-root file when init
149
215
  // runs below the root) that resolves outside the project is left as it
150
216
  // is, reported in docsError with one note; the exit code stays 0. A file
@@ -160,6 +226,9 @@ async function applyAgents(cwd, options, invocation, data) {
160
226
  // PathSafetyError carries a precise, user-actionable message — surface it
161
227
  // (and flag exit 1) instead of the generic "could not install" warning so
162
228
  // misconfigured --agent-docs-path values aren't silently swallowed.
229
+ // Nothing was written, so the status read before the write says nothing
230
+ // about this run.
231
+ data.agentDocsStatus = null;
163
232
  if (err instanceof PathSafetyError) {
164
233
  logger.error(`Error: ${err.message}`);
165
234
  data.docsError = {kind: 'path-safety', message: err.message};
@@ -325,6 +394,8 @@ export async function run(options = {}, {cwd = process.cwd()} = {}) {
325
394
  mode: 'features',
326
395
  features,
327
396
  docsWritten: [],
397
+ docsChanges: [],
398
+ agentDocsStatus: null,
328
399
  docsError: null,
329
400
  theme: false,
330
401
  themeTemplate: null,
@@ -348,11 +419,14 @@ export async function run(options = {}, {cwd = process.cwd()} = {}) {
348
419
  // steps would set up a project the folder does not have, so they are left
349
420
  // out (spec AST-081 FR3).
350
421
  const outside = isOutsideProject(cwd);
422
+
351
423
  /** @type {import('../init.type.mjs').InitRunData} */
352
424
  const data = {
353
425
  mode: 'default',
354
426
  features: ['agents'],
355
427
  docsWritten: [],
428
+ docsChanges: [],
429
+ agentDocsStatus: null,
356
430
  docsError: null,
357
431
  theme: false,
358
432
  themeTemplate: null,
@@ -362,6 +436,10 @@ export async function run(options = {}, {cwd = process.cwd()} = {}) {
362
436
  nextSteps: !outside,
363
437
  };
364
438
  await applyAgents(cwd, options, invocation, data);
439
+ // A project whose agent docs were all current before this run is set up:
440
+ // the install steps would only repeat setup.
441
+ const setUp = !outside && data.agentDocsStatus === 'current';
442
+ data.nextSteps = !outside && !setUp;
365
443
  logger.log('');
366
444
  logger.log(
367
445
  ` Tip: \`${invocation} init --all\` also points you to the theme and page-building workflows.`,
@@ -370,6 +448,7 @@ export async function run(options = {}, {cwd = process.cwd()} = {}) {
370
448
  logger.log('');
371
449
  return {type: 'init.run', data};
372
450
  }
373
- for (const line of getNextSteps(invocation)) logger.log(line);
451
+ const steps = setUp ? getWorkflowSteps(invocation) : getNextSteps(invocation, cwd);
452
+ for (const line of steps) logger.log(line);
374
453
  return {type: 'init.run', data};
375
454
  }
@@ -58,10 +58,11 @@ export function integrationDocTargets(integration: any): Promise<import("../docs
58
58
  */
59
59
  export function integrationDocCommands(integration: any): Promise<import("../../foundation/discovery/runner-commands.mjs").RunnerCommand[]>;
60
60
  /**
61
- * Whether the project at `cwd` opts in to icon sets (`experimental.iconSet`).
62
- * An installed package's experimental root is read only then
63
- * (spec:AST-017 FR27, spec:AST-084 FR0): a project without it gets what a CLI
64
- * without icon sets reports. A config that does not load opts in to nothing.
61
+ * Whether icon features are on in the project at `cwd` (the icon feature
62
+ * gate). An installed package's experimental root is read only then
63
+ * (spec:AST-017 FR27, spec:AST-084 FR0): a project where they are off gets
64
+ * what a CLI without icon sets reports. A config that does not load has them
65
+ * off.
65
66
  * @param {string} cwd
66
67
  * @returns {Promise<boolean>}
67
68
  */
@@ -16,6 +16,7 @@ import {
16
16
  integrationSourceForDoc,
17
17
  } from '../../foundation/discovery/component-discovery.mjs';
18
18
  import {Project} from '../../foundation/config/project.mjs';
19
+ import {iconFeatureGate} from '../../foundation/integrations/icon-features.mjs';
19
20
  import {discoverIntegrationDocs} from '../../foundation/discovery/docs-discovery.mjs';
20
21
  import {packageDocTargets} from '../docs/_adapter.mjs';
21
22
  import {comparePropDocs} from '../../foundation/discovery/prop-drift.mjs';
@@ -168,17 +169,18 @@ export async function integrationDocCommands(integration) {
168
169
  }
169
170
 
170
171
  /**
171
- * Whether the project at `cwd` opts in to icon sets (`experimental.iconSet`).
172
- * An installed package's experimental root is read only then
173
- * (spec:AST-017 FR27, spec:AST-084 FR0): a project without it gets what a CLI
174
- * without icon sets reports. A config that does not load opts in to nothing.
172
+ * Whether icon features are on in the project at `cwd` (the icon feature
173
+ * gate). An installed package's experimental root is read only then
174
+ * (spec:AST-017 FR27, spec:AST-084 FR0): a project where they are off gets
175
+ * what a CLI without icon sets reports. A config that does not load has them
176
+ * off.
175
177
  * @param {string} cwd
176
178
  * @returns {Promise<boolean>}
177
179
  */
178
180
  export async function projectUsesIconSets(cwd) {
179
181
  try {
180
182
  const project = await Project.load(cwd);
181
- return Boolean(project.config?.experimental?.iconSet);
183
+ return iconFeatureGate(project).on;
182
184
  } catch {
183
185
  return false;
184
186
  }
@@ -42,7 +42,7 @@ export const doc = {
42
42
  type: 'boolean',
43
43
  default: 'false',
44
44
  description:
45
- 'Also fail on any warning and on any check that did not run, not only on errors. A malformed `cliCommand` is reported as a note (`invalid_cli_command`) in `data.notes` of the validate check, which fails nothing until a minor release names it.',
45
+ 'Also fail on any warning and on any check that did not run, not only on errors. A malformed `cliCommand` or `installGuidance` is reported as a note (`invalid_cli_command`, `invalid_install_guidance`) in `data.notes` of the validate check, which fails nothing until a minor release names it.',
46
46
  },
47
47
  {
48
48
  name: 'options.next',
@@ -26,6 +26,7 @@ import {fileURLToPath} from 'node:url';
26
26
  import {spawnSync} from 'node:child_process';
27
27
  import {assertWithin} from '../../foundation/fs/path-safety.mjs';
28
28
  import {npmCommand} from '../../foundation/release/cache.mjs';
29
+ import {runNpmPackJson} from '../../foundation/integrations/pack-state.mjs';
29
30
  import {commandTokensIn} from '../../foundation/doc-compiler/doc-syntax.mjs';
30
31
  import {resolvePackageDir} from '../../foundation/integrations/integrations.mjs';
31
32
  import {
@@ -279,28 +280,26 @@ function npmPackErrorDetail(output) {
279
280
  * the artifact `npm publish` would produce. npm starts the way the CLI starts
280
281
  * it everywhere else (`npmCommand`): npm's own entry file run with this Node
281
282
  * when one is found, so an `npm` earlier on the PATH that is not npm itself
282
- * cannot answer for it. Uses spawnSync with an args array — no shell — so
283
- * paths with metacharacters cannot inject.
283
+ * cannot answer for it. npm runs with an args array — no shell — so paths
284
+ * with metacharacters cannot inject, and its output goes to a file, so a
285
+ * package of any size is listed.
284
286
  *
285
287
  * @param {string} packageDir
286
288
  * @param {string} destDir
287
289
  * @returns {{filename: string, fileCount: number, size: number, unpackedSize: number, packedPaths: Set<string>}}
288
290
  */
289
291
  function runNpmPack(packageDir, destDir) {
290
- const npm = npmCommand();
291
- const result = spawnSync(
292
- npm.command,
292
+ const result = runNpmPackJson(
293
+ npmCommand(),
294
+ packageDir,
293
295
  [
294
- ...npm.prefix,
295
- 'pack',
296
- '--json',
297
296
  '--silent',
298
297
  // Lifecycle scripts still run; background mode keeps their output off
299
298
  // the stdout that carries the JSON result.
300
299
  '--foreground-scripts=false',
301
300
  `--pack-destination=${destDir}`,
302
301
  ],
303
- {cwd: packageDir, encoding: 'utf-8', shell: false, timeout: 60_000},
302
+ {timeout: 60_000},
304
303
  );
305
304
  if (result.error) {
306
305
  throw new Error(`Could not start npm pack: ${result.error.message}`);
@@ -20,7 +20,7 @@ export function validateLocalIntegration(cwd?: string, { shippedImports }?: {
20
20
  * @param {string} [cwd]
21
21
  * @param {{iconSets?: boolean, shippedImports?: boolean}} [options]
22
22
  * `iconSets`: check the package's experimental icon sets; by default only
23
- * when the project at `cwd` sets `experimental.iconSet`.
23
+ * where icon features are on in the project at `cwd`.
24
24
  * `shippedImports: false` skips the shipped-import check.
25
25
  * @returns {Promise<ValidateResult>}
26
26
  */
@@ -78,6 +78,7 @@ import {
78
78
  packageListingCheck,
79
79
  componentDocNamesCheck,
80
80
  INVALID_CLI_COMMAND,
81
+ INVALID_INSTALL_GUIDANCE,
81
82
  isListedIssue,
82
83
  issueListed as listed,
83
84
  validateLoadedIntegration,
@@ -166,7 +167,6 @@ const ROOT_KINDS = /** @type {const} */ ([
166
167
  'themes',
167
168
  ]);
168
169
 
169
- const UNREACHABLE_SCAN_LIMIT = 5_000;
170
170
  const UNREACHABLE_SKIP_DIRS = new Set([
171
171
  'node_modules',
172
172
  '.git',
@@ -211,7 +211,9 @@ function unreadThemeFolderIssues(packageDir, loaded) {
211
211
  * Find real contribution metadata that sits outside every declared root. The
212
212
  * scan is local-authoring-only, skips dependency/build output, never follows
213
213
  * symlinks, and parses candidates before reporting them so ordinary JS files do
214
- * not become noise.
214
+ * not become noise. It reads every file name in the package: only a
215
+ * `.doc` or `.template` module is opened, so a package of tens of thousands
216
+ * of generated files costs one directory listing per folder.
215
217
  *
216
218
  * @param {string} packageDir
217
219
  * @param {import('../../foundation/integrations/integrations.mjs').LoadedIntegration} loaded
@@ -246,8 +248,6 @@ async function findUnreachableContributionIssues(
246
248
  /** @type {Issue[]} */
247
249
  const issues = [];
248
250
  const context = createFixContext(packageDir, usable);
249
- let scanned = 0;
250
- let truncated = false;
251
251
 
252
252
  /** @param {string} dir */
253
253
  async function walk(dir) {
@@ -279,7 +279,6 @@ async function findUnreachableContributionIssues(
279
279
  return;
280
280
  }
281
281
  for (const entry of entries) {
282
- if (truncated) return;
283
282
  if (UNREACHABLE_SKIP_DIRS.has(entry.name)) continue;
284
283
  const full = path.join(dir, entry.name);
285
284
  if (entry.isDirectory()) {
@@ -287,11 +286,6 @@ async function findUnreachableContributionIssues(
287
286
  continue;
288
287
  }
289
288
  if (!entry.isFile()) continue;
290
- scanned += 1;
291
- if (scanned > UNREACHABLE_SCAN_LIMIT) {
292
- truncated = true;
293
- return;
294
- }
295
289
  if (
296
290
  !TEMPLATE_CANDIDATE_RE.test(entry.name) &&
297
291
  !DOC_CANDIDATE_RE.test(entry.name)
@@ -310,14 +304,6 @@ async function findUnreachableContributionIssues(
310
304
  }
311
305
 
312
306
  await walk(packageDir);
313
- if (truncated) {
314
- issues.push(
315
- warning(
316
- 'unreachable_scan_truncated',
317
- `Stopped unreachable-contribution scanning after ${UNREACHABLE_SCAN_LIMIT} files. Narrow the package or move generated output under dist/build.`,
318
- ),
319
- );
320
- }
321
307
  return issues;
322
308
  }
323
309
 
@@ -399,6 +385,8 @@ async function validateAtPackageDir(
399
385
  let agentDocsError;
400
386
  /** @type {string | undefined} */
401
387
  let cliCommandError;
388
+ /** @type {string | undefined} */
389
+ let installGuidanceError;
402
390
  try {
403
391
  ({
404
392
  manifest,
@@ -407,6 +395,7 @@ async function validateAtPackageDir(
407
395
  declaredKeys,
408
396
  agentDocsError,
409
397
  cliCommandError,
398
+ installGuidanceError,
410
399
  } = await loadManifest(
411
400
  manifestFile,
412
401
  `Integration manifest (${path.basename(manifestFile)})`,
@@ -474,7 +463,9 @@ async function validateAtPackageDir(
474
463
  logo: manifest.logo,
475
464
  agentDocs: manifest.agentDocs,
476
465
  cliCommand: manifest.cliCommand,
466
+ installGuidance: manifest.installGuidance,
477
467
  __cliCommandError: cliCommandError,
468
+ __installGuidanceError: installGuidanceError,
478
469
  __agentDocsError: agentDocsError,
479
470
  __unknownKeys: unknownKeys,
480
471
  __ignoredFields: ignoredFields,
@@ -488,14 +479,22 @@ async function validateAtPackageDir(
488
479
 
489
480
  // Roots + contribution checks are shared with validateLoadedIntegration so
490
481
  // the everyday-command nudge runs the exact same validators.
491
- // A malformed `cliCommand` is an info note beside the issues, not an issue:
482
+ // A malformed `cliCommand` or `installGuidance` is an info note beside the
483
+ // issues, not an issue:
492
484
  // `integration check --strict` fails on any warning, and a new failure code
493
485
  // joins only in a minor release (architecture:cli-surface INV35). Doctor's
494
486
  // project check still warns about it.
487
+ // A manifest key this CLI does not know is a note too, never an issue:
488
+ // a key from a newer CLI is normal version skew.
495
489
  const contribution = await validateLoadedIntegrationListed(loaded);
496
490
  (result.listed ??= []).push(...contribution.listed);
491
+ if (contribution.notes.length > 0)
492
+ (result.notes ??= []).push(...contribution.notes);
497
493
  for (const issue of contribution.issues) {
498
- if (issue.code === INVALID_CLI_COMMAND) {
494
+ if (
495
+ issue.code === INVALID_CLI_COMMAND ||
496
+ issue.code === INVALID_INSTALL_GUIDANCE
497
+ ) {
499
498
  (result.notes ??= []).push({code: issue.code, message: issue.message});
500
499
  } else {
501
500
  issues.push(issue);
@@ -772,7 +771,7 @@ function packageJsonFieldIssues(pkg, pkgJsonPath) {
772
771
  * @param {string} [cwd]
773
772
  * @param {{iconSets?: boolean, shippedImports?: boolean}} [options]
774
773
  * `iconSets`: check the package's experimental icon sets; by default only
775
- * when the project at `cwd` sets `experimental.iconSet`.
774
+ * where icon features are on in the project at `cwd`.
776
775
  * `shippedImports: false` skips the shipped-import check.
777
776
  * @returns {Promise<ValidateResult>}
778
777
  */
@@ -998,10 +997,13 @@ async function validateIntegrationOnce(pkg, options) {
998
997
  // `integration check --strict --next` fails on it today.
999
998
  const notes = result.found
1000
999
  ? [
1001
- // A malformed cliCommand fails --strict from the next minor
1002
- // (spec:AST-081 FR5).
1000
+ // A malformed cliCommand or installGuidance fails --strict from the
1001
+ // next minor (spec:AST-081 FR5).
1003
1002
  ...(result.notes ?? []).map(note =>
1004
- note.code === INVALID_CLI_COMMAND ? {...note, next: true} : note,
1003
+ note.code === INVALID_CLI_COMMAND ||
1004
+ note.code === INVALID_INSTALL_GUIDANCE
1005
+ ? {...note, next: true}
1006
+ : note,
1005
1007
  ),
1006
1008
  ...(result.listed ?? []).map(issue => ({
1007
1009
  code: issue.code,
@@ -45,8 +45,11 @@ export type ValidateIntegrationResponse = {
45
45
  * `notes`: information beside the issues. A note fails nothing by default;
46
46
  * one with `next: true` counts as a warning under `integration check
47
47
  * --next`, fails `integration check --strict --next`, and fails `--strict`
48
- * from the next minor release. Notes include `invalid_cli_command`, a
49
- * `cliCommand` that was ignored as malformed;
48
+ * from the next minor release. Notes include `unknown_manifest_key`, a
49
+ * manifest key the running CLI does not know (marked `next` only when it
50
+ * is one letter from a known key); `invalid_cli_command`, a
51
+ * `cliCommand` that was ignored as malformed; `invalid_install_guidance`,
52
+ * an `installGuidance` that was ignored as malformed;
50
53
  * `component_without_example`, `template_category`,
51
54
  * `showcase_not_standalone` and `template_asset_not_packed`, what a
52
55
  * package's examples need (next minor; a block's `alsoShowcaseFor` names
@@ -46,8 +46,11 @@
46
46
  * `notes`: information beside the issues. A note fails nothing by default;
47
47
  * one with `next: true` counts as a warning under `integration check
48
48
  * --next`, fails `integration check --strict --next`, and fails `--strict`
49
- * from the next minor release. Notes include `invalid_cli_command`, a
50
- * `cliCommand` that was ignored as malformed;
49
+ * from the next minor release. Notes include `unknown_manifest_key`, a
50
+ * manifest key the running CLI does not know (marked `next` only when it
51
+ * is one letter from a known key); `invalid_cli_command`, a
52
+ * `cliCommand` that was ignored as malformed; `invalid_install_guidance`,
53
+ * an `installGuidance` that was ignored as malformed;
51
54
  * `component_without_example`, `template_category`,
52
55
  * `showcase_not_standalone` and `template_asset_not_packed`, what a
53
56
  * package's examples need (next minor; a block's `alsoShowcaseFor` names
@@ -62,7 +62,7 @@ export const doc = {
62
62
  {
63
63
  type: 'integration.validate',
64
64
  description:
65
- "The result envelope: `data.validated`, false when nothing was validated — with no `package.json` at all, `data.issues` carries one `no_package` error-severity issue so the command exits 1; with a `package.json` but no integration manifest, `data.issues` is empty, which means \"not looked at\", not \"healthy\"; `data.name` and `data.version` of the validated package (both null when `data.validated` is false; `data.name` is `(local package)` when the local package.json has no readable name), plus `data.issues`, an AstryxIntegrationIssue[] of {code, severity: `warning` | `error`, message, fix?, file?, line?}: `fix` is the change that resolves the issue, and `file` and `line` where it is, relative to the package, when the check knows them; and `data.notes` when there are any: {code, message, next?} information beside the issues; a note fails nothing by default, and one with `next: true` counts as a warning under `integration check --next`, fails `integration check --strict --next`, and fails `--strict` from the next minor release. Notes include `invalid_cli_command` for a `cliCommand` that was ignored as malformed and `cli_peer_version` when the running CLI is outside the `@astryxdesign/cli` peer range of the package, and the package layout findings added after the last minor release, each with its fix in the message: `duplicate_component_doc`, `symlinked_root`, `unreadable_file`, `invalid_package_json` (no `name` or `version`), `no_provider_id`, and `source_without_component_doc` for a doc whose file name differs from its source only in letter case where the two still pair; and `doc_name_mismatch` and `unknown_block_component` (see `docNames` and `blockComponents`); they become warnings in the next minor release. For the commands a topic writes, `runner_command` (written with a package runner), `plain_command` (written bare), `package_manager_command` (written for one package manager) and `doc_token` (a token that does not parse) notes each give the file, line and the token to write. A `doc_target_not_found` note names a doc whose `replaces` or `extends` names no topic and no guide of the CLI's docs or the package's own (such as a namespace, with the guides below it), so it changes nothing unless an app also installs a package that provides it, and a `doc_section_unplaced` note a section whose `before` or `after` names no section of the topic or guide it extends, so it is added at the end, and a `duplicate_guide_replacement` note two docs of the package that replace one guide, of which only the last is read; they become warnings in the next minor release. When the manifest loads, `data.docTypes` holds the doc type check: `status` (`checked` | `skipped`), `reason` when skipped, `typescript`, `docs` (doc values checked), `findings` ({doc, line, export, type, field, problem: `unknown_field` | `missing_field` | `wrong_type`, severity: `warning`, message, fix}), `unchecked` ({doc, reason}: a doc that could not be fully checked, or a root its reader cannot read), and `fixtures` when the components or docs root holds test fixture docs under `__tests__`: how many, none of them checked. When the manifest loads, `data.docNames` lists the component doc names it could not judge: `status` (`checked`), `findings` (always empty; a doc name the module its import names provably does not export is a `doc_name_mismatch` note, with its fix in the message) and `unchecked` ({file, name, reason}: a doc whose `name` differs from the name it is listed under and whose source exports cannot all be read, such as a re-export from another package). When the manifest loads, `data.blockComponents` lists the component names templates give in `exampleFor` or `componentsUsed` that could not be judged: `status` (`checked`), `findings` (always empty; a name neither the package nor Core has, and the template does not import, is an `unknown_block_component` note, with its fix in the message) and `unchecked` ({file, name, reason}: a name the template may reach through anything other than named imports and re-exports from Core, React, StyleX, local helpers or the entry of the package itself, such as an import from another package, a default or namespace import, an alias of or member read off an imported binding, require() or a dynamic import(), or a local module that cannot be read, or any name Core would have to resolve when Core is not installed). Since 0.7.3 each import apps cannot use is a note in `data.notes`, its fix inside the message, listed only: it does not fail this command or `integration check --strict`, and fails `--strict` from the next minor release. The codes are `component_import_not_exported`, `component_import_other_package`, `component_import_missing_name`, `example_import_not_exported`, `example_import_missing_name`, `template_import_not_exported`, `template_import_outside_root`, `template_private_import`, `template_import_missing_name` and `template_no_default_export`. Since 0.7.4 the examples a package ships are checked the same way: `component_without_example` (a published component no block template shows with `exampleFor` and `isShowcase: true`, or names in `alsoShowcaseFor`), `template_category` (a template category written as a path, such as `components/X`), `showcase_not_standalone` (a showcase that imports server-only code or reads `process.env` past `NODE_ENV`) and `template_asset_not_packed` (a `new URL(…, import.meta.url)` asset that is missing, or that `npm pack --dry-run` leaves out of the package). When npm cannot list the package's files, an asset no `files` entry can reach is still a note, and any other is listed in `data.exampleAssets` (`{status: 'checked', findings: [], unchecked}`, present only when it lists any) as {file, asset, reason}; `integration check` counts them as not compared. A `relative_import_not_shipped` note with `next: true` names each relative import of a module or stylesheet an app loads from the package (its `exports`, `main`, `module` and `browser` entries and its integration manifest, through static imports, re-exports, literal `import()` and `require()`, stylesheet `@import` and `url()`; type-only imports aside) that no file of the package answers the way a bundler resolves it, with the importing file, the line, and the fix in the message; it is read against the files on disk that npm packs for the package's own folder (npm is asked only when a `files` field or an ignore file can leave a file out) and against the files on disk for an installed package, and the next minor release makes it a warning, which fails `--strict`. A `built_module_imports_typescript` note, with `next: true` and the same weight, names each such import from a theme module `theme build` wrote (`.js`, `.mjs` or `.cjs`) that answers to TypeScript source (`.ts`, `.tsx`, `.mts`, `.cts`), which an app's bundler does not compile from an installed package by default. When npm cannot be asked, an import whose file no `files` entry can reach is still a note, and any other is listed in `data.shippedImports` (`{status: 'checked', findings: [], unchecked}`, present only when it lists any) as {file, specifier, reason}; `integration check` counts them as not compared. Since 0.7.15 two notes, without `next`, say what a catalog needs to list the package, each with its fix in the message; they fail no check under any flag: `package_without_logo` (the integration file's `logo.light`, or a `logo.dark` that is set, names no file in the package that is a PNG, JPEG, WebP or shapes-only SVG of at most 512 KB and that npm packs; when the integration file has no `logo`, package.json `marketplace.logo` is read the same way) and `package_without_example` (the package contributes components, other than the ones `component_without_example` exempts, but no block template sets `isShowcase: true` with `exampleFor`, or `alsoShowcaseFor`; a package of themes, docs or codemods alone needs none). A logo npm cannot be asked about is listed in `data.exampleAssets` with `file` set to the file that names it. When the manifest loads, `data.publicImports` is `{status: 'checked', findings: [], unchecked}`: `unchecked` lists each import the check could not judge, as {file, specifier, reason}, the reason starting `example <label>:` for an import in a component example: an `exports` target not built yet; a module whose export list cannot be read in full (CommonJS, or a declaration file it cannot read); a root import in a package with no `exports` (the root module `main` names is not read); every name an import (other than a component doc's own component) names that its module does not export, while a TypeScript file in the package has a `declare module` block for a relative path or the package's own name or a subpath of it, which can add names to that module (a `declare module` in a comment, `declare global`, a wildcard such as `'*.css'`, and another package's name do not count; a file whose text has `declare module` but that cannot be parsed counts); the same for every such name when the package has more than 5,000 files to search for that block; a deep path into build output not built yet in a package with no `exports`; a template import of Core when `@astryxdesign/core` is not installed beside the package (a `packages/core` of the workspace under another name does not count); every import of the package's own name when package.json has no `name` or a `name` that is not a bare package name; one entry for the whole check when package.json cannot be read; and an import of a subpath whose `exports` entry has only a `types` target, unless it is `import type`, every binding is an inline `type`, or every name it imports is a type its types file declares: a value import of a name that file does not declare as a type, a namespace or side-effect import, or any import when the types file cannot be read (it may be build output). `integration check` counts the unchecked as not compared; they never fail it. Each component example that is not `kind: 'setup'` but cannot run on its own, by the rule `previewableExample` in `@astryxdesign/cli/authoring` defines (the rule a live preview follows), is a note with `next: true` and its fix in the message: `example_does_not_compile` (not a TSX module, such as a top-level `return` or code that stops partway), `example_renders_nothing` (no default export, no component, and no JSX at its end), `example_undefined_name` (a name it never defines or imports that is not a component the package documents, a component or hook Core documents, a React export, or a browser global), `example_server_only` (an import of code that runs only on a server, a module of the package that imports `server-only` included, an async component of the package, which only a server renders, or a read of `process.env` past `NODE_ENV`) and `example_import_unresolvable` (a relative path, or a package the package does not declare). `data.exampleCode` (`{status: 'checked', findings: [], unchecked}`, present only when it lists any) lists as {file, example, reason} each example the check could not judge: its names, when Core's docs or React cannot be read beside the package, or the example itself, when it cannot be read; `integration check` counts them as not compared. `data.olderCliNotes` ({file, kind: `template` | `namespace`, field, message}), for the local package, lists each descriptor field a release before 0.7.4 refuses while the package's CLI peer range admits one, such as `stability` on a template or namespace doc; it is present only when it has entries, is never counted, and never fails a check.",
65
+ "The result envelope: `data.validated`, false when nothing was validated — with no `package.json` at all, `data.issues` carries one `no_package` error-severity issue so the command exits 1; with a `package.json` but no integration manifest, `data.issues` is empty, which means \"not looked at\", not \"healthy\"; `data.name` and `data.version` of the validated package (both null when `data.validated` is false; `data.name` is `(local package)` when the local package.json has no readable name), plus `data.issues`, an AstryxIntegrationIssue[] of {code, severity: `warning` | `error`, message, fix?, file?, line?}: `fix` is the change that resolves the issue, and `file` and `line` where it is, relative to the package, when the check knows them; and `data.notes` when there are any: {code, message, next?} information beside the issues; a note fails nothing by default, and one with `next: true` counts as a warning under `integration check --next`, fails `integration check --strict --next`, and fails `--strict` from the next minor release. Notes include `unknown_manifest_key` for a manifest key the running CLI does not know (it fails nothing; one a letter from a known key is marked `next`), `invalid_cli_command` for a `cliCommand` that was ignored as malformed, `invalid_install_guidance` for an `installGuidance` that was ignored as malformed, and `cli_peer_version` when the running CLI is outside the `@astryxdesign/cli` peer range of the package, and the package layout findings added after the last minor release, each with its fix in the message: `duplicate_component_doc`, `symlinked_root`, `unreadable_file`, `invalid_package_json` (no `name` or `version`), `no_provider_id`, and `source_without_component_doc` for a doc whose file name differs from its source only in letter case where the two still pair; and `doc_name_mismatch` and `unknown_block_component` (see `docNames` and `blockComponents`); they become warnings in the next minor release. For the commands a topic writes, `runner_command` (written with a package runner), `plain_command` (written bare), `package_manager_command` (written for one package manager) and `doc_token` (a token that does not parse) notes each give the file, line and the token to write. A `doc_target_not_found` note names a doc whose `replaces` or `extends` names no topic and no guide of the CLI's docs or the package's own (such as a namespace, with the guides below it), so it changes nothing unless an app also installs a package that provides it, and a `doc_section_unplaced` note a section whose `before` or `after` names no section of the topic or guide it extends, so it is added at the end, and a `duplicate_guide_replacement` note two docs of the package that replace one guide, of which only the last is read; they become warnings in the next minor release. When the manifest loads, `data.docTypes` holds the doc type check: `status` (`checked` | `skipped`), `reason` when skipped, `typescript`, `docs` (doc values checked), `findings` ({doc, line, export, type, field, problem: `unknown_field` | `missing_field` | `wrong_type`, severity: `warning`, message, fix}), `unchecked` ({doc, reason}: a doc that could not be fully checked, or a root its reader cannot read), and `fixtures` when the components or docs root holds test fixture docs under `__tests__`: how many, none of them checked. When the manifest loads, `data.docNames` lists the component doc names it could not judge: `status` (`checked`), `findings` (always empty; a doc name the module its import names provably does not export is a `doc_name_mismatch` note, with its fix in the message) and `unchecked` ({file, name, reason}: a doc whose `name` differs from the name it is listed under and whose source exports cannot all be read, such as a re-export from another package). When the manifest loads, `data.blockComponents` lists the component names templates give in `exampleFor` or `componentsUsed` that could not be judged: `status` (`checked`), `findings` (always empty; a name neither the package nor Core has, and the template does not import, is an `unknown_block_component` note, with its fix in the message) and `unchecked` ({file, name, reason}: a name the template may reach through anything other than named imports and re-exports from Core, React, StyleX, local helpers or the entry of the package itself, such as an import from another package, a default or namespace import, an alias of or member read off an imported binding, require() or a dynamic import(), or a local module that cannot be read, or any name Core would have to resolve when Core is not installed). Since 0.7.3 each import apps cannot use is a note in `data.notes`, its fix inside the message, listed only: it does not fail this command or `integration check --strict`, and fails `--strict` from the next minor release. The codes are `component_import_not_exported`, `component_import_other_package`, `component_import_missing_name`, `example_import_not_exported`, `example_import_missing_name`, `template_import_not_exported`, `template_import_outside_root`, `template_private_import`, `template_import_missing_name` and `template_no_default_export`. Since 0.7.4 the examples a package ships are checked the same way: `component_without_example` (a published component no block template shows with `exampleFor` and `isShowcase: true`, or names in `alsoShowcaseFor`), `template_category` (a template category written as a path, such as `components/X`), `showcase_not_standalone` (a showcase that imports server-only code or reads `process.env` past `NODE_ENV`) and `template_asset_not_packed` (a `new URL(…, import.meta.url)` asset that is missing, or that `npm pack --dry-run` leaves out of the package). When npm cannot list the package's files, an asset no `files` entry can reach is still a note, and any other is listed in `data.exampleAssets` (`{status: 'checked', findings: [], unchecked}`, present only when it lists any) as {file, asset, reason}; `integration check` counts them as not compared. A `relative_import_not_shipped` note with `next: true` names each relative import of a module or stylesheet an app loads from the package (its `exports`, `main`, `module` and `browser` entries and its integration manifest, through static imports, re-exports, literal `import()` and `require()`, stylesheet `@import` and `url()`; type-only imports aside) that no file of the package answers the way a bundler resolves it, with the importing file, the line, and the fix in the message; it is read against the files on disk that npm packs for the package's own folder (npm is asked only when a `files` field or an ignore file can leave a file out) and against the files on disk for an installed package, and the next minor release makes it a warning, which fails `--strict`. A `built_module_imports_typescript` note, with `next: true` and the same weight, names each such import from a theme module `theme build` wrote (`.js`, `.mjs` or `.cjs`) that answers to TypeScript source (`.ts`, `.tsx`, `.mts`, `.cts`), which an app's bundler does not compile from an installed package by default. When npm cannot be asked, an import whose file no `files` entry can reach is still a note, and any other is listed in `data.shippedImports` (`{status: 'checked', findings: [], unchecked}`, present only when it lists any) as {file, specifier, reason}; `integration check` counts them as not compared. Since 0.7.15 two notes, without `next`, say what a catalog needs to list the package, each with its fix in the message; they fail no check under any flag: `package_without_logo` (the integration file's `logo.light`, or a `logo.dark` that is set, names no file in the package that is a PNG, JPEG, WebP or shapes-only SVG of at most 512 KB and that npm packs; when the integration file has no `logo`, package.json `marketplace.logo` is read the same way) and `package_without_example` (the package contributes components, other than the ones `component_without_example` exempts, but no block template sets `isShowcase: true` with `exampleFor`, or `alsoShowcaseFor`; a package of themes, docs or codemods alone needs none). A logo npm cannot be asked about is listed in `data.exampleAssets` with `file` set to the file that names it. When the manifest loads, `data.publicImports` is `{status: 'checked', findings: [], unchecked}`: `unchecked` lists each import the check could not judge, as {file, specifier, reason}, the reason starting `example <label>:` for an import in a component example: an `exports` target not built yet; a module whose export list cannot be read in full (CommonJS, or a declaration file it cannot read); a root import in a package with no `exports` (the root module `main` names is not read); every name an import (other than a component doc's own component) names that its module does not export, while a TypeScript file in the package has a `declare module` block for a relative path or the package's own name or a subpath of it, which can add names to that module (a `declare module` in a comment, `declare global`, a wildcard such as `'*.css'`, and another package's name do not count; a file whose text has `declare module` but that cannot be parsed counts); the same for every such name when the package has more than 5,000 files to search for that block; a deep path into build output not built yet in a package with no `exports`; a template import of Core when `@astryxdesign/core` is not installed beside the package (a `packages/core` of the workspace under another name does not count); every import of the package's own name when package.json has no `name` or a `name` that is not a bare package name; one entry for the whole check when package.json cannot be read; and an import of a subpath whose `exports` entry has only a `types` target, unless it is `import type`, every binding is an inline `type`, or every name it imports is a type its types file declares: a value import of a name that file does not declare as a type, a namespace or side-effect import, or any import when the types file cannot be read (it may be build output). `integration check` counts the unchecked as not compared; they never fail it. Each component example that is not `kind: 'setup'` but cannot run on its own, by the rule `previewableExample` in `@astryxdesign/cli/authoring` defines (the rule a live preview follows), is a note with `next: true` and its fix in the message: `example_does_not_compile` (not a TSX module, such as a top-level `return` or code that stops partway), `example_renders_nothing` (no default export, no component, and no JSX at its end), `example_undefined_name` (a name it never defines or imports that is not a component the package documents, a component or hook Core documents, a React export, or a browser global), `example_server_only` (an import of code that runs only on a server, a module of the package that imports `server-only` included, an async component of the package, which only a server renders, or a read of `process.env` past `NODE_ENV`) and `example_import_unresolvable` (a relative path, or a package the package does not declare). `data.exampleCode` (`{status: 'checked', findings: [], unchecked}`, present only when it lists any) lists as {file, example, reason} each example the check could not judge: its names, when Core's docs or React cannot be read beside the package, or the example itself, when it cannot be read; `integration check` counts them as not compared. `data.olderCliNotes` ({file, kind: `template` | `namespace`, field, message}), for the local package, lists each descriptor field a release before 0.7.4 refuses while the package's CLI peer range admits one, such as `stability` on a template or namespace doc; it is present only when it has entries, is never counted, and never fails a check.",
66
66
  },
67
67
  ],
68
68
  examples: [
@@ -3,14 +3,16 @@
3
3
 
4
4
  /**
5
5
  * Render a page module to one HTML file and write it.
6
- * @param {{cwd: string, input: string, output: string, title?: string}} args absolute paths
6
+ * @param {{cwd: string, input: string, output: string, title?: string, absolute?: boolean}} args absolute paths;
7
+ * `absolute`: the caller named the output by an absolute path
7
8
  * @returns {Promise<import('./render.type.mjs').RenderPageResponse['data']>}
8
9
  */
9
- export function renderToFile({ cwd, input, output, title }: {
10
+ export function renderToFile({ cwd, input, output, title, absolute }: {
10
11
  cwd: string;
11
12
  input: string;
12
13
  output: string;
13
14
  title?: string;
15
+ absolute?: boolean;
14
16
  }): Promise<import("./render.type.mjs").RenderPageResponse["data"]>;
15
17
  /**
16
18
  * Turn a rendered HTML file back into a page module.