@astryxdesign/cli 0.6.4-canary.f0355e3 → 0.6.4

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 (331) hide show
  1. package/README.md +96 -99
  2. package/api/build/build.doc.mjs +1 -6
  3. package/api/build/build.test.mjs +0 -22
  4. package/api/build/kit/kit.mjs +5 -44
  5. package/api/component/_adapter.d.mts +0 -25
  6. package/api/component/_adapter.mjs +5 -59
  7. package/api/component/component.d.mts +3 -6
  8. package/api/component/component.doc.mjs +17 -37
  9. package/api/component/component.mjs +9 -249
  10. package/api/component/component.type.d.mts +0 -25
  11. package/api/component/component.type.mjs +0 -44
  12. package/api/discover/_adapter.d.mts +6 -114
  13. package/api/discover/_adapter.mjs +17 -372
  14. package/api/discover/detail/detail.d.mts +6 -18
  15. package/api/discover/detail/detail.mjs +13 -67
  16. package/api/discover/detail/detail.test.mjs +0 -85
  17. package/api/discover/discover.d.mts +9 -3
  18. package/api/discover/discover.doc.mjs +18 -61
  19. package/api/discover/discover.mjs +36 -220
  20. package/api/discover/discover.test.mjs +2 -11
  21. package/api/discover/discover.type.d.mts +8 -147
  22. package/api/discover/discover.type.mjs +12 -102
  23. package/api/discover/list/list.d.mts +6 -20
  24. package/api/discover/list/list.mjs +12 -45
  25. package/api/discover/list/list.test.mjs +0 -46
  26. package/api/discover/search/search.d.mts +16 -18
  27. package/api/discover/search/search.mjs +56 -102
  28. package/api/discover/search/search.test.mjs +10 -144
  29. package/api/docs/_adapter.d.mts +3 -8
  30. package/api/docs/_adapter.mjs +6 -14
  31. package/api/docs/docOverlays.test.mjs +1 -27
  32. package/api/docs/docs.doc.mjs +2 -2
  33. package/api/docs/docs.test.mjs +243 -0
  34. package/api/docs/integration-tree.test.mjs +555 -0
  35. package/api/docs/integrationDocs.test.mjs +314 -0
  36. package/api/doctor/doctor.d.mts +3 -8
  37. package/api/doctor/doctor.doc.mjs +8 -17
  38. package/api/doctor/doctor.mjs +9 -90
  39. package/api/doctor/doctor.test.mjs +10 -122
  40. package/api/doctor/doctor.type.d.mts +1 -1
  41. package/api/doctor/doctor.type.mjs +1 -1
  42. package/api/gap-report/gap-report.doc.mjs +10 -19
  43. package/api/hook/hook.doc.mjs +3 -6
  44. package/api/index.d.mts +2 -1
  45. package/api/index.mjs +5 -5
  46. package/api/init/init.doc.mjs +12 -17
  47. package/api/integration/add-helpers.d.mts +2 -5
  48. package/api/integration/add-helpers.mjs +9 -36
  49. package/api/integration/add-theme.mjs +1 -22
  50. package/api/integration/add-theme.test.mjs +0 -34
  51. package/api/integration/authoring-checks.mjs +2 -2
  52. package/api/integration/integrationPackCheck.doc.mjs +3 -3
  53. package/api/integration/pack-check.mjs +9 -82
  54. package/api/integration/pack-check.test.mjs +0 -90
  55. package/api/integration/pack-check.type.mjs +1 -1
  56. package/api/json/assertResponse.doc.mjs +1 -1
  57. package/api/json/index.ts +1 -0
  58. package/api/json/isError.doc.mjs +1 -1
  59. package/api/layout/_adapter.d.mts +34 -0
  60. package/api/layout/_adapter.mjs +148 -0
  61. package/api/layout/check/check.d.mts +16 -0
  62. package/api/layout/check/check.mjs +40 -0
  63. package/api/layout/expand/expand.d.mts +22 -0
  64. package/api/layout/expand/expand.mjs +155 -0
  65. package/api/layout/expand/expand.path-safety.test.mjs +53 -0
  66. package/api/layout/grammar/grammar.d.mts +13 -0
  67. package/api/layout/grammar/grammar.mjs +87 -0
  68. package/api/layout/layout.d.mts +6 -0
  69. package/api/layout/layout.mjs +17 -0
  70. package/api/layout/layout.test.mjs +297 -0
  71. package/api/layout/layout.type.d.mts +89 -0
  72. package/api/layout/layout.type.mjs +103 -0
  73. package/api/layout/layoutCheck.doc.d.mts +11 -0
  74. package/api/layout/layoutCheck.doc.mjs +85 -0
  75. package/api/layout/layoutExpand.doc.d.mts +11 -0
  76. package/api/layout/layoutExpand.doc.mjs +107 -0
  77. package/api/layout/layoutGrammar.doc.d.mts +11 -0
  78. package/api/layout/layoutGrammar.doc.mjs +57 -0
  79. package/api/search/search.d.mts +1 -27
  80. package/api/search/search.doc.mjs +2 -2
  81. package/api/search/search.mjs +16 -228
  82. package/api/search/search.test.mjs +512 -0
  83. package/api/swizzle/swizzle.doc.mjs +5 -7
  84. package/api/template/copy/copy.mjs +1 -1
  85. package/api/template/copy/copy.test.mjs +0 -9
  86. package/api/template/template-integration.test.mjs +65 -1
  87. package/api/template/template.doc.mjs +1 -2
  88. package/api/template/template.mjs +1 -1
  89. package/api/theme/add/add.mjs +25 -17
  90. package/api/theme/add/add.staging.test.mjs +23 -40
  91. package/api/theme/build/build.family.test.mjs +12 -7
  92. package/api/theme/build/build.mjs +18 -8
  93. package/api/theme/generateTonalPalette.doc.mjs +2 -1
  94. package/api/theme/listThemes.doc.mjs +1 -1
  95. package/api/theme/themeAdd.doc.mjs +10 -9
  96. package/api/theme/themeBuild.doc.mjs +13 -13
  97. package/api/theme/themeList.doc.mjs +1 -1
  98. package/api/theme/themeListAvailable.doc.mjs +1 -2
  99. package/api/theme/themePaletteGenerate.doc.mjs +8 -15
  100. package/api/theme/themeTargets.doc.mjs +2 -3
  101. package/api/theme/themeTemplate.doc.mjs +1 -2
  102. package/api/upgrade/run/run.mjs +4 -6
  103. package/api/upgrade/upgrade.doc.mjs +22 -24
  104. package/api/upgrade/upgrade.type.mjs +2 -2
  105. package/assets/codemods/__tests__/runner.test.mjs +1 -3
  106. package/assets/codemods/integration-runner.mjs +3 -3
  107. package/assets/codemods/runner.mjs +4 -5
  108. package/assets/docs/README.md +2 -4
  109. package/assets/docs/browser-support.doc.mjs +11 -11
  110. package/assets/docs/color.doc.mjs +2 -8
  111. package/assets/docs/elevation.doc.mjs +4 -6
  112. package/assets/docs/getting-started.doc.mjs +16 -5
  113. package/assets/docs/icons.doc.mjs +21 -2
  114. package/assets/docs/illustrations.doc.mjs +15 -7
  115. package/assets/docs/internationalization.doc.mjs +5 -7
  116. package/assets/docs/layout.doc.dense.mjs +82 -130
  117. package/assets/docs/layout.doc.mjs +77 -133
  118. package/assets/docs/migration.doc.mjs +21 -19
  119. package/assets/docs/motion.doc.mjs +3 -16
  120. package/assets/docs/principles.doc.dense.mjs +5 -5
  121. package/assets/docs/principles.doc.mjs +0 -8
  122. package/assets/docs/principles.doc.zh.mjs +6 -6
  123. package/assets/docs/shape.doc.mjs +3 -8
  124. package/assets/docs/spacing.doc.mjs +2 -7
  125. package/assets/docs/styling-libraries.doc.mjs +2 -6
  126. package/assets/docs/styling.doc.mjs +23 -19
  127. package/assets/docs/theme.doc.dense.mjs +18 -58
  128. package/assets/docs/theme.doc.mjs +46 -56
  129. package/assets/docs/theme.doc.zh.mjs +8 -9
  130. package/assets/docs/tokens.doc.dense.mjs +2 -2
  131. package/assets/docs/tokens.doc.mjs +8 -389
  132. package/assets/docs/tokens.doc.zh.mjs +2 -2
  133. package/assets/docs/tree/integrations.doc.mjs +451 -25
  134. package/assets/docs/tree/integrations.test.mjs +62 -0
  135. package/assets/docs/tree/writing-docs.doc.mjs +286 -0
  136. package/assets/docs/typography.doc.mjs +4 -24
  137. package/assets/docs/working-with-ai.doc.mjs +22 -30
  138. package/assets/templates/blocks/components/InternationalizationProvider/InternationalizationProvider01ShippedLocale.tsx +1 -1
  139. package/authoring/config/config.doc.mjs +2 -10
  140. package/authoring/config/parse.d.mts +0 -2
  141. package/authoring/config/parse.mjs +0 -19
  142. package/authoring/config/parse.test.mjs +0 -8
  143. package/authoring/config/type.ts +2 -13
  144. package/authoring/doctypes/_schema.d.mts +2 -3
  145. package/authoring/doctypes/_schema.mjs +0 -6
  146. package/authoring/doctypes/base/graph-fields.doc.mjs +3 -3
  147. package/authoring/doctypes/base/type.ts +2 -4
  148. package/authoring/doctypes/command/command.doc.mjs +1 -1
  149. package/authoring/doctypes/command/type.ts +1 -1
  150. package/authoring/doctypes/component/component.doc.mjs +0 -6
  151. package/authoring/doctypes/component/type.ts +0 -8
  152. package/authoring/doctypes/reference/reference.doc.mjs +0 -7
  153. package/authoring/doctypes/reference/type.ts +0 -5
  154. package/authoring/doctypes/schema/schema.doc.mjs +2 -2
  155. package/authoring/doctypes/template/template.doc.mjs +1 -1
  156. package/authoring/doctypes/template/type.ts +2 -2
  157. package/authoring/index.d.mts +0 -1
  158. package/authoring/index.d.ts +0 -10
  159. package/authoring/index.mjs +0 -1
  160. package/authoring/integration/integration.doc.mjs +10 -12
  161. package/clients/cli/command-result-coverage.test.mjs +7 -7
  162. package/clients/cli/commands/component/index.mjs +55 -152
  163. package/clients/cli/commands/component-ownership.test.mjs +0 -89
  164. package/clients/cli/commands/component.doc.mjs +9 -27
  165. package/clients/cli/commands/debug-result-summary.test.mjs +2 -2
  166. package/clients/cli/commands/discover.doc.mjs +9 -53
  167. package/clients/cli/commands/discover.mjs +118 -393
  168. package/clients/cli/commands/docs.doc.mjs +1 -1
  169. package/clients/cli/commands/docs.mjs +17 -60
  170. package/clients/cli/commands/docs.test.mjs +294 -0
  171. package/clients/cli/commands/doctor-integration-docs.doc.mjs +2 -3
  172. package/clients/cli/commands/doctor-integration.test.mjs +0 -53
  173. package/clients/cli/commands/doctor.doc.mjs +1 -3
  174. package/clients/cli/commands/doctor.mjs +5 -49
  175. package/clients/cli/commands/gap-report.doc.mjs +9 -10
  176. package/clients/cli/commands/init.doc.mjs +6 -9
  177. package/clients/cli/commands/integration-add.doc.mjs +9 -9
  178. package/clients/cli/commands/integration-authoring.test.mjs +10 -61
  179. package/clients/cli/commands/integration-pack.doc.mjs +9 -5
  180. package/clients/cli/commands/integration-real-world.test.mjs +1 -1
  181. package/clients/cli/commands/integration.doc.mjs +4 -4
  182. package/clients/cli/commands/integration.mjs +43 -74
  183. package/clients/cli/commands/layout-check.doc.mjs +65 -0
  184. package/clients/cli/commands/layout-expand.doc.mjs +83 -0
  185. package/clients/cli/commands/layout-grammar.doc.mjs +30 -0
  186. package/clients/cli/commands/layout.doc.mjs +34 -0
  187. package/clients/cli/commands/layout.error-codes.test.mjs +66 -0
  188. package/clients/cli/commands/layout.exit-parity.test.mjs +41 -0
  189. package/clients/cli/commands/layout.mjs +275 -0
  190. package/clients/cli/commands/layout.path-help.test.mjs +33 -0
  191. package/clients/cli/commands/layout.stdin-cap.test.mjs +47 -0
  192. package/clients/cli/commands/layout.text-fields.test.mjs +39 -0
  193. package/clients/cli/commands/manifest.doc.mjs +1 -1
  194. package/clients/cli/commands/search.doc.mjs +3 -10
  195. package/clients/cli/commands/search.mjs +2 -21
  196. package/clients/cli/commands/search.test.mjs +4 -21
  197. package/clients/cli/commands/swizzle.doc.mjs +1 -1
  198. package/clients/cli/commands/template.doc.mjs +1 -1
  199. package/clients/cli/commands/text-json-parity.test.mjs +16 -5
  200. package/clients/cli/commands/theme-add.doc.mjs +1 -1
  201. package/clients/cli/commands/theme-palette-generate.doc.mjs +2 -3
  202. package/clients/cli/commands/theme-palette.doc.mjs +2 -1
  203. package/clients/cli/commands/theme-targets.doc.mjs +2 -2
  204. package/clients/cli/commands/theme.doc.mjs +1 -2
  205. package/clients/cli/commands/upgrade.doc.mjs +3 -62
  206. package/clients/cli/index.mjs +10 -28
  207. package/clients/cli/lib/define-command.mjs +4 -28
  208. package/clients/cli/lib/define-command.test.mjs +0 -54
  209. package/clients/cli/lib/exit-codes.test.mjs +9 -18
  210. package/clients/cli/lib/json-shim.mjs +14 -24
  211. package/clients/cli/lib/json-shim.test.mjs +20 -6
  212. package/clients/cli/lib/manifest.mjs +13 -18
  213. package/clients/cli/lib/manifest.test.mjs +2 -5
  214. package/foundation/agent-docs/agent-docs.mjs +1 -1
  215. package/foundation/agent-docs/agent-docs.test.mjs +1159 -0
  216. package/foundation/discovery/authoring-self-docs.mjs +0 -1
  217. package/foundation/discovery/authoring-self-docs.test.mjs +2 -6
  218. package/foundation/discovery/cli-self-docs.mjs +2 -16
  219. package/foundation/discovery/cli-self-docs.test.mjs +0 -20
  220. package/foundation/discovery/docs-discovery.mjs +1 -5
  221. package/foundation/discovery/docs-discovery.test.mjs +0 -21
  222. package/foundation/discovery/docs-section-key.d.mts +1 -1
  223. package/foundation/discovery/docs-section-key.mjs +1 -1
  224. package/foundation/discovery/template-adapter.mjs +1 -1
  225. package/foundation/doc-compiler/doc-loads.test.mjs +14 -3
  226. package/foundation/doc-compiler/tree.d.mts +0 -4
  227. package/foundation/doc-compiler/tree.mjs +1 -6
  228. package/foundation/doc-compiler/tree.test.mjs +598 -0
  229. package/foundation/integrations/cli-requirement.d.mts +6 -26
  230. package/foundation/integrations/cli-requirement.mjs +11 -46
  231. package/foundation/integrations/cli-requirement.test.mjs +2 -7
  232. package/foundation/integrations/contribution-inventory.mjs +1 -1
  233. package/foundation/integrations/integrations.d.mts +1 -14
  234. package/foundation/integrations/integrations.mjs +1 -41
  235. package/foundation/integrations/integrations.test.mjs +0 -31
  236. package/foundation/response/error-codes.doc.mjs +8 -6
  237. package/foundation/response/error-codes.test.mjs +5 -30
  238. package/foundation/response/response-types.doc.d.mts +3 -4
  239. package/foundation/response/response-types.doc.mjs +27 -40
  240. package/foundation/response/response-types.doc.test.mjs +0 -23
  241. package/foundation/response/response.doc.mjs +10 -11
  242. package/foundation/xle/browser.d.mts +3 -3
  243. package/foundation/xle/browser.mjs +3 -3
  244. package/foundation/xle/expand.mjs +2 -2
  245. package/foundation/xle/parse.mjs +1 -1
  246. package/foundation/xle/print.mjs +2 -2
  247. package/foundation/xle/splice.mjs +1 -1
  248. package/package.json +9 -9
  249. package/api/discover/_adapter.test.mjs +0 -215
  250. package/api/discover/_catalog-view.d.mts +0 -115
  251. package/api/discover/_catalog-view.mjs +0 -203
  252. package/api/discover/_catalog-view.test.mjs +0 -128
  253. package/api/discover/detail/item/item.d.mts +0 -26
  254. package/api/discover/detail/item/item.mjs +0 -78
  255. package/api/discover/detail/item/item.test.mjs +0 -73
  256. package/api/integration/pack-check.lifecycle-output.test.mjs +0 -107
  257. package/api/theme/add/add.rollback.test.mjs +0 -158
  258. package/api/theme/build/build.rollback.test.mjs +0 -148
  259. package/api/upgrade/run/files-changed.test.mjs +0 -111
  260. package/assets/codemods/file-count.test.mjs +0 -163
  261. package/assets/docs/tree/add-a-component.doc.mjs +0 -75
  262. package/assets/docs/tree/add-a-theme.doc.mjs +0 -85
  263. package/assets/docs/tree/add-a-topic.doc.mjs +0 -144
  264. package/assets/docs/tree/agent-guidance.doc.mjs +0 -138
  265. package/assets/docs/tree/block-template.doc.mjs +0 -130
  266. package/assets/docs/tree/build-the-template.doc.mjs +0 -28
  267. package/assets/docs/tree/building-blocks.doc.mjs +0 -46
  268. package/assets/docs/tree/check-your-docs.doc.mjs +0 -137
  269. package/assets/docs/tree/checks.doc.mjs +0 -119
  270. package/assets/docs/tree/codemods.doc.mjs +0 -147
  271. package/assets/docs/tree/component-family.doc.mjs +0 -113
  272. package/assets/docs/tree/component-imports.doc.mjs +0 -69
  273. package/assets/docs/tree/component-lookups.doc.mjs +0 -149
  274. package/assets/docs/tree/components.doc.mjs +0 -23
  275. package/assets/docs/tree/configuration.doc.mjs +0 -23
  276. package/assets/docs/tree/debug-and-gap-reports.doc.mjs +0 -182
  277. package/assets/docs/tree/define-the-theme.doc.mjs +0 -118
  278. package/assets/docs/tree/describe-the-component.doc.mjs +0 -57
  279. package/assets/docs/tree/docs.doc.mjs +0 -21
  280. package/assets/docs/tree/document-the-template.doc.mjs +0 -28
  281. package/assets/docs/tree/document-the-theme.doc.mjs +0 -68
  282. package/assets/docs/tree/export-template-assets.doc.mjs +0 -147
  283. package/assets/docs/tree/extend-or-replace.doc.mjs +0 -103
  284. package/assets/docs/tree/fonts-and-assets.doc.mjs +0 -106
  285. package/assets/docs/tree/generate-a-palette.doc.mjs +0 -66
  286. package/assets/docs/tree/grade-template-with-agent.doc.mjs +0 -105
  287. package/assets/docs/tree/help.doc.mjs +0 -16
  288. package/assets/docs/tree/links.doc.mjs +0 -98
  289. package/assets/docs/tree/package-and-test.doc.mjs +0 -32
  290. package/assets/docs/tree/page-template.doc.mjs +0 -71
  291. package/assets/docs/tree/publishing.doc.mjs +0 -111
  292. package/assets/docs/tree/quick-start.doc.mjs +0 -272
  293. package/assets/docs/tree/replace-a-core-component.doc.mjs +0 -104
  294. package/assets/docs/tree/replace-a-core-template.doc.mjs +0 -172
  295. package/assets/docs/tree/sections-and-placement.doc.mjs +0 -108
  296. package/assets/docs/tree/see-it-in-an-app.doc.mjs +0 -59
  297. package/assets/docs/tree/ship.doc.mjs +0 -16
  298. package/assets/docs/tree/short-and-findable.doc.mjs +0 -108
  299. package/assets/docs/tree/single-component.doc.mjs +0 -165
  300. package/assets/docs/tree/start-a-template.doc.mjs +0 -143
  301. package/assets/docs/tree/subcomponent.doc.mjs +0 -115
  302. package/assets/docs/tree/template-assets.doc.mjs +0 -64
  303. package/assets/docs/tree/template-doc-overview.doc.mjs +0 -109
  304. package/assets/docs/tree/template-fonts.doc.mjs +0 -102
  305. package/assets/docs/tree/template-grading-rubric.doc.mjs +0 -452
  306. package/assets/docs/tree/template-icons.doc.mjs +0 -97
  307. package/assets/docs/tree/template-images-media.doc.mjs +0 -127
  308. package/assets/docs/tree/template-styles.doc.mjs +0 -93
  309. package/assets/docs/tree/templates.doc.mjs +0 -34
  310. package/assets/docs/tree/test-in-an-app.doc.mjs +0 -115
  311. package/assets/docs/tree/test-template-in-app.doc.mjs +0 -128
  312. package/assets/docs/tree/themes.doc.mjs +0 -39
  313. package/assets/docs/tree/troubleshooting.doc.mjs +0 -149
  314. package/assets/docs/tree/upgrading.doc.mjs +0 -103
  315. package/assets/docs/tree/use-a-theme-in-an-app.doc.mjs +0 -51
  316. package/assets/docs/tree/verify-packed-template.doc.mjs +0 -77
  317. package/assets/docs/tree/versioning.doc.mjs +0 -161
  318. package/assets/docs/tree/write-good-templates.doc.mjs +0 -64
  319. package/assets/docs/tree/write-the-template-file.doc.mjs +0 -154
  320. package/authoring/discover/discover.doc.d.mts +0 -13
  321. package/authoring/discover/discover.doc.mjs +0 -138
  322. package/authoring/discover/parse.d.mts +0 -24
  323. package/authoring/discover/parse.mjs +0 -128
  324. package/authoring/discover/parse.test.mjs +0 -124
  325. package/authoring/discover/type.ts +0 -87
  326. package/clients/cli/commands/component-batch.test.mjs +0 -341
  327. package/clients/cli/commands/discover.sources.test.mjs +0 -267
  328. package/clients/cli/commands/integration-verify.doc.mjs +0 -22
  329. package/clients/cli/lib/parse-error-format.test.mjs +0 -81
  330. package/foundation/response/batch.type.d.mts +0 -33
  331. package/foundation/response/batch.type.mjs +0 -34
