@astryxdesign/cli 0.6.3-canary.e073c9f → 0.6.3-canary.ea2f048

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 (188) hide show
  1. package/README.md +1 -2
  2. package/api/build/build.type.d.mts +2 -2
  3. package/api/build/build.type.mjs +2 -2
  4. package/api/component/component.type.d.mts +6 -6
  5. package/api/component/component.type.mjs +19 -19
  6. package/api/discover/discover.type.d.mts +4 -4
  7. package/api/discover/discover.type.mjs +10 -10
  8. package/api/docs/_adapter.d.mts +24 -37
  9. package/api/docs/_adapter.mjs +83 -169
  10. package/api/docs/detail/detail.mjs +63 -14
  11. package/api/docs/detail/section/section.d.mts +1 -1
  12. package/api/docs/detail/section/section.mjs +20 -44
  13. package/api/docs/detail/section/section.test.mjs +0 -41
  14. package/api/docs/docs.d.mts +2 -7
  15. package/api/docs/docs.doc.mjs +10 -27
  16. package/api/docs/docs.mjs +9 -16
  17. package/api/docs/docs.test.mjs +0 -6
  18. package/api/docs/docs.type.d.mts +3 -40
  19. package/api/docs/docs.type.mjs +8 -36
  20. package/api/docs/integrationDocs.test.mjs +0 -106
  21. package/api/doctor/doctor.d.mts +0 -48
  22. package/api/doctor/doctor.mjs +0 -232
  23. package/api/doctor/doctor.test.mjs +0 -196
  24. package/api/hook/hook.type.d.mts +3 -3
  25. package/api/hook/hook.type.mjs +11 -11
  26. package/api/hook/list/list.d.mts +1 -1
  27. package/api/integration/add-contribution.mjs +3 -5
  28. package/api/integration/add-contribution.test.mjs +4 -4
  29. package/api/integration/integration-authoring.type.d.mts +1 -1
  30. package/api/integration/pack-check.mjs +7 -49
  31. package/api/integration/pack-check.test.mjs +0 -249
  32. package/api/search/search.d.mts +1 -1
  33. package/api/search/search.mjs +5 -5
  34. package/api/search/search.type.d.mts +2 -2
  35. package/api/search/search.type.mjs +1 -1
  36. package/api/swizzle/swizzle.type.d.mts +2 -2
  37. package/api/swizzle/swizzle.type.mjs +2 -2
  38. package/api/template/template.d.mts +1 -1
  39. package/api/template/template.type.d.mts +6 -6
  40. package/api/template/template.type.mjs +12 -12
  41. package/api/theme/build/build.mjs +6 -20
  42. package/api/theme/build/build.test.mjs +0 -127
  43. package/api/theme/palette/generate/generate.mjs +1 -1
  44. package/api/theme/palette/generate/generator.d.mts +13 -10
  45. package/api/theme/palette/generate/generator.mjs +3 -7
  46. package/api/theme/theme.type.d.mts +11 -170
  47. package/api/theme/theme.type.mjs +27 -94
  48. package/api/upgrade/_adapter.mjs +5 -71
  49. package/api/upgrade/upgrade.doc.mjs +3 -4
  50. package/api/upgrade/upgrade.type.d.mts +5 -5
  51. package/api/upgrade/upgrade.type.mjs +11 -11
  52. package/assets/codemods/integration-discovery.mjs +2 -40
  53. package/assets/codemods/integration-discovery.test.mjs +0 -58
  54. package/assets/codemods/transforms/v0.3.0/__tests__/unwrap-authoring-factories.test.mjs +5 -27
  55. package/assets/codemods/transforms/v0.3.0/unwrap-authoring-factories.mjs +5 -20
  56. package/assets/docs/README.md +0 -9
  57. package/assets/docs/cli-integrations.doc.mjs +15 -86
  58. package/assets/docs/styling-libraries.doc.mjs +1 -1
  59. package/assets/docs/working-with-ai.doc.mjs +1 -1
  60. package/authoring/_shared/contract.ts +0 -22
  61. package/authoring/codemod/codemod.doc.mjs +1 -6
  62. package/authoring/codemod/parse.d.mts +8 -8
  63. package/authoring/codemod/parse.mjs +6 -8
  64. package/authoring/config/parse.d.mts +13 -13
  65. package/authoring/config/parse.mjs +8 -8
  66. package/authoring/config/type.ts +3 -3
  67. package/authoring/debug/parse.d.mts +5 -5
  68. package/authoring/debug/parse.mjs +3 -3
  69. package/authoring/doctypes/_schema.d.mts +23 -788
  70. package/authoring/doctypes/_schema.mjs +39 -492
  71. package/authoring/doctypes/base/type.ts +0 -40
  72. package/authoring/doctypes/command/command.doc.mjs +2 -3
  73. package/authoring/doctypes/command/parse.d.mts +2 -2
  74. package/authoring/doctypes/command/parse.mjs +1 -1
  75. package/authoring/doctypes/command/type.ts +2 -3
  76. package/authoring/doctypes/component/component.doc.mjs +3 -6
  77. package/authoring/doctypes/component/parse.d.mts +2 -2
  78. package/authoring/doctypes/component/parse.mjs +1 -1
  79. package/authoring/doctypes/component/type.ts +3 -4
  80. package/authoring/doctypes/enum/parse.d.mts +2 -2
  81. package/authoring/doctypes/enum/parse.mjs +1 -1
  82. package/authoring/doctypes/enum/type.ts +1 -3
  83. package/authoring/doctypes/function/function.doc.mjs +0 -4
  84. package/authoring/doctypes/function/parse.d.mts +2 -2
  85. package/authoring/doctypes/function/parse.mjs +1 -1
  86. package/authoring/doctypes/function/type.ts +2 -6
  87. package/authoring/doctypes/hook/hook.doc.mjs +0 -4
  88. package/authoring/doctypes/hook/parse.d.mts +2 -2
  89. package/authoring/doctypes/hook/parse.mjs +1 -1
  90. package/authoring/doctypes/hook/type.ts +2 -3
  91. package/authoring/doctypes/legacy.d.mts +6 -8
  92. package/authoring/doctypes/legacy.mjs +4 -5
  93. package/authoring/doctypes/parse.d.mts +18 -20
  94. package/authoring/doctypes/parse.mjs +10 -16
  95. package/authoring/doctypes/parse.test.mjs +3 -77
  96. package/authoring/doctypes/reference/parse.d.mts +2 -2
  97. package/authoring/doctypes/reference/parse.mjs +5 -8
  98. package/authoring/doctypes/reference/reference.doc.mjs +4 -17
  99. package/authoring/doctypes/reference/type.ts +5 -51
  100. package/authoring/doctypes/schema/parse.d.mts +2 -2
  101. package/authoring/doctypes/schema/parse.mjs +1 -1
  102. package/authoring/doctypes/schema/type.ts +2 -3
  103. package/authoring/doctypes/template/parse.d.mts +1 -92
  104. package/authoring/doctypes/template/parse.mjs +2 -36
  105. package/authoring/doctypes/template/parse.test.mjs +2 -8
  106. package/authoring/doctypes/template/template.doc.mjs +0 -4
  107. package/authoring/doctypes/template/type.ts +2 -5
  108. package/authoring/doctypes/types.ts +9 -10
  109. package/authoring/gap-report/parse.d.mts +10 -10
  110. package/authoring/gap-report/parse.mjs +6 -6
  111. package/authoring/gap-report/type.ts +1 -1
  112. package/authoring/index.d.mts +0 -1
  113. package/authoring/index.d.ts +17 -49
  114. package/authoring/index.mjs +0 -1
  115. package/authoring/integration/integration.doc.mjs +6 -13
  116. package/authoring/integration/parse.d.mts +2 -2
  117. package/authoring/integration/parse.mjs +1 -1
  118. package/authoring/integration/parse.test.mjs +1 -10
  119. package/authoring/integration/schema.d.mts +4 -6
  120. package/authoring/integration/schema.mjs +3 -9
  121. package/authoring/integration/type.ts +6 -23
  122. package/authoring/shadcn/receipt.d.mts +6 -6
  123. package/clients/cli/commands/docs.doc.mjs +3 -13
  124. package/clients/cli/commands/docs.mjs +21 -121
  125. package/clients/cli/commands/docs.test.mjs +0 -88
  126. package/clients/cli/commands/integration-authoring.test.mjs +9 -13
  127. package/clients/cli/commands/theme-palette-generate.doc.mjs +4 -8
  128. package/clients/cli/commands/upgrade.doc.mjs +2 -2
  129. package/clients/cli/formatters/index.mjs +1 -162
  130. package/clients/cli/formatters/index.test.mjs +0 -91
  131. package/clients/cli/lib/manifest.mjs +2 -7
  132. package/foundation/config/project.mjs +6 -21
  133. package/foundation/discovery/component-discovery.d.mts +1 -1
  134. package/foundation/discovery/component-discovery.mjs +1 -2
  135. package/foundation/discovery/docs-discovery.d.mts +4 -11
  136. package/foundation/discovery/docs-discovery.mjs +88 -208
  137. package/foundation/discovery/docs-discovery.test.mjs +13 -279
  138. package/foundation/discovery/template-adapter.mjs +1 -2
  139. package/foundation/discovery/theming-targets.test.mjs +0 -4
  140. package/foundation/integrations/autolink.mjs +5 -12
  141. package/foundation/integrations/integration-warnings.mjs +0 -6
  142. package/foundation/integrations/integrations.d.mts +2 -46
  143. package/foundation/integrations/integrations.mjs +8 -167
  144. package/foundation/integrations/integrations.test.mjs +1 -384
  145. package/foundation/integrations/validate-contributions.d.mts +0 -2
  146. package/foundation/integrations/validate-contributions.mjs +0 -10
  147. package/foundation/response/json-contract.test.mjs +17 -46
  148. package/foundation/response/response-types.doc.mjs +1 -6
  149. package/package.json +11 -9
  150. package/api/docs/compiled-topics.test.mjs +0 -78
  151. package/api/docs/index/index.d.mts +0 -18
  152. package/api/docs/index/index.mjs +0 -32
  153. package/api/docs/index/index.test.mjs +0 -62
  154. package/api/upgrade/project-context.test.mjs +0 -272
  155. package/assets/docs/authoring.doc.mjs +0 -14
  156. package/authoring/doctypes/base/graph-fields.doc.d.mts +0 -9
  157. package/authoring/doctypes/base/graph-fields.doc.mjs +0 -62
  158. package/authoring/doctypes/load-contract.test.mjs +0 -207
  159. package/authoring/doctypes/namespace/namespace.doc.d.mts +0 -9
  160. package/authoring/doctypes/namespace/namespace.doc.mjs +0 -132
  161. package/authoring/doctypes/namespace/parse.d.mts +0 -12
  162. package/authoring/doctypes/namespace/parse.mjs +0 -25
  163. package/authoring/doctypes/namespace/parse.test.mjs +0 -165
  164. package/authoring/doctypes/namespace/type.ts +0 -71
  165. package/authoring/identity/identity.doc.d.mts +0 -9
  166. package/authoring/identity/identity.doc.mjs +0 -61
  167. package/authoring/identity/type.ts +0 -132
  168. package/foundation/discovery/authoring-self-docs.d.mts +0 -69
  169. package/foundation/discovery/authoring-self-docs.mjs +0 -214
  170. package/foundation/discovery/authoring-self-docs.test.mjs +0 -154
  171. package/foundation/discovery/docs-output-budget.d.mts +0 -28
  172. package/foundation/discovery/docs-output-budget.mjs +0 -50
  173. package/foundation/discovery/docs-section-key.d.mts +0 -98
  174. package/foundation/discovery/docs-section-key.mjs +0 -221
  175. package/foundation/discovery/docs-section-key.test.mjs +0 -224
  176. package/foundation/doc-compiler/compile.d.mts +0 -162
  177. package/foundation/doc-compiler/compile.mjs +0 -262
  178. package/foundation/doc-compiler/doc-compiler.test.mjs +0 -687
  179. package/foundation/doc-compiler/ir.d.mts +0 -9
  180. package/foundation/doc-compiler/ir.mjs +0 -287
  181. package/foundation/doc-compiler/lenses.d.mts +0 -33
  182. package/foundation/doc-compiler/lenses.mjs +0 -127
  183. package/foundation/identity/provider-identity.d.mts +0 -90
  184. package/foundation/identity/provider-identity.mjs +0 -320
  185. package/foundation/identity/provider-identity.test.mjs +0 -254
  186. package/foundation/identity/providers.d.mts +0 -7
  187. package/foundation/identity/providers.mjs +0 -16
  188. package/foundation/integrations/provider-conflicts.test.mjs +0 -125
