@astryxdesign/cli 0.7.2-canary.55d8dff → 0.7.2-canary.577a62e

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 (404) hide show
  1. package/README.md +163 -143
  2. package/api/build/_adapter.d.mts +8 -0
  3. package/api/build/_adapter.mjs +12 -1
  4. package/api/build/build.doc.mjs +4 -0
  5. package/api/build/kit/kit.mjs +3 -11
  6. package/api/component/_adapter.d.mts +31 -0
  7. package/api/component/_adapter.mjs +119 -11
  8. package/api/component/component.doc.mjs +6 -1
  9. package/api/component/component.mjs +60 -10
  10. package/api/component/doc-links.test.mjs +386 -0
  11. package/api/discover/_adapter.d.mts +132 -12
  12. package/api/discover/_adapter.mjs +488 -27
  13. package/api/discover/_adapter.test.mjs +599 -17
  14. package/api/discover/_catalog-view.d.mts +16 -5
  15. package/api/discover/_catalog-view.mjs +32 -8
  16. package/api/discover/detail/doc/doc.mjs +9 -1
  17. package/api/discover/discover.d.mts +11 -0
  18. package/api/discover/discover.doc.mjs +9 -7
  19. package/api/discover/discover.mjs +121 -19
  20. package/api/discover/discover.type.d.mts +20 -7
  21. package/api/discover/discover.type.mjs +17 -7
  22. package/api/discover/list/list.d.mts +4 -3
  23. package/api/discover/list/list.mjs +17 -10
  24. package/api/docs/_adapter.d.mts +63 -0
  25. package/api/docs/_adapter.mjs +312 -18
  26. package/api/docs/docs.doc.mjs +2 -1
  27. package/api/docs/docs.mjs +2 -1
  28. package/api/docs/docs.test.mjs +5 -2
  29. package/api/docs/integration-tree.test.mjs +22 -0
  30. package/api/docs/list/list.mjs +12 -2
  31. package/api/docs/reference-blocks.test.mjs +1 -3
  32. package/api/doctor/_adapter.d.mts +108 -0
  33. package/api/doctor/_adapter.mjs +223 -4
  34. package/api/doctor/doctor.d.mts +199 -0
  35. package/api/doctor/doctor.doc.mjs +3 -2
  36. package/api/doctor/doctor.mjs +503 -31
  37. package/api/doctor/doctor.test.mjs +137 -14
  38. package/api/doctor/release-checks.test.mjs +156 -0
  39. package/api/doctor/theme-checks.mjs +16 -3
  40. package/api/doctor/theme-checks.test.mjs +223 -7
  41. package/api/error.d.mts +10 -0
  42. package/api/error.mjs +25 -0
  43. package/api/gap-report/gap-report.d.mts +3 -0
  44. package/api/gap-report/gap-report.doc.mjs +11 -3
  45. package/api/gap-report/gap-report.mjs +152 -48
  46. package/api/gap-report/gap-report.test.mjs +233 -0
  47. package/api/gap-report/gap-report.type.d.mts +41 -0
  48. package/api/gap-report/gap-report.type.mjs +18 -0
  49. package/api/hook/_adapter.mjs +3 -11
  50. package/api/hook/hook.doc.mjs +4 -0
  51. package/api/hook/list/list.d.mts +1 -1
  52. package/api/init/_adapter.d.mts +22 -0
  53. package/api/init/_adapter.mjs +59 -0
  54. package/api/init/init.d.mts +7 -5
  55. package/api/init/init.doc.mjs +28 -7
  56. package/api/init/init.mjs +28 -4
  57. package/api/init/init.type.d.mts +48 -3
  58. package/api/init/init.type.mjs +37 -3
  59. package/api/init/run/run.d.mts +1 -1
  60. package/api/init/run/run.mjs +15 -4
  61. package/api/init/user/user.d.mts +14 -0
  62. package/api/init/user/user.mjs +87 -0
  63. package/api/init/user/user.test.mjs +232 -0
  64. package/api/integration/_adapter.d.mts +33 -0
  65. package/api/integration/_adapter.mjs +58 -0
  66. package/api/integration/authoring-checks.mjs +100 -5
  67. package/api/integration/authoring-checks.test.mjs +769 -0
  68. package/api/integration/authoring-checks.type.d.mts +134 -0
  69. package/api/integration/authoring-checks.type.mjs +60 -1
  70. package/api/integration/integrationCheck.doc.mjs +1 -1
  71. package/api/integration/integrationComponentConflicts.doc.mjs +3 -1
  72. package/api/integration/integrationDocConflicts.doc.mjs +22 -5
  73. package/api/integration/pack-check.mjs +303 -13
  74. package/api/integration/pack-check.test.mjs +371 -10
  75. package/api/integration/validate-integration-fixes.test.mjs +67 -0
  76. package/api/integration/validate-integration.d.mts +8 -0
  77. package/api/integration/validate-integration.mjs +55 -9
  78. package/api/integration/validate-integration.test.mjs +77 -8
  79. package/api/integration/validate-integration.type.d.mts +8 -0
  80. package/api/integration/validate-integration.type.mjs +3 -1
  81. package/api/integration/validate-unread-theme-folders.test.mjs +3 -2
  82. package/api/integration/validateIntegration.doc.mjs +1 -1
  83. package/api/search/_adapter.d.mts +11 -0
  84. package/api/search/_adapter.mjs +25 -0
  85. package/api/search/search.d.mts +10 -8
  86. package/api/search/search.doc.mjs +8 -3
  87. package/api/search/search.mjs +130 -57
  88. package/api/search/search.test.mjs +15 -1
  89. package/api/search/search.type.d.mts +14 -1
  90. package/api/search/search.type.mjs +6 -1
  91. package/api/swizzle/_adapter.mjs +2 -2
  92. package/api/swizzle/copy/copy.mjs +1 -1
  93. package/api/template/template-integration.test.mjs +1 -1
  94. package/api/theme/_adapter.d.mts +16 -0
  95. package/api/theme/_adapter.mjs +32 -5
  96. package/api/theme/build/build.d.mts +2 -1
  97. package/api/theme/build/build.mjs +70 -14
  98. package/api/theme/build/build.packed-old-core.test.mjs +20 -3
  99. package/api/theme/build/font-warning.mjs +5 -3
  100. package/api/theme/build/font-warning.test.mjs +2 -1
  101. package/api/theme/remove/remove.test.mjs +2 -2
  102. package/api/theme/targets/targets.mjs +3 -10
  103. package/api/theme/themeTargets.doc.mjs +4 -0
  104. package/api/theme/use/use.test.mjs +1 -1
  105. package/api/upgrade/_adapter.d.mts +40 -2
  106. package/api/upgrade/_adapter.mjs +118 -5
  107. package/api/upgrade/run/cli-behind-core.test.mjs +438 -0
  108. package/api/upgrade/run/run.mjs +35 -2
  109. package/api/upgrade/status/status.d.mts +21 -5
  110. package/api/upgrade/status/status.mjs +45 -8
  111. package/api/upgrade/upgrade.doc.mjs +6 -3
  112. package/api/upgrade/upgrade.mjs +5 -1
  113. package/api/upgrade/upgrade.type.d.mts +23 -0
  114. package/api/upgrade/upgrade.type.mjs +16 -1
  115. package/assets/codemods/runner.mjs +7 -1
  116. package/assets/discover/official-packages.json +367 -0
  117. package/assets/docs/author-a-theme.doc.mjs +2 -2
  118. package/assets/docs/browser-support.doc.mjs +1 -1
  119. package/assets/docs/getting-started.doc.mjs +23 -3
  120. package/assets/docs/styling-overview.doc.mjs +1 -1
  121. package/assets/docs/theme.doc.mjs +1 -1
  122. package/assets/docs/tree/add-a-component.doc.mjs +11 -1
  123. package/assets/docs/tree/add-a-theme.doc.mjs +12 -2
  124. package/assets/docs/tree/add-a-topic.doc.mjs +46 -4
  125. package/assets/docs/tree/agent-guidance.doc.mjs +18 -4
  126. package/assets/docs/tree/building-blocks.doc.mjs +4 -0
  127. package/assets/docs/tree/check-the-props.doc.mjs +8 -3
  128. package/assets/docs/tree/check-your-docs.doc.mjs +20 -8
  129. package/assets/docs/tree/checks.doc.mjs +14 -14
  130. package/assets/docs/tree/ci-and-containers.doc.mjs +88 -0
  131. package/assets/docs/tree/cli-command.doc.mjs +142 -0
  132. package/assets/docs/tree/cli.doc.mjs +6 -0
  133. package/assets/docs/tree/codemods.doc.mjs +13 -3
  134. package/assets/docs/tree/commands.doc.mjs +7 -1
  135. package/assets/docs/tree/component-imports.doc.mjs +11 -1
  136. package/assets/docs/tree/components.doc.mjs +6 -0
  137. package/assets/docs/tree/computer-agent-guide.doc.mjs +160 -0
  138. package/assets/docs/tree/computer-integrations.doc.mjs +93 -0
  139. package/assets/docs/tree/configuration.doc.mjs +7 -3
  140. package/assets/docs/tree/debug-and-gap-reports.doc.mjs +36 -6
  141. package/assets/docs/tree/define-the-theme.doc.mjs +1 -1
  142. package/assets/docs/tree/describe-the-component.doc.mjs +1 -1
  143. package/assets/docs/tree/docs.doc.mjs +6 -0
  144. package/assets/docs/tree/document-the-theme.doc.mjs +2 -2
  145. package/assets/docs/tree/extend-or-replace.doc.mjs +13 -3
  146. package/assets/docs/tree/generate-a-palette.doc.mjs +2 -2
  147. package/assets/docs/tree/global-integrations.doc.mjs +124 -0
  148. package/assets/docs/tree/global.doc.mjs +131 -0
  149. package/assets/docs/tree/grade-template-with-agent.doc.mjs +4 -4
  150. package/assets/docs/tree/install-once.doc.mjs +105 -0
  151. package/assets/docs/tree/integrations.doc.mjs +5 -1
  152. package/assets/docs/tree/layout-spacing.doc.mjs +2 -3
  153. package/assets/docs/tree/layout.doc.mjs +6 -6
  154. package/assets/docs/tree/links.doc.mjs +1 -1
  155. package/assets/docs/tree/migration-setup.doc.mjs +2 -2
  156. package/assets/docs/tree/monorepos.doc.mjs +84 -0
  157. package/assets/docs/tree/problems.doc.mjs +205 -0
  158. package/assets/docs/tree/project-global-or-both.doc.mjs +131 -0
  159. package/assets/docs/tree/publishing.doc.mjs +5 -5
  160. package/assets/docs/tree/quick-start.doc.mjs +17 -7
  161. package/assets/docs/tree/reference.doc.mjs +192 -0
  162. package/assets/docs/tree/replace-a-core-component.doc.mjs +11 -1
  163. package/assets/docs/tree/replace-a-core-template.doc.mjs +4 -4
  164. package/assets/docs/tree/scaffold.doc.mjs +1 -1
  165. package/assets/docs/tree/sections-and-placement.doc.mjs +5 -5
  166. package/assets/docs/tree/see-it-in-an-app.doc.mjs +13 -3
  167. package/assets/docs/tree/short-and-findable.doc.mjs +3 -3
  168. package/assets/docs/tree/single-component.doc.mjs +3 -3
  169. package/assets/docs/tree/start-a-template.doc.mjs +15 -5
  170. package/assets/docs/tree/template-doc-overview.doc.mjs +2 -2
  171. package/assets/docs/tree/templates.doc.mjs +6 -0
  172. package/assets/docs/tree/test-in-an-app.doc.mjs +4 -4
  173. package/assets/docs/tree/test-template-in-app.doc.mjs +4 -4
  174. package/assets/docs/tree/themes.doc.mjs +4 -0
  175. package/assets/docs/tree/troubleshooting.doc.mjs +19 -11
  176. package/assets/docs/tree/uninstall.doc.mjs +109 -0
  177. package/assets/docs/tree/updates.doc.mjs +92 -0
  178. package/assets/docs/tree/upgrading.doc.mjs +3 -3
  179. package/assets/docs/tree/use-a-theme-in-an-app.doc.mjs +11 -1
  180. package/assets/docs/tree/verify-packed-template.doc.mjs +2 -2
  181. package/assets/docs/tree/versioning.doc.mjs +3 -3
  182. package/assets/docs/tree/who-answers.doc.mjs +119 -0
  183. package/assets/docs/tree/write-the-template-file.doc.mjs +3 -3
  184. package/assets/docs/working-with-ai.doc.mjs +23 -9
  185. package/authoring/debug/parse.d.mts +5 -5
  186. package/authoring/discover/discover.doc.mjs +7 -1
  187. package/authoring/doctypes/_schema.d.mts +8 -3
  188. package/authoring/doctypes/_schema.mjs +1 -0
  189. package/authoring/doctypes/command/command.doc.mjs +6 -0
  190. package/authoring/doctypes/command/type.ts +14 -0
  191. package/authoring/doctypes/component/component.doc.mjs +1 -1
  192. package/authoring/doctypes/component/type.ts +8 -0
  193. package/authoring/doctypes/hook/type.ts +4 -0
  194. package/authoring/doctypes/reference/reference.doc.mjs +1 -1
  195. package/authoring/index.d.ts +1 -0
  196. package/authoring/integration/integration.doc.mjs +18 -2
  197. package/authoring/integration/parse.test.mjs +11 -0
  198. package/authoring/integration/schema.d.mts +14 -3
  199. package/authoring/integration/schema.mjs +33 -2
  200. package/authoring/integration/type.ts +8 -0
  201. package/clients/cli/bin/astryx.mjs +20 -3
  202. package/clients/cli/cli-command.test.mjs +166 -0
  203. package/clients/cli/commands/blog.doc.mjs +1 -0
  204. package/clients/cli/commands/build-theme.batch-report.test.mjs +14 -2
  205. package/clients/cli/commands/build-theme.font-warning.test.mjs +3 -3
  206. package/clients/cli/commands/build-theme.mjs +25 -12
  207. package/clients/cli/commands/build.doc.mjs +1 -0
  208. package/clients/cli/commands/build.exit-codes-doc.test.mjs +4 -0
  209. package/clients/cli/commands/component.doc.mjs +1 -0
  210. package/clients/cli/commands/discover.broken-integration.test.mjs +11 -7
  211. package/clients/cli/commands/discover.doc.mjs +9 -1
  212. package/clients/cli/commands/discover.mjs +144 -93
  213. package/clients/cli/commands/discover.no-source.test.mjs +448 -33
  214. package/clients/cli/commands/discover.sources.test.mjs +20 -1
  215. package/clients/cli/commands/docs.doc.mjs +1 -0
  216. package/clients/cli/commands/docs.mjs +49 -19
  217. package/clients/cli/commands/docs.test.mjs +2 -2
  218. package/clients/cli/commands/doctor-integration-components.doc.mjs +4 -2
  219. package/clients/cli/commands/doctor-integration-docs.doc.mjs +20 -5
  220. package/clients/cli/commands/doctor-integration-templates.doc.mjs +1 -0
  221. package/clients/cli/commands/doctor-integration-validate.doc.mjs +10 -1
  222. package/clients/cli/commands/doctor-integration.test.mjs +52 -4
  223. package/clients/cli/commands/doctor.doc.mjs +12 -2
  224. package/clients/cli/commands/doctor.mjs +102 -7
  225. package/clients/cli/commands/doctor.test.mjs +10 -4
  226. package/clients/cli/commands/gap-report.doc.mjs +15 -2
  227. package/clients/cli/commands/gap-report.mjs +24 -2
  228. package/clients/cli/commands/gap-report.test.mjs +79 -0
  229. package/clients/cli/commands/hook.doc.mjs +1 -0
  230. package/clients/cli/commands/init.behavior.test.mjs +5 -0
  231. package/clients/cli/commands/init.doc.mjs +29 -3
  232. package/clients/cli/commands/integration-add.doc.mjs +7 -0
  233. package/clients/cli/commands/integration-authoring.test.mjs +49 -3
  234. package/clients/cli/commands/integration-check.doc.mjs +10 -2
  235. package/clients/cli/commands/integration-check.test.mjs +175 -1
  236. package/clients/cli/commands/integration-pack.doc.mjs +8 -1
  237. package/clients/cli/commands/integration-verify.doc.mjs +8 -1
  238. package/clients/cli/commands/integration.mjs +15 -9
  239. package/clients/cli/commands/json-contract.test.mjs +11 -2
  240. package/clients/cli/commands/manifest.doc.mjs +1 -0
  241. package/clients/cli/commands/outside-project.test.mjs +774 -0
  242. package/clients/cli/commands/search.doc.mjs +1 -0
  243. package/clients/cli/commands/search.mjs +16 -11
  244. package/clients/cli/commands/search.test.mjs +429 -296
  245. package/clients/cli/commands/setup-nudge.test.mjs +26 -4
  246. package/clients/cli/commands/swizzle.doc.mjs +7 -0
  247. package/clients/cli/commands/swizzle.routing.test.mjs +1 -1
  248. package/clients/cli/commands/template.doc.mjs +1 -0
  249. package/clients/cli/commands/theme-add-lifecycle.test.mjs +3 -3
  250. package/clients/cli/commands/theme-add.doc.mjs +8 -1
  251. package/clients/cli/commands/theme-build.doc.mjs +1 -0
  252. package/clients/cli/commands/theme-eject.doc.mjs +1 -0
  253. package/clients/cli/commands/theme-list.behavior.test.mjs +6 -0
  254. package/clients/cli/commands/theme-list.doc.mjs +1 -0
  255. package/clients/cli/commands/theme-palette-generate.doc.mjs +1 -0
  256. package/clients/cli/commands/theme-remove.doc.mjs +7 -0
  257. package/clients/cli/commands/theme-targets.doc.mjs +1 -0
  258. package/clients/cli/commands/theme-template.doc.mjs +1 -0
  259. package/clients/cli/commands/theme-use.doc.mjs +7 -0
  260. package/clients/cli/commands/upgrade.config-ordering.test.mjs +2 -1
  261. package/clients/cli/commands/upgrade.doc.mjs +22 -1
  262. package/clients/cli/commands/upgrade.file-protection.test.mjs +3 -2
  263. package/clients/cli/commands/upgrade.hook-output.test.mjs +2 -1
  264. package/clients/cli/commands/upgrade.older-cli.test.mjs +160 -0
  265. package/clients/cli/index.mjs +84 -13
  266. package/clients/cli/lib/cli-error.mjs +4 -1
  267. package/clients/cli/lib/component-format.test.mjs +1 -1
  268. package/clients/cli/lib/define-command.mjs +2 -2
  269. package/clients/cli/lib/json-shim.mjs +3 -1
  270. package/clients/cli/lib/manifest.d.ts +9 -0
  271. package/clients/cli/lib/manifest.mjs +17 -1
  272. package/clients/cli/lib/manifest.test.mjs +25 -0
  273. package/foundation/agent-docs/agent-doc-state.d.mts +21 -6
  274. package/foundation/agent-docs/agent-doc-state.mjs +29 -7
  275. package/foundation/agent-docs/agent-docs.d.mts +2 -2
  276. package/foundation/agent-docs/agent-docs.mjs +3 -3
  277. package/foundation/agent-docs/computer-agent-text.d.mts +133 -0
  278. package/foundation/agent-docs/computer-agent-text.mjs +623 -0
  279. package/foundation/agent-docs/computer-agent-text.test.mjs +602 -0
  280. package/foundation/config/project.d.mts +35 -3
  281. package/foundation/config/project.mjs +145 -8
  282. package/foundation/config/project.test.mjs +66 -0
  283. package/foundation/config/theme-state.mjs +5 -4
  284. package/foundation/discovery/cli-self-docs.mjs +20 -3
  285. package/foundation/discovery/cli-self-docs.test.mjs +3 -2
  286. package/foundation/discovery/component-replacement.mjs +2 -1
  287. package/foundation/discovery/copied-passages.d.mts +216 -0
  288. package/foundation/discovery/copied-passages.mjs +720 -0
  289. package/foundation/discovery/copied-passages.test.mjs +124 -0
  290. package/foundation/discovery/doc-consistency.d.mts +34 -0
  291. package/foundation/discovery/doc-consistency.mjs +513 -0
  292. package/foundation/discovery/doc-consistency.test.mjs +347 -0
  293. package/foundation/discovery/doc-fluff.d.mts +112 -0
  294. package/foundation/discovery/doc-fluff.mjs +328 -0
  295. package/foundation/discovery/doc-fluff.test.mjs +142 -0
  296. package/foundation/discovery/doc-types.mjs +12 -5
  297. package/foundation/discovery/doc-types.test.mjs +46 -2
  298. package/foundation/discovery/docs-discovery.d.mts +7 -0
  299. package/foundation/discovery/docs-discovery.mjs +26 -2
  300. package/foundation/discovery/prop-drift.d.mts +25 -6
  301. package/foundation/discovery/prop-drift.mjs +171 -6
  302. package/foundation/discovery/prop-drift.test.mjs +65 -0
  303. package/foundation/discovery/runner-allowlist.d.mts +40 -0
  304. package/foundation/discovery/runner-allowlist.mjs +53 -0
  305. package/foundation/discovery/stray-pointers.d.mts +52 -0
  306. package/foundation/discovery/stray-pointers.mjs +293 -0
  307. package/foundation/discovery/stray-pointers.test.mjs +86 -0
  308. package/foundation/discovery/template-needs.mjs +5 -2
  309. package/foundation/discovery/theme-imports.mjs +8 -4
  310. package/foundation/discovery/theme-imports.test.mjs +1 -1
  311. package/foundation/doc-compiler/doc-loads.test.mjs +36 -0
  312. package/foundation/doc-compiler/inputs.mjs +4 -1
  313. package/foundation/doc-compiler/links.d.mts +32 -0
  314. package/foundation/doc-compiler/links.mjs +163 -26
  315. package/foundation/doc-compiler/links.test.mjs +97 -4
  316. package/foundation/doc-compiler/read.d.mts +1 -1
  317. package/foundation/doc-compiler/tree.mjs +30 -1
  318. package/foundation/doc-compiler/tree.test.mjs +8 -1
  319. package/foundation/env/cli-command.d.mts +83 -0
  320. package/foundation/env/cli-command.mjs +152 -0
  321. package/foundation/env/cli-command.test.mjs +129 -0
  322. package/foundation/env/node-version.test.mjs +15 -3
  323. package/foundation/env/package-manager.d.mts +93 -9
  324. package/foundation/env/package-manager.global.test.mjs +66 -0
  325. package/foundation/env/package-manager.mjs +184 -13
  326. package/foundation/env/package-manager.test.mjs +341 -15
  327. package/foundation/env/project-scope.d.mts +9 -0
  328. package/foundation/env/project-scope.mjs +33 -0
  329. package/foundation/env/search-path.d.mts +42 -0
  330. package/foundation/env/search-path.mjs +205 -0
  331. package/foundation/env/search-path.test.mjs +122 -0
  332. package/foundation/env/user-dirs.d.mts +39 -0
  333. package/foundation/env/user-dirs.mjs +93 -0
  334. package/foundation/env/user-dirs.test.mjs +72 -0
  335. package/foundation/env/user-settings.d.mts +46 -0
  336. package/foundation/env/user-settings.mjs +106 -0
  337. package/foundation/env/user-settings.test.mjs +64 -0
  338. package/foundation/fs/file-protection.mjs +15 -1
  339. package/foundation/fs/module-loader.d.mts +2 -1
  340. package/foundation/fs/module-loader.mjs +60 -4
  341. package/foundation/fs/module-loader.stdout.test.mjs +3 -2
  342. package/foundation/fs/module-loader.test.mjs +194 -0
  343. package/foundation/fs/path-compare.d.mts +33 -0
  344. package/foundation/fs/path-compare.mjs +73 -0
  345. package/foundation/fs/paths.d.mts +57 -1
  346. package/foundation/fs/paths.mjs +131 -3
  347. package/foundation/fs/paths.test.mjs +10 -1
  348. package/foundation/integrations/computer-integrations.d.mts +78 -0
  349. package/foundation/integrations/computer-integrations.mjs +316 -0
  350. package/foundation/integrations/computer-integrations.test.mjs +292 -0
  351. package/foundation/integrations/contribution-inventory.d.mts +11 -0
  352. package/foundation/integrations/contribution-inventory.mjs +50 -2
  353. package/foundation/integrations/integration-warnings.mjs +3 -2
  354. package/foundation/integrations/integration-warnings.test.mjs +8 -9
  355. package/foundation/integrations/integrations.d.mts +25 -1
  356. package/foundation/integrations/integrations.mjs +46 -3
  357. package/foundation/integrations/issue.ts +6 -0
  358. package/foundation/integrations/validate-contributions.d.mts +2 -0
  359. package/foundation/integrations/validate-contributions.mjs +41 -1
  360. package/foundation/release/agent-text-worker.d.mts +4 -0
  361. package/foundation/release/agent-text-worker.mjs +52 -0
  362. package/foundation/release/cache.d.mts +310 -0
  363. package/foundation/release/cache.mjs +1216 -0
  364. package/foundation/release/cache.test.mjs +920 -0
  365. package/foundation/release/choose.d.mts +207 -0
  366. package/foundation/release/choose.mjs +677 -0
  367. package/foundation/release/choose.test.mjs +427 -0
  368. package/foundation/release/core-worker.d.mts +4 -0
  369. package/foundation/release/core-worker.mjs +38 -0
  370. package/foundation/release/global-state.d.mts +259 -0
  371. package/foundation/release/global-state.mjs +472 -0
  372. package/foundation/release/global-state.test.mjs +381 -0
  373. package/foundation/release/handoff.d.mts +60 -0
  374. package/foundation/release/handoff.e2e.test.mjs +278 -0
  375. package/foundation/release/handoff.mjs +357 -0
  376. package/foundation/release/lock-lease.d.mts +23 -0
  377. package/foundation/release/lock-lease.mjs +80 -0
  378. package/foundation/release/notices.d.mts +253 -0
  379. package/foundation/release/notices.mjs +596 -0
  380. package/foundation/release/notices.test.mjs +565 -0
  381. package/foundation/release/npm-guard.d.mts +4 -0
  382. package/foundation/release/npm-guard.mjs +126 -0
  383. package/foundation/release/project.d.mts +141 -0
  384. package/foundation/release/project.mjs +466 -0
  385. package/foundation/release/project.test.mjs +288 -0
  386. package/foundation/release/refresh-worker.d.mts +4 -0
  387. package/foundation/release/refresh-worker.mjs +27 -0
  388. package/foundation/release/run-context.d.mts +47 -0
  389. package/foundation/release/run-context.mjs +149 -0
  390. package/foundation/release/update-notice-env.d.mts +28 -0
  391. package/foundation/release/update-notice-env.mjs +39 -0
  392. package/foundation/response/base.d.ts +26 -3
  393. package/foundation/response/error-codes.d.mts +3 -1
  394. package/foundation/response/error-codes.doc.mjs +12 -0
  395. package/foundation/response/error-codes.mjs +17 -0
  396. package/foundation/response/error-codes.test.mjs +2 -0
  397. package/foundation/response/json-contract.test.mjs +7 -2
  398. package/foundation/response/json.mjs +4 -1
  399. package/foundation/response/response-types.doc.mjs +17 -11
  400. package/foundation/response/response-types.doc.test.mjs +46 -0
  401. package/foundation/response/response.doc.mjs +3 -3
  402. package/foundation/xle/browser-imports.test.mjs +74 -0
  403. package/package.json +11 -11
  404. package/scripts/postinstall.mjs +21 -2