@@ -6,9 +6,8 @@
6
6
  * @input A package.json object.
7
7
  * @output Whether its `peerDependencies` range for `@astryxdesign/cli` admits
8
8
  * only CLIs that read namespace docs, and the package.json that declares it.
9
- * @position foundation/integrations; read by `integration add doc --parent`
10
- * and `integration add theme`, which declare the peer, and
11
- * `integration verify`, which requires it.
9
+ * @position foundation/integrations; read by `integration add doc --parent`,
10
+ * which declares the peer, and `integration pack --check`, which requires it.
12
11
  */
13
12
 
14
13
  import {semverCompare} from '../env/semver.mjs';
@@ -17,12 +16,10 @@ export const CLI_PACKAGE = '@astryxdesign/cli';
17
16
 
18
17
  /**
19
18
  * The first CLI release that reads an integration's docs tree (namespace docs
20
- * and placed guides), its templates' `replaces`, and its typed theme
21
- * descriptors. A release before it can hide every doc topic a package with a
22
- * namespace doc or a placed guide ships, with no warning; it rejects
23
- * `replaces`, drops that template, and hides the package's doc topics; and it
24
- * rejects a themes root without the `manifest.json` catalog the CLI no longer
25
- * writes, withholding the package's themes and doc topics.
19
+ * and placed guides) and its templates' `replaces`. A release before it can
20
+ * hide every doc topic a package with a namespace doc or a placed guide
21
+ * ships, with no warning, and it rejects `replaces` and withholds the
22
+ * package's templates and doc topics.
26
23
  */
