@contentful/experience-design-system-cli 2.34.5-dev-build-4471673c.0 → 2.35.0

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 (277) hide show
  1. package/README.md +245 -0
  2. package/bin/cli.js +57 -1
  3. package/dist/package.json +15 -10
  4. package/{legacy/dist → dist}/src/index.js +457 -465
  5. package/package.json +17 -12
  6. package/dist/app.d.ts +0 -9
  7. package/dist/app.js +0 -945
  8. package/dist/index.js +0 -1160
  9. package/dist/program.d.ts +0 -2
  10. package/dist/src/legacy/legacy-cli-path.d.ts +0 -1
  11. package/dist/src/legacy/run-legacy.d.ts +0 -1
  12. package/dist/src/tui/debug-store.d.ts +0 -14
  13. package/dist/src/tui/help/PageContainer.d.ts +0 -4
  14. package/dist/src/tui/home/home.d.ts +0 -5
  15. package/dist/src/tui/home/home.theme.d.ts +0 -14
  16. package/dist/src/tui/import/PageContainer.d.ts +0 -5
  17. package/dist/src/tui/import/spawn-v1-import.d.ts +0 -28
  18. package/dist/src/tui/import/terminal-input.d.ts +0 -2
  19. package/dist/src/tui/package-root.d.ts +0 -9
  20. package/dist/src/tui/settings/PageContainer.d.ts +0 -6
  21. package/dist/src/tui/settings/contentful-configuration/ContentfulConfigScreen.d.ts +0 -4
  22. package/dist/src/tui/settings/contentful-configuration/config-store.d.ts +0 -9
  23. package/dist/src/tui/settings/debug-mode/debug-mode-store.d.ts +0 -5
  24. package/dist/src/tui/settings/debug-mode/screen.d.ts +0 -4
  25. package/dist/src/tui/settings/opt-in-analytics/analytics-store.d.ts +0 -5
  26. package/dist/src/tui/settings/opt-in-analytics/screen.d.ts +0 -4
  27. package/dist/src/tui/settings/utils/v1-store.d.ts +0 -2
  28. package/dist/src/tui/upgrade/PageContainer.d.ts +0 -4
  29. package/dist/src/tui/upgrade/version.d.ts +0 -12
  30. package/dist/src/tui/use-terminal-width.d.ts +0 -1
  31. package/legacy/bin/cli.js +0 -58
  32. package/legacy/dist/package.json +0 -73
  33. package/legacy/dist/src/index.d.ts +0 -1
  34. package/legacy/package.json +0 -77
  35. /package/{legacy/dist → dist}/src/analytics/apply.d.ts +0 -0
  36. /package/{legacy/dist → dist}/src/analytics/client.d.ts +0 -0
  37. /package/{legacy/dist → dist}/src/analytics/constants.d.ts +0 -0
  38. /package/{legacy/dist → dist}/src/analytics/exit.d.ts +0 -0
  39. /package/{legacy/dist → dist}/src/analytics/index.d.ts +0 -0
  40. /package/{legacy/dist → dist}/src/analytics/normalize.d.ts +0 -0
  41. /package/{legacy/dist → dist}/src/analytics/os.d.ts +0 -0
  42. /package/{legacy/dist → dist}/src/analytics/session.d.ts +0 -0
  43. /package/{legacy/dist → dist}/src/analytics/tracker.d.ts +0 -0
  44. /package/{legacy/dist → dist}/src/analytics/types.d.ts +0 -0
  45. /package/{legacy/dist → dist}/src/analyze/composite-closure.d.ts +0 -0
  46. /package/{legacy/dist → dist}/src/analyze/composition/apply-mapping.d.ts +0 -0
  47. /package/{legacy/dist → dist}/src/analyze/composition/candidate-files.d.ts +0 -0
  48. /package/{legacy/dist → dist}/src/analyze/composition/composition-cache-key.d.ts +0 -0
  49. /package/{legacy/dist → dist}/src/analyze/composition/interchange-schema.d.ts +0 -0
  50. /package/{legacy/dist → dist}/src/analyze/composition/manifest-doc-evidence.d.ts +0 -0
  51. /package/{legacy/dist → dist}/src/analyze/composition/merge-edges.d.ts +0 -0
  52. /package/{legacy/dist → dist}/src/analyze/composition/parse-map-edges.d.ts +0 -0
  53. /package/{legacy/dist → dist}/src/analyze/composition/prompt-loader.d.ts +0 -0
  54. /package/{legacy/dist → dist}/src/analyze/composition/resolve-mapping-cli.d.ts +0 -0
  55. /package/{legacy/dist → dist}/src/analyze/composition/resolve-mapping.d.ts +0 -0
  56. /package/{legacy/dist → dist}/src/analyze/cycle-detection.d.ts +0 -0
  57. /package/{legacy/dist → dist}/src/analyze/cycle-view.d.ts +0 -0
  58. /package/{legacy/dist → dist}/src/analyze/extract-command.d.ts +0 -0
  59. /package/{legacy/dist → dist}/src/analyze/fuzzy-search.d.ts +0 -0
  60. /package/{legacy/dist → dist}/src/analyze/issue-inheritance.d.ts +0 -0
  61. /package/{legacy/dist → dist}/src/analyze/lineage.d.ts +0 -0
  62. /package/{legacy/dist → dist}/src/analyze/scope-gate-cascade.d.ts +0 -0
  63. /package/{legacy/dist → dist}/src/analyze/search-neighborhood.d.ts +0 -0
  64. /package/{legacy/dist → dist}/src/analyze/select/command.d.ts +0 -0
  65. /package/{legacy/dist → dist}/src/analyze/select/parser.d.ts +0 -0
  66. /package/{legacy/dist → dist}/src/analyze/select/persistence.d.ts +0 -0
  67. /package/{legacy/dist → dist}/src/analyze/select/preview-annotations.d.ts +0 -0
  68. /package/{legacy/dist → dist}/src/analyze/select/tui/LegacySelectApp.d.ts +0 -0
  69. /package/{legacy/dist → dist}/src/analyze/select/tui/components/ComponentDetail.d.ts +0 -0
  70. /package/{legacy/dist → dist}/src/analyze/select/tui/components/ComponentRationalePanel.d.ts +0 -0
  71. /package/{legacy/dist → dist}/src/analyze/select/tui/components/FieldEditor.d.ts +0 -0
  72. /package/{legacy/dist → dist}/src/analyze/select/tui/components/FinalizeDialog.d.ts +0 -0
  73. /package/{legacy/dist → dist}/src/analyze/select/tui/components/GotoBanner.d.ts +0 -0
  74. /package/{legacy/dist → dist}/src/analyze/select/tui/components/GroupedSidebar.d.ts +0 -0
  75. /package/{legacy/dist → dist}/src/analyze/select/tui/components/HelpOverlay.d.ts +0 -0
  76. /package/{legacy/dist → dist}/src/analyze/select/tui/components/HighlightedLine.d.ts +0 -0
  77. /package/{legacy/dist → dist}/src/analyze/select/tui/components/JsonEditor.d.ts +0 -0
  78. /package/{legacy/dist → dist}/src/analyze/select/tui/components/JsonPanel.d.ts +0 -0
  79. /package/{legacy/dist → dist}/src/analyze/select/tui/components/PreviewSummaryBar.d.ts +0 -0
  80. /package/{legacy/dist → dist}/src/analyze/select/tui/components/QuitDialog.d.ts +0 -0
  81. /package/{legacy/dist → dist}/src/analyze/select/tui/components/RationaleLine.d.ts +0 -0
  82. /package/{legacy/dist → dist}/src/analyze/select/tui/components/RationalePanel.d.ts +0 -0
  83. /package/{legacy/dist → dist}/src/analyze/select/tui/components/ScrollablePanel.d.ts +0 -0
  84. /package/{legacy/dist → dist}/src/analyze/select/tui/components/Sidebar.d.ts +0 -0
  85. /package/{legacy/dist → dist}/src/analyze/select/tui/components/SourcePanel.d.ts +0 -0
  86. /package/{legacy/dist → dist}/src/analyze/select/tui/components/StatusBar.d.ts +0 -0
  87. /package/{legacy/dist → dist}/src/analyze/select/tui/components/TokenReviewPanel.d.ts +0 -0
  88. /package/{legacy/dist → dist}/src/analyze/select/tui/components/TopBar.d.ts +0 -0
  89. /package/{legacy/dist → dist}/src/analyze/select/tui/components/removed-components-text.d.ts +0 -0
  90. /package/{legacy/dist → dist}/src/analyze/select/tui/components/wrap-text.d.ts +0 -0
  91. /package/{legacy/dist → dist}/src/analyze/select/tui/hooks/list-scroll-input.d.ts +0 -0
  92. /package/{legacy/dist → dist}/src/analyze/select/tui/hooks/scroll-offset.d.ts +0 -0
  93. /package/{legacy/dist → dist}/src/analyze/select/tui/hooks/useImmediateInput.d.ts +0 -0
  94. /package/{legacy/dist → dist}/src/analyze/select/tui/hooks/useKeymap.d.ts +0 -0
  95. /package/{legacy/dist → dist}/src/analyze/select/tui/hooks/useSession.d.ts +0 -0
  96. /package/{legacy/dist → dist}/src/analyze/select/tui/hooks/useUndo.d.ts +0 -0
  97. /package/{legacy/dist → dist}/src/analyze/select/tui/theme.d.ts +0 -0
  98. /package/{legacy/dist → dist}/src/analyze/select/types.d.ts +0 -0
  99. /package/{legacy/dist → dist}/src/analyze/selection-cascade.d.ts +0 -0
  100. /package/{legacy/dist → dist}/src/analyze/slot-graph.d.ts +0 -0
  101. /package/{legacy/dist → dist}/src/apply/api-client.d.ts +0 -0
  102. /package/{legacy/dist → dist}/src/apply/command.d.ts +0 -0
  103. /package/{legacy/dist → dist}/src/apply/preview-utils.d.ts +0 -0
  104. /package/{legacy/dist → dist}/src/apply/tokens.d.ts +0 -0
  105. /package/{legacy/dist → dist}/src/apply/tui/ServerApplyView.d.ts +0 -0
  106. /package/{legacy/dist → dist}/src/apply/tui/ServerPreviewView.d.ts +0 -0
  107. /package/{legacy/dist → dist}/src/credentials-store.d.ts +0 -0
  108. /package/{legacy/dist → dist}/src/doctor/checks.d.ts +0 -0
  109. /package/{legacy/dist → dist}/src/doctor/command.d.ts +0 -0
  110. /package/{legacy/dist → dist}/src/doctor/report.d.ts +0 -0
  111. /package/{legacy/dist → dist}/src/generate/command.d.ts +0 -0
  112. /package/{legacy/dist → dist}/src/generate/tui/GenerateView.d.ts +0 -0
  113. /package/{legacy/dist → dist}/src/helpers/build-contentful-management-client.d.ts +0 -0
  114. /package/{legacy/dist → dist}/src/helpers/fetch-and-persist-existing-contentful-entities.d.ts +0 -0
  115. /package/{legacy/dist → dist}/src/helpers/fetch-existing-contentful-entities.d.ts +0 -0
  116. /package/{legacy/dist → dist}/src/helpers/find-nearly-matching-component.d.ts +0 -0
  117. /package/{legacy/dist → dist}/src/helpers/read-existing-contentful-entities-from-session.d.ts +0 -0
  118. /package/{legacy/dist → dist}/src/helpers/summarize-existing-contentful-entities.d.ts +0 -0
  119. /package/{legacy/dist → dist}/src/host-utils.d.ts +0 -0
  120. /package/{legacy/dist → dist}/src/import/agent-model-resolve.d.ts +0 -0
  121. /package/{legacy/dist → dist}/src/import/command.d.ts +0 -0
  122. /package/{legacy/dist → dist}/src/import/composition-options.d.ts +0 -0
  123. /package/{legacy/dist → dist}/src/import/cycle-auto-reject.d.ts +0 -0
  124. /package/{legacy/dist → dist}/src/import/path-utils.d.ts +0 -0
  125. /package/{legacy/dist → dist}/src/import/tui/CustomPromptBanner.d.ts +0 -0
  126. /package/{legacy/dist → dist}/src/import/tui/WizardApp.d.ts +0 -0
  127. /package/{legacy/dist → dist}/src/import/tui/ai-flag.d.ts +0 -0
  128. /package/{legacy/dist → dist}/src/import/tui/autocomplete.d.ts +0 -0
  129. /package/{legacy/dist → dist}/src/import/tui/components/CompactControlBar.d.ts +0 -0
  130. /package/{legacy/dist → dist}/src/import/tui/components/CounterStrip.d.ts +0 -0
  131. /package/{legacy/dist → dist}/src/import/tui/components/LegendEntry.d.ts +0 -0
  132. /package/{legacy/dist → dist}/src/import/tui/components/LivePreviewSummary.d.ts +0 -0
  133. /package/{legacy/dist → dist}/src/import/tui/components/ReviewComponentPanel.d.ts +0 -0
  134. /package/{legacy/dist → dist}/src/import/tui/components/ReviewDetailsEditor.d.ts +0 -0
  135. /package/{legacy/dist → dist}/src/import/tui/components/ReviewDialogs.d.ts +0 -0
  136. /package/{legacy/dist → dist}/src/import/tui/components/ReviewStatus.d.ts +0 -0
  137. /package/{legacy/dist → dist}/src/import/tui/components/SearchMatchSummary.d.ts +0 -0
  138. /package/{legacy/dist → dist}/src/import/tui/components/SpaceEnvironment.d.ts +0 -0
  139. /package/{legacy/dist → dist}/src/import/tui/components/StepHeader.d.ts +0 -0
  140. /package/{legacy/dist → dist}/src/import/tui/cycle-panel-scroll.d.ts +0 -0
  141. /package/{legacy/dist → dist}/src/import/tui/group-collapse.d.ts +0 -0
  142. /package/{legacy/dist → dist}/src/import/tui/history.d.ts +0 -0
  143. /package/{legacy/dist → dist}/src/import/tui/hooks/review-input.d.ts +0 -0
  144. /package/{legacy/dist → dist}/src/import/tui/hooks/sidebar-search-state.d.ts +0 -0
  145. /package/{legacy/dist → dist}/src/import/tui/hooks/useOverlayPanel.d.ts +0 -0
  146. /package/{legacy/dist → dist}/src/import/tui/hooks/useReviewEditor.d.ts +0 -0
  147. /package/{legacy/dist → dist}/src/import/tui/hooks/useReviewPreview.d.ts +0 -0
  148. /package/{legacy/dist → dist}/src/import/tui/hooks/useReviewSession.d.ts +0 -0
  149. /package/{legacy/dist → dist}/src/import/tui/hooks/useReviewSurfaceState.d.ts +0 -0
  150. /package/{legacy/dist → dist}/src/import/tui/lineage-layout.d.ts +0 -0
  151. /package/{legacy/dist → dist}/src/import/tui/preview-confirmation-input.d.ts +0 -0
  152. /package/{legacy/dist → dist}/src/import/tui/push-progress.d.ts +0 -0
  153. /package/{legacy/dist → dist}/src/import/tui/run-print-files-helpers.d.ts +0 -0
  154. /package/{legacy/dist → dist}/src/import/tui/run-selection-agent.d.ts +0 -0
  155. /package/{legacy/dist → dist}/src/import/tui/run-teaser.d.ts +0 -0
  156. /package/{legacy/dist → dist}/src/import/tui/runLivePreview.d.ts +0 -0
  157. /package/{legacy/dist → dist}/src/import/tui/runScopeGate.d.ts +0 -0
  158. /package/{legacy/dist → dist}/src/import/tui/scope-gate-columns.d.ts +0 -0
  159. /package/{legacy/dist → dist}/src/import/tui/sidebar-help.d.ts +0 -0
  160. /package/{legacy/dist → dist}/src/import/tui/sidebar-input.d.ts +0 -0
  161. /package/{legacy/dist → dist}/src/import/tui/sidebar-navigation.d.ts +0 -0
  162. /package/{legacy/dist → dist}/src/import/tui/sidebar-width.d.ts +0 -0
  163. /package/{legacy/dist → dist}/src/import/tui/spawn-generate.d.ts +0 -0
  164. /package/{legacy/dist → dist}/src/import/tui/step-filters.d.ts +0 -0
  165. /package/{legacy/dist → dist}/src/import/tui/steps/CredentialsStep.d.ts +0 -0
  166. /package/{legacy/dist → dist}/src/import/tui/steps/DoneStep.d.ts +0 -0
  167. /package/{legacy/dist → dist}/src/import/tui/steps/ErrorStep.d.ts +0 -0
  168. /package/{legacy/dist → dist}/src/import/tui/steps/GateStep.d.ts +0 -0
  169. /package/{legacy/dist → dist}/src/import/tui/steps/GenerateReviewStep.d.ts +0 -0
  170. /package/{legacy/dist → dist}/src/import/tui/steps/PathValidationStep.d.ts +0 -0
  171. /package/{legacy/dist → dist}/src/import/tui/steps/PreviewValidationErrorStep.d.ts +0 -0
  172. /package/{legacy/dist → dist}/src/import/tui/steps/PushingStep.d.ts +0 -0
  173. /package/{legacy/dist → dist}/src/import/tui/steps/RunningStep.d.ts +0 -0
  174. /package/{legacy/dist → dist}/src/import/tui/steps/ScopeGateStep.d.ts +0 -0
  175. /package/{legacy/dist → dist}/src/import/tui/steps/TokenInputStep.d.ts +0 -0
  176. /package/{legacy/dist → dist}/src/import/tui/steps/WelcomeStep.d.ts +0 -0
  177. /package/{legacy/dist → dist}/src/import/tui/steps/WizardPreviewStep.d.ts +0 -0
  178. /package/{legacy/dist → dist}/src/import/tui/steps/auto-reject-decision.d.ts +0 -0
  179. /package/{legacy/dist → dist}/src/import/tui/steps/breaking-change-format.d.ts +0 -0
  180. /package/{legacy/dist → dist}/src/import/tui/steps/enumerate-cycle-breaks.d.ts +0 -0
  181. /package/{legacy/dist → dist}/src/import/tui/steps/preview-diff.d.ts +0 -0
  182. /package/{legacy/dist → dist}/src/import/tui/steps/review-details-panel.d.ts +0 -0
  183. /package/{legacy/dist → dist}/src/import/tui/steps/review-json-panel.d.ts +0 -0
  184. /package/{legacy/dist → dist}/src/import/tui/useFinalizePreview.d.ts +0 -0
  185. /package/{legacy/dist → dist}/src/import/tui/useLivePreview.d.ts +0 -0
  186. /package/{legacy/dist → dist}/src/import/tui/wizard-422-helpers.d.ts +0 -0
  187. /package/{legacy/dist → dist}/src/import/tui/wizard-generate-progress.d.ts +0 -0
  188. /package/{legacy/dist → dist}/src/import/tui/wizard-state-transitions.d.ts +0 -0
  189. /package/dist/{index.d.ts → src/index.d.ts} +0 -0
  190. /package/{legacy/dist → dist}/src/lib/agent-definitions.d.ts +0 -0
  191. /package/{legacy/dist → dist}/src/lib/agent-model-options.d.ts +0 -0
  192. /package/{legacy/dist → dist}/src/lib/agent-output.d.ts +0 -0
  193. /package/{legacy/dist → dist}/src/lib/cli-errors.d.ts +0 -0
  194. /package/{legacy/dist → dist}/src/lib/cli-path.d.ts +0 -0
  195. /package/{legacy/dist → dist}/src/lib/command-options.d.ts +0 -0
  196. /package/{legacy/dist → dist}/src/lib/component-patch.d.ts +0 -0
  197. /package/{legacy/dist → dist}/src/lib/contentful-urls.d.ts +0 -0
  198. /package/{legacy/dist → dist}/src/lib/debug-logger.d.ts +0 -0
  199. /package/{legacy/dist → dist}/src/lib/debug-preamble.d.ts +0 -0
  200. /package/{legacy/dist → dist}/src/lib/error-parser.d.ts +0 -0
  201. /package/{legacy/dist → dist}/src/lib/path-exists.d.ts +0 -0
  202. /package/{legacy/dist → dist}/src/lib/prompt-overrides.d.ts +0 -0
  203. /package/{legacy/dist → dist}/src/lib/terminal-capabilities.d.ts +0 -0
  204. /package/{legacy/dist → dist}/src/lib/user-agent.d.ts +0 -0
  205. /package/{legacy/dist → dist}/src/map-tokens/apply.d.ts +0 -0
  206. /package/{legacy/dist → dist}/src/map-tokens/command.d.ts +0 -0
  207. /package/{legacy/dist → dist}/src/map-tokens/resolve-defaults.d.ts +0 -0
  208. /package/{legacy/dist → dist}/src/map-tokens/tui/MapTokensView.d.ts +0 -0
  209. /package/{legacy/dist → dist}/src/output/format.d.ts +0 -0
  210. /package/{legacy/dist → dist}/src/print/command.d.ts +0 -0
  211. /package/{legacy/dist → dist}/src/print/validate/tui/ValidateView.d.ts +0 -0
  212. /package/{legacy/dist → dist}/src/print/validate/validators/cdf-validator.d.ts +0 -0
  213. /package/{legacy/dist → dist}/src/print/validate/validators/dtcg-validator.d.ts +0 -0
  214. /package/{legacy/dist → dist}/src/print/validate/validators/format-errors.d.ts +0 -0
  215. /package/{legacy/dist → dist}/src/print/validate/validators/read-json-file.d.ts +0 -0
  216. /package/{legacy/dist → dist}/src/program.d.ts +0 -0
  217. /package/{legacy/dist → dist}/src/runs/fingerprint.d.ts +0 -0
  218. /package/{legacy/dist → dist}/src/runs/path-prompt.d.ts +0 -0
  219. /package/{legacy/dist → dist}/src/runs/save-path-resolver.d.ts +0 -0
  220. /package/{legacy/dist → dist}/src/runs/store.d.ts +0 -0
  221. /package/{legacy/dist → dist}/src/session/cache-keys.d.ts +0 -0
  222. /package/{legacy/dist → dist}/src/session/core/cdf/cdf-mappers.d.ts +0 -0
  223. /package/{legacy/dist → dist}/src/session/core/components/derive-component-id.d.ts +0 -0
  224. /package/{legacy/dist → dist}/src/session/core/components/hash-component-shape.d.ts +0 -0
  225. /package/{legacy/dist → dist}/src/session/core/shared/index-rows-by-key.d.ts +0 -0
  226. /package/{legacy/dist → dist}/src/session/core/tokens/build-dtcg-groups.d.ts +0 -0
  227. /package/{legacy/dist → dist}/src/session/core/tokens/build-dtcg-tokens.d.ts +0 -0
  228. /package/{legacy/dist → dist}/src/session/core/tokens/hash-token-content.d.ts +0 -0
  229. /package/{legacy/dist → dist}/src/session/db.d.ts +0 -0
  230. /package/{legacy/dist → dist}/src/session/migration.d.ts +0 -0
  231. /package/{legacy/dist → dist}/src/session/repositories/sessions/read.d.ts +0 -0
  232. /package/{legacy/dist → dist}/src/session/repositories/sessions/write.d.ts +0 -0
  233. /package/{legacy/dist → dist}/src/session/repositories/shared/with-transaction.d.ts +0 -0
  234. /package/{legacy/dist → dist}/src/session/repositories/steps/read.d.ts +0 -0
  235. /package/{legacy/dist → dist}/src/session/repositories/steps/write.d.ts +0 -0
  236. /package/{legacy/dist → dist}/src/session/repositories/tokens/read.d.ts +0 -0
  237. /package/{legacy/dist → dist}/src/session/repositories/tokens/write.d.ts +0 -0
  238. /package/{legacy/dist → dist}/src/session/resolve-session-id.d.ts +0 -0
  239. /package/{legacy/dist → dist}/src/session/services/session-resolver.d.ts +0 -0
  240. /package/{legacy/dist → dist}/src/session/services/tokens/apply-tool-calls.d.ts +0 -0
  241. /package/{legacy/dist → dist}/src/session/services/tokens/replace-raw-prop-token-paths.d.ts +0 -0
  242. /package/{legacy/dist → dist}/src/session/services/tokens/replace-raw-token-name-paths.d.ts +0 -0
  243. /package/{legacy/dist → dist}/src/session/services/tokens/store-dtcg-tokens.d.ts +0 -0
  244. /package/{legacy/dist → dist}/src/session/session-id.d.ts +0 -0
  245. /package/{legacy/dist → dist}/src/session/source-excerpt.d.ts +0 -0
  246. /package/{legacy/dist → dist}/src/setup/SetupScreen.d.ts +0 -0
  247. /package/{legacy/dist → dist}/src/setup/SetupStepper.d.ts +0 -0
  248. /package/{legacy/dist → dist}/src/setup/command.d.ts +0 -0
  249. /package/{legacy/dist → dist}/src/setup/lib/checks.d.ts +0 -0
  250. /package/{legacy/dist → dist}/src/setup/lib/shell.d.ts +0 -0
  251. /package/{legacy/dist → dist}/src/setup/steps/CodingAgentScreen.d.ts +0 -0
  252. /package/{legacy/dist → dist}/src/setup/steps/ContentfulCredentialsScreen.d.ts +0 -0
  253. /package/{legacy/dist → dist}/src/setup/steps/StepLayout.d.ts +0 -0
  254. /package/{legacy/dist → dist}/src/setup/steps/preferences/AnalyticsScreen.d.ts +0 -0
  255. /package/{legacy/dist → dist}/src/setup/steps/preferences/BooleanInput.d.ts +0 -0
  256. /package/{legacy/dist → dist}/src/setup/steps/preferences/ColorPreferenceScreen.d.ts +0 -0
  257. /package/{legacy/dist → dist}/src/setup/steps/preferences/CustomPromptScreen.d.ts +0 -0
  258. /package/{legacy/dist → dist}/src/setup/steps/preferences/DebugLogsScreen.d.ts +0 -0
  259. /package/{legacy/dist → dist}/src/setup/steps/preferences/PreferencesMenu.d.ts +0 -0
  260. /package/{legacy/dist → dist}/src/setup/steps/prerequisites/PrerequisitesScreen.d.ts +0 -0
  261. /package/{legacy/dist → dist}/src/setup/steps/prerequisites/build.d.ts +0 -0
  262. /package/{legacy/dist → dist}/src/setup/steps/prerequisites/deps.d.ts +0 -0
  263. /package/{legacy/dist → dist}/src/setup/steps/prerequisites/index.d.ts +0 -0
  264. /package/{legacy/dist → dist}/src/setup/steps/prerequisites/node.d.ts +0 -0
  265. /package/{legacy/dist → dist}/src/setup/steps/prerequisites/pnpm.d.ts +0 -0
  266. /package/{legacy/dist → dist}/src/tui/CommandCompletionView.d.ts +0 -0
  267. /package/{legacy/dist → dist}/src/tui/render-with-goodbye.d.ts +0 -0
  268. /package/{legacy/dist → dist}/src/tui/use-blinking-cursor.d.ts +0 -0
  269. /package/{legacy/dist → dist}/src/tui/use-terminal-size.d.ts +0 -0
  270. /package/{legacy/dist → dist}/src/tui/use-timed-spinner.d.ts +0 -0
  271. /package/{legacy/dist → dist}/src/tui/windowed-panel.d.ts +0 -0
  272. /package/{legacy/dist → dist}/src/types.d.ts +0 -0
  273. /package/{legacy/prompts → prompts}/composition-edges.md +0 -0
  274. /package/{legacy/skills → skills}/generate-components.md +0 -0
  275. /package/{legacy/skills → skills}/generate-tokens.md +0 -0
  276. /package/{legacy/skills → skills}/map-tokens.md +0 -0
  277. /package/{legacy/skills → skills}/select-components.md +0 -0