@@ -149,7 +149,7 @@ export const docs = {
149
149
  type: 'list',
150
150
  style: 'ordered',
151
151
  items: [
152
- 'Polyfill anchor positioning. Load a CSS anchor positioning polyfill conditionally behind an `@supports` check so it costs nothing on Tier 1. This is the lowest-effort way to get correct positioning; note that polyfills may not cover every position-fallback feature.',
152
+ 'Polyfill anchor positioning. Load a CSS anchor positioning polyfill conditionally behind an `@supports` check so it costs nothing on Tier 1. This is the lowest-effort way to get correct positioning; polyfills may not cover every position-fallback feature.',
153
153
  'Provide a JS positioning fallback. Detect missing support with `CSS.supports("anchor-name", "--x")` and position layers with a measurement-based library (e.g. a floating-element positioner) when it returns false. More code, full control.',
154
154
  'Accept degraded positioning. Document for your users that on Tier 2 browsers, layered surfaces open correctly but may not sit next to their trigger. Cheapest, and often fine for internal tools on evergreen browsers.',
155
155
  ],
@@ -21,7 +21,7 @@ export const docs = {
21
21
  type: 'code',
22
22
  lang: 'text',
23
23
  label: 'Set up the design system',
24
- code: 'Install @astryxdesign/core, @stylexjs/stylex, @astryxdesign/theme-neutral, and @astryxdesign/cli in this project, then run `npx @astryxdesign/cli init` to set up agent docs. Read the generated files to learn the conventions.',
24
+ code: 'Install @astryxdesign/core, @stylexjs/stylex, @astryxdesign/theme-neutral, and @astryxdesign/cli in this project, then run `astryx init` to set up agent docs. Read the generated files to learn the conventions.',
25
25
  },
26
26
  {
27
27
  type: 'prose',
@@ -31,7 +31,7 @@ export const docs = {
31
31
  type: 'code',
32
32
  lang: 'text',
33
33
  label: 'Give it a look',
34
- code: 'Ask me what look and feel this app should have. Run `npx @astryxdesign/cli theme list`, install the closest theme package, and run `theme add <slug>`; use `--package` when owners share a slug. Import `themes` and `defaultThemeSlug` from the generated module once and pass `themes[defaultThemeSlug]` to `<Theme>`. Customize with `defineTheme({extends: importedTheme, ...})`. Use `theme eject` only when I ask for an independent source fork. Default to neutral if I have no preference, and show me the result before moving on.',
34
+ code: 'Ask me what look and feel this app should have. Run `astryx theme list`, install the closest theme package, and run `theme add <slug>`; use `--package` when owners share a slug. Import `themes` and `defaultThemeSlug` from the generated module once and pass `themes[defaultThemeSlug]` to `<Theme>`. Customize with `defineTheme({extends: importedTheme, ...})`. Use `theme eject` only when I ask for an independent source fork. Default to neutral if I have no preference, and show me the result before moving on.',
35
35
  },
36
36
  ],
37
37
  },