27
24
  export const DOCS_TREE_CLI = '0.7.0';
28
25
 
@@ -95,11 +92,11 @@ function cliRangeProblem(pkg, feature, loss) {
95
92
  const range = pkg?.peerDependencies?.[CLI_PACKAGE];
96
93
  const fix = `"${CLI_PACKAGE}": ">=${DOCS_TREE_CLI}" in peerDependencies (optional in peerDependenciesMeta, if the CLI is not required)`;
97
94
  if (typeof range !== 'string') {
98
- return `The package ${feature} but declares no ${CLI_PACKAGE} peer. A stable CLI before ${DOCS_TREE_CLI} ${loss}. Declare ${fix}.`;
95
+ return `The package ${feature} but declares no ${CLI_PACKAGE} peer. A CLI older than ${DOCS_TREE_CLI} ${loss}. Declare ${fix}.`;
99
96
  }
100
97
  const lowest = lowestAdmitted(range);
101
98
  if (lowest == null || semverCompare(lowest, DOCS_TREE_CLI) < 0) {
102
- return `The package ${feature}, but its ${CLI_PACKAGE} peer range "${range}" admits a stable CLI before ${DOCS_TREE_CLI}, which ${loss}. Declare ${fix}.`;
99
+ return `The package ${feature}, but its ${CLI_PACKAGE} peer range "${range}" admits a CLI older than ${DOCS_TREE_CLI}, which ${loss}. Declare ${fix}.`;
103
100
  }
104
101
  return null;
105
102
  }
