@contentful/experience-design-system-cli 2.38.1-dev-build-f59ff6e8.0 → 2.38.1-dev-build-1adffe40.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 (365) hide show
  1. package/dist/app.d.ts +5 -7
  2. package/dist/app.js +30449 -967
  3. package/dist/index.js +34085 -1070
  4. package/dist/package.json +8 -3
  5. package/dist/src/commands/import-options.d.ts +10 -0
  6. package/dist/src/commands/import.d.ts +2 -1
  7. package/dist/src/tui/debug-prune.d.ts +12 -0
  8. package/dist/src/tui/debug-store.d.ts +18 -1
  9. package/dist/src/tui/help/file-locations.d.ts +23 -0
  10. package/dist/src/tui/home/home.theme.d.ts +0 -9
  11. package/dist/src/tui/import/resolve-user-path.d.ts +1 -0
  12. package/dist/src/tui/import/shared/error-step/controls.d.ts +7 -0
  13. package/{legacy/dist/src/import/tui/steps/ErrorStep.d.ts → dist/src/tui/import/shared/error-step/error-step.d.ts} +2 -2
  14. package/dist/src/tui/import/shared/error-step/logic.d.ts +15 -0
  15. package/dist/src/tui/import/shared/gate-step/controls.d.ts +8 -0
  16. package/dist/src/tui/import/shared/gate-step/gate-step.d.ts +16 -0
  17. package/dist/src/tui/import/shared/gate-step/logic.d.ts +11 -0
  18. package/dist/src/tui/import/shared/index.d.ts +4 -0
  19. package/dist/src/tui/import/shared/overview-box/overview-box.d.ts +10 -0
  20. package/dist/src/tui/import/shared/running-step/logic.d.ts +11 -0
  21. package/dist/src/tui/import/shared/running-step/running-step.d.ts +10 -0
  22. package/dist/src/tui/import/shared/running-step/theme.d.ts +3 -0
  23. package/dist/src/tui/import/shared/running-step/use-elapsed.d.ts +1 -0
  24. package/dist/src/tui/import/steps/00-preflight/controls.d.ts +17 -0
  25. package/dist/src/tui/import/steps/00-preflight/logic.d.ts +45 -0
  26. package/dist/src/tui/import/steps/00-preflight/screen.d.ts +8 -0
  27. package/dist/src/tui/import/steps/01-welcome/controls.d.ts +4 -1
  28. package/dist/src/tui/import/steps/02-token-input/controls.d.ts +3 -0
  29. package/dist/src/tui/import/steps/03-path-validation/controls.d.ts +13 -0
  30. package/dist/src/tui/import/steps/03-path-validation/helpers/scan-files.d.ts +2 -0
  31. package/dist/src/tui/import/steps/03-path-validation/logic.d.ts +45 -0
  32. package/dist/src/tui/import/steps/03-path-validation/screen.d.ts +14 -0
  33. package/dist/src/tui/import/steps/04-credentials/logic.d.ts +12 -0
  34. package/dist/src/tui/import/steps/04-credentials/screen.d.ts +19 -0
  35. package/dist/src/tui/import/steps/04-credentials/validate.d.ts +8 -0
  36. package/dist/src/tui/import/steps/06-extraction/find-skill-path.d.ts +1 -0
  37. package/dist/src/tui/import/steps/06-extraction/logic.d.ts +33 -0
  38. package/dist/src/tui/import/steps/06-extraction/run-tokens-only.d.ts +31 -0
  39. package/dist/src/tui/import/steps/06-extraction/run.d.ts +26 -0
  40. package/dist/src/tui/import/steps/06-extraction/screen.d.ts +8 -0
  41. package/dist/src/tui/import/steps/06-extraction/selection.d.ts +18 -0
  42. package/dist/src/tui/import/steps/06-extraction/types.d.ts +45 -0
  43. package/dist/src/tui/import/steps/06-extraction/use-extraction.d.ts +14 -0
  44. package/dist/src/tui/import/steps/06-extraction/use-tokens-only.d.ts +12 -0
  45. package/dist/src/tui/import/steps/07-scope-gate/cache-check.d.ts +10 -0
  46. package/{legacy/dist/src/import/tui/scope-gate-columns.d.ts → dist/src/tui/import/steps/07-scope-gate/columns.d.ts} +22 -4
  47. package/dist/src/tui/import/steps/07-scope-gate/graph/fuzzy-search.d.ts +1 -0
  48. package/dist/src/tui/import/steps/07-scope-gate/graph/index.d.ts +33 -0
  49. package/dist/src/tui/import/steps/07-scope-gate/graph/lineage.d.ts +7 -0
  50. package/dist/src/tui/import/steps/07-scope-gate/keymap.d.ts +84 -0
  51. package/dist/src/tui/import/steps/07-scope-gate/load.d.ts +8 -0
  52. package/dist/src/tui/import/steps/07-scope-gate/panels/added-column.d.ts +15 -0
  53. package/dist/src/tui/import/steps/07-scope-gate/panels/cycles-panel.d.ts +8 -0
  54. package/dist/src/tui/import/steps/07-scope-gate/panels/reject-prompt.d.ts +5 -0
  55. package/dist/src/tui/import/steps/07-scope-gate/screen.d.ts +9 -0
  56. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/ai-flag.d.ts +0 -1
  57. package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/components/GotoBanner.d.ts +2 -1
  58. package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/components/GroupedSidebar.d.ts +3 -36
  59. package/dist/src/tui/import/steps/07-scope-gate/sidebar/components/badge.d.ts +13 -0
  60. package/{legacy/dist/src/tui → dist/src/tui/import/steps/07-scope-gate/sidebar/components}/windowed-panel.d.ts +3 -5
  61. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/group-collapse.d.ts +1 -1
  62. package/dist/src/tui/import/steps/07-scope-gate/sidebar/lineage-layout.d.ts +32 -0
  63. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/sidebar-help.d.ts +1 -1
  64. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/sidebar-navigation.d.ts +2 -2
  65. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/step-filters.d.ts +4 -0
  66. package/dist/src/tui/import/steps/07-scope-gate/sidebar/types.d.ts +7 -0
  67. package/dist/src/tui/import/steps/07-scope-gate/state.d.ts +19 -0
  68. package/dist/src/tui/import/steps/07-scope-gate/types.d.ts +24 -0
  69. package/dist/src/tui/import/steps/07-scope-gate/use-scope-gate-flow.d.ts +27 -0
  70. package/dist/src/tui/import/steps/07-scope-gate/use-scope-gate.d.ts +77 -0
  71. package/dist/src/tui/import/steps/08-generation/logic.d.ts +23 -0
  72. package/dist/src/tui/import/steps/08-generation/map-tokens.d.ts +14 -0
  73. package/dist/src/tui/import/steps/08-generation/run.d.ts +12 -0
  74. package/dist/src/tui/import/steps/08-generation/save-decisions.d.ts +8 -0
  75. package/dist/src/tui/import/steps/08-generation/screen.d.ts +10 -0
  76. package/dist/src/tui/import/steps/08-generation/types.d.ts +47 -0
  77. package/dist/src/tui/import/steps/08-generation/use-generation.d.ts +14 -0
  78. package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/ComponentRationalePanel.d.ts +1 -1
  79. package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/FieldEditor.d.ts +1 -18
  80. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/components/LivePreviewSummary.d.ts +2 -2
  81. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/components/ReviewComponentPanel.d.ts +3 -3
  82. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/components/ReviewDetailsEditor.d.ts +3 -3
  83. package/dist/src/tui/import/steps/09-review/components/ReviewDialogs.d.ts +14 -0
  84. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/components/ReviewStatus.d.ts +1 -1
  85. package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/ScrollablePanel.d.ts +2 -2
  86. package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/TokenReviewPanel.d.ts +0 -6
  87. package/dist/src/tui/import/steps/09-review/generate-review-step.d.ts +16 -0
  88. package/{legacy/dist/src/import → dist/src/tui/import/steps/09-review/graph}/cycle-auto-reject.d.ts +1 -1
  89. package/{legacy/dist/src/analyze → dist/src/tui/import/steps/09-review/graph}/cycle-view.d.ts +2 -2
  90. package/{legacy/dist/src/analyze → dist/src/tui/import/steps/09-review/graph}/issue-inheritance.d.ts +1 -1
  91. package/{legacy/dist/src/analyze → dist/src/tui/import/steps/09-review/graph}/selection-cascade.d.ts +1 -1
  92. package/dist/src/tui/import/steps/09-review/helpers/cycle-panel-scroll.d.ts +4 -0
  93. package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/09-review/helpers}/enumerate-cycle-breaks.d.ts +1 -1
  94. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/history.d.ts +1 -1
  95. package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/09-review}/review-details-panel.d.ts +2 -2
  96. package/{legacy/dist/src/import/tui/hooks → dist/src/tui/import/steps/09-review}/review-input.d.ts +2 -2
  97. package/{legacy/dist/src/import/tui/runLivePreview.d.ts → dist/src/tui/import/steps/09-review/run-live-preview.d.ts} +2 -6
  98. package/dist/src/tui/import/steps/09-review/session.d.ts +26 -0
  99. package/dist/src/tui/import/steps/09-review/token-suggestions.d.ts +8 -0
  100. package/dist/src/tui/import/steps/09-review/types.d.ts +19 -0
  101. package/{legacy/dist/src/import/tui/useFinalizePreview.d.ts → dist/src/tui/import/steps/09-review/use-finalize-preview.d.ts} +1 -11
  102. package/{legacy/dist/src/import/tui/hooks/useReviewEditor.d.ts → dist/src/tui/import/steps/09-review/use-review-editor.d.ts} +1 -3
  103. package/{legacy/dist/src/import/tui/hooks/useReviewPreview.d.ts → dist/src/tui/import/steps/09-review/use-review-preview.d.ts} +2 -2
  104. package/{legacy/dist/src/import/tui/hooks/useReviewSession.d.ts → dist/src/tui/import/steps/09-review/use-review-session.d.ts} +5 -35
  105. package/dist/src/tui/import/steps/10-flow/flow/build-flow-start.d.ts +22 -0
  106. package/dist/src/tui/import/steps/10-flow/flow/controller.d.ts +71 -0
  107. package/dist/src/tui/import/steps/10-flow/flow/preview.d.ts +44 -0
  108. package/dist/src/tui/import/steps/10-flow/flow/push.d.ts +45 -0
  109. package/dist/src/tui/import/steps/10-flow/flow/save.d.ts +41 -0
  110. package/dist/src/tui/import/steps/10-flow/flow/screen.d.ts +13 -0
  111. package/dist/src/tui/import/steps/10-flow/flow/types.d.ts +71 -0
  112. package/dist/src/tui/import/steps/10-flow/flow/use-flow.d.ts +12 -0
  113. package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/10-flow/screens}/DoneStep.d.ts +6 -1
  114. package/dist/src/tui/import/steps/10-flow/screens/PushingStep.d.ts +9 -0
  115. package/dist/src/tui/import/steps/10-flow/screens/WizardPreviewStep.d.ts +12 -0
  116. package/{legacy/dist/src/import → dist/src/tui/import/steps/10-flow/support}/path-utils.d.ts +0 -5
  117. package/dist/src/tui/import/steps/10-flow/support/preview-diff.d.ts +7 -0
  118. package/dist/src/tui/import/steps/10-flow/support/produced.d.ts +15 -0
  119. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/support}/wizard-state-transitions.d.ts +0 -13
  120. package/dist/src/tui/import/steps/index.d.ts +4 -0
  121. package/dist/src/tui/import/steps/preview-validation-error/logic.d.ts +9 -0
  122. package/dist/src/tui/import/steps/preview-validation-error/screen.d.ts +11 -0
  123. package/dist/src/tui/settings/{contentful-configuration/ContentfulConfigScreen.d.ts → configuration/ConfigurationScreen.d.ts} +1 -0
  124. package/dist/src/tui/settings/configuration/agents/AgentDetail.d.ts +15 -0
  125. package/dist/src/tui/settings/configuration/agents/AgentStatusBadge.d.ts +10 -0
  126. package/dist/src/tui/settings/configuration/agents/AgentsScreen.d.ts +11 -0
  127. package/dist/src/tui/settings/configuration/agents/agent-debug.d.ts +25 -0
  128. package/dist/src/tui/settings/configuration/agents/agent-status.d.ts +63 -0
  129. package/dist/src/tui/settings/configuration/agents/agent-store.d.ts +21 -0
  130. package/dist/src/tui/settings/configuration/agents/apply-binary-overrides.d.ts +13 -0
  131. package/dist/src/tui/settings/configuration/project/ProjectScreen.d.ts +5 -0
  132. package/dist/src/tui/settings/{contentful-configuration/config-store.d.ts → configuration/project/project-store.d.ts} +1 -0
  133. package/dist/src/tui/settings/debug-mode/debug-mode-store.d.ts +7 -1
  134. package/dist/src/tui/settings/debug-mode/screen.d.ts +4 -0
  135. package/dist/src/tui/settings/shared/debug-trail.d.ts +35 -0
  136. package/dist/src/tui/shared/components/ClearableTextInput.d.ts +6 -0
  137. package/dist/src/tui/shared/components/ControlHints.d.ts +9 -0
  138. package/dist/src/tui/shared/components/FieldForm.d.ts +71 -0
  139. package/dist/src/tui/shared/components/StepHeader.d.ts +26 -0
  140. package/dist/src/tui/theme.d.ts +21 -0
  141. package/dist/src/tui/user-agent.d.ts +5 -0
  142. package/package.json +8 -3
  143. package/dist/src/commands/forwarded.d.ts +0 -2
  144. package/dist/src/legacy/forwarded-import-args.d.ts +0 -1
  145. package/dist/src/legacy/legacy-cli-path.d.ts +0 -1
  146. package/dist/src/legacy/run-legacy.d.ts +0 -1
  147. package/dist/src/tui/control-hints.d.ts +0 -7
  148. package/dist/src/tui/import/spawn-v1-import.d.ts +0 -29
  149. package/dist/src/tui/import/terminal-input.d.ts +0 -2
  150. package/dist/src/tui/upgrade/PageContainer.d.ts +0 -4
  151. package/legacy/bin/cli.js +0 -58
  152. package/legacy/dist/package.json +0 -73
  153. package/legacy/dist/src/analytics/apply.d.ts +0 -6
  154. package/legacy/dist/src/analytics/client.d.ts +0 -8
  155. package/legacy/dist/src/analytics/constants.d.ts +0 -4
  156. package/legacy/dist/src/analytics/exit.d.ts +0 -4
  157. package/legacy/dist/src/analytics/index.d.ts +0 -6
  158. package/legacy/dist/src/analytics/normalize.d.ts +0 -3
  159. package/legacy/dist/src/analytics/os.d.ts +0 -2
  160. package/legacy/dist/src/analytics/session.d.ts +0 -3
  161. package/legacy/dist/src/analytics/tracker.d.ts +0 -16
  162. package/legacy/dist/src/analytics/types.d.ts +0 -28
  163. package/legacy/dist/src/analyze/composition/apply-mapping.d.ts +0 -22
  164. package/legacy/dist/src/analyze/composition/candidate-files.d.ts +0 -34
  165. package/legacy/dist/src/analyze/composition/composition-cache-key.d.ts +0 -18
  166. package/legacy/dist/src/analyze/composition/interchange-schema.d.ts +0 -17
  167. package/legacy/dist/src/analyze/composition/manifest-doc-evidence.d.ts +0 -49
  168. package/legacy/dist/src/analyze/composition/merge-edges.d.ts +0 -19
  169. package/legacy/dist/src/analyze/composition/parse-map-edges.d.ts +0 -16
  170. package/legacy/dist/src/analyze/composition/prompt-loader.d.ts +0 -3
  171. package/legacy/dist/src/analyze/composition/resolve-mapping-cli.d.ts +0 -10
  172. package/legacy/dist/src/analyze/composition/resolve-mapping.d.ts +0 -59
  173. package/legacy/dist/src/analyze/extract-command.d.ts +0 -7
  174. package/legacy/dist/src/analyze/fuzzy-search.d.ts +0 -3
  175. package/legacy/dist/src/analyze/lineage.d.ts +0 -29
  176. package/legacy/dist/src/analyze/select/command.d.ts +0 -27
  177. package/legacy/dist/src/analyze/select/parser.d.ts +0 -6
  178. package/legacy/dist/src/analyze/select/persistence.d.ts +0 -22
  179. package/legacy/dist/src/analyze/select/tui/LegacySelectApp.d.ts +0 -8
  180. package/legacy/dist/src/analyze/select/tui/components/ComponentDetail.d.ts +0 -19
  181. package/legacy/dist/src/analyze/select/tui/components/JsonEditor.d.ts +0 -10
  182. package/legacy/dist/src/analyze/select/tui/components/PreviewSummaryBar.d.ts +0 -8
  183. package/legacy/dist/src/analyze/select/tui/components/Sidebar.d.ts +0 -29
  184. package/legacy/dist/src/analyze/select/tui/components/SourcePanel.d.ts +0 -11
  185. package/legacy/dist/src/analyze/select/tui/components/StatusBar.d.ts +0 -11
  186. package/legacy/dist/src/analyze/select/tui/components/TopBar.d.ts +0 -10
  187. package/legacy/dist/src/analyze/select/tui/hooks/list-scroll-input.d.ts +0 -13
  188. package/legacy/dist/src/analyze/select/tui/hooks/useKeymap.d.ts +0 -24
  189. package/legacy/dist/src/analyze/select/tui/hooks/useSession.d.ts +0 -19
  190. package/legacy/dist/src/analyze/select/tui/hooks/useUndo.d.ts +0 -8
  191. package/legacy/dist/src/analyze/select/tui/theme.d.ts +0 -18
  192. package/legacy/dist/src/analyze/select/types.d.ts +0 -54
  193. package/legacy/dist/src/apply/api-client.d.ts +0 -64
  194. package/legacy/dist/src/apply/command.d.ts +0 -43
  195. package/legacy/dist/src/apply/preview-utils.d.ts +0 -12
  196. package/legacy/dist/src/apply/tokens.d.ts +0 -1
  197. package/legacy/dist/src/apply/tui/ServerApplyView.d.ts +0 -34
  198. package/legacy/dist/src/apply/tui/ServerPreviewView.d.ts +0 -9
  199. package/legacy/dist/src/credentials-store.d.ts +0 -18
  200. package/legacy/dist/src/doctor/checks.d.ts +0 -5
  201. package/legacy/dist/src/doctor/command.d.ts +0 -2
  202. package/legacy/dist/src/doctor/report.d.ts +0 -7
  203. package/legacy/dist/src/generate/command.d.ts +0 -2
  204. package/legacy/dist/src/generate/tui/GenerateView.d.ts +0 -12
  205. package/legacy/dist/src/helpers/build-contentful-management-client.d.ts +0 -7
  206. package/legacy/dist/src/helpers/fetch-and-persist-existing-contentful-entities.d.ts +0 -29
  207. package/legacy/dist/src/helpers/fetch-existing-contentful-entities.d.ts +0 -11
  208. package/legacy/dist/src/helpers/find-nearly-matching-component.d.ts +0 -7
  209. package/legacy/dist/src/helpers/read-existing-contentful-entities-from-session.d.ts +0 -7
  210. package/legacy/dist/src/helpers/summarize-existing-contentful-entities.d.ts +0 -50
  211. package/legacy/dist/src/host-utils.d.ts +0 -3
  212. package/legacy/dist/src/import/agent-model-resolve.d.ts +0 -27
  213. package/legacy/dist/src/import/command.d.ts +0 -2
  214. package/legacy/dist/src/import/composition-options.d.ts +0 -7
  215. package/legacy/dist/src/import/tui/WizardApp.d.ts +0 -67
  216. package/legacy/dist/src/import/tui/components/LegendEntry.d.ts +0 -2
  217. package/legacy/dist/src/import/tui/components/ReviewDialogs.d.ts +0 -28
  218. package/legacy/dist/src/import/tui/components/StepHeader.d.ts +0 -8
  219. package/legacy/dist/src/import/tui/cycle-panel-scroll.d.ts +0 -8
  220. package/legacy/dist/src/import/tui/lineage-layout.d.ts +0 -68
  221. package/legacy/dist/src/import/tui/run-selection-agent.d.ts +0 -9
  222. package/legacy/dist/src/import/tui/runScopeGate.d.ts +0 -12
  223. package/legacy/dist/src/import/tui/spawn-generate.d.ts +0 -33
  224. package/legacy/dist/src/import/tui/steps/CredentialsStep.d.ts +0 -43
  225. package/legacy/dist/src/import/tui/steps/GateStep.d.ts +0 -15
  226. package/legacy/dist/src/import/tui/steps/GenerateReviewStep.d.ts +0 -37
  227. package/legacy/dist/src/import/tui/steps/PathValidationStep.d.ts +0 -10
  228. package/legacy/dist/src/import/tui/steps/PreviewValidationErrorStep.d.ts +0 -11
  229. package/legacy/dist/src/import/tui/steps/PushingStep.d.ts +0 -9
  230. package/legacy/dist/src/import/tui/steps/RunningStep.d.ts +0 -32
  231. package/legacy/dist/src/import/tui/steps/ScopeGateStep.d.ts +0 -48
  232. package/legacy/dist/src/import/tui/steps/TokenInputStep.d.ts +0 -8
  233. package/legacy/dist/src/import/tui/steps/WelcomeStep.d.ts +0 -7
  234. package/legacy/dist/src/import/tui/steps/WizardPreviewStep.d.ts +0 -21
  235. package/legacy/dist/src/import/tui/steps/preview-diff.d.ts +0 -10
  236. package/legacy/dist/src/import/tui/wizard-422-helpers.d.ts +0 -48
  237. package/legacy/dist/src/import/tui/wizard-generate-progress.d.ts +0 -21
  238. package/legacy/dist/src/index.d.ts +0 -1
  239. package/legacy/dist/src/index.js +0 -33004
  240. package/legacy/dist/src/lib/agent-definitions.d.ts +0 -14
  241. package/legacy/dist/src/lib/agent-model-options.d.ts +0 -15
  242. package/legacy/dist/src/lib/agent-output.d.ts +0 -5
  243. package/legacy/dist/src/lib/cli-errors.d.ts +0 -2
  244. package/legacy/dist/src/lib/cli-path.d.ts +0 -4
  245. package/legacy/dist/src/lib/command-options.d.ts +0 -3
  246. package/legacy/dist/src/lib/component-patch.d.ts +0 -12
  247. package/legacy/dist/src/lib/debug-logger.d.ts +0 -39
  248. package/legacy/dist/src/lib/debug-preamble.d.ts +0 -7
  249. package/legacy/dist/src/lib/error-parser.d.ts +0 -40
  250. package/legacy/dist/src/lib/path-exists.d.ts +0 -1
  251. package/legacy/dist/src/lib/prompt-overrides.d.ts +0 -38
  252. package/legacy/dist/src/lib/terminal-capabilities.d.ts +0 -29
  253. package/legacy/dist/src/lib/user-agent.d.ts +0 -7
  254. package/legacy/dist/src/map-tokens/apply.d.ts +0 -12
  255. package/legacy/dist/src/map-tokens/command.d.ts +0 -2
  256. package/legacy/dist/src/map-tokens/resolve-defaults.d.ts +0 -32
  257. package/legacy/dist/src/map-tokens/tui/MapTokensView.d.ts +0 -13
  258. package/legacy/dist/src/output/format.d.ts +0 -23
  259. package/legacy/dist/src/print/command.d.ts +0 -11
  260. package/legacy/dist/src/print/validate/tui/ValidateView.d.ts +0 -15
  261. package/legacy/dist/src/print/validate/validators/cdf-validator.d.ts +0 -2
  262. package/legacy/dist/src/print/validate/validators/dtcg-validator.d.ts +0 -2
  263. package/legacy/dist/src/print/validate/validators/format-errors.d.ts +0 -12
  264. package/legacy/dist/src/print/validate/validators/read-json-file.d.ts +0 -10
  265. package/legacy/dist/src/program.d.ts +0 -25
  266. package/legacy/dist/src/runs/fingerprint.d.ts +0 -36
  267. package/legacy/dist/src/runs/save-path-resolver.d.ts +0 -11
  268. package/legacy/dist/src/runs/store.d.ts +0 -65
  269. package/legacy/dist/src/session/cache-keys.d.ts +0 -22
  270. package/legacy/dist/src/session/core/cdf/cdf-mappers.d.ts +0 -3
  271. package/legacy/dist/src/session/core/components/derive-component-id.d.ts +0 -1
  272. package/legacy/dist/src/session/core/components/hash-component-shape.d.ts +0 -5
  273. package/legacy/dist/src/session/core/shared/index-rows-by-key.d.ts +0 -1
  274. package/legacy/dist/src/session/core/tokens/build-dtcg-groups.d.ts +0 -12
  275. package/legacy/dist/src/session/core/tokens/build-dtcg-tokens.d.ts +0 -3
  276. package/legacy/dist/src/session/core/tokens/hash-token-content.d.ts +0 -1
  277. package/legacy/dist/src/session/db.d.ts +0 -200
  278. package/legacy/dist/src/session/migration.d.ts +0 -2
  279. package/legacy/dist/src/session/repositories/sessions/read.d.ts +0 -11
  280. package/legacy/dist/src/session/repositories/sessions/write.d.ts +0 -3
  281. package/legacy/dist/src/session/repositories/shared/with-transaction.d.ts +0 -2
  282. package/legacy/dist/src/session/repositories/steps/read.d.ts +0 -2
  283. package/legacy/dist/src/session/repositories/steps/write.d.ts +0 -5
  284. package/legacy/dist/src/session/repositories/tokens/read.d.ts +0 -15
  285. package/legacy/dist/src/session/repositories/tokens/write.d.ts +0 -16
  286. package/legacy/dist/src/session/resolve-session-id.d.ts +0 -1
  287. package/legacy/dist/src/session/services/session-resolver.d.ts +0 -9
  288. package/legacy/dist/src/session/services/tokens/apply-tool-calls.d.ts +0 -8
  289. package/legacy/dist/src/session/services/tokens/replace-raw-prop-token-paths.d.ts +0 -3
  290. package/legacy/dist/src/session/services/tokens/replace-raw-token-name-paths.d.ts +0 -3
  291. package/legacy/dist/src/session/services/tokens/store-dtcg-tokens.d.ts +0 -3
  292. package/legacy/dist/src/session/session-id.d.ts +0 -1
  293. package/legacy/dist/src/session/source-excerpt.d.ts +0 -26
  294. package/legacy/dist/src/setup/SetupScreen.d.ts +0 -28
  295. package/legacy/dist/src/setup/SetupStepper.d.ts +0 -7
  296. package/legacy/dist/src/setup/command.d.ts +0 -3
  297. package/legacy/dist/src/setup/lib/checks.d.ts +0 -57
  298. package/legacy/dist/src/setup/lib/shell.d.ts +0 -12
  299. package/legacy/dist/src/setup/steps/CodingAgentScreen.d.ts +0 -20
  300. package/legacy/dist/src/setup/steps/ContentfulCredentialsScreen.d.ts +0 -11
  301. package/legacy/dist/src/setup/steps/StepLayout.d.ts +0 -20
  302. package/legacy/dist/src/setup/steps/preferences/AnalyticsScreen.d.ts +0 -5
  303. package/legacy/dist/src/setup/steps/preferences/BooleanInput.d.ts +0 -21
  304. package/legacy/dist/src/setup/steps/preferences/ColorPreferenceScreen.d.ts +0 -5
  305. package/legacy/dist/src/setup/steps/preferences/CustomPromptScreen.d.ts +0 -14
  306. package/legacy/dist/src/setup/steps/preferences/DebugLogsScreen.d.ts +0 -5
  307. package/legacy/dist/src/setup/steps/preferences/PreferencesMenu.d.ts +0 -26
  308. package/legacy/dist/src/setup/steps/prerequisites/PrerequisitesScreen.d.ts +0 -16
  309. package/legacy/dist/src/setup/steps/prerequisites/build.d.ts +0 -2
  310. package/legacy/dist/src/setup/steps/prerequisites/deps.d.ts +0 -33
  311. package/legacy/dist/src/setup/steps/prerequisites/index.d.ts +0 -4
  312. package/legacy/dist/src/setup/steps/prerequisites/node.d.ts +0 -2
  313. package/legacy/dist/src/setup/steps/prerequisites/pnpm.d.ts +0 -2
  314. package/legacy/dist/src/tui/CommandCompletionView.d.ts +0 -13
  315. package/legacy/dist/src/tui/render-with-goodbye.d.ts +0 -7
  316. package/legacy/dist/src/types.d.ts +0 -2
  317. package/legacy/package.json +0 -80
  318. package/legacy/prompts/composition-edges.md +0 -11
  319. /package/dist/src/tui/{upgrade → home}/version.d.ts +0 -0
  320. /package/{legacy/dist/src/analyze → dist/src/tui/import/steps/07-scope-gate/graph}/composite-closure.d.ts +0 -0
  321. /package/{legacy/dist/src/analyze → dist/src/tui/import/steps/07-scope-gate/graph}/cycle-detection.d.ts +0 -0
  322. /package/{legacy/dist/src/analyze → dist/src/tui/import/steps/07-scope-gate/graph}/scope-gate-cascade.d.ts +0 -0
  323. /package/{legacy/dist/src/analyze → dist/src/tui/import/steps/07-scope-gate/graph}/search-neighborhood.d.ts +0 -0
  324. /package/{legacy/dist/src/analyze → dist/src/tui/import/steps/07-scope-gate/graph}/slot-graph.d.ts +0 -0
  325. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/autocomplete.d.ts +0 -0
  326. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/components/CompactControlBar.d.ts +0 -0
  327. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/components/CounterStrip.d.ts +0 -0
  328. /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/components/HelpOverlay.d.ts +0 -0
  329. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/components/SearchMatchSummary.d.ts +0 -0
  330. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/hooks/sidebar-search-state.d.ts +0 -0
  331. /package/{legacy/dist/src/tui → dist/src/tui/import/steps/07-scope-gate/sidebar/hooks}/use-terminal-size.d.ts +0 -0
  332. /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/hooks/useImmediateInput.d.ts +0 -0
  333. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/hooks/useOverlayPanel.d.ts +0 -0
  334. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/sidebar-input.d.ts +0 -0
  335. /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/FinalizeDialog.d.ts +0 -0
  336. /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/HighlightedLine.d.ts +0 -0
  337. /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/JsonPanel.d.ts +0 -0
  338. /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/QuitDialog.d.ts +0 -0
  339. /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/RationaleLine.d.ts +0 -0
  340. /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/RationalePanel.d.ts +0 -0
  341. /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/removed-components-text.d.ts +0 -0
  342. /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/wrap-text.d.ts +0 -0
  343. /package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/09-review/helpers}/auto-reject-decision.d.ts +0 -0
  344. /package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/09-review/helpers}/breaking-change-format.d.ts +0 -0
  345. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review/helpers}/sidebar-width.d.ts +0 -0
  346. /package/{legacy/dist/src/analyze/select → dist/src/tui/import/steps/09-review}/preview-annotations.d.ts +0 -0
  347. /package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/09-review}/review-json-panel.d.ts +0 -0
  348. /package/{legacy/dist/src/analyze/select/tui/hooks → dist/src/tui/import/steps/09-review}/scroll-offset.d.ts +0 -0
  349. /package/{legacy/dist/src/import/tui/useLivePreview.d.ts → dist/src/tui/import/steps/09-review/use-live-preview.d.ts} +0 -0
  350. /package/{legacy/dist/src/import/tui/hooks/useReviewSurfaceState.d.ts → dist/src/tui/import/steps/09-review/use-review-surface-state.d.ts} +0 -0
  351. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/components}/CustomPromptBanner.d.ts +0 -0
  352. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow}/components/SpaceEnvironment.d.ts +0 -0
  353. /package/{legacy/dist/src/runs/path-prompt.d.ts → dist/src/tui/import/steps/10-flow/screens/PathPrompt.d.ts} +0 -0
  354. /package/{legacy/dist/src/lib → dist/src/tui/import/steps/10-flow/support}/contentful-urls.d.ts +0 -0
  355. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/support}/preview-confirmation-input.d.ts +0 -0
  356. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/support}/push-progress.d.ts +0 -0
  357. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/support}/run-print-files-helpers.d.ts +0 -0
  358. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/support}/run-teaser.d.ts +0 -0
  359. /package/{legacy/dist/src/tui → dist/src/tui/import/steps/10-flow/support}/use-blinking-cursor.d.ts +0 -0
  360. /package/{legacy/dist/src/tui → dist/src/tui/import/steps/10-flow/support}/use-timed-spinner.d.ts +0 -0
  361. /package/dist/src/tui/settings/{utils → shared}/v1-store.d.ts +0 -0
  362. /package/{legacy/skills → skills}/generate-components.md +0 -0
  363. /package/{legacy/skills → skills}/generate-tokens.md +0 -0
  364. /package/{legacy/skills → skills}/map-tokens.md +0 -0
  365. /package/{legacy/skills → skills}/select-components.md +0 -0