@@ -60,7 +60,27 @@ export const docs = {
60
60
  type: 'code',
61
61
  lang: 'bash',
62
62
  label: 'Terminal',
63
- code: `npx astryx init`,
63
+ code: `astryx init`,
64
+ },
65
+ ],
66
+ },
67
+ {
68
+ id: 'install-once',
69
+ title: 'Install once, use everywhere',
70
+ content: [
71
+ {
72
+ type: 'prose',
73
+ text: "Install the CLI once for your computer too, and the astryx command works in any folder, for you and for any coding agent, even before a project exists. Inside a project, the project's own version still answers, so a global install never changes what your team and CI get. Keep it in the project as well; that is the recommended setup.",
74
+ },
75
+ {
76
+ type: 'code',
77
+ lang: 'bash',
78
+ label: 'Terminal',
79
+ code: `npm i -g @astryxdesign/cli`,
80
+ },
81
+ {
82
+ type: 'prose',
83
+ text: 'Project, global, or both: {@link generic:project-global-or-both}. Everything else about global mode: {@link namespace:global}.',
64
84
  },
65
85
  ],
66
86
  },
@@ -158,7 +158,7 @@ export const docs = {
158
158
  },
159
159
  {
160
160
  type: 'prose',
161
- text: "If importing a swizzled component throws an error that starts `Unexpected 'stylex.create' call at runtime` and the page does not render, the app is missing a StyleX compiler. See the StyleX Build Setup section of {@link generic:tokens-and-setup} for bundler config examples.",
161
+ text: 'If a swizzled component fails at runtime with a `stylex.create` error, the app is missing a StyleX compiler: see the StyleX Build Setup section of {@link generic:tokens-and-setup}.',
162
162
  },