@@ -122,8 +119,8 @@ export function docsTreeCliProblem(pkg) {
122
119
  }
123
120
 
124
121
  /**
125
- * Why a package with a template that sets `replaces` would lose templates and
126
- * doc topics on an older CLI (spec:AST-035), or null when its declared CLI
122
+ * Why a package with a template that sets `replaces` would lose its templates
123
+ * and doc topics on an older CLI (spec:AST-035), or null when its declared CLI
127
124
  * range admits only CLIs that read the field.
128
125
  * @param {any} pkg package.json
129
126
  * @returns {string | null}
@@ -132,39 +129,7 @@ export function replacesCliProblem(pkg) {
132
129
  return cliRangeProblem(
133
130
  pkg,
134
131
  'has a template that sets `replaces`',
135
- "rejects the field, drops that template, and hides the package's doc topics",
136
- );
137
- }
138
-
139
- /**
140
- * Why a package with a doc section that sets `id` would lose its doc topics on
141
- * an older CLI, or null when its declared CLI range admits only CLIs that read
142
- * the field. Published 0.6.3 rejects a section `id` and hides every doc topic
143
- * the package ships.
144
- * @param {any} pkg package.json
145
- * @returns {string | null}
146
- */
147
- export function sectionIdsCliProblem(pkg) {
148
- return cliRangeProblem(
149
- pkg,
150
- 'has a doc section that sets `id`',
151
- 'rejects the field, and can hide every doc topic the package ships',
152
- );
153
- }
154
-
155
- /**
156
- * Why a package that ships a theme would lose its themes and doc topics on an
157
- * older CLI, or null when its declared CLI range admits only CLIs that read
158
- * typed theme descriptors. Published 0.6.3 rejects a themes root with no
159
- * `manifest.json` catalog, which `integration add theme` no longer writes.
160
- * @param {any} pkg package.json
161
- * @returns {string | null}
162
- */
163
- export function themesCliProblem(pkg) {
164
- return cliRangeProblem(
165
- pkg,
166
- 'ships a theme',
167
- "cannot read typed theme descriptors, and can drop the package's themes and hide its doc topics",
132
+ "rejects the field, and withholds the package's templates and doc topics",
168
133
  );
169
134
  }
