@astryxdesign/cli 0.6.3-canary.f22695a → 0.6.3

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 (197) 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/assets/templates/blocks/components/Toolbar/ToolbarTableFilter.doc.mjs +3 -19
  61. package/assets/templates/blocks/components/Toolbar/ToolbarTableFilter.tsx +65 -383
  62. package/authoring/_shared/contract.ts +0 -22
  63. package/authoring/codemod/codemod.doc.mjs +1 -6
  64. package/authoring/codemod/parse.d.mts +8 -8
  65. package/authoring/codemod/parse.mjs +6 -8
  66. package/authoring/config/parse.d.mts +13 -13
  67. package/authoring/config/parse.mjs +8 -8
  68. package/authoring/config/type.ts +3 -3
  69. package/authoring/debug/parse.d.mts +5 -5
  70. package/authoring/debug/parse.mjs +3 -3
  71. package/authoring/doctypes/_schema.d.mts +23 -788
  72. package/authoring/doctypes/_schema.mjs +39 -492
  73. package/authoring/doctypes/base/type.ts +0 -40
  74. package/authoring/doctypes/command/command.doc.mjs +2 -3
  75. package/authoring/doctypes/command/parse.d.mts +2 -2
  76. package/authoring/doctypes/command/parse.mjs +1 -1
  77. package/authoring/doctypes/command/type.ts +2 -3
  78. package/authoring/doctypes/component/component.doc.mjs +3 -6
  79. package/authoring/doctypes/component/parse.d.mts +2 -2
  80. package/authoring/doctypes/component/parse.mjs +1 -1
  81. package/authoring/doctypes/component/type.ts +3 -4
  82. package/authoring/doctypes/enum/parse.d.mts +2 -2
  83. package/authoring/doctypes/enum/parse.mjs +1 -1
  84. package/authoring/doctypes/enum/type.ts +1 -3
  85. package/authoring/doctypes/function/function.doc.mjs +0 -4
  86. package/authoring/doctypes/function/parse.d.mts +2 -2
  87. package/authoring/doctypes/function/parse.mjs +1 -1
  88. package/authoring/doctypes/function/type.ts +2 -6
  89. package/authoring/doctypes/hook/hook.doc.mjs +0 -4
  90. package/authoring/doctypes/hook/parse.d.mts +2 -2
  91. package/authoring/doctypes/hook/parse.mjs +1 -1
  92. package/authoring/doctypes/hook/type.ts +2 -3
  93. package/authoring/doctypes/legacy.d.mts +6 -8
  94. package/authoring/doctypes/legacy.mjs +4 -5
  95. package/authoring/doctypes/parse.d.mts +18 -20
  96. package/authoring/doctypes/parse.mjs +10 -16
  97. package/authoring/doctypes/parse.test.mjs +3 -77
  98. package/authoring/doctypes/reference/parse.d.mts +2 -2
  99. package/authoring/doctypes/reference/parse.mjs +5 -8
  100. package/authoring/doctypes/reference/reference.doc.mjs +4 -17
  101. package/authoring/doctypes/reference/type.ts +5 -51
  102. package/authoring/doctypes/schema/parse.d.mts +2 -2
  103. package/authoring/doctypes/schema/parse.mjs +1 -1
  104. package/authoring/doctypes/schema/type.ts +2 -3
  105. package/authoring/doctypes/template/parse.d.mts +1 -92
  106. package/authoring/doctypes/template/parse.mjs +2 -36
  107. package/authoring/doctypes/template/parse.test.mjs +2 -8
  108. package/authoring/doctypes/template/template.doc.mjs +0 -4
  109. package/authoring/doctypes/template/type.ts +2 -5
  110. package/authoring/doctypes/types.ts +9 -10
  111. package/authoring/gap-report/parse.d.mts +10 -10
  112. package/authoring/gap-report/parse.mjs +6 -6
  113. package/authoring/gap-report/type.ts +1 -1
  114. package/authoring/index.d.mts +0 -1
  115. package/authoring/index.d.ts +17 -49
  116. package/authoring/index.mjs +0 -1
  117. package/authoring/integration/integration.doc.mjs +6 -13
  118. package/authoring/integration/parse.d.mts +2 -2
  119. package/authoring/integration/parse.mjs +1 -1
  120. package/authoring/integration/parse.test.mjs +1 -10
  121. package/authoring/integration/schema.d.mts +4 -6
  122. package/authoring/integration/schema.mjs +3 -9
  123. package/authoring/integration/type.ts +6 -23
  124. package/authoring/shadcn/receipt.d.mts +6 -6
  125. package/clients/cli/commands/docs.doc.mjs +3 -13
  126. package/clients/cli/commands/docs.mjs +21 -121
  127. package/clients/cli/commands/docs.test.mjs +0 -88
  128. package/clients/cli/commands/integration-authoring.test.mjs +9 -13
  129. package/clients/cli/commands/theme-palette-generate.doc.mjs +4 -8
  130. package/clients/cli/commands/upgrade.doc.mjs +2 -2
  131. package/clients/cli/formatters/index.mjs +1 -162
  132. package/clients/cli/formatters/index.test.mjs +0 -91
  133. package/clients/cli/lib/manifest.mjs +2 -7
  134. package/foundation/config/project.mjs +6 -21
  135. package/foundation/discovery/component-discovery.d.mts +1 -1
  136. package/foundation/discovery/component-discovery.mjs +1 -2
  137. package/foundation/discovery/docs-discovery.d.mts +4 -11
  138. package/foundation/discovery/docs-discovery.mjs +88 -208
  139. package/foundation/discovery/docs-discovery.test.mjs +13 -279
  140. package/foundation/discovery/template-adapter.mjs +1 -2
  141. package/foundation/integrations/autolink.mjs +5 -12
  142. package/foundation/integrations/integration-warnings.mjs +0 -6
  143. package/foundation/integrations/integrations.d.mts +2 -46
  144. package/foundation/integrations/integrations.mjs +8 -167
  145. package/foundation/integrations/integrations.test.mjs +1 -384
  146. package/foundation/integrations/validate-contributions.d.mts +0 -2
  147. package/foundation/integrations/validate-contributions.mjs +0 -10
  148. package/foundation/response/json-contract.test.mjs +17 -46
  149. package/foundation/response/response-types.doc.mjs +1 -6
  150. package/package.json +11 -9
  151. package/api/docs/compiled-topics.test.mjs +0 -78
  152. package/api/docs/index/index.d.mts +0 -18
  153. package/api/docs/index/index.mjs +0 -32
  154. package/api/docs/index/index.test.mjs +0 -62
  155. package/api/upgrade/project-context.test.mjs +0 -272
  156. package/assets/docs/authoring.doc.mjs +0 -14
  157. package/assets/templates/blocks/components/Timer/TimerFormats.doc.mjs +0 -14
  158. package/assets/templates/blocks/components/Timer/TimerFormats.tsx +0 -34
  159. package/assets/templates/blocks/components/Timer/TimerInline.doc.mjs +0 -14
  160. package/assets/templates/blocks/components/Timer/TimerInline.tsx +0 -14
  161. package/assets/templates/blocks/components/Timer/TimerShowcase.doc.mjs +0 -13
  162. package/assets/templates/blocks/components/Timer/TimerShowcase.tsx +0 -47
  163. package/assets/templates/blocks/components/Timer/TimerTypography.doc.mjs +0 -14
  164. package/assets/templates/blocks/components/Timer/TimerTypography.tsx +0 -31
  165. package/authoring/doctypes/base/graph-fields.doc.d.mts +0 -9
  166. package/authoring/doctypes/base/graph-fields.doc.mjs +0 -62
  167. package/authoring/doctypes/load-contract.test.mjs +0 -207
  168. package/authoring/doctypes/namespace/namespace.doc.d.mts +0 -9
  169. package/authoring/doctypes/namespace/namespace.doc.mjs +0 -132
  170. package/authoring/doctypes/namespace/parse.d.mts +0 -12
  171. package/authoring/doctypes/namespace/parse.mjs +0 -25
  172. package/authoring/doctypes/namespace/parse.test.mjs +0 -165
  173. package/authoring/doctypes/namespace/type.ts +0 -71
  174. package/authoring/identity/identity.doc.d.mts +0 -9
  175. package/authoring/identity/identity.doc.mjs +0 -61
  176. package/authoring/identity/type.ts +0 -132
  177. package/foundation/discovery/authoring-self-docs.d.mts +0 -69
  178. package/foundation/discovery/authoring-self-docs.mjs +0 -214
  179. package/foundation/discovery/authoring-self-docs.test.mjs +0 -154
  180. package/foundation/discovery/docs-output-budget.d.mts +0 -28
  181. package/foundation/discovery/docs-output-budget.mjs +0 -50
  182. package/foundation/discovery/docs-section-key.d.mts +0 -98
  183. package/foundation/discovery/docs-section-key.mjs +0 -221
  184. package/foundation/discovery/docs-section-key.test.mjs +0 -224
  185. package/foundation/doc-compiler/compile.d.mts +0 -162
  186. package/foundation/doc-compiler/compile.mjs +0 -262
  187. package/foundation/doc-compiler/doc-compiler.test.mjs +0 -687
  188. package/foundation/doc-compiler/ir.d.mts +0 -9
  189. package/foundation/doc-compiler/ir.mjs +0 -287
  190. package/foundation/doc-compiler/lenses.d.mts +0 -33
  191. package/foundation/doc-compiler/lenses.mjs +0 -127
  192. package/foundation/identity/provider-identity.d.mts +0 -90
  193. package/foundation/identity/provider-identity.mjs +0 -320
  194. package/foundation/identity/provider-identity.test.mjs +0 -254
  195. package/foundation/identity/providers.d.mts +0 -7
  196. package/foundation/identity/providers.mjs +0 -16
  197. package/foundation/integrations/provider-conflicts.test.mjs +0 -125