163
163
  ],
164
164
  },
@@ -59,7 +59,7 @@ export const docs = {
59
59
  content: [
60
60
  {
61
61
  type: 'prose',
62
- text: "Use [light, dark] tuples in token values for automatic mode switching. Use mode='system' (default) on Theme to follow OS preference. Full guide: {@link generic:use-a-theme}.",
62
+ text: 'Light, dark, and system modes: {@link generic:use-a-theme}.',
63
63
  },
64
64
  {
65
65
  type: 'code',
@@ -45,7 +45,7 @@ export const docs = {
45
45
  {
46
46
  type: 'code',
47
47
  lang: 'bash',
48
- code: 'npx astryx integration add component AcmeCarousel',
48
+ code: 'astryx integration add component AcmeCarousel',
49
49
  },
50
50
  {
51
51
  type: 'code',
@@ -81,5 +81,15 @@ Declare component root ./components in astryx.integration.mjs.
81
81
  },
82
82
  ],
83
83
  },
84
+ {
85
+ id: 'global-mode',
86
+ title: 'In global mode',
87
+ content: [
88
+ {
89
+ type: 'prose',
90
+ text: "In global mode: when users install your package for their computer, beside the global CLI, your components show up in folders outside any project; inside a project, only if the project installs your package. See {@link namespace:global} and {@link generic:global-integrations}.",
91
+ },
92
+ ],
93
+ },
84
94
  ],
85
95
  };