@@ -0,0 +1,45 @@
1
+ import type { ExtractionHandoff } from '@contentful/experience-design-system-types/handoff';
2
+ export interface ExtractionInput {
3
+ projectPath: string;
4
+ /** Where the stage writes tokens.json and the other files. Defaults to `<projectPath>/.contentful`. */
5
+ outDir?: string;
6
+ /** Absolute source files from the path-validation step (collectFiles output). */
7
+ filePaths: string[];
8
+ /** Raw tokens file the user pointed at. Empty when the import does not generate tokens (components only). */
9
+ rawTokensPath: string;
10
+ /** Null when the user skipped credentials: no existing-entities fetch happens. */
11
+ credentials: {
12
+ spaceId: string;
13
+ environmentId: string;
14
+ cmaToken: string;
15
+ host: string;
16
+ } | null;
17
+ agent: string;
18
+ agentModel?: string;
19
+ promptOverrides: string[];
20
+ noCache: boolean;
21
+ }
22
+ type CompositionPhase = 'resolving' | 'cache-hit' | 'done' | `agent:${string}`;
23
+ type JobStatus = 'idle' | 'running' | 'complete' | 'failed';
24
+ /** Everything the extracting screen shows. One field per row. */
25
+ export interface ExtractionProgress {
26
+ scan: {
27
+ scanned: number;
28
+ total: number | null;
29
+ } | null;
30
+ composition: CompositionPhase;
31
+ selection: 'running' | 'complete';
32
+ existingEntities: JobStatus;
33
+ tokens: JobStatus;
34
+ }
35
+ /** The label the error screen shows, as the wizard labelled it. */
36
+ type ExtractionStepName = 'analyze extract' | 'selection agent' | 'generate tokens' | 'print tokens' | `${string} auth check`;
37
+ export type ExtractionResult = {
38
+ ok: true;
39
+ extraction: ExtractionHandoff;
40
+ } | {
41
+ ok: false;
42
+ step: ExtractionStepName;
43
+ message: string;
44
+ };
45
+ export {};
@@ -0,0 +1,14 @@
1
+ import type { ExtractionInput, ExtractionProgress, ExtractionResult } from './types.js';
2
+ export type ExtractionState = {
3
+ status: 'running';
4
+ progress: ExtractionProgress;
5
+ } | {
6
+ status: 'done';
7
+ result: ExtractionResult;
8
+ };
9
+ /**
10
+ * Runs the extraction stage once for the given input and reports its progress. Passing a different input starts a new
11
+ * run; passing nothing leaves the stage idle. A run that finishes after the input changed or the screen went away is
12
+ * ignored.
13
+ */
14
+ export declare function useExtraction(input: ExtractionInput | undefined): ExtractionState | undefined;
@@ -0,0 +1,12 @@
1
+ import { type TokensOnlyInput, type TokensOnlyResult } from './run-tokens-only.js';
2
+ export type TokensOnlyState = {
3
+ status: 'running';
4
+ } | {
5
+ status: 'done';
6
+ result: TokensOnlyResult;
7
+ };
8
+ /**
9
+ * Runs the tokens-only stage once for the given input. Passing nothing leaves it idle. A run that finishes after the
10
+ * input changed or the screen went away is ignored.
11
+ */
12
+ export declare function useTokensOnly(input: TokensOnlyInput | undefined): TokensOnlyState | undefined;
@@ -0,0 +1,10 @@
1
+ export interface CacheCheckInput {
2
+ sessionId: string;
3
+ tokensPath: string;
4
+ agent: string;
5
+ agentModel?: string;
6
+ promptOverrides: string[];
7
+ existingEntitiesPath: string | null;
8
+ noCache: boolean;
9
+ }
10
+ export declare function checkGenerationCache(input: CacheCheckInput): Promise<string[]>;
@@ -1,11 +1,9 @@
1
- import type { Closure } from '../../analyze/composite-closure.js';
1
+ import type { Closure } from './graph/composite-closure.js';
2
2
  /** Structural subset of ScopeComponent needed by these helpers. */