@@ -23,18 +23,17 @@
23
23
  // ═══════════════════════════════════════════════════════════════════════
24
24
  // AUTHOR THESE — each is the default export of one authored file.
25
25
  // ═══════════════════════════════════════════════════════════════════════
26
- export type {ComponentDoc} from './doctypes/types.js'; // Button.doc.{ts,mjs}
27
- export type {HookDoc} from './doctypes/types.js'; // useToast.doc.{ts,mjs}
28
- export type {FunctionDoc} from './doctypes/types.js'; // search.doc.mjs (hook | api)
29
- export type {ReferenceDoc} from './doctypes/types.js'; // theming.doc.{ts,mjs}
30
- export type {TemplateDoc} from './doctypes/types.js'; // Foo.template.{ts,mjs}
31
- export type {SchemaDoc} from './doctypes/types.js'; // config.doc.mjs (object shape)
32
- export type {CommandDoc} from './doctypes/types.js'; // search.doc.mjs (CLI command)
33
- export type {EnumDoc} from './doctypes/types.js'; // error-codes.doc.mjs (vocabulary)
34
- export type {NamespaceDoc} from './doctypes/types.js'; // cli.doc.mjs (hierarchy)
35
- export type {AstryxConfig} from './config/type.js'; // astryx.config.{ts,mjs}
36
- export type {DebugEvent} from './debug/type.js'; // one recorded CLI run
37
- export type {AstryxIntegration} from './integration/type.js'; // astryx.integration.{ts,mjs}
26
+ export type {ComponentDoc} from './doctypes/types'; // Button.doc.{ts,mjs}
27
+ export type {HookDoc} from './doctypes/types'; // useToast.doc.{ts,mjs}
28
+ export type {FunctionDoc} from './doctypes/types'; // search.doc.mjs (hook | api)
29
+ export type {ReferenceDoc} from './doctypes/types'; // theming.doc.{ts,mjs}
30
+ export type {TemplateDoc} from './doctypes/types'; // Foo.template.{ts,mjs}
31
+ export type {SchemaDoc} from './doctypes/types'; // config.doc.mjs (object shape)
32
+ export type {CommandDoc} from './doctypes/types'; // search.doc.mjs (CLI command)
33
+ export type {EnumDoc} from './doctypes/types'; // error-codes.doc.mjs (vocabulary)
34
+ export type {AstryxConfig} from './config/type'; // astryx.config.{ts,mjs}
35
+ export type {DebugEvent} from './debug/type'; // one recorded CLI run
36
+ export type {AstryxIntegration} from './integration/type'; // astryx.integration.{ts,mjs}
38
37
  export type {
39
38
  GapReportHandler,
40
39
  GapReportHandlerContext,
@@ -42,8 +41,8 @@ export type {
42
41
  GapReportCategory,
43
42
  GapReportTarget,
44
43
  GapReportHandlerReceipt,
45
- } from './gap-report/type.js'; // gap-report handler contract
46
- export type {AstryxCodemod, AstryxConfigCodemod} from './codemod/type.js'; // codemods/*
44
+ } from './gap-report/type'; // gap-report handler contract
45
+ export type {AstryxCodemod, AstryxConfigCodemod} from './codemod/type'; // codemods/*
47
46
 