@@ -5,9 +5,8 @@
5
5
  *
6
6
  * v0.3.0 removes the authoring factories. Authoring is now types + parsers: an
7
7
  * author writes a plain object and stamps its `type` directly. This transform
8
- * rewrites factory calls imported from the retired Astryx authoring entrypoints
9
- * to the plain object the factory used to return, then drops the now-dead
10
- * factory imports:
8
+ * rewrites every factory call to the plain object the factory used to return,
9
+ * then drops the now-dead factory imports:
11
10
  *
12
11
  * createConfig(o) / createIntegration(o) -> o (no discriminant)
13
12
  * createComponentDoc(o) -> { ...o, type: 'component' }
@@ -26,9 +25,8 @@
26
25
  *
27
26
  * Import aliases are followed (`import {createDoc as mk}` → calls to `mk`), and
28
27
  * the factory specifiers are removed afterward (the whole import statement goes
29
- * if nothing else was imported from it). Same-named imports from other packages
30
- * remain untouched. Run this BEFORE `migrate-authoring-imports`, which repoints
31
- * the surviving type imports.
28
+ * if nothing else was imported from it). Run this BEFORE
29
+ * `migrate-authoring-imports`, which repoints the surviving type imports.
32
30
  */
33
31
 
34
32
  export const meta = {
@@ -37,24 +35,13 @@ export const meta = {
37
35
  'Rewrites createConfig/createIntegration/createComponentDoc/' +
38
36
  'createFunctionDoc/createDoc/createPageTemplate/createBlockTemplate/' +
39
37
  'createCodemod/createConfigCodemod calls to the plain object they returned ' +
40
- '(stamping the doc/template/codemod `type` discriminant), and removes the ' +
38
+ "(stamping the doc/template/codemod `type` discriminant), and removes the " +
41
39
  'now-dead factory imports. Authoring is types + parsers in v0.3.0 — there ' +
42
40
  'are no factories.',
43
41
  pr: '#4612',
44
42
  fileExtensions: ['.js', '.jsx', '.ts', '.tsx', '.mjs', '.cjs'],
45
43
  };
46
44
 
47
- /** Legacy Astryx authoring entrypoints that exported the removed factories. */
48
- const AUTHORING_SOURCES = new Set([
49
- '@astryxdesign/cli/config',
50
- '@astryxdesign/cli/doc',
51
- '@astryxdesign/cli/integration',
52
- '@astryxdesign/cli/template',
53
- '@astryxdesign/cli/codemod',
54
- '@astryxdesign/core/authoring',
55
- '@astryxdesign/core/config',
56
- ]);
57
-
58
45
  /**
59
46
  * Factory name → the `type` discriminant it stamped, or `null` for the config /
60
47
  * integration factories, which were pure typed-identity (no discriminant).
@@ -121,7 +108,6 @@ export default function transformer(file, api) {
121
108
  /** @type {Map<string, string>} */
122
109
  const localToFactory = new Map();
123
110
  root.find(j.ImportDeclaration).forEach((/** @type {any} */ path) => {
124
- if (!AUTHORING_SOURCES.has(path.node.source.value)) return;
125
111
  for (const spec of path.node.specifiers ?? []) {
126
112
  if (spec.type !== 'ImportSpecifier') continue;
127
113
  const importedName = spec.imported?.name;
@@ -177,7 +163,6 @@ export default function transformer(file, api) {
177
163
  // Drop the now-dead factory import specifiers; remove any import statement
178
164
  // left empty.
179
165
  root.find(j.ImportDeclaration).forEach((/** @type {any} */ path) => {
180
- if (!AUTHORING_SOURCES.has(path.node.source.value)) return;
181
166
  const specs = path.node.specifiers ?? [];
182
167
  const kept = specs.filter(
183
168
  (/** @type {any} */ spec) =>
@@ -48,12 +48,3 @@ The material is usually good; the finding is placement, not quality. It goes in
48
48
  **Fits no row?** It is still not caller-facing. Default it to [Contributing](https://github.com/facebook/astryx/wiki/Contributing), or `CONTRIBUTING.md` when it is a step someone follows with the repo cloned. Never default it back to this directory.
49
49
 
50
50
  Worked example: a responsive-and-interaction readiness rubric is grading criteria → **Component-Audit-Rubric**, or **Component-Lifecycle** if it is a promotion gate.
51
-
52
- ## Sections are read one at a time
53
-
54
- `astryx docs <topic> --index` lists a topic's sections, and readers then open
55
- one section by its key. A section's key is its `id`, or a key derived from its
56
- title when it has none. Give a section an `id` when its title may change, since
57
- readers and extensions link to the key. Two sections in one topic cannot share
58
- a key. Keep each section small enough to read on its own: `astryx doctor` fails
59
- any section over 32 KB.
@@ -20,11 +20,7 @@ export const docs = {
20
20
  },
21
21
  {
22
22
  type: 'prose',
23
- text: 'The authoring CLI owns the integration file. The first `astryx integration add` creates `astryx.integration.mjs`; each later add declares its root only after writing a valid contribution behind it. Identity (name and version) still comes from package.json. For the consumer side, run `astryx docs getting-started`.',
24
- },
25
- {
26
- type: 'prose',
27
- text: 'Every file an integration author writes is documented field by field in `npx astryx docs authoring`: the manifest, astryx.config, codemods, identity, and each doc type. `npx astryx docs authoring --index` lists them, and `npx astryx docs authoring <key>` reads one.',
23
+ text: 'The authoring CLI owns the integration file. The first `astryx integration add` creates `astryx.integration.mjs`; each later add declares its root only after writing a valid contribution behind it. Identity (name and version) still comes from package.json. For the consumer side, run `npx astryx docs getting-started`.',
28
24
  },
29
25
  {
30
26
  type: 'prose',
@@ -52,7 +48,7 @@ export const docs = {
52
48
  content: [
53
49
  {
54
50
  type: 'prose',
55
- text: 'Do not start by hand-editing a manifest. Add the contribution you mean to ship; Astryx creates the manifest, writes every required file, preserves an existing custom root, and updates an existing package.json files allowlist without creating one. Always run these commands from the locally installed CLI in the package (e.g. `node node_modules/@astryxdesign/cli/clients/cli/bin/astryx.mjs` or `pnpm astryx`), not `npx @astryxdesign/cli` — npx may resolve a stale registry version whose integration scaffolding does not match the installed one.',
51
+ text: 'Do not start by hand-editing a manifest. Add the contribution you mean to ship; Astryx creates the manifest, writes every required file, preserves an existing custom root, and updates an existing package.json files allowlist without creating one.',
56
52
  },
57
53
  {
58
54
  type: 'code',
@@ -84,17 +80,17 @@ export const docs = {
84
80
  content: [
85
81
  {
86
82
  type: 'prose',
87
- text: 'A useful theme package usually ships more than colors. Start with the source theme, author the palette request at `themes/ocean/palette.config.json`, then add the guides its consumers need. The `integration add` commands keep the package manifest in sync; add palette outputs to the theme catalog after generation.',
83
+ text: 'A useful theme package usually ships more than colors. Start with the source theme, then add the guides its consumers need. Each command writes a complete contribution and keeps the package manifest in sync.',
88
84
  },
89
85
  {
90
86
  type: 'code',
91
87
  lang: 'bash',
92
88
  label: 'In the provider package',
93
- code: 'astryx integration add theme ocean\nastryx theme palette generate themes/ocean/palette.config.json --out themes/ocean/tokens/ocean.palette.ts\nastryx integration add doc brand-theme\nastryx integration add doc theme-migration\nastryx theme list --package @acme/brand-integration\nastryx docs brand-theme\nastryx integration pack --check\nnpm pack',
89
+ code: 'astryx integration add theme ocean\nastryx theme palette generate palette.config.json --out themes/ocean/tokens/ocean.palette.ts\nastryx integration add doc brand-theme\nastryx integration add doc theme-migration\nastryx theme list --package @acme/brand-integration\nastryx docs brand-theme\nastryx integration pack --check\nnpm pack',
94
90
  },
95
91
  {
96
92
  type: 'prose',
97
- text: "Edit the generated theme and guide files before publishing. The shown palette command writes `themes/ocean/tokens/ocean.palette.ts` and its sibling `themes/ocean/tokens/ocean.palette.receipt.json`. The TypeScript candidate directly exports `black`, `white`, and `palette`; import what the theme uses from `./tokens/ocean.palette`. Keep the request at `themes/ocean/palette.config.json`, and list the theme source, request, candidate, and receipt in the catalog entry's `files` array. Add any optional wrapper, refs, icon, or preview modules only when you author them, and list each one too. `integration pack --check` runs the real package lifecycle and compares local discovery with the npm tarball, so a missing source file or files allowlist entry fails before a consumer sees it.",
93
+ text: 'Edit the generated theme and guide files before publishing. Palette generation writes an importable TypeScript candidate and a reproducibility receipt; import the candidate from the theme and list both nested files in that theme catalog entry. `integration pack --check` runs the real package lifecycle and compares local discovery with the npm tarball, so a missing source file or files allowlist entry fails before a consumer sees it.',
98
94
  },
99
95
  {
100
96
  type: 'code',
@@ -108,25 +104,6 @@ export const docs = {
108
104
  },
109
105
  ],
110
106
  },
111
- {
112
- title: 'Contribution Kinds at a Glance',
113
- category: 'guide',
114
- content: [
115
- {
116
- type: 'prose',
117
- text: 'Each contribution kind uses a different metadata suffix, type stamp, and discovery rule. The table below prevents the most common first-time authoring mistake — using the wrong file or export convention.',
118
- },
119
- {
120
- type: 'code',
121
- lang: 'text',
122
- code: "Kind Metadata suffix type stamp Source file\n──────── ───────────────────────── ───────────── ──────────────────────\nComponent Name.doc.{ts,mjs,js} 'component' Name.tsx (same stem)\nTemplate Name.template.{ts,mjs,js} 'page'/'block' Name.tsx (same stem)\nDoc topic topic.doc.{ts,mjs,js} 'generic' (none — docs are prose)\nCodemod <version>/<id>.{ts,mjs,js} 'code'/'config' (the codemod IS the source)\nTheme manifest.json entry — <slug>/<entry>.ts",
123
- },
124
- {
125
- type: 'prose',
126
- text: 'The `type` stamp is how new docs should be authored — it routes parsing to the correct schema at the load boundary. Legacy docs without a stamp still load via shape-sniffing for backward compatibility, but unstamped docs rely on heuristics (presence of `props`, `params`, etc.) and may parse under the wrong schema if the shape is ambiguous. Always stamp new integration contributions.',
127
- },
128
- ],
129
- },
130
107
  {
131
108
  title: 'The Integration File',
132
109
  category: 'guide',
@@ -152,7 +129,7 @@ export const docs = {
152
129
  content: [
153
130
  {
154
131
  type: 'prose',
155
- text: "Export your components from your library however you like, and consumers still import them from your package. For each component the CLI should document, ship a `.doc.{ts,mjs,js}` file with the same stem, for example `AcmeCarousel.tsx` alongside `AcmeCarousel.doc.ts`. The doc file must default-export an object with `type: 'component'` — not `'generic'` (that is for reference docs) and not `'page'`/`'block'` (those are for templates).",
132
+ text: 'Export your components from your library however you like, and consumers still import them from your package. For each component the CLI should document, ship a `.doc.{ts,mjs,js}` file with the same stem, for example `AcmeCarousel.tsx` alongside `AcmeCarousel.doc.ts`.',
156
133
  },
157
134
  {
158
135
  type: 'prose',
@@ -161,7 +138,7 @@ export const docs = {
161
138
  {
162
139
  type: 'code',
163
140
  lang: 'typescript',
164
- code: "// AcmeCarousel.doc.ts\nexport default {\n type: 'component',\n name: 'AcmeCarousel',\n description: 'A carousel that cycles through slides.',\n // props, usage, examples, ...\n} satisfies import('@astryxdesign/cli/authoring').ComponentDoc;",
141
+ code: "// AcmeCarousel.doc.ts\nexport default {\n type: 'component',\n name: 'AcmeCarousel',\n description: 'A carousel that cycles through slides.',\n // props, usage, examples, ...\n};",
165
142
  },
166
143
  ],
167
144
  },
@@ -171,7 +148,7 @@ export const docs = {
171
148
  content: [
172
149
  {
173
150
  type: 'prose',
174
- text: "Templates are usually not exported from the package directly. Instead, consumers browse them through the CLI and materialize them into their app. Define a template as a plain object with `type: 'page'` (full pages) or `type: 'block'` (smaller chunks) as its default export in a `.template.{ts,mjs,js}` file next to the source, for example `AcmeLandingPage.tsx` and `AcmeLandingPage.template.ts`. Do not use the `.doc.{ts,mjs,js}` suffix — that is for component docs and reference docs.",
151
+ text: "Templates are usually not exported from the package directly. Instead, consumers browse them through the CLI and materialize them into their app. Define a template as a plain object stamped with `type: 'page'` (full pages) or `type: 'block'` (smaller chunks) in a `.template.{ts,mjs,js}` file next to the source, for example `AcmeLandingPage.tsx` and `AcmeLandingPage.template.ts`.",
175
152
  },
176
153
  {
177
154
  type: 'prose',
@@ -184,7 +161,7 @@ export const docs = {
184
161
  },
185
162
  {
186
163
  type: 'prose',
187
- text: 'The CLI needs both files at consume time. `integration add` includes the templates root when package.json already has a files allowlist. It never creates an exports map, because doing that can make previously-open deep imports private; when a map already exists, it adds the generated source subpath without replacing author-owned entries. Use consumer-safe extensionless subpaths in the exports map (e.g. `"./templates/AcmeDashboard"` instead of `"./templates/AcmeDashboard.tsx"`), so consumers import without knowing the file extension. `integration pack --check` proves the source and metadata survive the tarball and verifies every component through the public import its metadata advertises.',
164
+ text: 'The CLI needs both files at consume time. `integration add` includes the templates root when package.json already has a files allowlist. It never creates an exports map, because doing that can make previously-open deep imports private; when a map already exists, it adds the generated source subpath without replacing author-owned entries. `integration pack --check` proves the source and metadata survive the tarball and verifies every component through the public import its metadata advertises.',
188
165
  },
189
166
  ],
190
167
  },
@@ -194,7 +171,7 @@ export const docs = {
194
171
  content: [
195
172
  {
196
173
  type: 'prose',
197
- text: "Point the integration file's `docs` field at a directory of reference docs and every `{topic}.doc.{ts,mjs,js}` under it becomes a topic the CLI serves: `astryx docs` lists it, `astryx docs <topic>` prints it, `astryx search` indexes it, and `astryx init` names it in the agent block. A topic is a plain object with `type: 'generic'` as its default export — not `'component'` (that is for component docs with a same-stem source file). This is the same shape core's own topics use.",
174
+ text: "Point the integration file's `docs` field at a directory of reference docs and every `{topic}.doc.{ts,mjs,js}` under it becomes a topic the CLI serves: `astryx docs` lists it, `astryx docs <topic>` prints it, `astryx search` indexes it, and `astryx init` names it in the agent block. A topic is a plain object stamped `type: 'generic'`, the same shape core's own topics use.",
198
175
  },
199
176
  {
200
177
  type: 'code',
@@ -212,7 +189,7 @@ export const docs = {
212
189
  },
213
190
  {
214
191
  type: 'prose',
215
- text: "`extends: 'x'` merges onto a topic instead of owning it: a section with the same key as one in the base (its `id`, or the key its title derives) or the same title replaces that section, and a section the base does not have is appended. Reach for it to correct or add to a topic you do not want to fork: a fork of someone else's guide stops receiving their fixes the day you write it.",
192
+ text: "`extends: 'x'` merges onto a topic instead of owning it: a section whose title matches one in the base replaces that section, and a section the base does not have is appended. Reach for it to correct or add to a topic you do not want to fork: a fork of someone else's guide stops receiving their fixes the day you write it.",
216
193
  },
217
194
  {
218
195
  type: 'list',
@@ -238,33 +215,16 @@ export const docs = {
238
215
  {
239
216
  type: 'code',
240
217
  lang: 'text',
241
- code: 'themes/\n manifest.json\n ocean/\n oceanTheme.ts\n palette.config.json\n tokens/\n ocean.palette.ts\n ocean.palette.receipt.json',
218
+ code: 'themes/\n manifest.json\n ocean/\n oceanTheme.ts',
242
219
  },
243
220
  {
244
221
  type: 'prose',
245
- text: 'The root catalog `manifest.json` must be `{ "version": 1, "themes": [...] }`. Each entry in the `themes` array requires every field shown below — omitting any one is a hard validation error:',
246
- },
247
- {
248
- type: 'list',
249
- style: 'unordered',
250
- items: [
251
- '`slug` — lowercase kebab-case starting with a letter (e.g. `"ocean"`). Must be unique within the catalog.',
252
- '`displayName` — human-readable label (e.g. `"Ocean"`).',
253
- '`description` — string description of the theme.',
254
- '`maintained` — boolean indicating active maintenance.',
255
- '`entry` — source file relative to `themes/<slug>/` (e.g. `"oceanTheme.ts"`).',
256
- '`exportName` — a valid JS identifier naming the runtime export in the entry file (e.g. `"oceanTheme"`). Astryx parses the source without executing it and rejects missing or type-only exports.',
257
- '`files` — non-empty array of filenames relative to `themes/<slug>/`. Must include the entry file and every local static import the entry source uses. Astryx validates that every listed file exists on disk and that every local import in the entry names a file in this list.',
258
- ],
222
+ text: "The root catalog uses the same entry contract as Astryx's bundled themes: `slug`, `displayName`, `description`, `maintained`, `entry`, `exportName`, and `files`. `entry` and every file are relative to `themes/<slug>/`; `exportName` identifies a named runtime export in the entry source. Astryx parses that source without executing it, requires every local static import and re-export to name a file in `files`, and rejects missing or type-only exports.",
259
223
  },
260
224
  {
261
225
  type: 'code',
262
226
  lang: 'json',
263
- code: '{\n "version": 1,\n "themes": [{\n "slug": "ocean",\n "displayName": "Ocean",\n "description": "Ocean theme with OKLCH palettes.",\n "maintained": true,\n "entry": "oceanTheme.ts",\n "exportName": "oceanTheme",\n "files": [\n "oceanTheme.ts",\n "palette.config.json",\n "tokens/ocean.palette.ts",\n "tokens/ocean.palette.receipt.json"\n ]\n }]\n}',
264
- },
265
- {
266
- type: 'prose',
267
- text: 'The generated candidate is already importable: it exports `black`, `white`, `palette`, and a default palette value. Import it directly from `./tokens/ocean.palette`. A wrapper or palette-refs module is optional application code, not generator output; list it only if you create it.',
227
+ code: '{\n "version": 1,\n "themes": [{\n "slug": "ocean",\n "displayName": "Ocean",\n "description": "Ocean theme.",\n "maintained": true,\n "entry": "oceanTheme.ts",\n "exportName": "oceanTheme",\n "files": ["oceanTheme.ts"]\n }]\n}',
268
228
  },
269
229
  {
270
230
  type: 'prose',
@@ -307,41 +267,10 @@ export const docs = {
307
267
  type: 'prose',
308
268
  text: "Ship codemods so `astryx upgrade` can migrate consumers across breaking changes in your package. Point the integration file's `codemods` field at your codemods root, and author each one as a plain object stamped with `type: 'code'` (transforms source files) or `type: 'config'` (rewrites the consumer's `astryx.config`).",
309
269
  },
310
- {
311
- type: 'prose',
312
- text: 'The codemods root uses a version-folder-first layout. Each folder name is an exact semver string (no `v` prefix) matching the version the codemod migrates TO. Each module under it is a kebab-case `.ts`, `.mjs`, or `.js` file whose default export is the codemod envelope:',
313
- },
314
- {
315
- type: 'code',
316
- lang: 'text',
317
- code: 'codemods/\n 0.2.0/\n rename-widget-prop.ts\n 0.3.0/\n update-theme-import.ts\n config/rename-integration.ts',
318
- },
319
- {
320
- type: 'prose',
321
- text: 'Codemod ids (the extension-less relative path under the version folder, e.g. `rename-widget-prop`, `config/rename-integration`) must be unique within a package across all versions. A duplicate id across versions is a hard error.',
322
- },
323
- {
324
- type: 'prose',
325
- text: 'The loader automatically skips test and fixture files so you can colocate tests with transforms. Reserved names: files matching `*.test.*`, `*.spec.*`, or `*.fixture.*`, and any file under a `__tests__/` or `__fixtures__/` directory. These are never loaded as codemods regardless of their extension.',
326
- },
327
- {
328
- type: 'code',
329
- lang: 'text',
330
- code: 'codemods/\n 0.2.0/\n rename-widget-prop.ts # loaded as a codemod\n rename-widget-prop.test.ts # skipped (reserved name)\n __tests__/\n rename-widget-prop.test.ts # skipped (reserved directory)',
331
- },
332
270
  {
333
271
  type: 'code',
334
272
  lang: 'typescript',
335
- code: "// codemods/0.2.0/rename-widget-prop.ts\nexport default {\n type: 'code',\n title: 'Rename AcmeWidget oldProp to newProp',\n description: 'Updates JSX props in consumer source files.',\n transform(file, api) {\n // jscodeshift transform\n return file.source;\n },\n};",
336
- },
337
- {
338
- type: 'prose',
339
- text: "`astryx upgrade` is dry-run by default — it previews which codemods would run and what files would change, without writing anything. Pass `--apply` to write the changes. There is no `--dry-run` flag; omitting `--apply` is the dry run. The `--integration` flag resolves each value beneath the project's `node_modules` (for example, `--integration @acme/widgets`). Absolute paths and `.` or `..` segments are rejected; other slash-separated values remain beneath `node_modules`.",
340
- },
341
- {
342
- type: 'code',
343
- lang: 'bash',
344
- code: '# Preview what would change (dry-run, the default)\nastryx upgrade --from 0.1.0\n\n# Apply the migration\nastryx upgrade --from 0.1.0 --apply',
273
+ code: "// codemods/v2-rename-prop.ts\nexport default {\n type: 'code',\n // title, description, transform, ...\n};",
345
274
  },
346
275
  {
347
276
  type: 'prose',
@@ -351,7 +351,7 @@ tokens: {
351
351
  },
352
352
  },
353
353
  shortcuts: {
354
- 'astryx-card': 'bg-surface text-primary border border-border rounded-lg p-4',
354
+ 'xds-card': 'bg-surface text-primary border border-border rounded-lg p-4',
355
355
  },
356
356
  });`,
357
357
  },
@@ -182,7 +182,7 @@ astryx docs tokens --dense`,
182
182
  label: 'MCP config (same for all tools)',
183
183
  code: `{
184
184
  "mcpServers": {
185
- "astryx": {
185
+ "xds": {
186
186
  "type": "url",
187
187
  "url": "https://astryx.atmeta.com/mcp"
188
188
  }
@@ -28,27 +28,5 @@ export type MutuallyAssignable<A, B> = [A] extends [B]
28
28
  : false
29
29
  : false;
30
30
 
31
- /**
32
- * `T` without string or number index signatures, at every depth. A
33
- * `.passthrough()` schema infers one and a hand-written interface never has
34
- * one, so a lock drops them before comparing named fields. Recursive fields
35
- * that a schema casts to their public type compare equal by construction.
36
- */
37
- export type NamedFields<T> = T extends readonly (infer U)[]
38
- ? NamedFields<U>[]
39
- : T extends (...args: never[]) => unknown
40
- ? T
41
- : T extends object
42
- ? {
43
- [
44
- K in keyof T as string extends K
45
- ? never
46
- : number extends K
47
- ? never
48
- : K
49
- ]: NamedFields<T[K]>;
50
- }
51
- : T;
52
-
53
31
  /** Compiles only when `T` is exactly `true`; otherwise a type error. */
54
32
  export type Expect<T extends true> = T;
@@ -63,13 +63,11 @@ export const doc = {
63
63
  name: 'file.path',
64
64
  type: 'string',
65
65
  description: 'Absolute path to the file being transformed.',
66
- required: true,
67
66
  },
68
67
  {
69
68
  name: 'file.source',
70
69
  type: 'string',
71
70
  description: 'The current source contents of the file.',
72
- required: true,
73
71
  },
74
72
  ],
75
73
  },
@@ -83,21 +81,18 @@ export const doc = {
83
81
  type: 'unknown',
84
82
  description:
85
83
  'A jscodeshift instance configured with a parser for the file.',
86
- required: true,
87
84
  },
88
85
  {
89
86
  name: 'api.stats',
90
87
  type: '(...args: unknown[]) => void',
91
88
  description:
92
89
  'Report a statistic (no-op-friendly; provided for jscodeshift parity).',
93
- required: true,
94
90
  },
95
91
  {
96
92
  name: 'api.report',
97
93
  type: '(...args: unknown[]) => void',
98
94
  description:
99
95
  'Report progress (no-op-friendly; provided for jscodeshift parity).',
100
- required: true,
101
96
  },
102
97
  ],
103
98
  },
@@ -105,7 +100,7 @@ export const doc = {
105
100
  },
106
101
  {
107
102
  name: 'type',
108
- type: "'code' | 'config'",
103
+ type: "'code'",
109
104
  description:
110
105
  "Discriminant for the file-transforming variant. Use 'config' for a " +
111
106
  'codemod that rewrites astryx.config.* instead (see notes).',
@@ -5,8 +5,8 @@
5
5
  * Compile-time drift-lock: sealed envelope must infer exactly the public
6
6
  * stamped-codemod union.
7
7
  *
8
- * @typedef {import('../_shared/contract.js').Expect<
9
- * import('../_shared/contract.js').Equal<
8
+ * @typedef {import('../_shared/contract').Expect<
9
+ * import('../_shared/contract').Equal<
10
10
  * z.infer<typeof codemodEnvelopeSchema>,
11
11
  * AstryxCodemod | AstryxConfigCodemod
12
12
  * >
@@ -24,10 +24,10 @@ export function parseCodemod(input: unknown, label?: string): AstryxCodemod | As
24
24
  * Compile-time drift-lock: sealed envelope must infer exactly the public
25
25
  * stamped-codemod union.
26
26
  */
27
- export type _CodemodDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").Equal<z.infer<typeof codemodEnvelopeSchema>, AstryxCodemod | AstryxConfigCodemod>>;
28
- export type AstryxCodemod = import("./type.js").AstryxCodemod;
29
- export type AstryxConfigCodemod = import("./type.js").AstryxConfigCodemod;
30
- export type AstryxCodemodTransform = import("./type.js").AstryxCodemodTransform;
27
+ export type _CodemodDriftLock = import("../_shared/contract").Expect<import("../_shared/contract").Equal<z.infer<typeof codemodEnvelopeSchema>, AstryxCodemod | AstryxConfigCodemod>>;
28
+ export type AstryxCodemod = import("./type").AstryxCodemod;
29
+ export type AstryxConfigCodemod = import("./type").AstryxConfigCodemod;
30
+ export type AstryxCodemodTransform = import("./type").AstryxCodemodTransform;
31
31
  import { z } from 'zod';
32
32
  /**
33
33
  * The load-boundary contract: a stamped codemod default export, discriminated
@@ -38,13 +38,13 @@ declare const codemodEnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
38
38
  description: z.ZodOptional<z.ZodString>;
39
39
  isOptional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
40
40
  fileExtensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
41
- transform: z.ZodType<import("./type.js").AstryxCodemodTransform, any, z.core.$ZodTypeInternals<import("./type.js").AstryxCodemodTransform, any>>;
41
+ transform: z.ZodType<import("./type").AstryxCodemodTransform, any, z.core.$ZodTypeInternals<import("./type").AstryxCodemodTransform, any>>;
42
42
  type: z.ZodLiteral<"code">;
43
43
  }, z.core.$strict>, z.ZodObject<{
44
44
  title: z.ZodString;
45
45
  description: z.ZodOptional<z.ZodString>;
46
46
  isOptional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
47
- transform: z.ZodType<import("./type.js").AstryxCodemodTransform, any, z.core.$ZodTypeInternals<import("./type.js").AstryxCodemodTransform, any>>;
47
+ transform: z.ZodType<import("./type").AstryxCodemodTransform, any, z.core.$ZodTypeInternals<import("./type").AstryxCodemodTransform, any>>;
48
48
  type: z.ZodLiteral<"config">;
49
49
  }, z.core.$strict>], "type">;
50
50
  export {};
@@ -10,14 +10,12 @@
10
10
  import {z} from 'zod';
11
11
  import {formatZodError} from '../_shared/errors.mjs';
12
12
 
13
- /** @typedef {import('./type.js').AstryxCodemod} AstryxCodemod */
14
- /** @typedef {import('./type.js').AstryxConfigCodemod} AstryxConfigCodemod */
15
- /** @typedef {import('./type.js').AstryxCodemodTransform} AstryxCodemodTransform */
13
+ /** @typedef {import('./type').AstryxCodemod} AstryxCodemod */
14
+ /** @typedef {import('./type').AstryxConfigCodemod} AstryxConfigCodemod */
15
+ /** @typedef {import('./type').AstryxCodemodTransform} AstryxCodemodTransform */
16
16
 
17
17
  const transform = /** @type {z.ZodType<AstryxCodemodTransform>} */ (
18
- z.custom(value => typeof value === 'function', {
19
- message: 'Expected a function',
20
- })
18
+ z.custom(value => typeof value === 'function', {message: 'Expected a function'})
21
19
  );
22
20
 
23
21
  const codeCodemodSchema = z
@@ -54,8 +52,8 @@ const codemodEnvelopeSchema = z.discriminatedUnion('type', [
54
52
  * Compile-time drift-lock: sealed envelope must infer exactly the public
55
53
  * stamped-codemod union.
56
54
  *
57
- * @typedef {import('../_shared/contract.js').Expect<
58
- * import('../_shared/contract.js').Equal<
55
+ * @typedef {import('../_shared/contract').Expect<
56
+ * import('../_shared/contract').Equal<
59
57
  * z.infer<typeof codemodEnvelopeSchema>,
60
58
  * AstryxCodemod | AstryxConfigCodemod
61
59
  * >
@@ -6,8 +6,8 @@
6
6
  * {@link AstryxConfig} type. If they drift, `Equal` becomes `false` and
7
7
  * `Expect<false>` fails the `tsconfig.authoring-contract.json` typecheck.
8
8
  *
9
- * @typedef {import('../_shared/contract.js').Expect<
10
- * import('../_shared/contract.js').MutuallyAssignable<z.infer<typeof configSchema>, AstryxConfig>
9
+ * @typedef {import('../_shared/contract').Expect<
10
+ * import('../_shared/contract').MutuallyAssignable<z.infer<typeof configSchema>, AstryxConfig>
11
11
  * >} _ConfigDriftLock
12
12
  */
13
13
  /**
@@ -23,13 +23,13 @@ export function parseConfig(input: unknown, label?: string): AstryxConfig;
23
23
  * {@link AstryxConfig} type. If they drift, `Equal` becomes `false` and
24
24
  * `Expect<false>` fails the `tsconfig.authoring-contract.json` typecheck.
25
25
  */
26
- export type _ConfigDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").MutuallyAssignable<z.infer<typeof configSchema>, AstryxConfig>>;
27
- export type AstryxConfig = import("./type.js").AstryxConfig;
28
- export type PostCodemodHook = import("./type.js").PostCodemodHook;
29
- export type XleComponent = import("./type.js").XleComponent;
30
- export type DebugConfig = import("./type.js").DebugConfig;
31
- export type DebugEventHandler = import("../debug/type.js").DebugEventHandler;
32
- export type GapReportHandler = import("../gap-report/type.js").GapReportHandler;
26
+ export type _ConfigDriftLock = import("../_shared/contract").Expect<import("../_shared/contract").MutuallyAssignable<z.infer<typeof configSchema>, AstryxConfig>>;
27
+ export type AstryxConfig = import("./type").AstryxConfig;
28
+ export type PostCodemodHook = import("./type").PostCodemodHook;
29
+ export type XleComponent = import("./type").XleComponent;
30
+ export type DebugConfig = import("./type").DebugConfig;
31
+ export type DebugEventHandler = import("../debug/type").DebugEventHandler;
32
+ export type GapReportHandler = import("../gap-report/type").GapReportHandler;
33
33
  import { z } from 'zod';
34
34
  declare const configSchema: z.ZodObject<{
35
35
  integrations: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -40,14 +40,14 @@ declare const configSchema: z.ZodObject<{
40
40
  buildCommand: z.ZodType<(ctx: {
41
41
  packageDir: string;
42
42
  files: string[];
43
- }) => import("./type.js").PostCodemodCommand | null | undefined | Promise<import("./type.js").PostCodemodCommand | null | undefined>, any, z.core.$ZodTypeInternals<(ctx: {
43
+ }) => import("./type").PostCodemodCommand | null | undefined | Promise<import("./type").PostCodemodCommand | null | undefined>, any, z.core.$ZodTypeInternals<(ctx: {
44
44
  packageDir: string;
45
45
  files: string[];
46
- }) => import("./type.js").PostCodemodCommand | null | undefined | Promise<import("./type.js").PostCodemodCommand | null | undefined>, any>>;
46
+ }) => import("./type").PostCodemodCommand | null | undefined | Promise<import("./type").PostCodemodCommand | null | undefined>, any>>;
47
47
  }, z.core.$strict>>>;
48
48
  }, z.core.$strict>>;
49
- debug: z.ZodOptional<z.ZodType<import("../debug/type.js").DebugEventHandler, any, z.core.$ZodTypeInternals<import("../debug/type.js").DebugEventHandler, any>>>;
50
- gapReport: z.ZodOptional<z.ZodType<import("../gap-report/type.js").GapReportHandler, any, z.core.$ZodTypeInternals<import("../gap-report/type.js").GapReportHandler, any>>>;
49
+ debug: z.ZodOptional<z.ZodType<import("../debug/type").DebugEventHandler, any, z.core.$ZodTypeInternals<import("../debug/type").DebugEventHandler, any>>>;
50
+ gapReport: z.ZodOptional<z.ZodType<import("../gap-report/type").GapReportHandler, any, z.core.$ZodTypeInternals<import("../gap-report/type").GapReportHandler, any>>>;
51
51
  experimental: z.ZodOptional<z.ZodObject<{
52
52
  xle: z.ZodOptional<z.ZodObject<{
53
53
  components: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -13,12 +13,12 @@ import {z} from 'zod';
13
13
  import {formatZodError} from '../_shared/errors.mjs';
14
14
  import {parseGapReportHandler} from '../gap-report/parse.mjs';
15
15
 
16
- /** @typedef {import('./type.js').AstryxConfig} AstryxConfig */
17
- /** @typedef {import('./type.js').PostCodemodHook} PostCodemodHook */
18
- /** @typedef {import('./type.js').XleComponent} XleComponent */
19
- /** @typedef {import('./type.js').DebugConfig} DebugConfig */
20
- /** @typedef {import('../debug/type.js').DebugEventHandler} DebugEventHandler */
21
- /** @typedef {import('../gap-report/type.js').GapReportHandler} GapReportHandler */
16
+ /** @typedef {import('./type').AstryxConfig} AstryxConfig */
17
+ /** @typedef {import('./type').PostCodemodHook} PostCodemodHook */
18
+ /** @typedef {import('./type').XleComponent} XleComponent */
19
+ /** @typedef {import('./type').DebugConfig} DebugConfig */
20
+ /** @typedef {import('../debug/type').DebugEventHandler} DebugEventHandler */
21
+ /** @typedef {import('../gap-report/type').GapReportHandler} GapReportHandler */
22
22
 
23
23
  // Typed `z.custom` so `z.infer` reproduces the real function type (not `unknown`).
24
24
  const buildCommand = /** @type {z.ZodType<PostCodemodHook['buildCommand']>} */ (
@@ -95,8 +95,8 @@ const configSchema = z
95
95
  * {@link AstryxConfig} type. If they drift, `Equal` becomes `false` and
96
96
  * `Expect<false>` fails the `tsconfig.authoring-contract.json` typecheck.
97
97
  *
98
- * @typedef {import('../_shared/contract.js').Expect<
99
- * import('../_shared/contract.js').MutuallyAssignable<z.infer<typeof configSchema>, AstryxConfig>
98
+ * @typedef {import('../_shared/contract').Expect<
99
+ * import('../_shared/contract').MutuallyAssignable<z.infer<typeof configSchema>, AstryxConfig>
100
100
  * >} _ConfigDriftLock
101
101
  */
102
102
 
@@ -9,8 +9,8 @@
9
9
  * boundary; there is no factory to call.
10
10
  */
11
11
 
12
- import type {DebugEventHandler} from '../debug/type.js';
13
- import type {GapReportHandler} from '../gap-report/type.js';
12
+ import type {DebugEventHandler} from '../debug/type';
13
+ import type {GapReportHandler} from '../gap-report/type';
14
14
 
15
15
  /**
16
16
  * A command to run as part of a post-codemod hook. Returned by a hook's
@@ -21,7 +21,7 @@ export interface PostCodemodCommand {
21
21
  args?: string[];
22
22
  options?: {
23
23
  cwd?: string;
24
- env?: Record<string, string | undefined>;
24
+ env?: NodeJS.ProcessEnv;
25
25
  timeout?: number;
26
26
  };
27
27
  }
@@ -7,8 +7,8 @@
7
7
  * `Expect<false>` fails the `tsconfig.authoring-contract.json` typecheck —
8
8
  * so a field added to the recorder without being published here breaks CI.
9
9
  *
10
- * @typedef {import('../_shared/contract.js').Expect<
11
- * import('../_shared/contract.js').MutuallyAssignable<z.infer<typeof eventSchema>, DebugEvent>
10
+ * @typedef {import('../_shared/contract').Expect<
11
+ * import('../_shared/contract').MutuallyAssignable<z.infer<typeof eventSchema>, DebugEvent>
12
12
  * >} _DebugEventDriftLock
13
13
  */
14
14
  /**
@@ -29,8 +29,8 @@ export function parseDebugEvent(input: unknown, label?: string): DebugEvent;
29
29
  * `Expect<false>` fails the `tsconfig.authoring-contract.json` typecheck —
30
30
  * so a field added to the recorder without being published here breaks CI.
31
31
  */
32
- export type _DebugEventDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").MutuallyAssignable<z.infer<typeof eventSchema>, DebugEvent>>;
33
- export type DebugEvent = import("./type.js").DebugEvent;
32
+ export type _DebugEventDriftLock = import("../_shared/contract").Expect<import("../_shared/contract").MutuallyAssignable<z.infer<typeof eventSchema>, DebugEvent>>;
33
+ export type DebugEvent = import("./type").DebugEvent;
34
34
  import { z } from 'zod';
35
35
  declare const eventSchema: z.ZodObject<{
36
36
  schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
@@ -77,12 +77,12 @@ declare const eventSchema: z.ZodObject<{
77
77
  resultKind: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
78
78
  theme: "theme";
79
79
  component: "component";
80
- command: "command";
81
80
  hook: "hook";
82
81
  doc: "doc";
83
82
  template: "template";
84
83
  integration: "integration";
85
84
  migration: "migration";
85
+ command: "command";
86
86
  mixed: "mixed";
87
87
  none: "none";
88
88
  }>>>;
@@ -22,7 +22,7 @@
22
22
  import {z} from 'zod';
23
23
  import {formatZodError} from '../_shared/errors.mjs';
24
24
 
25
- /** @typedef {import('./type.js').DebugEvent} DebugEvent */
25
+ /** @typedef {import('./type').DebugEvent} DebugEvent */
26
26
 
27
27
  const outcomeSchema = z.enum([
28
28
  'ok',
@@ -169,8 +169,8 @@ const eventSchema = z
169
169
  * `Expect<false>` fails the `tsconfig.authoring-contract.json` typecheck —
170
170
  * so a field added to the recorder without being published here breaks CI.
171
171
  *
172
- * @typedef {import('../_shared/contract.js').Expect<
173
- * import('../_shared/contract.js').MutuallyAssignable<z.infer<typeof eventSchema>, DebugEvent>
172
+ * @typedef {import('../_shared/contract').Expect<
173
+ * import('../_shared/contract').MutuallyAssignable<z.infer<typeof eventSchema>, DebugEvent>
174
174
  * >} _DebugEventDriftLock
175
175
  */
176
176