3
3
  export interface ScopeComponentLike {
4
4
  name: string;
5
5
  }
6
- export type Decision = 'accepted' | 'rejected' | 'undecided';
7
- export declare const SCOPE_GATE_MAIN_COLUMN_WIDTH = 54;
8
- export declare const ACCEPTED_COMPONENTS_COLUMN_WIDTH = 36;
6
+ import type { Decision } from './types.js';
9
7
  export interface ScopeGatePanelLayout {
10
8
  height: number;
11
9
  mainVisibleCount: number;
@@ -34,3 +32,23 @@ export declare function computeCounters(components: ScopeComponentLike[], closur
34
32
  groups: number;
35
33
  total: number;
36
34
  };
35
+ export declare function sideColumnLabelStyle(input: {
36
+ isCycle: boolean;
37
+ isSelected: boolean;
38
+ focused: boolean;
39
+ }): {
40
+ nameColor: string | undefined;
41
+ nameBold: boolean;
42
+ nameInverse: boolean;
43
+ nameUnderline: boolean;
44
+ suffixColor: string | undefined;
45
+ suffixDim: boolean;
46
+ suffixInverse: boolean;
47
+ suffixUnderline: boolean;
48
+ };
49
+ export declare function computeColumnWindow(total: number, cursor: number, visibleCount: number): {
50
+ start: number;
51
+ end: number;
52
+ above: number;
53
+ below: number;
54
+ };
@@ -0,0 +1 @@
1
+ export declare function fuzzyMatches(query: string, text: string): boolean;
@@ -0,0 +1,33 @@
1
+ import type { CDFComponentEntry } from '@contentful/experience-design-system-types';
2
+ import type { ScopeComponent } from '../types.js';
3
+ import { type Closure, type ComponentGraphNode, type NodeStatus } from './composite-closure.js';
4
+ import { type SlotCycle } from './cycle-detection.js';
5
+ export interface ScopeGraph {
6
+ /** The slot dependency graph, one node per component. */
7
+ nodes: ComponentGraphNode[];
8
+ /** Every slot cycle. A graph that cannot be searched for cycles has none, as in legacy. */
9
+ cycles: SlotCycle[];
10
+ /** Names in at least one cycle. */
11
+ cycleParticipants: Set<string>;
12
+ /** For each cycle member, the whole set of members that has to be accepted or rejected with it. */
13
+ cycleUnits: Map<string, Set<string>>;
14
+ /** For each root, what it needs. A root with more than one node is a group. */
15
+ closures: Map<string, Closure>;
16
+ }
17
+ export interface SidebarItem {
18
+ key: string;
19
+ entry: CDFComponentEntry;
20
+ status: NodeStatus;
21
+ }
22
+ /** What the sidebar draws a row from: an entry standing in for the component (its slots are what matter), and its status. */
23
+ export declare function sidebarItems(components: ScopeComponent[]): SidebarItem[];
24
+ export declare function buildScopeGraph(components: ScopeComponent[]): ScopeGraph;
25
+ /** Names that change when `target` is accepted. Pulls in everything it needs, whole cycles together. */
26
+ export declare function acceptCascade(graph: ScopeGraph, target: string): string[];
27
+ /** Rejecting rejects every ancestor and deselects the descendants. The screen asks first when it is 2 or more. */
28
+ export declare function rejectCascade(graph: ScopeGraph, target: string): {
29
+ toReject: string[];
30
+ toDeselect: string[];
31
+ };
32
+ /** Everything reachable from the seeds, including the cycles they depend on. Used by "toggle all" and "accept non-flagged". */
33
+ export declare function reachableCycleMembers(graph: ScopeGraph, seeds: string[]): string[];
@@ -0,0 +1,7 @@
1
+ import type { ComponentGraphNode } from './composite-closure.js';
2
+ export interface LineageParentEdge {
3
+ parent: string;
4
+ slotName: string;
5
+ }
6
+ export declare function findDirectParents(target: string, components: ComponentGraphNode[]): LineageParentEdge[];
7
+ export declare function findAllAncestors(target: string, components: ComponentGraphNode[]): Set<string>;
@@ -0,0 +1,84 @@
1
+ export type GateMode = 'help' | 'reject-prompt' | 'search' | 'cycles' | 'flags' | 'main';
2
+ export interface KeyPress {
3
+ input: string;
4
+ upArrow?: boolean;
5
+ downArrow?: boolean;
6
+ return?: boolean;
7
+ escape?: boolean;
8
+ tab?: boolean;
9
+ shiftTab?: boolean;
10
+ ctrl?: boolean;
11
+ }
12
+ /** What legacy looked at besides the key and the open panel. */
13
+ export interface GateContext {
14
+ focusedColumn: 'main' | 'added-components';
15
+ /** The layout has only the main column, so Tab has nowhere to go. */
16
+ singleColumn: boolean;
17
+ hasCycles: boolean;
18
+ /** Some component was flagged by the AI with a reason to show. */
19
+ hasFlagReasons: boolean;
20
+ /** A jump filter is on, so Esc clears it before it quits. */
21
+ jumpFilterActive: boolean;
22
+ /** Search text is set, so Esc clears it before it quits. */
23
+ searchActive: boolean;
24
+ /** The list in the focused column has no rows, so the arrows have nothing to move. */
25
+ focusedListEmpty: boolean;
26
+ }
27
+ export type GateAction = {
28
+ type: 'none';
29
+ } | {
30
+ type: 'quit';
31
+ } | {
32
+ type: 'confirm';
33
+ } | {
34
+ type: 'close-help';
35
+ } | {
36
+ type: 'answer-reject-prompt';
37
+ confirm: boolean;
38
+ } | {
39
+ type: 'close-panel';
40
+ } | {
41
+ type: 'close-search';
42
+ } | {
43
+ type: 'submit-search';
44
+ } | {
45
+ type: 'search-input';
46
+ } | {
47
+ type: 'clear-jump-filter';
48
+ } | {
49
+ type: 'clear-search';
50
+ } | {
51
+ type: 'move';
52
+ delta: -1 | 1;
53
+ } | {
54
+ type: 'jump-to-selected';
55
+ } | {
56
+ type: 'accept';
57
+ } | {
58
+ type: 'reject';
59
+ } | {
60
+ type: 'toggle-all';
61
+ } | {
62
+ type: 'accept-unflagged';
63
+ } | {
64
+ type: 'toggle-group';
65
+ } | {
66
+ type: 'expand-all';
67
+ } | {
68
+ type: 'collapse-all';
69
+ } | {
70
+ type: 'switch-column';
71
+ delta: -1 | 1;
72
+ } | {
73
+ type: 'open-panel';
74
+ panel: 'cycles' | 'flags' | 'help' | 'search';
75
+ } | {
76
+ type: 'toggle-dependencies';
77
+ } | {
78
+ type: 'toggle-cycle-filter';
79
+ } | {
80
+ type: 'toggle-jump-filter';
81
+ } | {
82
+ type: 'toggle-view';
83
+ };
84
+ export declare function resolveKey(mode: GateMode, key: KeyPress, ctx: GateContext): GateAction;
@@ -0,0 +1,8 @@
1
+ import type { ScopeGateLoad } from './types.js';
2
+ /**
3
+ * Reads the components for the gate, once, before the screen renders. Replaces legacy's database read inside render
4
+ * (and its "remember the last list" workaround for the resize that happened after confirming): with nothing written
5
+ * until the wizard saves the decisions, the list cannot change under the screen.
6
+ * Uses `loadScopeComponents` from backend-pipeline, which is identical to legacy's.
7
+ */
8
+ export declare function loadScopeGate(sessionId: string): ScopeGateLoad;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { type AddedComponentEntry } from '../columns.js';
3
+ interface AddedColumnProps {
4
+ title: string;
5
+ width: number;
6
+ height: number;
7
+ entries: AddedComponentEntry[];
8
+ cursor: number;
9
+ focused: boolean;
10
+ aiFlaggedByKey?: Map<string, boolean>;
11
+ visibleCount: number;
12
+ }
13
+ /** The accepted components, cycle members first. Rejecting from here is the only decision it allows. */
14
+ export declare function AddedColumn(props: AddedColumnProps): React.ReactElement;
15
+ export {};
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { SlotCycle } from '../graph/cycle-detection.js';
3
+ interface CyclesPanelProps {
4
+ cycles: SlotCycle[];
5
+ cursor: number;
6
+ }
7
+ export declare function CyclesPanel({ cycles, cursor }: CyclesPanelProps): React.ReactElement;
8
+ export {};
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { PendingRejectCascade } from '../use-scope-gate.js';
3
+ export declare function RejectPrompt({ pending }: {
4
+ pending: PendingRejectCascade;
5
+ }): React.ReactElement;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { ScopeComponent, ScopeDecisions } from './types.js';
3
+ interface ScopeGateScreenProps {
4
+ components: ScopeComponent[];
5
+ onConfirm: (decisions: ScopeDecisions) => void;
6
+ onQuit: () => void;
7
+ }
8
+ export declare function ScopeGateScreen(props: ScopeGateScreenProps): React.ReactElement;
9
+ export {};
@@ -3,4 +3,3 @@ export type AiFlaggable = {
3
3
  needsReview?: boolean;
4
4
  };
5
5
  export declare function isAiFlagged(row: AiFlaggable): boolean;
6
- export declare function isDefaultIncluded(row: AiFlaggable): boolean;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export interface GotoRow {
2
+ interface GotoRow {
3
3
  label: string;
4
4
  jumpTarget: string;
5
5
  kind?: string;
@@ -29,3 +29,4 @@ export interface GotoBannerProps {
29
29
  renderRow?: (row: GotoRow, index: number, isCursor: boolean) => React.ReactElement;
30
30
  }
31
31
  export declare function GotoBanner({ title, rows, cursor, cursorRowIndex, maxRows, width, footerHint, renderRow, }: GotoBannerProps): React.ReactElement;
32
+ export {};
@@ -1,8 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { CDFComponentEntry } from '@contentful/experience-design-system-types';
3
- import { type ComponentGraphNode, type NodeStatus } from '../../../composite-closure.js';
4
- import type { RenderStatus } from '../../../issue-inheritance.js';
5
- import type { PreviewAnnotation } from '../../types.js';
3
+ import { type ComponentGraphNode, type NodeStatus } from '../../graph/composite-closure.js';
4
+ import type { PreviewAnnotation, RenderStatus } from '../types.js';
6
5
  export interface GroupedSidebarItem {
7
6
  key: string;
8
7
  entry: CDFComponentEntry;
@@ -34,6 +33,7 @@ export interface GroupedSidebarProps {
34
33
  visibleRows?: VisibleRow[];
35
34
  graph: ComponentGraphNode[];
36
35
  filterVisibleKeys?: Set<string>;
36
+ emptyMessage?: string;
37
37
  }
38
38
  type RowKind = 'cycle' | 'empty' | 'group-root' | 'group-child' | 'standalone' | 'flat' | 'flat-header';
39
39
  export interface VisibleRow {
@@ -57,38 +57,5 @@ export declare function buildVisibleRows(props: {
57
57
  graph: ComponentGraphNode[];
58
58
  filterVisibleKeys?: Set<string>;
59
59
  }): VisibleRow[];
60
- export declare function visibleItemOrder(props: {
61
- items: GroupedSidebarItem[];
62
- cycleParticipants: Set<string>;
63
- expandedGroups: Set<string>;
64
- alwaysExpanded?: boolean;
65
- showFlatTier?: boolean;
66
- graph: ComponentGraphNode[];
67
- }): number[];
68
- export declare function labelStyleFor(input: {
69
- row: VisibleRow;
70
- isCursor: boolean;
71
- wouldDim: boolean;
72
- }): {
73
- color: string | undefined;
74
- bold: boolean;
75
- dim: boolean;
76
- };
77
- export declare function selectionGlyphStyleFor(selState: 'accepted' | 'rejected' | 'undecided' | undefined, isCycleRow: boolean): {
78
- glyph: string | null;
79
- color: string | undefined;
80
- dim: boolean;
81
- bold: boolean;
82
- };
83
- export declare function inheritanceGlyphStyleFor(input: {
84
- status: RenderStatus['status'] | undefined;
85
- isOwn: boolean;
86
- isCursor: boolean;
87
- }): {
88
- glyph: string | null;
89
- color: string | undefined;
90
- dim: boolean;
91
- bold: boolean;
92
- };
93
60
  export declare function GroupedSidebar(props: GroupedSidebarProps): React.ReactElement;
94
61
  export {};
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import type { PreviewAnnotation } from '../types.js';
3
+ export type PreviewBadgeValue = {
4
+ char: string;
5
+ color: string;
6
+ bold?: boolean;
7
+ dim?: boolean;
8
+ };
9
+ export declare function previewBadge(annotation: PreviewAnnotation | undefined): PreviewBadgeValue | null;
10
+ export declare function PreviewBadge({ badge, highlighted, }: {
11
+ badge: PreviewBadgeValue | null;
12
+ highlighted?: boolean;
13
+ }): React.ReactElement;
@@ -25,12 +25,10 @@ export interface FixedPanelProps {
25
25
  export declare function FixedPanel({ width, height, minHeight, focused, borderStyle, borderColor, paddingLeft, clipOverflow, children, }: FixedPanelProps): ReactElement;
26
26
  /** Shared frame for panels whose viewport must not change with their contents. */
27
27
  export declare function WindowedPanel({ width, height, title, focused, children }: WindowedPanelProps): ReactElement;
28
- export declare function WindowedPanelHeader({ title, width, focused, }: {
29
- title: string;
30
- width: number;
31
- focused: boolean;
28
+ export declare function WindowFooter({ above, below }: {
29
+ above: number;
30
+ below: number;
32
31
  }): ReactElement;
33
- export declare function formatWindowIndicator(direction: WindowDirection, count: number): string;
34
32
  export declare function WindowIndicator({ direction, count }: {
35
33
  direction: WindowDirection;
36
34
  count: number;
@@ -1,2 +1,2 @@
1
- import type { Closure } from '../../analyze/composite-closure.js';
1
+ import type { Closure } from '../graph/composite-closure.js';
2
2
  export declare function resolveGroupRoot(key: string, closures: Map<string, Closure>, cycleSet: Set<string>): string | undefined;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Fallback when `stdout.rows` is unavailable (piped output, tests). No TTY
3
+ * means Ink is not interactively repainting, so there is no flicker risk — we
4
+ * assume enough height for a terminal-sized sidebar so the non-interactive
5
+ * render is complete and unclipped.
6
+ */
7
+ export declare const FALLBACK_ROWS = 40;
8
+ export interface LineageLayoutInput {
9
+ /** Terminal height in rows (`stdout.rows`, or the fallback). */
10
+ rows: number;
11
+ /** Whether the lineage panel is currently open. */
12
+ panelOpen: boolean;
13
+ /** Number of lineage entries — caps the panel window so it never over-allocates. */
14
+ entryCount?: number;
15
+ }
16
+ export interface SidebarBudget {
17
+ /** Rows the GroupedSidebar should render (`visibleCount`). */
18
+ sidebarVisibleCount: number;
19
+ /** Rows a sidebar replacement panel should window to (`maxRows`). */
20
+ panelMaxRows: number;
21
+ }
22
+ /**
23
+ * L2e — autoscale the BASE frame to the terminal height. Even with the lineage
24
+ * panel closed, the visible-row budget follows `stdout.rows` minus
25
+ * `BASE_CHROME_OVERHEAD` so the whole frame stays within the terminal while
26
+ * preserving the shared panel-open sizing behavior.
27
+ *
28
+ * Floor: `BASE_CHROME_OVERHEAD + SIDEBAR_MIN`. Below it `SIDEBAR_MIN`
29
+ * (usability) intentionally wins over the fit — a terminal that small can't
30
+ * host the chrome regardless.
31
+ */
32
+ export declare function computeSidebarBudget({ rows, panelOpen, entryCount }: LineageLayoutInput): SidebarBudget;
@@ -1,2 +1,2 @@
1
- import type { HelpSection } from '../../analyze/select/tui/components/HelpOverlay.js';
1
+ import type { HelpSection } from './components/HelpOverlay.js';
2
2
  export declare function createSidebarViewsHelpSection(includeBreaking: boolean): HelpSection;
@@ -1,5 +1,5 @@
1
- import type { ComponentGraphNode, Closure } from '../../analyze/composite-closure.js';
2
- import { type GroupedSidebarItem } from '../../analyze/select/tui/components/GroupedSidebar.js';
1
+ import type { ComponentGraphNode, Closure } from '../graph/composite-closure.js';
2
+ import { type GroupedSidebarItem } from './components/GroupedSidebar.js';
3
3
  export declare function collectExpandedGroupRoots(closures: Map<string, Closure>, cycleParticipants: Iterable<string>): Set<string>;
4
4
  export declare function computeSidebarViewToggle({ currentView, currentKey, currentScroll, visibleCount, items, cycleParticipants, expandedGroups, graph, showFlatTier, }: {
5
5
  currentView: 'grouped' | 'flat';
@@ -11,6 +11,10 @@ export declare function computeFilterKeys(input: {
11
11
  filters: Iterable<FilterCategory>;
12
12
  data: FilterDataSources;
13
13
  }): Set<string> | undefined;
14
+ export declare function describeEmptyFilter(input: {
15
+ filters: Iterable<FilterCategory>;
16
+ slotDependencies?: boolean;
17
+ }): string | undefined;
14
18
  export declare function intersectFilterKeys(a: Set<string> | undefined, b: Set<string> | undefined): Set<string> | undefined;
15
19
  export declare function buildFlatDimPredicate(input: {
16
20
  viewMode: 'grouped' | 'flat';
@@ -0,0 +1,7 @@
1
+ import type { NodeStatus } from '../graph/composite-closure.js';
2
+ export type PreviewAnnotation = 'new' | 'changed' | 'removed' | 'breaking';
3
+ export interface RenderStatus {
4
+ status: NodeStatus;
5
+ isOwn: boolean;
6
+ sourceComponents: string[];
7
+ }
@@ -0,0 +1,19 @@
1
+ import { type ScopeGraph } from './graph/index.js';
2
+ import type { Decision, ScopeComponent, ScopeDecisions } from './types.js';
3
+ export type DecisionState = Map<string, Decision>;
4
+ export type DecisionAction = {
5
+ type: 'accept';
6
+ name: string;
7
+ } | {
8
+ type: 'reject';
9
+ name: string;
10
+ } | {
11
+ type: 'toggle-all';
12
+ } | {
13
+ type: 'accept-unflagged';
14
+ };
15
+ export declare function reduceDecisions(state: DecisionState, action: DecisionAction, components: ScopeComponent[], graph: ScopeGraph): DecisionState;
16
+ /** Whether rejecting `name` touches 2 or more other components, so the screen has to ask first. */
17
+ export declare function rejectNeedsConfirmation(graph: ScopeGraph, name: string, state: DecisionState): boolean;
18
+ /** Everything not accepted counts as rejected, as legacy's `partition` did. */
19
+ export declare function partitionDecisions(components: ScopeComponent[], state: DecisionState): ScopeDecisions;
@@ -0,0 +1,24 @@
1
+ import type { ScopeComponentRow } from '@contentful/experience-design-system-backend-pipeline';
2
+ /**
3
+ * One row of the gate. The loader always fills in the slots, but the screen is handed whatever the caller has, and
4
+ * legacy's screen accepted rows without them (and without the AI fields), so those stay optional here.
5
+ */
6
+ export type ScopeComponent = Omit<ScopeComponentRow, 'aiDecision' | 'aiReason' | 'needsReview' | 'slots'> & {
7
+ aiDecision?: 'accepted' | 'rejected' | 'failed' | null;
8
+ aiReason?: string | null;
9
+ needsReview?: boolean;
10
+ slots?: ScopeComponentRow['slots'];
11
+ };
12
+ export type Decision = 'accepted' | 'rejected' | 'undecided';
13
+ /** What the user confirmed. Becomes `ImportHandoff.scope`; the legacy wizard saves it and starts generation. */
14
+ export interface ScopeDecisions {
15
+ accepted: string[];
16
+ rejected: string[];
17
+ }
18
+ export type ScopeGateLoad = {
19
+ ok: true;
20
+ components: ScopeComponent[];
21
+ } | {
22
+ ok: false;
23
+ message: string;
24
+ };
@@ -0,0 +1,27 @@
1
+ import { type CacheCheckInput } from './cache-check.js';
2
+ import { loadScopeGate } from './load.js';
3
+ import type { ScopeDecisions, ScopeGateLoad } from './types.js';
4
+ export type ScopeGateFlow = {
5
+ status: 'failed';
6
+ message: string;
7
+ } | {
8
+ status: 'deciding';
9
+ load: Extract<ScopeGateLoad, {
10
+ ok: true;
11
+ }>;
12
+ confirm: (decisions: ScopeDecisions) => void;
13
+ } | {
14
+ status: 'confirmed';
15
+ decisions: ScopeDecisions;
16
+ cachedNames: Promise<string[]>;
17
+ };
18
+ interface Deps {
19
+ load: typeof loadScopeGate;
20
+ checkCache: (input: CacheCheckInput) => Promise<string[]>;
21
+ }
22
+ /** `input` is undefined until the extraction stage has produced a session, so the hook can be called unconditionally. */
23
+ export declare function useScopeGateFlow(input: {
24
+ sessionId: string;
25
+ cache: CacheCheckInput;
26
+ } | undefined, deps?: Deps): ScopeGateFlow | undefined;
27
+ export {};
@@ -0,0 +1,77 @@
1
+ import type { ScopeComponent, ScopeDecisions } from './types.js';
2
+ interface UseScopeGateOptions {
3
+ components: ScopeComponent[];
4
+ onConfirm: (decisions: ScopeDecisions) => void;
5
+ onQuit: () => void;
6
+ }
7
+ type FocusedColumn = 'main' | 'added-components';
8
+ export interface PendingRejectCascade {
9
+ target: string;
10
+ ancestors: string[];
11
+ descendants: string[];
12
+ }
13
+ export declare function useScopeGate({ components, onConfirm, onQuit }: UseScopeGateOptions): {
14
+ totalWidth: number;
15
+ columnPlan: {
16
+ layout: "single" | "two-column";
17
+ main: number;
18
+ added: number;
19
+ };
20
+ panelLayout: import("./columns.js").ScopeGatePanelLayout;
21
+ visibleCount: number;
22
+ panelMaxRows: number;
23
+ groupedItems: import("./graph/index.js").SidebarItem[];
24
+ graph: import("./graph/index.js").ScopeGraph;
25
+ hasGroupRoots: boolean;
26
+ expandedGroups: Set<string>;
27
+ toggleExpanded: (rootName: string) => void;
28
+ visibleRows: import("./sidebar/components/GroupedSidebar.js").VisibleRow[];
29
+ emptyMessage: string | undefined;
30
+ safeCursor: number;
31
+ scrollOffset: number;
32
+ selectionStateByKey: Map<string, "accepted" | "rejected" | "undecided">;
33
+ aiFlaggedByKey: Map<string, boolean>;
34
+ dimPredicate: ((componentKey: string) => boolean) | undefined;
35
+ columnOneView: "flat" | "grouped";
36
+ focusedColumn: FocusedColumn;
37
+ showHelp: boolean;
38
+ closeHelp: () => void;
39
+ cyclesPanelOpen: boolean;
40
+ cyclesCursor: number;
41
+ slotCycles: import("./graph/cycle-detection.js").SlotCycle[];
42
+ aiRationalePanelOpen: boolean;
43
+ aiCursor: number;
44
+ aiRows: {
45
+ label: string;
46
+ jumpTarget: string;
47
+ }[];
48
+ aiExcludedCount: number;
49
+ pendingRejectCascade: PendingRejectCascade | null;
50
+ addedComponents: import("./columns.js").AddedComponentEntry[];
51
+ safeAddedComponentsCursor: number;
52
+ counters: {
53
+ accepted: number;
54
+ rejected: number;
55
+ undecided: number;
56
+ groups: number;
57
+ total: number;
58
+ };
59
+ search: {
60
+ searchOpen: boolean;
61
+ setSearchOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
62
+ searchQuery: string;
63
+ setSearchQuery: import("react").Dispatch<import("react").SetStateAction<string>>;
64
+ autocompleteCandidates: string[];
65
+ setAutocompleteCandidates: import("react").Dispatch<import("react").SetStateAction<string[]>>;
66
+ jumpFilterTarget: string | null;
67
+ setJumpFilterTarget: import("react").Dispatch<import("react").SetStateAction<string | null>>;
68
+ columnOneView: "flat" | "grouped";
69
+ setColumnOneView: import("react").Dispatch<import("react").SetStateAction<"flat" | "grouped">>;
70
+ activeFilters: Set<import("./sidebar/step-filters.js").FilterCategory>;
71
+ setActiveFilters: import("react").Dispatch<import("react").SetStateAction<Set<import("./sidebar/step-filters.js").FilterCategory>>>;
72
+ showHelp: boolean;
73
+ setShowHelp: import("react").Dispatch<import("react").SetStateAction<boolean>>;
74
+ };
75
+ searchMatches: string[];
76
+ };
77
+ export {};