48
47
  // ═══════════════════════════════════════════════════════════════════════
49
48
  // PARSERS — the CLI's load boundary (types come from each parser's JSDoc).
@@ -57,7 +56,6 @@ export {parseTemplate} from './doctypes/template/parse.mjs';
57
56
  export {parseSchema} from './doctypes/schema/parse.mjs';
58
57
  export {parseCommand} from './doctypes/command/parse.mjs';
59
58
  export {parseEnum} from './doctypes/enum/parse.mjs';
60
- export {parseNamespace} from './doctypes/namespace/parse.mjs';
61
59
  export {parseLegacyDoc} from './doctypes/legacy.mjs';
62
60
  export {parseConfig} from './config/parse.mjs';
63
61
  export {parseIntegration} from './integration/parse.mjs';
@@ -74,26 +72,6 @@ export {parseDebugEvent} from './debug/parse.mjs';
74
72
  // need them to author. Names carry the doc kind they belong to.
75
73
  // ═══════════════════════════════════════════════════════════════════════
76
74
  export type {
77
- ProviderId,
78
- ArtifactId,
79
- DocId,
80
- ProviderInstanceId,
81
- ContentDigest,
82
- ContributionKind,
83
- ArtifactIdentity,
84
- ProviderInstance,
85
- AuthoredDoc,
86
- AuthoredDocKindOf,
87
- AuthoredDocSnapshot,
88
- AuthoredDocSource,
89
- AuthoredDocEntry,
90
- } from './identity/type.js';
91
- export type {
92
- // shared graph
93
- AuthoredDocKind,
94
- DocAudience,
95
- DocPlacement,
96
- AuthoredDocGraphFields,
97
75
  // component
98
76
  SingleComponentDoc,
99
77
  MultiComponentDoc,
@@ -131,16 +109,6 @@ export type {
131
109
  ReferenceContentBlock,
132
110
  ReferenceTokenPreviewType,
133
111
  ReferenceTranslationDoc,
134
- WorkflowStep,
135
- WorkflowDocBlock,
136
- CollectionDocBlock,
137
- ReferenceDocBlock,
138
- // namespace
139
- NamespaceProviderScope,
140
- NamespaceSlotAcceptance,
141
- NamespaceSlot,
142
- NamespaceAdoptionSource,
143
- NamespaceAdoptionRule,
144
112
  // template
145
113
  TemplateCategory,
146
114
  // schema
@@ -151,8 +119,8 @@ export type {
151
119
  CommandExampleDoc,
152
120
  // enum
153
121
  EnumMemberDoc,
154
- } from './doctypes/types.js';
155
- export type {PostCodemodHook, DebugConfig} from './config/type.js';
122
+ } from './doctypes/types';
123
+ export type {PostCodemodHook, DebugConfig} from './config/type';
156
124
  export type {
157
125
  // debug
158
126
  DebugSchemaVersion,
@@ -165,11 +133,11 @@ export type {
165
133
  DebugEventEnv,
166
134
  DebugEventProject,
167
135
  DebugEventHandler,
168
- } from './debug/type.js';
136
+ } from './debug/type';
169
137
  export type {
170
138
  AstryxCodemodDef,
171
139
  AstryxConfigCodemodDef,
172
140
  AstryxCodemodFile,
173
141
  AstryxCodemodApi,
174
142
  AstryxCodemodTransform,
175
- } from './codemod/type.js';
143
+ } from './codemod/type';
@@ -31,5 +31,4 @@ export {parseTemplate} from './doctypes/template/parse.mjs';
31
31
  export {parseSchema} from './doctypes/schema/parse.mjs';