@@ -26,7 +26,7 @@ export const docs = {
26
26
  {
27
27
  type: 'code',
28
28
  lang: 'bash',
29
- code: 'npx astryx integration add theme ocean',
29
+ code: 'astryx integration add theme ocean',
30
30
  },
31
31
  {
32
32
  type: 'code',
@@ -63,7 +63,7 @@ Declare theme root ./themes in astryx.integration.mjs.
63
63
  {
64
64
  type: 'code',
65
65
  lang: 'bash',
66
- code: 'npx astryx integration add theme ocean --from neutral',
66
+ code: 'astryx integration add theme ocean --from neutral',
67
67
  },
68
68
  {
69
69
  type: 'prose',
@@ -85,5 +85,15 @@ Declare theme root ./themes in astryx.integration.mjs.
85
85
  },
86
86
  ],
87
87
  },
88
+ {
89
+ id: 'global-mode',
90
+ title: 'In global mode',
91
+ content: [
92
+ {
93
+ type: 'prose',
94
+ text: 'In global mode: when users install your package for their computer, beside the global CLI, your themes are listed in folders outside any project, where `theme add` lists but writes nothing; inside a project, only if the project installs your package. See {@link namespace:global} and {@link generic:global-integrations}.',
95
+ },
96
+ ],
97
+ },
88
98
  ],
89
99
  };
@@ -27,7 +27,7 @@ export const docs = {
27
27
  {
28
28
  type: 'code',
29
29
  lang: 'bash',
30
- code: 'npx astryx integration add doc deploying\n# Read it the way an app will\nnpx astryx docs deploying',
30
+ code: 'astryx integration add doc deploying\n# Read it the way an app will\nastryx docs deploying',
31
31
  },
32
32
  {
33
33
  type: 'code',
@@ -40,7 +40,7 @@ export const docs = {
40
40
  items: [
41
41
  'Name the topic in lowercase kebab-case, such as `deploying`. Readers type the name as a command argument, so it holds only letters, digits, `_`, and `-`.',
42
42
  'Keep the name stable: readers and links find the topic by it.',
43
- 'Pick a name that `astryx docs` does not already list: no Core topic, and no section such as `tokens` or `layout`. To take over or add to a Core topic, see {@link generic:extend-or-replace}.',
43
+ 'Pick a name `astryx docs` does not already list: no Core topic, and no section such as `tokens` or `layout`. To take over or add to a Core topic, see {@link generic:extend-or-replace}.',
44
44
  ],
45
45
  },
46
46
  ],
@@ -67,12 +67,44 @@ export const docs = {
67
67
  type: 'list',
68
68
  style: 'unordered',
69
69
  items: [
70
- 'Replace the `Overview` placeholder that `integration add` writes.',
70
+ 'Replace the `Overview` placeholder `integration add` writes.',
71
71
  'Every field is in {@link schema:reference-doc}.',
72
72
  ],
73
73
  },
74
74
  ],
75
75
  },
76
+ {
77
+ id: 'write-commands-without-a-runner',
78
+ title: 'Write commands without a runner',
79
+ content: [
80
+ {
81
+ type: 'prose',
82
+ text: 'Start every CLI command in a doc with the word astryx alone, with no runner such as npx or pnpm exec in front. The CLI prefixes each one when it prints the doc, with the command the reader runs: `pnpm exec astryx` or `yarn astryx` from their package manager, or the `cliCommand` an integration sets. See {@link generic:cli-command}.',
83
+ },
84
+ {
85
+ type: 'code',
86
+ lang: 'javascript',
87
+ label: 'docs/deploying.doc.mjs',
88
+ code: "{type: 'prose', text: 'Check the app with `astryx doctor` before you ship.'},\n{type: 'code', lang: 'bash', code: 'astryx doctor'},",
89
+ },
90
+ {
91
+ type: 'code',
92
+ lang: 'text',
93
+ label:
94
+ "Read in an app whose integration sets cliCommand: 'acme astryx'",
95
+ code: 'Check the app with `acme astryx doctor` before you ship.\n\n```bash\nacme astryx doctor\n```',
96
+ },
97
+ {
98
+ type: 'list',
99
+ style: 'unordered',
100
+ items: [
101
+ 'The CLI prefixes an inline code span that starts with the word astryx, a command at the start of a line, or after `&&`, `||`, `;` or `|`, in a `bash`, `sh`, `shell`, `zsh`, `console`, `text` or `markdown` code block or one with no language, and a table cell that holds only a command.',
102
+ 'Code in other languages, such as a `js` example, and the word astryx in plain prose stay as written.',
103
+ '`--json` returns the doc as written, so a reader that shows it prefixes the commands itself.',
104
+ ],
105
+ },
106
+ ],
107
+ },
76
108
  {
77
109
  id: 'pick-the-doc-kind',
78
110
  title: 'Pick the doc kind',
@@ -138,10 +170,20 @@ export const docs = {
138
170
  items: [
139
171
  'Readers open a topic by its `name`, not its file name. Name the file after the doc, `<name>.doc.mjs`, so each one is easy to find.',
140
172
  'A topic with no `placement` is a flat topic: the docs list shows it under Topics, and readers open it by its name.',
141
- 'To give your package its own section in the docs tree instead, see {@link generic:sections-and-placement}.',
173
+ 'For a section of your own in the docs tree, see {@link generic:sections-and-placement}.',
142
174
  ],
143
175
  },
144
176
  ],