package/README.md ADDED
@@ -0,0 +1,245 @@
1
+ # @contentful/experience-design-system-cli
2
+
3
+ CLI for extracting, reviewing, generating, validating, and pushing Contentful Experience Design System component definitions into Experiences.
4
+
5
+ ## Binaries
6
+
7
+ The package installs three equivalent binaries:
8
+
9
+ | Binary | Notes |
10
+ | ------------------------------ | ----------------------------------------------------- |
11
+ | `experiences` | Preferred entry point — short and operator-facing |
12
+ | `exo` | Shorthand for Experience Orchestration |
13
+ | `experience-design-system-cli` | Full name; used in CI / scripts where clarity matters |
14
+
15
+ The rest of this README uses `experiences`.
16
+
17
+ ## CLI Overview
18
+
19
+ The CLI has two primary workflows:
20
+
21
+ 1. **`experiences import`** — the wizard. Drives the full pipeline (extract → AI select → scope-gate → generation → final-review → save and push) from a single command in a full-screen interactive TUI. **This is the recommended path for almost everyone.**
22
+
23
+ 2. **`experiences apply <file>`** — applies a CDF file of component and token definitions to Contentful.
24
+
25
+ `experiences setup` and `experiences doctor` configure and check your environment. `experiences importv2` launches the newer v2 TUI, and `experiences build` rebuilds a local checkout and re-links the binaries.
26
+
27
+ The import wizard owns extraction, selection, generation, validation, and apply orchestration internally; those implementation stages are not exposed as public commands. Hidden internal commands (`__extract`, `__generate`, `map tokens`, `print`) are what the wizard runs in subprocesses.
28
+
29
+ All intermediate data flows through a local SQLite session database (`~/.contentful/experience-design-system-cli/pipeline.db`). No JSON files are written between steps — each pipeline step reads its inputs from the session and writes its outputs back to it.
30
+
31
+ ---
32
+
33
+ ## Composite components & composition
34
+
35
+ A **composite component** is one that renders other components inside it — a `Card` that slots a `Button` and an `Icon`, a `Tabs` that slots `Tab` panels. When you import composite components, the CLI can populate each slot's `$allowedComponents` so the parent→child relationships survive into Contentful.
36
+
37
+ All imports use composite mode: embedded-component relationships are resolved and preserved in the generated CDF.
38
+
39
+ ### How composition is resolved
40
+
41
+ Relationships are resolved from the highest-confidence source available, in this precedence order:
42
+
43
+ 1. **Typed slots (code)** — slots the source already declares, e.g. React `ReactElement<XProps>` / `children`, Svelte `Snippet<[XProps]>`, or an explicit `@allowedComponents` JSDoc tag. Fully deterministic; picked up automatically.
44
+ 2. **Agent** — direct edge emission for codebases that encode composition in _code patterns_ rather than typed slots (common in real-world design systems). It is enabled automatically in composite mode and only runs when the deterministic sources above find nothing.
45
+
46
+ When more than one source speaks to the same relationship, the higher-precedence one wins (**code slots > agent**).
47
+
48
+ ### The composition agent
49
+
50
+ The composition agent emits one structured edge per relationship. The CLI validates component names and merges those edges with deterministic sources by provenance and precedence.
51
+
52
+ - `--no-cache` — ignore caches and re-resolve composition from scratch, forcing the agent to run.
53
+ - `--agent <name>` — which coding agent runs composition, and the rest of the wizard's agent stages (`claude`, `codex`, `opencode`, `cursor`, `copilot`).
54
+ - `--prompt composition=<file-or-text>` — override the composition stage's prompt.
55
+
56
+ Because the agent path spawns a coding agent, it adds latency and cost and is best-effort.
57
+
58
+ ### Slot cycles
59
+
60
+ If the resolved graph contains a circular slot dependency (A slots B, B slots A), it is detected before push. `apply` and the wizard's push path **refuse to send a manifest with cycles**; the cycle path is reported so you can break it.
61
+
62
+ ---
63
+
64
+ ## Prerequisites
65
+
66
+ ### Coding agent
67
+
68
+ The import wizard's generation steps require a coding agent CLI in your `$PATH`. Choose one:
69
+
70
+ | Agent | Install | Auth |
71
+ | ------------------------------ | ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
72
+ | **Claude Code** (`claude`) | `npm install -g @anthropic-ai/claude-code` | `claude login` (browser OAuth) **or** set `ANTHROPIC_API_KEY` |
73
+ | **OpenAI Codex** (`codex`) | `npm install -g @openai/codex` | Set `OPENAI_API_KEY` |
74
+ | **OpenCode** (`opencode`) | `npm install -g opencode-ai` | Configure via `opencode auth` (supports multiple providers) |
75
+ | **Cursor** (`cursor`) | Install [Cursor](https://cursor.com) | Sign in to Cursor; exposes `cursor-agent` binary |
76
+ | **GitHub Copilot** (`copilot`) | `npm install -g @github/copilot` | Run `copilot` once to complete GitHub OAuth login. Free plan uses Auto model selection by default. Paid plans can pin a specific model via `EDS_AGENT_MODEL_COPILOT=<model-id>` (e.g. `claude-sonnet-4.6`) |
77
+
78
+ The CLI invokes the agent non-interactively in a subprocess. If the binary is not found in `$PATH`, the command exits 1 and prints manual fallback instructions.
79
+
80
+ `experiences setup` persists your chosen agent (and optional model + custom prompt paths) to `~/.config/experiences/credentials.json`; later commands pick them up automatically.
81
+
82
+ ### Contentful credentials
83
+
84
+ `apply` and `import` (when pushing) require access to a Contentful space. Configure these environment variables or run `experiences setup`:
85
+
86
+ ```bash
87
+ export CONTENTFUL_MANAGEMENT_TOKEN=<your-cma-token> # required
88
+ export CONTENTFUL_SPACE_ID=<your-space-id> # required
89
+ export CONTENTFUL_ENVIRONMENT_ID=master # required
90
+ ```
91
+
92
+ Or run `experiences setup` once and they get saved to `credentials.json` and pre-filled in the wizard.
93
+
94
+ In the wizard's credentials step you can press `[s] Skip` to save-only without pushing — useful when you want a checked-in combined CDF file without a live push.
95
+
96
+ ---
97
+
98
+ ## The `import` wizard
99
+
100
+ ```bash
101
+ experiences import [flags]
102
+ ```
103
+
104
+ `experiences import` is the primary entry point and launches a full-screen wizard in a supported interactive terminal.
105
+
106
+ ### Wizard step machine
107
+
108
+ The order below is the normal path. The first step depends on how the wizard is started: `--project` jumps straight to `token-input`, and `--tokens` jumps to `path-validation` (with `--project`) or `credentials` (without it).
109
+
110
+ ```
111
+ welcome — project path
112
+ ↓
113
+ token-input — optional raw token file; Enter on an empty field skips
114
+ ↓ (token-generation and token-reuse-gate run here when a file is given)
115
+ path-validation — confirms the project path and how many files will be scanned
116
+ ↓
117
+ credentials — space ID, environment, CMA token and API host, prefilled from
118
+ `experiences setup`; press [s] to skip and save files only
119
+ ↓
120
+ extracting — composite relationships enabled; the selection agent runs here
121
+ once components are extracted
122
+ ↓
123
+ scope-gate — single human review gate: confirm the AI selection, toggle components
124
+ ↓
125
+ generating — component generation, then token mapping when a token file was given
126
+ ↓
127
+ final-review — edit names, $description, $default, $allowedComponents per slot,
128
+ $values, with source and rationale panels
129
+ ↓
130
+ path-prompt — where to save `components.json` (and `tokens.json`)
131
+ ↓
132
+ previewing → preview-gate — diff against live Contentful; confirm to push
133
+ ↓
134
+ pushing → done — the push emits a Contentful webapp view URL for the imported components
135
+ ```
136
+
137
+ There is a single human review gate (`scope-gate`) before generation. Choosing to skip credentials still saves the files; it bypasses the preview and refuses to push.
138
+
139
+ ### Save and push
140
+
141
+ After final-review the wizard always saves one combined `components.json` CDF (components and design tokens) and then, unless credentials were skipped, previews the diff and pushes it to Contentful. The wizard records each saved run in `~/.config/experiences/runs.json`.
142
+
143
+ ### Custom skill prompts
144
+
145
+ Custom `.md` skill prompt paths can be saved via `experiences setup`; the CLI emits a banner at agent invocation when an override is active.
146
+
147
+ ### Flag reference — `experiences import`
148
+
149
+ | Flag | Default | Description |
150
+ | ------------------------ | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
151
+ | `--project <path>` | `.` | Project root to analyze |
152
+ | `--tokens <path>` | — | Raw token source file (SCSS, CSS variables, JS/TS, Style Dictionary, …) to classify and import alongside components; skips the interactive token prompt |
153
+ | `--agent <name>` | saved by setup / `claude` | Coding agent, with an optional model as `agent:model` or `"agent model"` |
154
+ | `--prompt <stage=value>` | — | Override a stage prompt (repeatable); value is a file path or literal text, e.g. `--prompt select=./p.md`. Stages used today: `composition`, `select`, `map-tokens` |
155
+ | `--no-cache` | cache on | Re-run all steps instead of reusing cached results |
156
+
157
+ `--model`, `--composition-map`, `--skip-map-tokens` and `--raw-tokens` were removed from `import`. Unknown flags are rejected. Pass the model through `--agent` instead, and use `--tokens` for a token file.
158
+
159
+ ### Choosing the agent and model
160
+
161
+ `--agent` accepts `claude`, `codex`, `opencode`, `cursor` or `copilot`, optionally followed by a model: `--agent claude:sonnet` or `--agent "claude sonnet"`. The agent resolves in this order:
162
+
163
+ 1. `--agent <name>` flag
164
+ 2. `agent` field saved in `~/.config/experiences/credentials.json` by `experiences setup`
165
+ 3. Built-in default, `claude`
166
+
167
+ The model resolves the same way: the model part of `--agent`, then the `agentModel` field in `credentials.json`, then the agent's own lightweight default. You can also set a model per agent with `EDS_AGENT_MODEL_<AGENT>` (for example `EDS_AGENT_MODEL_CLAUDE`).
168
+
169
+ ---
170
+
171
+ ### `apply`
172
+
173
+ This command is the non-wizard route to the same diff and push logic. It accepts one CDF file containing all component and design token definitions.
174
+
175
+ `apply` emits a Contentful webapp view URL for the imported components in its JSON summary (`viewUrl`) so callers can deep-link into the management UI after a successful push.
176
+
177
+ Design tokens are read from the same CDF file, so there is no separate token flag.
178
+
179
+ ```bash
180
+ experiences apply <file>
181
+ ```
182
+
183
+ `apply` is interactive and loads credentials from `experiences setup` or environment variables. Remote ComponentTypes and DesignTokens missing from the pushed manifest are always skipped.
184
+
185
+ Design tokens are written first (component types may reference token kinds). Each entity write is recorded in the session database atomically — interrupted pushes resume from where they left off.
186
+
187
+ ---
188
+
189
+ ## Session Database
190
+
191
+ All pipeline state is stored in `~/.contentful/experience-design-system-cli/pipeline.db` (SQLite). The path can be overridden with the `EDS_PIPELINE_DB_PATH` environment variable. The push-resumption database is at `~/.contentful/experience-design-system-cli/import.db` (override with `EDS_IMPORT_DB_PATH`).
192
+
193
+ ---
194
+
195
+ ## Terminal Compatibility
196
+
197
+ - The scope-gate step shows two columns at 100 or more terminal columns and one column below that; a wider terminal is more comfortable for the final-review editor
198
+ - `NO_COLOR=1` suppresses all ANSI color output
199
+ - Interactive views require both stdin and stdout to be TTYs and stdin to support raw mode.
200
+ - On Windows, use Windows Terminal with PowerShell. Older ConEmu and cmd.exe hosts may not provide the raw-mode support the interactive UI needs.
201
+ - `experiences import` does not provide a non-interactive execution mode.
202
+
203
+ ---
204
+
205
+ ## Usage data
206
+
207
+ The CLI collects **anonymous usage data** to help us understand which commands are used and where the import workflow succeeds or fails. This data does **not** include your source code, file paths, credentials, prompts, or any content you author.
208
+
209
+ What may be included:
210
+
211
+ - Command name and duration
212
+ - CLI, Node.js, and operating-system version
213
+ - Anonymous session identifiers that link steps within a single import run
214
+ - Structural counts (for example, how many components were extracted or accepted)
215
+ - Space and environment IDs you pass on the command line
216
+ - Contentful request IDs from API responses (to correlate failures with server logs)
217
+
218
+ You can turn this off two ways:
219
+
220
+ - Persistently: run `experiences setup`, open **Usage analytics** and choose "Don't share usage data". This writes `analyticsDisabled: true` to `~/.config/experiences/credentials.json`, which persists across invocations until you change it again — it will not silently re-enable itself.
221
+ - Per invocation:
222
+
223
+ ```bash
224
+ DISABLE_ANALYTICS=1 experiences import --project ./my-app
225
+ ```
226
+
227
+ Setting `DISABLE_ANALYTICS` to any value disables collection for that invocation. This is additive with the persisted opt-out — it can only disable, never re-enable, collection that setup has turned off.
228
+
229
+ ---
230
+
231
+ ## Development
232
+
233
+ ```bash
234
+ # Install dependencies from repo root
235
+ pnpm install
236
+
237
+ # Build
238
+ pnpm -F @contentful/experience-design-system-cli build
239
+
240
+ # Run tests
241
+ pnpm -F @contentful/experience-design-system-cli test
242
+
243
+ # Typecheck
244
+ pnpm -F @contentful/experience-design-system-cli typecheck
245
+ ```
package/bin/cli.js CHANGED
@@ -1,2 +1,58 @@
1
1
  #!/usr/bin/env node
2
- await import("../dist/index.js");
2
+ // Suppress the SQLite ExperimentalWarning before any modules load.
3
+ // Must use dynamic import so this handler registers before sqlite is imported.
4
+ process.removeAllListeners("warning");
5
+ process.on("warning", (w) => {
6
+ if (w.name === "ExperimentalWarning" && w.message.includes("SQLite")) return;
7
+ process.stderr.write(`${w.name}: ${w.message}\n`);
8
+ });
9
+
10
+ // Auto-rebuild when running from source (dev mode only).
11
+ // Skipped when src/ doesn't exist (e.g. npm-installed users).
12
+ import { existsSync, statSync, readdirSync } from "node:fs";
13
+ import { execFileSync } from "node:child_process";
14
+ import { fileURLToPath } from "node:url";
15
+ import { dirname, resolve, join } from "node:path";
16
+
17
+ function newestMtime(dir, depth = 0) {
18
+ if (depth > 10) return 0;
19
+ let max = 0;
20
+ for (const entry of readdirSync(dir, { withFileTypes: true })) {
21
+ if (entry.isSymbolicLink()) continue;
22
+ const full = join(dir, entry.name);
23
+ if (entry.isDirectory()) {
24
+ max = Math.max(max, newestMtime(full, depth + 1));
25
+ } else if (entry.name.endsWith(".ts") || entry.name.endsWith(".tsx")) {
26
+ max = Math.max(max, statSync(full).mtimeMs);
27
+ }
28
+ }
29
+ return max;
30
+ }
31
+
32
+ const __dirname = dirname(fileURLToPath(import.meta.url));
33
+ const pkgRoot = resolve(__dirname, "..");
34
+ const srcDir = join(pkgRoot, "src");
35
+ const distEntry = join(pkgRoot, "dist", "src", "index.js");
36
+
37
+ if (
38
+ existsSync(srcDir) &&
39
+ existsSync(distEntry) &&
40
+ process.env.NODE_ENV !== "test"
41
+ ) {
42
+ const distMtime = statSync(distEntry).mtimeMs;
43
+ if (newestMtime(srcDir) > distMtime) {
44
+ process.stderr.write("⚙ Source changed — rebuilding...\n");
45
+ const tsc = join(pkgRoot, "node_modules", ".bin", "tsc");
46
+ try {
47
+ execFileSync(tsc, ["-p", join(pkgRoot, "tsconfig.build.json")], {
48
+ stdio: ["ignore", "ignore", "inherit"],
49
+ cwd: pkgRoot,
50
+ });
51
+ process.stderr.write("✓ Build complete\n");
52
+ } catch {
53
+ process.stderr.write("✗ Build failed — running with existing dist\n");
54
+ }
55
+ }
56
+ }
57
+
58
+ await import("../dist/src/index.js");
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.34.5-dev-build-4471673c.0",
3
+ "version": "2.35.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -9,13 +9,13 @@
9
9
  "experiences": "./bin/cli.js",
10
10
  "exo": "./bin/cli.js"
11
11
  },