170
135
 
@@ -32,11 +32,6 @@ describe('docsTreeCliProblem', () => {
32
32
  expect(docsTreeCliProblem({name: '@acme/kit'})).toContain(
33
33
  'declares no @astryxdesign/cli peer',
34
34
  );
35
- // Stable releases: a canary built from main before its release reports
36
- // the older version and reads every feature.
37
- expect(docsTreeCliProblem({name: '@acme/kit'})).toContain(
38
- 'A stable CLI before 0.7.0 does not read the docs tree',
39
- );
40
35
  });
41
36
 
42
37
  it.each(['^0.6.0', '^0.6.0 || >=0.7.0', '*', '>=0.6.3'])(
@@ -44,7 +39,7 @@ describe('docsTreeCliProblem', () => {
44
39
  range => {
45
40
  expect(
46
41
  docsTreeCliProblem({peerDependencies: {'@astryxdesign/cli': range}}),
47
- ).toContain('admits a stable CLI before');
42
+ ).toContain('admits a CLI older than');
48
43
  },
49
44
  );
50
45
 
@@ -81,7 +76,7 @@ describe('replacesCliProblem', () => {
81
76
  );
82
77
  expect(
83
78
  replacesCliProblem({peerDependencies: {'@astryxdesign/cli': '^0.6.0'}}),
84
- ).toContain('admits a stable CLI before');
79
+ ).toContain('admits a CLI older than');
85
80
  expect(
86
81
  replacesCliProblem({peerDependencies: {'@astryxdesign/cli': '>=0.7.0'}}),
87
82
  ).toBeNull();
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file Contribution inventory for `astryx integration verify`.
4
+ * @file Contribution inventory for integration pack-check.
5
5
  *
6
6
  * Enumerates the files and contribution identities an integration package
7
7
  * declares, for cross-referencing against the npm tarball. The file inventory
@@ -45,7 +45,7 @@ export function findManifestPaths(dir: string): string[];
45
45
  * @param {string} file absolute manifest path
46
46
  * @param {string} [label] used in error messages
47
47
  * @param {{fresh?: boolean}} [options]
48
- * @returns {Promise<{manifest: import('../../authoring/integration/type').AstryxIntegration, unknownKeys: string[], debug?: import('../../authoring/debug/type').DebugEventHandler, gapReport?: import('../../authoring/gap-report/type').GapReportHandler, gapReportError?: string, discover?: import('../../authoring/discover/type').DiscoverSource, discoverError?: string, agentDocsError?: string}>}
48
+ * @returns {Promise<{manifest: import('../../authoring/integration/type').AstryxIntegration, unknownKeys: string[], debug?: import('../../authoring/debug/type').DebugEventHandler, gapReport?: import('../../authoring/gap-report/type').GapReportHandler, gapReportError?: string, agentDocsError?: string}>}
49
49
  */
50
50
  export function loadManifest(file: string, label?: string, { fresh }?: {
51
51
  fresh?: boolean;
@@ -55,8 +55,6 @@ export function loadManifest(file: string, label?: string, { fresh }?: {
55
55
  debug?: import("../../authoring/debug/type").DebugEventHandler;
56
56
  gapReport?: import("../../authoring/gap-report/type").GapReportHandler;
57
57
  gapReportError?: string;
58
- discover?: import("../../authoring/discover/type").DiscoverSource;
59
- discoverError?: string;
60
58
  agentDocsError?: string;
61
59
  }>;
62
60
  /**
@@ -156,9 +154,6 @@ export function loadIntegrations(specs?: string[], { cwd, fresh, resolveProvider
156
154
  * validated package-owned handler from the `gapReport` NAMED export.
157
155
  * @property {string} [__gapReportError] isolated named-handler validation error.
158
156
  * Named exports are not manifest keys — see {@link loadManifest}.
159
- * @property {import('../../authoring/discover/type').DiscoverSource} [__discover]
160
- * validated catalog source from the `discover` NAMED export.
161
- * @property {string} [__discoverError] isolated discover-source validation error.
162
157
  */
163
158
  /** Conventional manifest basenames, in load-precedence order. */
164
159
  export const MANIFEST_BASENAMES: string[];
@@ -250,12 +245,4 @@ export type LoadedIntegration = {
250
245
  * Named exports are not manifest keys — see {@link loadManifest}.
251
246
  */
252
247
  __gapReportError?: string | undefined;
253
- /**
254
- * validated catalog source from the `discover` NAMED export.
255
- */
256
- __discover?: import("../../authoring/discover/type").DiscoverSource | undefined;
257
- /**
258
- * isolated discover-source validation error.
259
- */
260
- __discoverError?: string | undefined;
261
248
  };
@@ -29,7 +29,6 @@ import {
29
29
  } from '../../authoring/integration/schema.mjs';
30
30
  import {importUserModule, findPresentFiles} from '../fs/module-loader.mjs';
31
31
  import {parseGapReportHandler} from '../../authoring/gap-report/parse.mjs';
32
- import {parseDiscoverSource} from '../../authoring/discover/parse.mjs';
33
32
  import {resolveProviders} from './provider-resolution.mjs';
34
33
 
35
34
  /**
@@ -81,9 +80,6 @@ import {resolveProviders} from './provider-resolution.mjs';
81
80
  * validated package-owned handler from the `gapReport` NAMED export.
82
81
  * @property {string} [__gapReportError] isolated named-handler validation error.
83
82
  * Named exports are not manifest keys — see {@link loadManifest}.
84
- * @property {import('../../authoring/discover/type').DiscoverSource} [__discover]
85
- * validated catalog source from the `discover` NAMED export.
86
- * @property {string} [__discoverError] isolated discover-source validation error.
87
83
  */
88
84
 
89
85
  /** Conventional manifest basenames, in load-precedence order. */
@@ -171,23 +167,6 @@ function parseGapReportHandlerExport(value, label) {
171
167
  }
172
168
  }
173
169
 
174
- /**
175
- * Parse the optional named discover source the same way: a malformed one is
176
- * isolated from every other contribution and reported by `astryx discover`.
177
- *
178
- * @param {unknown} value
179
- * @param {string} label
180
- * @returns {{source?: import('../../authoring/discover/type').DiscoverSource, error?: string}}
181
- */
182
- function parseDiscoverSourceExport(value, label) {
183
- if (value === undefined) return {};
184
- try {
185
- return {source: parseDiscoverSource(value, `${label} named export "discover"`)};
186
- } catch (error) {
187
- return {error: error instanceof Error ? error.message : String(error)};
188
- }
189
- }
190
-
191
170
  /**
192
171
  * Load and validate a manifest module's default export, while isolating the
193
172
  * optional `agentDocs` contribution from the manifest's other fields.
@@ -204,7 +183,7 @@ function parseDiscoverSourceExport(value, label) {
204
183
  * @param {string} file absolute manifest path
205
184
  * @param {string} [label] used in error messages
206
185
  * @param {{fresh?: boolean}} [options]
207
- * @returns {Promise<{manifest: import('../../authoring/integration/type').AstryxIntegration, unknownKeys: string[], debug?: import('../../authoring/debug/type').DebugEventHandler, gapReport?: import('../../authoring/gap-report/type').GapReportHandler, gapReportError?: string, discover?: import('../../authoring/discover/type').DiscoverSource, discoverError?: string, agentDocsError?: string}>}
186
+ * @returns {Promise<{manifest: import('../../authoring/integration/type').AstryxIntegration, unknownKeys: string[], debug?: import('../../authoring/debug/type').DebugEventHandler, gapReport?: import('../../authoring/gap-report/type').GapReportHandler, gapReportError?: string, agentDocsError?: string}>}
208
187
  */
209
188
  export async function loadManifest(
210
189
  file,
@@ -215,7 +194,6 @@ export async function loadManifest(
215
194
  const raw = mod?.default;
216
195
  const baseManifest = parseIntegrationBase(raw, label);
217
196
  const gapReport = parseGapReportHandlerExport(mod?.gapReport, label);
218
- const discover = parseDiscoverSourceExport(mod?.discover, label);
219
197
  const hasAgentDocs =
220
198
  raw != null &&
221
199
  typeof raw === 'object' &&
@@ -250,8 +228,6 @@ export async function loadManifest(
250
228
  : undefined,
251
229
  gapReport: gapReport.handler,
252
230
  gapReportError: gapReport.error,
253
- discover: discover.source,
254
- discoverError: discover.error,
255
231
  agentDocsError,
256
232
  };
257
233
  }
@@ -369,10 +345,6 @@ export async function loadLocalIntegration(packageDir, {fresh = false} = {}) {
369
345
  let gapReportHandler;
370
346
  /** @type {string | undefined} */
371
347
  let gapReportError;
372
- /** @type {import('../../authoring/discover/type').DiscoverSource | undefined} */
373
- let discoverSource;
374
- /** @type {string | undefined} */
375
- let discoverError;
376
348
  /** @type {string | undefined} */
377
349
  let agentDocsError;
378
350
  try {
@@ -382,8 +354,6 @@ export async function loadLocalIntegration(packageDir, {fresh = false} = {}) {
382
354
  debug: debugHandler,
383
355
  gapReport: gapReportHandler,
384
356
  gapReportError,
385
- discover: discoverSource,
386
- discoverError,
387
357
  agentDocsError,
388
358
  } = await loadManifest(manifestFile, `Integration ${spec}`, {fresh}));
389
359
  } catch (err) {
@@ -427,8 +397,6 @@ export async function loadLocalIntegration(packageDir, {fresh = false} = {}) {
427
397
  __debug: debugHandler,
428
398
  __gapReport: gapReportHandler,
429
399
  __gapReportError: gapReportError,
430
- __discover: discoverSource,
431
- __discoverError: discoverError,
432
400
  __spec: spec,
433
401
  __packageDir: packageDir,
434
402
  __packageExports: pkg.exports ?? null,
@@ -480,10 +448,6 @@ export async function loadIntegrations(
480
448
  let gapReportHandler;
481
449
  /** @type {string | undefined} */
482
450
  let gapReportError;
483
- /** @type {import('../../authoring/discover/type').DiscoverSource | undefined} */
484
- let discoverSource;
485
- /** @type {string | undefined} */
486
- let discoverError;
487
451
  /** @type {string | undefined} */
488
452
  let agentDocsError;
489
453
  try {
@@ -493,8 +457,6 @@ export async function loadIntegrations(
493
457
  debug: debugHandler,
494
458
  gapReport: gapReportHandler,
495
459
  gapReportError,
496
- discover: discoverSource,
497
- discoverError,
498
460
  agentDocsError,
499
461
  } = await loadManifest(manifestFile, `Integration ${spec}`, {fresh}));
500
462
  } catch (err) {
@@ -545,8 +507,6 @@ export async function loadIntegrations(
545
507
  __debug: debugHandler,
546
508
  __gapReport: gapReportHandler,
547
509
  __gapReportError: gapReportError,
548
- __discover: discoverSource,
549
- __discoverError: discoverError,
550
510
  __spec: spec,
551
511
  __packageDir: packageDir,
552
512
  __packageExports: pkg.exports ?? null,
@@ -785,34 +785,3 @@ describe('the `gapReport` named export', () => {
785
785
  expect(loaded.__unknownKeys).toEqual(['gapReport']);
786
786
  });
787
787
  });
788
-
789
- describe('the `discover` named export', () => {
790
- it('is carried out of the manifest module as __discover', async () => {
791
- writeManifestPackage(tmpDir, {
792
- body:
793
- `export async function discover() { return {schemaVersion: 1}; }\n` +
794
- `export default {issuesUrl: 'https://example.com/i'};\n`,
795
- });
796
-
797
- const [loaded] = await loadIntegrations(['@acme/widgets'], {cwd: tmpDir});
798
-
799
- expect(typeof loaded.__discover).toBe('function');
800
- expect(loaded.__discoverError).toBeUndefined();
801
- expect(loaded.__unknownKeys).toEqual([]);
802
- expect(loaded.issuesUrl).toBe('https://example.com/i');
803
- });
804
-
805
- it('keeps the manifest and records why when the export is not a function', async () => {
806
- writeManifestPackage(tmpDir, {
807
- body:
808
- `export const discover = {url: 'https://example.com/catalog.json'};\n` +
809
- `export default {issuesUrl: 'https://example.com/i'};\n`,
810
- });
811
-
812
- const [loaded] = await loadIntegrations(['@acme/widgets'], {cwd: tmpDir});
813
-
814
- expect(loaded.__discover).toBeUndefined();
815
- expect(loaded.__discoverError).toContain('must be a function');
816
- expect(loaded.issuesUrl).toBe('https://example.com/i');
817
- });
818
- });
@@ -36,16 +36,17 @@ export const doc = {
36
36
  {
37
37
  value: 'ERR_INVALID_OPTION',
38
38
  description:
39
- 'An unknown option was passed, --json was given to a command without JSON output, or layout --form got a value other than compact, outline, or auto.',
39
+ 'An unknown flag/option was passed (Commander `unknownOption`).',
40
40
  },
41
41
  {
42
42
  value: 'ERR_INVALID_ARGUMENT',
43
43
  description:
44
- 'An argument or option value is invalid: wrong type, out of range, an unknown choice, an extra argument, or a conflicting combination.',
44
+ "An option/argument had a value Commander's parser rejected.",
45
45
  },
46
46
  {
47
47
  value: 'ERR_MISSING_ARGUMENT',
48
- description: 'A required argument or option value was omitted.',
48
+ description:
49
+ 'A required positional argument was omitted (Commander `missingArgument`).',
49
50
  },
50
51
  {
51
52
  value: 'ERR_INVALID_LANG',
@@ -133,11 +134,12 @@ export const doc = {
133
134
  },
134
135
  {
135
136
  value: 'ERR_UNKNOWN_PACKAGE',
136
- description: 'No package matched the requested name.',
137
+ description: 'No package matched the requested name (discover).',
137
138
  },
138
139
  {
139
140
  value: 'ERR_UNKNOWN_AGENT',
140
- description: 'An unrecognized `--agent` value was passed to init.',
141
+ description:
142
+ 'An unrecognized `--agent` value was passed to agent-docs/init.',
141
143
  },
142
144
  {
143
145
  value: 'ERR_UNKNOWN_FEATURE',
@@ -270,7 +272,7 @@ export const doc = {
270
272
  {
271
273
  value: 'ERR_UNCLASSIFIED_EXIT',
272
274
  description:
273
- 'Recorded in the debug log, never printed: a command exited non-zero without reporting an error code.',
275
+ 'Recorded in the debug log, never printed: a command exited non-zero without going through cliError/jsonError, so no stable code was available.',
274
276
  },
275
277
  {
276
278
  value: 'ERR_SIGNAL_TERMINATED',
@@ -195,15 +195,8 @@ describe('error codes: end-to-end JSON envelopes', () => {
195
195
  // is rejected at the preAction gate with a stable invalid-option code.
196
196
  {
197
197
  name: 'json not supported',
198
- args: ['theme', '--json'],
199
- code: 'ERR_INVALID_OPTION',
200
- },
201
- // A group given a word it does not have names the unknown subcommand,
202
- // in JSON as in text.
203
- {
204
- name: 'unknown subcommand of a group',
205
198
  args: ['theme', 'bogus-sub', '--json'],
206
- code: 'ERR_UNKNOWN_SUBCOMMAND',
199
+ code: 'ERR_INVALID_OPTION',
207
200
  },
208
201
  ];
209
202
 
@@ -256,31 +249,13 @@ describe('error codes: human mode stays clean', () => {
256
249
  expect(stdout).not.toContain('ERR_UNKNOWN_COMPONENT');
257
250
  });
258
251
 
259
- it('unknown subcommand exits 1, with the code in JSON and not in text', async () => {
260
- // A group that is not JSON-capable itself still answers an unknown
261
- // subcommand in JSON, so a JSON caller learns the subcommands it has.
252
+ it('unknown subcommand exits 1 in human mode (code carried internally)', async () => {
253
+ // `theme` is not JSON-capable, so this path is human-only; we assert the
254
+ // failure surfaces with exit 1 and a helpful message. The stable
255
+ // ERR_UNKNOWN_SUBCOMMAND code rides along on the cliError call.
262
256
  const {status, stderr} = await runCli(['theme', 'bogus-sub']);
263
257
  expect(status).toBe(1);
264
258
  expect(stderr).toContain("unknown subcommand 'theme bogus-sub'");
265
259
  expect(stderr).not.toContain('ERR_UNKNOWN_SUBCOMMAND');
266
- for (const args of [
267
- ['--json', 'theme', 'bogus-sub'],
268
- ['theme', 'bogus-sub', '--json'],
269
- ['--json', 'doctor', 'integration', 'bogus-sub'],
270
- ]) {
271
- const json = await runCli(args);
272
- expect(json.status, args.join(' ')).toBe(1);
273
- expect(JSON.parse(json.stdout), args.join(' ')).toMatchObject({
274
- code: 'ERR_UNKNOWN_SUBCOMMAND',
275
- suggestions: expect.arrayContaining([expect.objectContaining({reason: 'available subcommand'})]),
276
- });
277
- }
278
- // Text and JSON agree for a group that shows help when run bare.
279
- const text = await runCli(['doctor', 'integration', 'bogus-sub']);
280
- expect(text.status).toBe(1);
281
- expect(text.stderr).toContain("unknown subcommand 'doctor integration bogus-sub'");
282
- const doctor = await runCli(['doctor', 'integrations']);
283
- expect(doctor.status).toBe(1);
284
- expect(doctor.stderr).toContain("unknown subcommand 'doctor integrations'");
285
260
  });
286
261
  });
@@ -4,10 +4,9 @@
4
4
  /**
5
5
  * @file EnumDoc for the `type` discriminant carried on every --json success
6
6
  * envelope. The vocabulary mirrors the RESPONSE_TYPES map (each command's
7
- * `jsonOut(...)` call sites) plus ROOT_RESPONSE_TYPES (help, version) in
8
- * `clients/cli/lib/manifest.mjs`; a consumer switches on `type` to narrow the
9
- * `data` payload. Descriptions follow the currently published response
10
- * projection, not a future package-version boundary.
7
+ * `jsonOut(...)` call sites) in `clients/cli/lib/manifest.mjs`; a consumer
8
+ * switches on `type` to narrow the `data` payload. Descriptions follow the
9
+ * currently published response projection, not a future package-version boundary.
11
10
  *
12
11
  * @input Public response discriminants and their currently released payloads.
13
12
  * @output Generated consumer reference for every typed JSON success response.
@@ -3,10 +3,9 @@
3
3
  /**
4
4
  * @file EnumDoc for the `type` discriminant carried on every --json success
5
5
  * envelope. The vocabulary mirrors the RESPONSE_TYPES map (each command's
6
- * `jsonOut(...)` call sites) plus ROOT_RESPONSE_TYPES (help, version) in
7
- * `clients/cli/lib/manifest.mjs`; a consumer switches on `type` to narrow the
8
- * `data` payload. Descriptions follow the currently published response
9
- * projection, not a future package-version boundary.
6
+ * `jsonOut(...)` call sites) in `clients/cli/lib/manifest.mjs`; a consumer
7
+ * switches on `type` to narrow the `data` payload. Descriptions follow the
8
+ * currently published response projection, not a future package-version boundary.
10
9
  *
11
10
  * @input Public response discriminants and their currently released payloads.
12
11
  * @output Generated consumer reference for every typed JSON success response.
@@ -36,12 +35,7 @@ export const doc = {
36
35
  {
37
36
  value: 'component.list',
38
37
  description:
39
- "The component catalog grouped by component group (each component's group field): `detail` (the level: names | compact | full) and `components`, the grouped map of names entries ({name, package, and optional canonical import for integrations}), brief entries, or a full ComponentDoc per entry.",
40
- },
41
- {
42
- value: 'component.batch',
43
- description:
44
- 'The component specialization of the shared `BatchResponse` and `BatchRow` types. An explicit programmatic selector array, or two or more CLI selectors, returns one ordered receipt: `count` plus `results`, one row per selector including duplicates. Every row carries `selector` and `status` (found | not_found | ambiguous | error). A found row carries `result`, the same {type, data} response as one selector. An ambiguous row carries `code`, `error`, and `candidates` ({package, component, kind, installed}). Other failed rows carry `code`, `error`, and optional `suggestions` ({name, reason}).',
38
+ 'The component catalog grouped by category: `detail` (the level: names | compact | full) and `components`, the grouped map of names entries ({name, package, and optional canonical import for integrations}), brief entries, or a full ComponentDoc per entry.',
45
39
  },
46
40
  {
47
41
  value: 'component.detail',
@@ -110,27 +104,21 @@ export const doc = {
110
104
  {
111
105
  value: 'discover.list',
112
106
  description:
113
- 'The integrations the project loads (name, category, components, version, a list per other kind they add, and latest when a source knows it); with a discover source, meta.available lists what the project could add and meta.sources reports each source; when empty it carries meta.configured to tell "nothing configured" from "nothing discovered".',
107
+ 'The configured external packages (name, category, components, version, description); when empty it carries meta.configured to tell "nothing configured" from "nothing discovered".',
114
108
  },
115
109
  {
116
110
  value: 'discover.detail',
117
- description:
118
- 'One package, for an @scope/name or @scope/name@version query: what the shown version adds, whether the project has it, and, when a source knows the package, its versions, latest release, and the command that adds it.',
111
+ description: 'A single external package entry, for an @scope/name query.',
119
112
  },
120
113
  {
121
114
  value: 'discover.detail.doc',
122
115
  description:
123
- 'The validated ComponentDoc for one installed component, for an @scope/name/Component query.',
124
- },
125
- {
126
- value: 'discover.item',
127
- description:
128
- 'One item that is not an installed component, for an @scope/name/<item> query: its kind, name, package, version, and whether the project has the package.',
116
+ 'The validated ComponentDoc for one external component: an @scope/name/Component query, or a free-text term resolving to exactly one component.',
129
117
  },
130
118
  {
131
119
  value: 'discover.search',
132
120
  description:
133
- 'The echoed query plus every matching item and package across all packages, each with its kind and whether the project has it, even when only one matches; total is set when --limit cut the list.',
121
+ 'The echoed query plus the matching {package, component} pairs, when a free-text term matches several components.',
134
122
  },
135
123
 
136
124
  // search
@@ -161,7 +149,7 @@ export const doc = {
161
149
  {
162
150
  value: 'swizzle.copy',
163
151
  description:
164
- 'An eject receipt: component name, owning package, output directory, files-copied count, the written file names, whether any file uses StyleX, and, when the owner has an issues URL, feedback ({issuesUrl, ghCommand?}): where to report the gap that led to swizzling.',
152
+ 'An eject receipt: component name, owning package, output directory, files-copied count, the written file names, whether any file uses StyleX, and an optional maintainer note.',
165
153
  },
166
154
 
167
155
  // gap reports
@@ -263,11 +251,6 @@ export const doc = {
263
251
  description:
264
252
  'Every available codemod, oldest→newest, as {name, title, version, optional}; returned for --list without running anything.',
265
253
  },
266
- {
267
- value: 'upgrade.registry',
268
- description:
269
- 'The copied-composition receipt for --registry: applied, ok, the counts (found, current, wouldUpdate, updated, wouldMerge, merged, wouldRefreshReceipt, receiptsRefreshed, conflicts, missing, invalid, failed), and items.',
270
- },
271
254
  {
272
255
  value: 'upgrade.status',
273
256
  description:
@@ -286,24 +269,11 @@ export const doc = {
286
269
  'The CLI capability manifest: name, version, apiVersion, description, globalOptions, commands (each name, description, arguments, options, json, aliases?, responseTypes?, examples?, exitCodes? as [{code, when}], subcommands?), jsonSupported, and the flat responseTypes index.',
287
270
  },
288
271
 
289
- // help and version, which no single command owns
290
- {
291
- value: 'help',
292
- description:
293
- 'Help, in one of two shapes. A bare `astryx --json` returns the root manifest: name, version, commands (the command names), jsonSupported, and manifest (the full payload `astryx manifest --json` returns). ' +
294
- "`--help --json` on any command, or `astryx help [command] --json`, returns that command's help: command, description, usage, options (each flags, description, and defaultValue and choices when set), and subcommands (each name and description). " +
295
- 'data.manifest marks the first shape; data.usage marks the second.',
296
- },
297
- {
298
- value: 'version',
299
- description: 'The CLI version, for `astryx --version --json`: {version}.',
300
- },
301
-
302
272
  // doctor
303
273
  {
304
274
  value: 'doctor',
305
275
  description:
306
- 'The health-check report: `checks` (each with id, label, status: pass | warn | fail | info, a message, and an optional fix, always present on warn and fail) plus a `summary` of counts per status.',
276
+ 'The health-check report: `checks` (each with id, label, status: pass | warn | fail | info, a message, and a fix when not passing) plus a `summary` of counts per status.',
307
277
  },
308
278
 
309
279
  // integration authoring
@@ -337,5 +307,22 @@ export const doc = {
337
307
  description:
338
308
  'The integration identity, structural issues, and Core doc overlaps. Each finding includes `severity` (`info` | `error`) and `relationship` (`replaces` | `extends` | `accidental`).',
339
309
  },
310
+
311
+ // layout (XLE/XLO)
312
+ {
313
+ value: 'layout.expand',
314
+ description:
315
+ 'The expansion: parsed form, generated TSX code, componentsUsed, states (count of useState hooks scaffolded), todos, blocksReferenced (each {name, mode}), warnings, and written (the output path, or null when nothing was written).',
316
+ },
317
+ {
318
+ value: 'layout.check',
319
+ description:
320
+ 'The validation result: a valid flag, the detected form, errors (each with line/col, message, formatted text, and suggestions), warnings, and the expression re-printed in both canonical surfaces (compact and outline).',
321
+ },
322
+ {
323
+ value: 'layout.grammar',
324
+ description:
325
+ "The XLE/XLO grammar cheatsheet: a text field with the full reference plus an aliases map (short name → canonical component) generated from this install's registry.",
326
+ },
340
327
  ],
341
328
  };
@@ -53,29 +53,6 @@ function expectNamed(type, fields) {
53
53
  }
54
54
 
55
55
  describe('response-types EnumDoc names every field', () => {
56
- it('component.batch names every row field and state', async () => {
57
- const res = await data(['component', 'Button', 'Badge']);
58
- expect(res.type).toBe('component.batch');
59
- expect(describedAs('component.batch')).toMatch(/BatchResponse.*BatchRow/);
60
- expectNamed('component.batch', [
61
- 'count',
62
- 'results',
63
- 'selector',
64
- 'status',
65
- 'result',
66
- 'code',
67
- 'error',
68
- 'candidates',
69
- 'package',
70
- 'component',
71
- 'kind',
72
- 'installed',
73
- 'suggestions',
74
- 'name',
75
- 'reason',
76
- ]);
77
- });
78
-
79
56
  it('component.detail: the ownership fields and parentDoc', async () => {
80
57
  const res = await data(['component', 'HStack']);
81
58
  expect(res.type).toBe('component.detail');