145
177
  },
178
+ {
179
+ id: 'global-mode',
180
+ title: 'In global mode',
181
+ content: [
182
+ {
183
+ type: 'prose',
184
+ text: 'In global mode: when users install your package for their computer, beside the global CLI, your doc topics show up in folders outside any project; inside a project, only if the project installs your package. See {@link namespace:global} and {@link generic:global-integrations}.',
185
+ },
186
+ ],
187
+ },
146
188
  ],
147
189
  };
@@ -27,7 +27,7 @@ export const docs = {
27
27
  {
28
28
  type: 'code',
29
29
  lang: 'bash',
30
- code: "npx astryx integration add agent-doc 'Use AcmeCarousel for rotating content.'",
30
+ code: "astryx integration add agent-doc 'Use AcmeCarousel for rotating content.'",
31
31
  },
32
32
  {
33
33
  type: 'prose',
@@ -80,6 +80,10 @@ export default {
80
80
  type: 'prose',
81
81
  text: 'A line is one line of plain text. Line breaks, control characters, spaces at either end, and managed-block markers such as `<!-- ASTRYX:START -->` are rejected.',
82
82
  },
83
+ {
84
+ type: 'prose',
85
+ text: 'Start a command in a line with the word astryx alone, with no runner in front, as in: Run astryx doctor before finishing. The block names the command the app runs once, at its top, for every command below it, so your line works in every app. See {@link generic:cli-command}.',
86
+ },
83
87
  ],
84
88
  },