32
32
  export {parseCommand} from './doctypes/command/parse.mjs';
33
33
  export {parseEnum} from './doctypes/enum/parse.mjs';
34
- export {parseNamespace} from './doctypes/namespace/parse.mjs';
35
34
  export {parseLegacyDoc} from './doctypes/legacy.mjs';
@@ -14,18 +14,11 @@ export const doc = {
14
14
  namespace: 'cli',
15
15
  description:
16
16
  'The astryx.integration.* manifest that sits beside an integration ' +
17
- "package's package.json. It can preserve a stable provider identity across a package rename, " +
18
- "and points the CLI at the package's components, templates, codemods, doc topics, " +
19
- 'source themes, managed agent guidance, and issue tracker. Every field is optional.',
17
+ "package's package.json. Points the CLI at the package's components, " +
18
+ 'templates, codemods, doc topics, source themes, and managed agent guidance, ' +
19
+ 'and where to file issues. Every field is optional.',
20
20
  appliesTo: 'astryx.integration.{ts,mjs,js}',
21
21
  fields: [
22
- {
23
- name: 'providerId',
24
- type: 'string',
25
- description:
26
- 'Stable logical provider ID. Omit to use package.json#name; set it to the prior package name only when an explicit rename must preserve artifact IDs. If two packages claim the same ID, the package being authored is used, otherwise the first-loaded one, and the CLI warns about the other.',
27
- example: "'@acme/widgets'",
28
- },
29
22
  {
30
23
  name: 'components',
31
24
  type: 'string',
@@ -94,9 +87,9 @@ export const doc = {
94
87
  {
95
88
  type: 'prose',
96
89
  text:
97
- 'Provider identity defaults to package.json#name. During an explicit ' +
98
- 'package rename, set `providerId` to the prior canonical package name so ' +
99
- 'existing artifact IDs remain stable. Package version always comes from package.json.',
90
+ "Identity, the integration's name and version, comes from the " +
91
+ "package's package.json, not from this manifest. The manifest only " +
92
+ 'declares where the CLI finds each kind of artifact.',
100
93
  },
101
94
  {
102
95
  type: 'prose',
@@ -1,7 +1,7 @@
1
1
  // @generated by scripts/sync-api-types.mjs from the JSDoc in authoring/**/*.mjs.
2
2
  // DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
3
3
 
4
- /** @typedef {import('./type.js').AstryxIntegration} AstryxIntegration */
4
+ /** @typedef {import('./type').AstryxIntegration} AstryxIntegration */
5
5
  /**
6
6
  * Validate an unknown value as an Astryx integration manifest, or throw.
7
7
  *
@@ -14,4 +14,4 @@
14
14
  * @returns {AstryxIntegration}
15
15
  */
16
16
  export function parseIntegration(input: unknown, label?: string): AstryxIntegration;
17
- export type AstryxIntegration = import("./type.js").AstryxIntegration;
17
+ export type AstryxIntegration = import("./type").AstryxIntegration;
@@ -14,7 +14,7 @@
14
14
  import {formatZodError} from '../_shared/errors.mjs';
15
15
  import {integrationSchema} from './schema.mjs';
16
16
 
17
- /** @typedef {import('./type.js').AstryxIntegration} AstryxIntegration */
17
+ /** @typedef {import('./type').AstryxIntegration} AstryxIntegration */
18
18
 
19
19
  /**
20
20
  * Validate an unknown value as an Astryx integration manifest, or throw.
@@ -28,9 +28,6 @@ describe('parseIntegration (load boundary)', () => {
28
28
  components: './src',
29
29
  });
30
30
  expect(parseIntegration({docs: './docs'})).toEqual({docs: './docs'});
31
- expect(parseIntegration({providerId: '@acme/legacy-widgets'})).toEqual({
32
- providerId: '@acme/legacy-widgets',
33
- });
34
31
  expect(parseIntegration({themes: './themes'})).toEqual({
35
32
  themes: './themes',
36
33
  });
@@ -69,9 +66,7 @@ describe('parseIntegration (load boundary)', () => {
69
66
  ? 'https://example.com/issues'
70
67
  : key === 'agentDocs'
71
68
  ? {}
72
- : key === 'providerId'
73
- ? '@acme/widgets'
74
- : './x',
69
+ : './x',
75
70
  ]),
76
71
  );
77
72
  expect(unknownIntegrationKeys(everyKnownKey)).toEqual([]);
@@ -87,10 +82,6 @@ describe('parseIntegration (load boundary)', () => {
87
82
  expect(reason({issuesUrl: 'nope'})).toContain('issuesUrl');
88
83
  });
89
84
 
90
- it('rejects a noncanonical providerId', () => {
91
- expect(reason({providerId: 'Acme Widgets'})).toContain('providerId');
92
- });
93
-
94
85
  it('accepts an optional append array as manifest data', () => {
95
86
  expect(
96
87
  parseIntegration({
@@ -32,7 +32,6 @@ export const agentDocsSchema: z.ZodObject<{
32
32
  append: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
33
33
  }, z.core.$strip>;
34
34
  export const integrationBaseSchema: z.ZodObject<{
35
- providerId: z.ZodOptional<z.ZodString>;
36
35
  components: z.ZodOptional<z.ZodString>;
37
36
  templates: z.ZodOptional<z.ZodString>;
38
37
  codemods: z.ZodOptional<z.ZodString>;
@@ -41,7 +40,6 @@ export const integrationBaseSchema: z.ZodObject<{
41
40
  issuesUrl: z.ZodOptional<z.ZodString>;
42
41
  }, z.core.$strip>;
43
42
  export const integrationSchema: z.ZodObject<{
44
- providerId: z.ZodOptional<z.ZodString>;
45
43
  components: z.ZodOptional<z.ZodString>;
46
44
  templates: z.ZodOptional<z.ZodString>;
47
45
  codemods: z.ZodOptional<z.ZodString>;
@@ -55,8 +53,8 @@ export const integrationSchema: z.ZodObject<{
55
53
  /**
56
54
  * Compile-time drift-lock: sealed schema must infer exactly {@link AstryxIntegration}.
57
55
  *
58
- * @typedef {import('../_shared/contract.js').Expect<
59
- * import('../_shared/contract.js').Equal<z.infer<typeof integrationSchema>, AstryxIntegration>
56
+ * @typedef {import('../_shared/contract').Expect<
57
+ * import('../_shared/contract').Equal<z.infer<typeof integrationSchema>, AstryxIntegration>
60
58
  * >} _IntegrationDriftLock
61
59
  */
62
60
  /**
@@ -69,9 +67,9 @@ export const integrationSchema: z.ZodObject<{
69
67
  * @type {string[]}
70
68
  */
71
69
  export const KNOWN_INTEGRATION_KEYS: string[];
72
- export type AstryxIntegration = import("./type.js").AstryxIntegration;
70
+ export type AstryxIntegration = import("./type").AstryxIntegration;
73
71
  /**
74
72
  * Compile-time drift-lock: sealed schema must infer exactly {@link AstryxIntegration}.
75
73
  */
76
- export type _IntegrationDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").Equal<z.infer<typeof integrationSchema>, AstryxIntegration>>;
74
+ export type _IntegrationDriftLock = import("../_shared/contract").Expect<import("../_shared/contract").Equal<z.infer<typeof integrationSchema>, AstryxIntegration>>;
77
75
  import { z } from 'zod';
@@ -16,13 +16,11 @@
16
16
  import {z} from 'zod';
17
17
  import {formatZodError} from '../_shared/errors.mjs';
18
18
 
19
- /** @typedef {import('./type.js').AstryxIntegration} AstryxIntegration */
19
+ /** @typedef {import('./type').AstryxIntegration} AstryxIntegration */
20
20
 
21
21
  const MAX_AGENT_DOC_LINES = 8;
22
22
  const MAX_AGENT_DOC_LINE_CODE_POINTS = 240;
23
23
  const MANAGED_MARKER_TEXT = /(?:ASTRYX|XDS):(START|END)/u;
24
- const PROVIDER_ID_RE =
25
- /^(?:@[a-z0-9][a-z0-9._~!*'()-]*\/)?[a-z0-9][a-z0-9._~!*'()-]*$/u;
26
24
 
27
25
  /**
28
26
  * @param {string} value
@@ -68,10 +66,6 @@ export const agentDocsSchema = z.object({
68
66
  });
69
67
 
70
68
  export const integrationBaseSchema = z.object({
71
- providerId: z
72
- .string()
73
- .regex(PROVIDER_ID_RE, 'providerId must be a canonical npm package name')
74
- .optional(),
75
69
  components: z.string().optional(),
76
70
  templates: z.string().optional(),
77
71
  codemods: z.string().optional(),
@@ -121,8 +115,8 @@ export function parseAgentDocsField(input, label) {
121
115
  /**
122
116
  * Compile-time drift-lock: sealed schema must infer exactly {@link AstryxIntegration}.
123
117
  *
124
- * @typedef {import('../_shared/contract.js').Expect<
125
- * import('../_shared/contract.js').Equal<z.infer<typeof integrationSchema>, AstryxIntegration>
118
+ * @typedef {import('../_shared/contract').Expect<
119
+ * import('../_shared/contract').Equal<z.infer<typeof integrationSchema>, AstryxIntegration>
126
120
  * >} _IntegrationDriftLock
127
121
  */
128
122
 
@@ -3,10 +3,9 @@
3
3
  /**
4
4
  * Public type surface for an Astryx integration manifest
5
5
  * (`astryx.integration.{ts,mjs,js}`, sibling to the integration package's
6
- * package.json). Identity defaults to the package name, but `providerId` can keep
7
- * a stable logical identity across an explicit package rename. Authors write a
8
- * plain object against {@link AstryxIntegration}; the CLI validates it via
9
- * `parseIntegration` at the load boundary.
6
+ * package.json). Identity (name/version) comes from package.json, not the
7
+ * manifest. Authors write a plain object against {@link AstryxIntegration};
8
+ * the CLI validates it via `parseIntegration` at the load boundary.
10
9
  *
11
10
  * The manifest module may also carry `debug` and `gapReport` NAMED exports.
12
11
  * They are not fields here on purpose: a CLI released before a given manifest
@@ -14,20 +13,11 @@
14
13
  * named export is simply not read. See the `cli-integrations` doc topic.
15
14
  */
16
15
  export interface AstryxIntegration {
17
- /** Stable logical provider ID. Omit to use package.json#name. Set this only
18
- * when a package rename must preserve existing artifact IDs. */
19
- providerId?: string;
20
16
  /** Relative path to the components/docs root (resolved to absolute). */
21
17
  components?: string;
22
18
  /** Relative path to the templates root (resolved to absolute). */
23
19
  templates?: string;
24
- /** Relative path to the codemods root (resolved to absolute).
25
- * The root uses a version-folder-first layout:
26
- * `<codemodsRoot>/<version>/<id>.<ext>`, where `<version>` is an exact
27
- * semver string (e.g. `0.2.0`, no `v` prefix) and `<id>` is a kebab-case
28
- * module basename. Each module default-exports a codemod envelope stamped
29
- * `type: 'code'` or `type: 'config'`. Codemod ids must be unique within
30
- * a package across all versions. */
20
+ /** Relative path to the codemods root (resolved to absolute). */
31
21
  codemods?: string;
32
22
  /** Relative path to the reference-docs (topics) root (resolved to
33
23
  * absolute). Every `{topic}.doc.{ts,mjs,js}` under it is a topic the CLI
@@ -35,14 +25,7 @@ export interface AstryxIntegration {
35
25
  * `replace` or `extend` a built-in topic; see the ReferenceDoc type. */
36
26
  docs?: string;
37
27
  /** Relative path to the source-theme catalog root (resolved to absolute).
38
- * The root contains `manifest.json` plus one directory per theme slug.
39
- * `manifest.json` is `{ "version": 1, "themes": [...] }` where each
40
- * entry requires `slug`, `displayName`, `description` (string),
41
- * `maintained` (boolean), `entry` (source file relative to `themes/<slug>/`),
42
- * `exportName` (a valid JS identifier naming the runtime export), and
43
- * `files` (non-empty array of filenames relative to `themes/<slug>/`).
44
- * Every file listed must exist on disk; the entry file must also appear
45
- * in `files`. */
28
+ * The root contains `manifest.json` plus one directory per theme slug. */
46
29
  themes?: string;
47
30
  /** Static package guidance appended to the CLI-owned managed agent block. */
48
31
  agentDocs?: {
@@ -66,4 +49,4 @@ export type {
66
49
  GapReportCategory,
67
50
  GapReportTarget,
68
51
  GapReportHandlerReceipt,
69
- } from '../gap-report/type.js';
52
+ } from '../gap-report/type';
@@ -63,7 +63,7 @@ export function createRegistryReceipt(input: {
63
63
  name: string;
64
64
  path: string;
65
65
  aliases: string[];
66
- kind: "page" | "block" | "example" | "showcase";
66
+ kind: "block" | "page" | "example" | "showcase";
67
67
  };
68
68
  source: {
69
69
  package: "@astryxdesign/cli";
@@ -83,7 +83,7 @@ export function createRegistryReceipt(input: {
83
83
  name: string;
84
84
  path: string;
85
85
  aliases: string[];
86
- kind: "page" | "block" | "example" | "showcase";
86
+ kind: "block" | "page" | "example" | "showcase";
87
87
  };
88
88
  source: {
89
89
  package: "@astryxdesign/cli";
@@ -112,7 +112,7 @@ export function parseRegistryReceipt(input: unknown): {
112
112
  name: string;
113
113
  path: string;
114
114
  aliases: string[];
115
- kind: "page" | "block" | "example" | "showcase";
115
+ kind: "block" | "page" | "example" | "showcase";
116
116
  };
117
117
  source: {
118
118
  package: "@astryxdesign/cli";
@@ -132,7 +132,7 @@ export function parseRegistryReceipt(input: unknown): {
132
132
  name: string;
133
133
  path: string;
134
134
  aliases: string[];
135
- kind: "page" | "block" | "example" | "showcase";
135
+ kind: "block" | "page" | "example" | "showcase";
136
136
  };
137
137
  source: {
138
138
  package: "@astryxdesign/cli";
@@ -165,8 +165,8 @@ export const registryReceiptSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
165
165
  path: z.ZodString;
166
166
  aliases: z.ZodArray<z.ZodString>;
167
167
  kind: z.ZodEnum<{
168
- page: "page";
169
168
  block: "block";
169
+ page: "page";
170
170
  example: "example";
171
171
  showcase: "showcase";
172
172
  }>;
@@ -190,8 +190,8 @@ export const registryReceiptSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
190
190
  path: z.ZodString;
191
191
  aliases: z.ZodArray<z.ZodString>;
192
192
  kind: z.ZodEnum<{
193
- page: "page";
194
193
  block: "block";
194
+ page: "page";
195
195
  example: "example";
196
196
  showcase: "showcase";
197
197
  }>;
@@ -16,32 +16,22 @@ export const doc = {
16
16
  summary: 'Print reference docs',
17
17
  description:
18
18
  'Reads the reference docs: with no topic it lists every topic; a topic prints that ' +
19
- 'full doc; `--index` lists its sections instead, each with the key to read it by; a ' +
20
- 'topic plus a section prints that section (by key, exact title, or a unique part of ' +
21
- 'a title).',
19
+ 'full doc; a topic plus a section returns the first section whose title contains the ' +
20
+ '(case-insensitive) query.',
22
21
  fn: 'docs',
23
22
  args: [
24
23
  {name: 'topic', param: 'topic', required: false},
25
24
  {name: 'section', param: 'section', required: false},
26
25
  ],
27
- options: [
28
- {
29
- flag: '--index',
30
- param: 'options.index',
31
- description: "List the topic's sections and their keys instead of printing the whole topic",
32
- },
33
- ],
34
26
  examples: [
35
27
  {label: 'List topics', cli: 'astryx docs'},
36
28
  {label: 'One topic as JSON', cli: 'astryx docs spacing --json'},
37
- {label: "A topic's sections", cli: 'astryx docs theme --index'},
38
- {label: 'One section', cli: 'astryx docs theme quick-start'},
39
29
  ],
40
30
  exitCodes: [
41
31
  {code: 0, when: 'success'},
42
32
  {
43
33
  code: 1,
44
- when: 'unknown topic, or a section that matches no section or more than one',
34
+ when: 'unknown topic, or a section that matches no title in the topic',
45
35
  },
46
36
  ],
47
37
  related: ['search', 'component', 'hook', 'template'],