12
- "main": "./dist/index.js",
12
+ "main": "./dist/src/index.js",
13
+ "types": "./dist/src/index.d.ts",
13
14
  "exports": {
14
- ".": "./dist/index.js",
15
- "./app": {
16
- "types": "./dist/app.d.ts",
17
- "import": "./dist/app.js",
18
- "node": "./dist/app.js"
15
+ ".": {
16
+ "types": "./dist/src/index.d.ts",
17
+ "import": "./dist/src/index.js",
18
+ "node": "./dist/src/index.js"
19
19
  }
20
20
  },
21
21
  "publishConfig": {
@@ -25,17 +25,20 @@
25
25
  "files": [
26
26
  "bin/",
27
27
  "dist/",
28
- "legacy/"
28
+ "prompts/",
29
+ "skills/"
29
30
  ],
30
31
  "scripts": {
31
32
  "build": "nx build experience-design-system-cli",
32
33
  "typecheck": "nx typecheck experience-design-system-cli",
33
34
  "clean": "nx clean experience-design-system-cli",
34
35
  "test": "nx test experience-design-system-cli",
36
+ "test:watch": "nx test:watch experience-design-system-cli",
35
37
  "lint": "nx lint experience-design-system-cli",
36
38
  "lint:fix": "nx lint:fix experience-design-system-cli"
37
39
  },
38
40
  "dependencies": {
41
+ "@contentful/experience-design-system-cli-v2": "workspace:*",
39
42
  "@contentful/experience-design-system-types": "workspace:*",
40
43
  "@inkjs/ui": "^2.0.0",
41
44
  "@segment/analytics-node": "^3.0.0",
@@ -46,19 +49,21 @@
46
49
  "ink": "^5.2.1",
47
50
  "react": "^18.3.1",
48
51
  "react-devtools-core": "^4.19.1",
49
- "semver": "^7.7.2",
50
52
  "svelte": "^5.56.4",
51
53
  "ts-morph": "^27.0.2",
52
54
  "typescript": "^5.9.3"
53
55
  },
54
56
  "devDependencies": {
57
+ "@contentful/experience-design-system-client": "workspace:*",
58
+ "@contentful/experience-design-system-extraction": "workspace:*",
59
+ "@contentful/experience-design-system-generation": "workspace:*",
55
60
  "@tsconfig/node24": "^24.0.4",
56
61
  "@types/node": "^24.0.3",
57
62
  "@types/react": "^18.3.24",
58
- "@types/semver": "^7.7.1",
59
63
  "eslint": "^9.39.5",
60
64
  "eslint-config-prettier": "^10.1.8",
61
65
  "eslint-plugin-prettier": "^5.5.6",
66
+ "ink-testing-library": "^4.0.0",
62
67
  "typescript-eslint": "^8.67.0",
63
68
  "vitest": "^4.0.16"
64
69
  },