85
89
  {
@@ -93,7 +97,7 @@ export default {
93
97
  {
94
98
  type: 'code',
95
99
  lang: 'bash',
96
- code: 'npx astryx init --features agents',
100
+ code: 'astryx init --features agents',
97
101
  },
98
102
  {
99
103
  type: 'code',
@@ -119,9 +123,9 @@ export default {
119
123
  {
120
124
  type: 'code',
121
125
  lang: 'bash',
122
- code: `npx astryx init --features agents
126
+ code: `astryx init --features agents
123
127
  # Or: --from takes the Core version the app had before
124
- npx astryx upgrade --from <version> --apply`,
128
+ astryx upgrade --from <version> --apply`,
125
129
  },
126
130
  {
127
131
  type: 'code',
@@ -134,5 +138,15 @@ npx astryx upgrade --from <version> --apply`,
134
138
  },
135
139
  ],
136
140
  },
141
+ {
142
+ id: 'global-mode',
143
+ title: 'In global mode',
144
+ content: [
145
+ {
146
+ type: 'prose',
147
+ text: "In global mode: the agent guide the CLI keeps for the computer carries no integration's guidance, because it serves every folder; your guidance reaches agents through the agent docs `init` writes in an app that installs your package. See {@link namespace:global} and {@link generic:computer-agent-guide}.",
148
+ },
149
+ ],
150
+ },
137
151
  ],
138
152
  };
@@ -23,6 +23,10 @@ export const docs = {
23
23
  },
24
24
  },
25
25
  blocks: [
26
+ {
27
+ type: 'prose',
28
+ text: 'In global mode: every kind your package adds also applies outside projects when users install it for their computer, beside the global CLI; inside a project, only if the project installs it. See {@link namespace:global} and {@link generic:global-integrations}.',
29
+ },
26
30
  {
27
31
  type: 'prose',
28
32
  text: 'These are everything you can add to an integration. Mix them however you like. You are not limited to any one thing.',
@@ -37,7 +37,7 @@ export const docs = {
37
37
  {
38
38
  type: 'code',
39
39
  lang: 'bash',
40
- code: 'npx astryx doctor integration components',
40
+ code: 'astryx doctor integration components',
41
41
  },
42
42
  {
43
43
  type: 'code',
@@ -58,8 +58,8 @@ docType: boolean
58
58
  style: 'unordered',
59
59
  items: [
60
60
  "A doc's own `props` describe the export its `name` names. In a family doc, each entry describes its own export. A hook entry documents parameters and returns, so it is not compared.",
61
- "It reads props with the `typescript` your package installs, and reads your package's `tsconfig.json` the way `tsc -p` does. Where `typescript` is missing or has no JavaScript compiler API, as TypeScript 7 does, it uses `@typescript/typescript6`, the TypeScript 6 API package, if your package installs it. Without either it prints `[skip] Props not compared` and the reason.",
62
- 'Every finding is a warning, so the exit code stays 0. Read them before you publish. With `--json`, they are in `data.propDrift.findings`.',
61
+ "It reads props with the `typescript` your package installs, and reads your package's `tsconfig.json` the way `tsc -p` does. It finds TypeScript the way the docs check does, TypeScript 7 included ({@link generic:check-your-docs}). Without a usable one it prints `[skip] Props not compared` and the reason.",
62
+ 'Findings are warnings and leave the exit code at 0. Read them before you publish. With `--json`, they are in `data.propDrift.findings`.',
63
63
  ],
64
64
  },
65
65
  ],
@@ -96,6 +96,11 @@ docType: boolean
96
96
  "The documented `type` differs from the code's, where both read exactly",
97
97
  'Copy the type from the source, or fix the code. The next section says which types are judged',
98
98
  ],
99
+ [
100
+ '`default_mismatch`',
101
+ "The documented `default` differs from the literal default the component writes in its props destructuring, such as `size = 'md'`",
102
+ 'Copy the default from the source, quoted as code: `default: "\'md\'"`. Quotes and spacing are ignored, and a default that is not a literal on either side (a constant, a call, prose) is not compared',
103
+ ],
99
104
  ],
100
105
  },
101
106
  ],
@@ -22,17 +22,29 @@ export const docs = {
22
22
  content: [
23
23
  {
24
24
  type: 'prose',
25
- text: 'Run `doctor integration docs` in your package to check the docs tree, every link, and overlaps with Core topics. Pass a package name to check an installed package.',
25
+ text: 'Run `doctor integration docs` in your package to check the docs tree, every link, and overlaps with Core topics, and to list any passage two topics repeat. Pass a package name to check an installed package.',
26
26
  },
27
27
  {
28
28
  type: 'code',
29
29
  lang: 'bash',
30
- code: 'npx astryx doctor integration docs\n# In an app, check an installed package\nnpx astryx doctor integration docs @acme/astryx-widgets',
30
+ code: 'astryx doctor integration docs\n# In an app, check an installed package\nastryx doctor integration docs @acme/astryx-widgets',
31
31
  },
32
32
  {
33
33
  type: 'code',
34
34
  lang: 'text',
35
- code: 'Checking integration docs: @acme/astryx-widgets@1.0.0\n\n[ok] The docs tree and every link in these docs check out.\n\n[ok] No doc topics overlap with Core.',
35
+ code: 'Checking integration docs: @acme/astryx-widgets@1.0.0\n\n[ok] The docs tree and every link in these docs check out.\n\n[ok] No doc topics overlap with Core.\n[ok] No topic copies a passage from another.\n[ok] No filler phrases or low-density topics.',
36
+ },
37
+ {
38
+ type: 'prose',
39
+ text: 'Write each fact in one topic. When two of your topics, or one of yours and a Core topic, repeat 10 or more words of prose word for word, the check lists the pair as a `copied_passage` warning. It names the topic that keeps the text (a Core topic, or of your two the one the passage fits) and the line in the other where to put the link instead ({@link generic:links}). Code and examples are not compared, and a topic may carry the text of the Core topic it replaces. A run with fewer than 4 distinct content words (words other than function words such as \"the\", \"in\" or \"it\"), or one that three or more topics share (a series lead-in), is not listed. Each listed pair is also a warning (`copied_passage`): `doctor integration docs` still exits 0, and `integration check --strict` fails until you fix it.',
40
+ },
41
+ {
42
+ type: 'prose',
43
+ text: "Keep docs dense. The check lists, as a `doc_fluff` warning, each padding phrase in your prose, with its file line and what to write instead, and each topic of 80 or more prose words in which fewer than half the words carry content (words other than function words such as the, and, in), with its measured share and the floor of 0.5. `doctor integration docs` still exits 0, and `integration check --strict` fails until you cut it. Code, examples, and quoted text are not read. The phrases: `it\'s important to note`, `it is important to note`, `important to note that`, `it\'s worth noting`, `it is worth noting`, `worth noting that`, `it should be noted`, `please note`, `note that` (opening a sentence), `as mentioned above`, `as mentioned earlier`, `as mentioned before`, `as noted above`, `as you can see`, `needless to say`, `in order to`, `due to the fact that`, `for the purpose of`, `at this point in time`, `in other words`, `basically`, `essentially`, `obviously`.",
44
+ },
45
+ {
46
+ type: 'prose',
47
+ text: "Point at another doc with a link, never by writing `astryx docs <name>` in prose: `{@link generic:<name>}` for one of your package's topics, or `{@link @astryxdesign/cli:generic:<name>}` for a Core doc (`namespace:` for a Core namespace). The CLI prints the link as the command that opens the doc, and doctor checks that the doc exists. The check lists each written pointer to a doc that exists as a `stray_doc_pointer` warning, with the link to write instead. A command with more words, or one in a code block, is a walkthrough and is not listed.",
36
48
  },
37
49
  {
38
50
  type: 'prose',
@@ -97,7 +109,7 @@ export const docs = {
97
109
  {
98
110
  type: 'code',
99
111
  lang: 'bash',
100
- code: 'npx astryx doctor integration validate',
112
+ code: 'astryx doctor integration validate',
101
113
  },
102
114
  {
103
115
  type: 'code',
@@ -121,7 +133,7 @@ fix: Remove \`summary\`: SingleComponentDoc has no field \`summary\`.`,
121
133
  "The folder decides the type: `ComponentDoc` in your components root, `IntegrationTemplateDoc` in your templates root, `ThemeDoc` in your themes root, and in your docs root the type the doc's `type` names. Keep the `@type` comment above each doc's export too, so your editor shows the same problems as you type.",
122
134
  'Every finding is a warning, so the exit code stays 0. With `--json`, they are in `data.docTypes.findings`.',
123
135
  'It uses the `typescript` your package installs. Where `typescript` is missing or has no JavaScript compiler API, as TypeScript 7 does, it uses `@typescript/typescript6`, the TypeScript 6 API package, if your package installs it. Without either, it prints `[skip] Docs not type-checked` and the reason.',
124
- 'Every field of every doc type is in `astryx docs authoring`.',
136
+ 'Every field of every doc type is in {@link generic:authoring}.',
125
137
  ],
126
138
  },
127
139
  ],
@@ -132,12 +144,12 @@ fix: Remove \`summary\`: SingleComponentDoc has no field \`summary\`.`,
132
144
  content: [
133
145
  {
134
146
  type: 'prose',
135
- text: '`npx astryx doctor` also measures every read and warns on one over 32 KB. Run it in your package or in an app that installs it; `doctor integration docs` does not check size.',
147
+ text: '`astryx doctor` also measures every read and warns on one over 32 KB. Run it in your package or in an app that installs it; `doctor integration docs` does not check size.',
136
148
  },
137
149
  {
138
150
  type: 'code',
139
151
  lang: 'bash',
140
- code: 'npx astryx doctor',
152
+ code: 'astryx doctor',
141
153
  },
142
154
  {
143
155
  type: 'code',
@@ -161,7 +173,7 @@ fix: Remove \`summary\`: SingleComponentDoc has no field \`summary\`.`,
161
173
  {
162
174
  type: 'code',
163
175
  lang: 'bash',
164
- code: 'npx astryx integration verify',
176
+ code: 'astryx integration verify',
165
177
  },
166
178
  {
167
179
  type: 'code',
@@ -29,37 +29,37 @@ export const docs = {
29
29
  headers: ['Command', 'Proves', 'Exits 1 when', 'Only warns when'],
30
30
  rows: [
31
31
  [
32
- '`npx astryx doctor integration validate`',
32
+ '`astryx doctor integration validate`',
33
33
  'The manifest loads, each root holds contributions the CLI can read, and each doc matches its authoring type',
34
34
  'A declared root is missing (`missing_root`), a contribution does not load (`invalid_doc`, `invalid_component`, `invalid_theme`), or two templates in the package replace one Core id (`ambiguous_template_replacement`)',
35
- "The manifest has a key this CLI does not know (`unknown_manifest_key`), or a doc field does not match the doc's authoring type: a field the type does not have, a missing required field, or a value outside the field's type. It checks docs with your installed `typescript`, or, where that is missing or has no JavaScript compiler API (TypeScript 7), with an installed `@typescript/typescript6`; without either, it prints `[skip] Docs not type-checked`. With no `astryx.integration.mjs` it prints a hint and exits 0",
35
+ "The manifest has a key this CLI does not know (`unknown_manifest_key`), or a doc field does not match the doc's authoring type: a field the type does not have, a missing required field, or a value outside the field's type. It also warns on what no reader can serve: a prop listed twice (`duplicate_prop`), a `propDescriptions` key that names no documented prop (`unknown_translated_prop`), a section with no content (`empty_section`), two sections of a topic with one key (`duplicate_section_key`), or a `.doc.zh.mjs` or `.doc.dense.mjs` overlay beside no topic file (`orphan_doc_overlay`). It checks docs with your installed `typescript`, or, where that is missing or has no JavaScript compiler API (TypeScript 7), with an installed `@typescript/typescript6`; without either, it prints `[skip] Docs not type-checked`. With no `astryx.integration.mjs` it prints a hint and exits 0",
36
36
  ],
37
37
  [
38
- '`npx astryx doctor integration components`',
38
+ '`astryx doctor integration components`',
39
39
  "No component name clashes with a Core component, each `replaces` names one Core component, and each component doc's props match the component's TypeScript props",
40
40
  'Core is not installed (`core_not_found`). In a package that declares the CLI range that turns replacement on, a `replaces` target is missing (`missing_component_replacement_target`) or invalid (`invalid_component_replacement`), or two components replace one Core component (`ambiguous_component_replacement`)',
41
- 'A name clashes with Core, a component sets `replaces` in a package without that range (`inactive_component_replacement`, plus any missing, invalid, or duplicate `replaces` reported as a warning), or a documented prop differs from the code: it is missing there (`not_in_code`), the doc omits a prop the package declares (`not_in_doc`), or its `required` (`required_mismatch`) or type (`type_mismatch`) disagrees. It reads props with your installed `typescript`; without it, it prints `[skip] Props not compared`',
41
+ 'A name clashes with Core, a component sets `replaces` in a package without that range (`inactive_component_replacement`, plus any missing, invalid, or duplicate `replaces` reported as a warning), or a documented prop differs from the code: it is missing there (`not_in_code`), the doc omits a prop the package declares (`not_in_doc`), or its `required` (`required_mismatch`), type (`type_mismatch`), or literal `default` (`default_mismatch`) disagrees, or a `{@link}` in a component doc names no doc (`invalid_doc_graph`). It reads props with your installed `typescript`; without it, it prints `[skip] Props not compared`',
42
42
  ],
43
43
  [
44
- '`npx astryx doctor integration templates`',
44
+ '`astryx doctor integration templates`',
45
45
  'Each `replaces` names a Core template of the same type',
46
46
  'A `replaces` target is missing (`missing_template_replacement_target`) or of the other type (`invalid_template_replacement`), or two templates replace one id (`ambiguous_template_replacement`)',
47
47
  'A template id matches a Core id without `replaces`',
48
48
  ],
49
49
  [
50
- '`npx astryx doctor integration docs`',
51
- 'Your docs tree, every link, and topic names against Core',
50
+ '`astryx doctor integration docs`',
51
+ 'Your docs tree, every link, topic names against Core, passages two topics repeat word for word, padding phrases and low-density topics, and written pointers to docs',
52
52
  'A topic takes a Core topic name without `replaces` or `extends`, a doc is invalid (`invalid_doc`), or a namespace or placement fails, which hides the doc (`invalid_doc_graph`)',
53
- 'A link names no doc (`invalid_doc_graph`)',
53
+ 'A link names no doc (`invalid_doc_graph`), two topics repeat a passage word for word (`copied_passage`), prose pads with a listed phrase or falls under the density floor (`doc_fluff`), or prose, a description or summary, or the text of a component doc writes `astryx docs <name>` where a link would be checked (`stray_doc_pointer`)',
54
54
  ],
55
55
  [
56
- '`npx astryx integration check`',
56
+ '`astryx integration check`',
57
57
  'Everything the four `doctor integration` checks prove, in one command, for your build',
58
58
  'Any of the four would exit 1 on its own. With `--strict`, also any warning, and any check that did not run, such as a package with no `astryx.integration.*`',
59
59
  'Anything the four warn about, unless you pass `--strict`',
60
60
  ],
61
61
  [
62
- '`npx astryx integration verify`',
62
+ '`astryx integration verify`',
63
63
  'The packed package holds every file, shows the same contributions, resolves every public import, and declares the CLI it needs',
64
64
  'Anything `validate` fails on, no manifest, a file left out of the `.tgz` file, an import that does not resolve, or a missing CLI peer',
65
65
  'Anything `validate` warns about, or a component sets `replaces` and the package does not declare the CLI range that turns it on (`component_replaces_needs_cli`)',
@@ -68,7 +68,7 @@ export const docs = {
68
68
  },
69
69
  {
70
70
  type: 'prose',
71
- text: 'Pass a package name, such as `npx astryx doctor integration validate @acme/astryx-widgets`, to check an installed copy from an app instead. To fix a props finding, see {@link generic:check-the-props}.',
71
+ text: 'Pass a package name, such as `astryx doctor integration validate @acme/astryx-widgets`, to check an installed copy from an app instead. To fix a props finding, see {@link generic:check-the-props}.',
72
72
  },
73
73
  ],
74
74
  },
@@ -78,7 +78,7 @@ export const docs = {
78
78
  content: [
79
79
  {
80
80
  type: 'prose',
81
- text: 'Every integration runs `integration check --strict` in its own build, so every build keeps your docs, types, and links in sync; this is required, not optional. Run `integration verify` before you publish. Install devDependencies first, because the components check needs Core, and `tsc --noEmit` needs `typescript` and a `tsconfig.json`. In package.json:',
81
+ text: 'Every integration runs `integration check --strict` in its own build, so every build keeps your docs, types, and links in sync; this is required, not optional. The strict check fails on every copied passage the docs check lists ({@link generic:check-your-docs}). Run `integration verify` before you publish. Install devDependencies first, because the components check needs Core, and `tsc --noEmit` needs `typescript` and a `tsconfig.json`. In package.json:',
82
82
  },
83
83
  {
84
84
  type: 'code',
@@ -92,8 +92,8 @@ export const docs = {
92
92
  '`integration check` runs `validate`, `components`, `templates`, and `docs` in that order, prints each result, then a summary, and exits 1 when any of them would.',
93
93
  '`--strict` also exits 1 on any warning and on any check that did not run. Without it, warnings keep exit code 0: use that while you fix the warnings a package already has.',
94
94
  'Its exit codes and JSON are a contract for your build: a new check, or a new failure code, joins only in a minor release that names it in the release notes. A patch can still ship a Core component, template, or CLI topic whose name conflicts with one of yours.',
95
- '`integration verify` runs `validate` but none of the other three: a Core name clash, a `replaces` that names no Core template, a topic that takes a Core name, or a hidden guide still passes it. Run both before you publish: `npx astryx integration check --strict && npx astryx integration verify`.',
96
- 'Bare `npx astryx doctor` in the package also warns about a doc section over 32 KB, which no check above measures.',
95
+ '`integration verify` runs `validate` but none of the other three: a Core name clash, a `replaces` that names no Core template, a topic that takes a Core name, or a hidden guide still passes it. Run both before you publish: `astryx integration check --strict && astryx integration verify`.',
96
+ 'Bare `astryx doctor` in the package also warns about a doc section over 32 KB, which no check above measures.',
97
97
  ],
98
98
  },
99
99
  ],
@@ -0,0 +1,88 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /**
4
+ * @file `astryx docs global/ci-and-containers`: Astryx in CI and containers: no
5
+ * update checks, caching versions, read-only home folders (spec AST-081 FR6,
6
+ * FR7, FR10).
7
+ */
8
+
9
+ /** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */
10
+ export const docs = {
11
+ type: 'generic',
12
+ name: 'ci-and-containers',
13
+ placement: {
14
+ parent: 'namespace:global',
15
+ slot: 'guides',
16
+ order: 8,
17
+ },
18
+ title: 'CI and containers',
19
+ category: 'guide',
20
+ keywords: [
21
+ 'ci',
22
+ 'github actions',
23
+ 'container',
24
+ 'docker',
25
+ 'read-only home',
26
+ 'cache the release cache',
27
+ ],
28
+ description:
29
+ "What Astryx does in CI and containers: no update checks or notices, the project's version as always, and how to cache versions or work with a read-only home folder.",
30
+ sections: [
31
+ {
32
+ id: 'in-ci',
33
+ title: 'In CI',
34
+ content: [
35
+ {
36
+ type: 'list',
37
+ style: 'unordered',
38
+ items: [
39
+ 'Most CI services set `CI=true`. When `CI` is set to anything but empty, `0`, or `false`, Astryx never checks for updates and never prints a notice; `CI=false`, `CI=0`, and an empty `CI` do not count. `NO_UPDATE_NOTIFIER`, set to anything, does the same anywhere.',
40
+ "Add `@astryxdesign/cli` to the project as a devDependency at the same version as `@astryxdesign/core`; then CI runs the version pinned in the repo, and nothing is fetched. A global install in a CI image also works: in a project, it runs the project's version.",
41
+ 'Use `--json` for output a script reads; it never carries the answered-by line or a notice.',
42
+ ],
43
+ },
44
+ ],
45
+ },
46
+ {
47
+ id: 'cache',
48
+ title: 'Cache project versions',
49
+ content: [
50
+ {
51
+ type: 'prose',
52
+ text: "When the project installs its own CLI and you install the project's dependencies first, there is nothing to cache. Astryx downloads into its cache only the CLI version a project whose own CLI cannot start needs, and, outside a project, the Core of a global install for commands that read components. In CI it downloads nothing in the background, so a global install in a CI image fetches that Core on its first component command. To skip those downloads on every run, cache this folder between runs:",
53
+ },
54
+ {
55
+ type: 'table',
56
+ headers: ['Linux', 'macOS', 'Windows'],
57
+ rows: [
58
+ [
59
+ '`~/.cache/astryx` (or `$XDG_CACHE_HOME/astryx`)',
60
+ '`~/Library/Caches/astryx`',
61
+ '`%LOCALAPPDATA%\\astryx\\Cache`',
62
+ ],
63
+ ],
64
+ },
65
+ ],
66
+ },
67
+ {
68
+ id: 'read-only',
69
+ title: 'Read-only home folders',
70
+ content: [
71
+ {
72
+ type: 'prose',
73
+ text: "When the cache cannot be written, a project whose own CLI cannot start is answered by the global install, with a warning naming the folder. Point `XDG_CACHE_HOME` at a writable absolute path, or reinstall the project's dependencies. The global install's daily check and agent guide are skipped quietly when they cannot be written.",
74
+ },
75
+ ],
76
+ },
77
+ {
78
+ id: 'more',
79
+ title: 'More on global mode',
80
+ content: [
81
+ {
82
+ type: 'prose',
83
+ text: 'This page is part of {@link namespace:global}, which explains what global mode is and how each part works.',
84
+ },
85
+ ],
86
+ },
87
+ ],
88
+ };