@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.
- package/dist/app.d.ts +5 -7
- package/dist/app.js +30449 -967
- package/dist/index.js +34085 -1070
- package/dist/package.json +8 -3
- package/dist/src/commands/import-options.d.ts +10 -0
- package/dist/src/commands/import.d.ts +2 -1
- package/dist/src/tui/debug-prune.d.ts +12 -0
- package/dist/src/tui/debug-store.d.ts +18 -1
- package/dist/src/tui/help/file-locations.d.ts +23 -0
- package/dist/src/tui/home/home.theme.d.ts +0 -9
- package/dist/src/tui/import/resolve-user-path.d.ts +1 -0
- package/dist/src/tui/import/shared/error-step/controls.d.ts +7 -0
- package/{legacy/dist/src/import/tui/steps/ErrorStep.d.ts → dist/src/tui/import/shared/error-step/error-step.d.ts} +2 -2
- package/dist/src/tui/import/shared/error-step/logic.d.ts +15 -0
- package/dist/src/tui/import/shared/gate-step/controls.d.ts +8 -0
- package/dist/src/tui/import/shared/gate-step/gate-step.d.ts +16 -0
- package/dist/src/tui/import/shared/gate-step/logic.d.ts +11 -0
- package/dist/src/tui/import/shared/index.d.ts +4 -0
- package/dist/src/tui/import/shared/overview-box/overview-box.d.ts +10 -0
- package/dist/src/tui/import/shared/running-step/logic.d.ts +11 -0
- package/dist/src/tui/import/shared/running-step/running-step.d.ts +10 -0
- package/dist/src/tui/import/shared/running-step/theme.d.ts +3 -0
- package/dist/src/tui/import/shared/running-step/use-elapsed.d.ts +1 -0
- package/dist/src/tui/import/steps/00-preflight/controls.d.ts +17 -0
- package/dist/src/tui/import/steps/00-preflight/logic.d.ts +45 -0
- package/dist/src/tui/import/steps/00-preflight/screen.d.ts +8 -0
- package/dist/src/tui/import/steps/01-welcome/controls.d.ts +4 -1
- package/dist/src/tui/import/steps/02-token-input/controls.d.ts +3 -0
- package/dist/src/tui/import/steps/03-path-validation/controls.d.ts +13 -0
- package/dist/src/tui/import/steps/03-path-validation/helpers/scan-files.d.ts +2 -0
- package/dist/src/tui/import/steps/03-path-validation/logic.d.ts +45 -0
- package/dist/src/tui/import/steps/03-path-validation/screen.d.ts +14 -0
- package/dist/src/tui/import/steps/04-credentials/logic.d.ts +12 -0
- package/dist/src/tui/import/steps/04-credentials/screen.d.ts +19 -0
- package/dist/src/tui/import/steps/04-credentials/validate.d.ts +8 -0
- package/dist/src/tui/import/steps/06-extraction/find-skill-path.d.ts +1 -0
- package/dist/src/tui/import/steps/06-extraction/logic.d.ts +33 -0
- package/dist/src/tui/import/steps/06-extraction/run-tokens-only.d.ts +31 -0
- package/dist/src/tui/import/steps/06-extraction/run.d.ts +26 -0
- package/dist/src/tui/import/steps/06-extraction/screen.d.ts +8 -0
- package/dist/src/tui/import/steps/06-extraction/selection.d.ts +18 -0
- package/dist/src/tui/import/steps/06-extraction/types.d.ts +45 -0
- package/dist/src/tui/import/steps/06-extraction/use-extraction.d.ts +14 -0
- package/dist/src/tui/import/steps/06-extraction/use-tokens-only.d.ts +12 -0
- package/dist/src/tui/import/steps/07-scope-gate/cache-check.d.ts +10 -0
- package/{legacy/dist/src/import/tui/scope-gate-columns.d.ts → dist/src/tui/import/steps/07-scope-gate/columns.d.ts} +22 -4
- package/dist/src/tui/import/steps/07-scope-gate/graph/fuzzy-search.d.ts +1 -0
- package/dist/src/tui/import/steps/07-scope-gate/graph/index.d.ts +33 -0
- package/dist/src/tui/import/steps/07-scope-gate/graph/lineage.d.ts +7 -0
- package/dist/src/tui/import/steps/07-scope-gate/keymap.d.ts +84 -0
- package/dist/src/tui/import/steps/07-scope-gate/load.d.ts +8 -0
- package/dist/src/tui/import/steps/07-scope-gate/panels/added-column.d.ts +15 -0
- package/dist/src/tui/import/steps/07-scope-gate/panels/cycles-panel.d.ts +8 -0
- package/dist/src/tui/import/steps/07-scope-gate/panels/reject-prompt.d.ts +5 -0
- package/dist/src/tui/import/steps/07-scope-gate/screen.d.ts +9 -0
- package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/ai-flag.d.ts +0 -1
- package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/components/GotoBanner.d.ts +2 -1
- package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/components/GroupedSidebar.d.ts +3 -36
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/components/badge.d.ts +13 -0
- package/{legacy/dist/src/tui → dist/src/tui/import/steps/07-scope-gate/sidebar/components}/windowed-panel.d.ts +3 -5
- package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/group-collapse.d.ts +1 -1
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/lineage-layout.d.ts +32 -0
- package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/sidebar-help.d.ts +1 -1
- package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/sidebar-navigation.d.ts +2 -2
- package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/step-filters.d.ts +4 -0
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/types.d.ts +7 -0
- package/dist/src/tui/import/steps/07-scope-gate/state.d.ts +19 -0
- package/dist/src/tui/import/steps/07-scope-gate/types.d.ts +24 -0
- package/dist/src/tui/import/steps/07-scope-gate/use-scope-gate-flow.d.ts +27 -0
- package/dist/src/tui/import/steps/07-scope-gate/use-scope-gate.d.ts +77 -0
- package/dist/src/tui/import/steps/08-generation/logic.d.ts +23 -0
- package/dist/src/tui/import/steps/08-generation/map-tokens.d.ts +14 -0
- package/dist/src/tui/import/steps/08-generation/run.d.ts +12 -0
- package/dist/src/tui/import/steps/08-generation/save-decisions.d.ts +8 -0
- package/dist/src/tui/import/steps/08-generation/screen.d.ts +10 -0
- package/dist/src/tui/import/steps/08-generation/types.d.ts +47 -0
- package/dist/src/tui/import/steps/08-generation/use-generation.d.ts +14 -0
- package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/ComponentRationalePanel.d.ts +1 -1
- package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/FieldEditor.d.ts +1 -18
- package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/components/LivePreviewSummary.d.ts +2 -2
- package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/components/ReviewComponentPanel.d.ts +3 -3
- package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/components/ReviewDetailsEditor.d.ts +3 -3
- package/dist/src/tui/import/steps/09-review/components/ReviewDialogs.d.ts +14 -0
- package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/components/ReviewStatus.d.ts +1 -1
- package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/ScrollablePanel.d.ts +2 -2
- package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/TokenReviewPanel.d.ts +0 -6
- package/dist/src/tui/import/steps/09-review/generate-review-step.d.ts +16 -0
- package/{legacy/dist/src/import → dist/src/tui/import/steps/09-review/graph}/cycle-auto-reject.d.ts +1 -1
- package/{legacy/dist/src/analyze → dist/src/tui/import/steps/09-review/graph}/cycle-view.d.ts +2 -2
- package/{legacy/dist/src/analyze → dist/src/tui/import/steps/09-review/graph}/issue-inheritance.d.ts +1 -1
- package/{legacy/dist/src/analyze → dist/src/tui/import/steps/09-review/graph}/selection-cascade.d.ts +1 -1
- package/dist/src/tui/import/steps/09-review/helpers/cycle-panel-scroll.d.ts +4 -0
- package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/09-review/helpers}/enumerate-cycle-breaks.d.ts +1 -1
- package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/history.d.ts +1 -1
- package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/09-review}/review-details-panel.d.ts +2 -2
- package/{legacy/dist/src/import/tui/hooks → dist/src/tui/import/steps/09-review}/review-input.d.ts +2 -2
- package/{legacy/dist/src/import/tui/runLivePreview.d.ts → dist/src/tui/import/steps/09-review/run-live-preview.d.ts} +2 -6
- package/dist/src/tui/import/steps/09-review/session.d.ts +26 -0
- package/dist/src/tui/import/steps/09-review/token-suggestions.d.ts +8 -0
- package/dist/src/tui/import/steps/09-review/types.d.ts +19 -0
- package/{legacy/dist/src/import/tui/useFinalizePreview.d.ts → dist/src/tui/import/steps/09-review/use-finalize-preview.d.ts} +1 -11
- package/{legacy/dist/src/import/tui/hooks/useReviewEditor.d.ts → dist/src/tui/import/steps/09-review/use-review-editor.d.ts} +1 -3
- package/{legacy/dist/src/import/tui/hooks/useReviewPreview.d.ts → dist/src/tui/import/steps/09-review/use-review-preview.d.ts} +2 -2
- package/{legacy/dist/src/import/tui/hooks/useReviewSession.d.ts → dist/src/tui/import/steps/09-review/use-review-session.d.ts} +5 -35
- package/dist/src/tui/import/steps/10-flow/flow/build-flow-start.d.ts +22 -0
- package/dist/src/tui/import/steps/10-flow/flow/controller.d.ts +71 -0
- package/dist/src/tui/import/steps/10-flow/flow/preview.d.ts +44 -0
- package/dist/src/tui/import/steps/10-flow/flow/push.d.ts +45 -0
- package/dist/src/tui/import/steps/10-flow/flow/save.d.ts +41 -0
- package/dist/src/tui/import/steps/10-flow/flow/screen.d.ts +13 -0
- package/dist/src/tui/import/steps/10-flow/flow/types.d.ts +71 -0
- package/dist/src/tui/import/steps/10-flow/flow/use-flow.d.ts +12 -0
- package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/10-flow/screens}/DoneStep.d.ts +6 -1
- package/dist/src/tui/import/steps/10-flow/screens/PushingStep.d.ts +9 -0
- package/dist/src/tui/import/steps/10-flow/screens/WizardPreviewStep.d.ts +12 -0
- package/{legacy/dist/src/import → dist/src/tui/import/steps/10-flow/support}/path-utils.d.ts +0 -5
- package/dist/src/tui/import/steps/10-flow/support/preview-diff.d.ts +7 -0
- package/dist/src/tui/import/steps/10-flow/support/produced.d.ts +15 -0
- package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/support}/wizard-state-transitions.d.ts +0 -13
- package/dist/src/tui/import/steps/index.d.ts +4 -0
- package/dist/src/tui/import/steps/preview-validation-error/logic.d.ts +9 -0
- package/dist/src/tui/import/steps/preview-validation-error/screen.d.ts +11 -0
- package/dist/src/tui/settings/{contentful-configuration/ContentfulConfigScreen.d.ts → configuration/ConfigurationScreen.d.ts} +1 -0
- package/dist/src/tui/settings/configuration/agents/AgentDetail.d.ts +15 -0
- package/dist/src/tui/settings/configuration/agents/AgentStatusBadge.d.ts +10 -0
- package/dist/src/tui/settings/configuration/agents/AgentsScreen.d.ts +11 -0
- package/dist/src/tui/settings/configuration/agents/agent-debug.d.ts +25 -0
- package/dist/src/tui/settings/configuration/agents/agent-status.d.ts +63 -0
- package/dist/src/tui/settings/configuration/agents/agent-store.d.ts +21 -0
- package/dist/src/tui/settings/configuration/agents/apply-binary-overrides.d.ts +13 -0
- package/dist/src/tui/settings/configuration/project/ProjectScreen.d.ts +5 -0
- package/dist/src/tui/settings/{contentful-configuration/config-store.d.ts → configuration/project/project-store.d.ts} +1 -0
- package/dist/src/tui/settings/debug-mode/debug-mode-store.d.ts +7 -1
- package/dist/src/tui/settings/debug-mode/screen.d.ts +4 -0
- package/dist/src/tui/settings/shared/debug-trail.d.ts +35 -0
- package/dist/src/tui/shared/components/ClearableTextInput.d.ts +6 -0
- package/dist/src/tui/shared/components/ControlHints.d.ts +9 -0
- package/dist/src/tui/shared/components/FieldForm.d.ts +71 -0
- package/dist/src/tui/shared/components/StepHeader.d.ts +26 -0
- package/dist/src/tui/theme.d.ts +21 -0
- package/dist/src/tui/user-agent.d.ts +5 -0
- package/package.json +8 -3
- package/dist/src/commands/forwarded.d.ts +0 -2
- package/dist/src/legacy/forwarded-import-args.d.ts +0 -1
- package/dist/src/legacy/legacy-cli-path.d.ts +0 -1
- package/dist/src/legacy/run-legacy.d.ts +0 -1
- package/dist/src/tui/control-hints.d.ts +0 -7
- package/dist/src/tui/import/spawn-v1-import.d.ts +0 -29
- package/dist/src/tui/import/terminal-input.d.ts +0 -2
- package/dist/src/tui/upgrade/PageContainer.d.ts +0 -4
- package/legacy/bin/cli.js +0 -58
- package/legacy/dist/package.json +0 -73
- package/legacy/dist/src/analytics/apply.d.ts +0 -6
- package/legacy/dist/src/analytics/client.d.ts +0 -8
- package/legacy/dist/src/analytics/constants.d.ts +0 -4
- package/legacy/dist/src/analytics/exit.d.ts +0 -4
- package/legacy/dist/src/analytics/index.d.ts +0 -6
- package/legacy/dist/src/analytics/normalize.d.ts +0 -3
- package/legacy/dist/src/analytics/os.d.ts +0 -2
- package/legacy/dist/src/analytics/session.d.ts +0 -3
- package/legacy/dist/src/analytics/tracker.d.ts +0 -16
- package/legacy/dist/src/analytics/types.d.ts +0 -28
- package/legacy/dist/src/analyze/composition/apply-mapping.d.ts +0 -22
- package/legacy/dist/src/analyze/composition/candidate-files.d.ts +0 -34
- package/legacy/dist/src/analyze/composition/composition-cache-key.d.ts +0 -18
- package/legacy/dist/src/analyze/composition/interchange-schema.d.ts +0 -17
- package/legacy/dist/src/analyze/composition/manifest-doc-evidence.d.ts +0 -49
- package/legacy/dist/src/analyze/composition/merge-edges.d.ts +0 -19
- package/legacy/dist/src/analyze/composition/parse-map-edges.d.ts +0 -16
- package/legacy/dist/src/analyze/composition/prompt-loader.d.ts +0 -3
- package/legacy/dist/src/analyze/composition/resolve-mapping-cli.d.ts +0 -10
- package/legacy/dist/src/analyze/composition/resolve-mapping.d.ts +0 -59
- package/legacy/dist/src/analyze/extract-command.d.ts +0 -7
- package/legacy/dist/src/analyze/fuzzy-search.d.ts +0 -3
- package/legacy/dist/src/analyze/lineage.d.ts +0 -29
- package/legacy/dist/src/analyze/select/command.d.ts +0 -27
- package/legacy/dist/src/analyze/select/parser.d.ts +0 -6
- package/legacy/dist/src/analyze/select/persistence.d.ts +0 -22
- package/legacy/dist/src/analyze/select/tui/LegacySelectApp.d.ts +0 -8
- package/legacy/dist/src/analyze/select/tui/components/ComponentDetail.d.ts +0 -19
- package/legacy/dist/src/analyze/select/tui/components/JsonEditor.d.ts +0 -10
- package/legacy/dist/src/analyze/select/tui/components/PreviewSummaryBar.d.ts +0 -8
- package/legacy/dist/src/analyze/select/tui/components/Sidebar.d.ts +0 -29
- package/legacy/dist/src/analyze/select/tui/components/SourcePanel.d.ts +0 -11
- package/legacy/dist/src/analyze/select/tui/components/StatusBar.d.ts +0 -11
- package/legacy/dist/src/analyze/select/tui/components/TopBar.d.ts +0 -10
- package/legacy/dist/src/analyze/select/tui/hooks/list-scroll-input.d.ts +0 -13
- package/legacy/dist/src/analyze/select/tui/hooks/useKeymap.d.ts +0 -24
- package/legacy/dist/src/analyze/select/tui/hooks/useSession.d.ts +0 -19
- package/legacy/dist/src/analyze/select/tui/hooks/useUndo.d.ts +0 -8
- package/legacy/dist/src/analyze/select/tui/theme.d.ts +0 -18
- package/legacy/dist/src/analyze/select/types.d.ts +0 -54
- package/legacy/dist/src/apply/api-client.d.ts +0 -64
- package/legacy/dist/src/apply/command.d.ts +0 -43
- package/legacy/dist/src/apply/preview-utils.d.ts +0 -12
- package/legacy/dist/src/apply/tokens.d.ts +0 -1
- package/legacy/dist/src/apply/tui/ServerApplyView.d.ts +0 -34
- package/legacy/dist/src/apply/tui/ServerPreviewView.d.ts +0 -9
- package/legacy/dist/src/credentials-store.d.ts +0 -18
- package/legacy/dist/src/doctor/checks.d.ts +0 -5
- package/legacy/dist/src/doctor/command.d.ts +0 -2
- package/legacy/dist/src/doctor/report.d.ts +0 -7
- package/legacy/dist/src/generate/command.d.ts +0 -2
- package/legacy/dist/src/generate/tui/GenerateView.d.ts +0 -12
- package/legacy/dist/src/helpers/build-contentful-management-client.d.ts +0 -7
- package/legacy/dist/src/helpers/fetch-and-persist-existing-contentful-entities.d.ts +0 -29
- package/legacy/dist/src/helpers/fetch-existing-contentful-entities.d.ts +0 -11
- package/legacy/dist/src/helpers/find-nearly-matching-component.d.ts +0 -7
- package/legacy/dist/src/helpers/read-existing-contentful-entities-from-session.d.ts +0 -7
- package/legacy/dist/src/helpers/summarize-existing-contentful-entities.d.ts +0 -50
- package/legacy/dist/src/host-utils.d.ts +0 -3
- package/legacy/dist/src/import/agent-model-resolve.d.ts +0 -27
- package/legacy/dist/src/import/command.d.ts +0 -2
- package/legacy/dist/src/import/composition-options.d.ts +0 -7
- package/legacy/dist/src/import/tui/WizardApp.d.ts +0 -67
- package/legacy/dist/src/import/tui/components/LegendEntry.d.ts +0 -2
- package/legacy/dist/src/import/tui/components/ReviewDialogs.d.ts +0 -28
- package/legacy/dist/src/import/tui/components/StepHeader.d.ts +0 -8
- package/legacy/dist/src/import/tui/cycle-panel-scroll.d.ts +0 -8
- package/legacy/dist/src/import/tui/lineage-layout.d.ts +0 -68
- package/legacy/dist/src/import/tui/run-selection-agent.d.ts +0 -9
- package/legacy/dist/src/import/tui/runScopeGate.d.ts +0 -12
- package/legacy/dist/src/import/tui/spawn-generate.d.ts +0 -33
- package/legacy/dist/src/import/tui/steps/CredentialsStep.d.ts +0 -43
- package/legacy/dist/src/import/tui/steps/GateStep.d.ts +0 -15
- package/legacy/dist/src/import/tui/steps/GenerateReviewStep.d.ts +0 -37
- package/legacy/dist/src/import/tui/steps/PathValidationStep.d.ts +0 -10
- package/legacy/dist/src/import/tui/steps/PreviewValidationErrorStep.d.ts +0 -11
- package/legacy/dist/src/import/tui/steps/PushingStep.d.ts +0 -9
- package/legacy/dist/src/import/tui/steps/RunningStep.d.ts +0 -32
- package/legacy/dist/src/import/tui/steps/ScopeGateStep.d.ts +0 -48
- package/legacy/dist/src/import/tui/steps/TokenInputStep.d.ts +0 -8
- package/legacy/dist/src/import/tui/steps/WelcomeStep.d.ts +0 -7
- package/legacy/dist/src/import/tui/steps/WizardPreviewStep.d.ts +0 -21
- package/legacy/dist/src/import/tui/steps/preview-diff.d.ts +0 -10
- package/legacy/dist/src/import/tui/wizard-422-helpers.d.ts +0 -48
- package/legacy/dist/src/import/tui/wizard-generate-progress.d.ts +0 -21
- package/legacy/dist/src/index.d.ts +0 -1
- package/legacy/dist/src/index.js +0 -33004
- package/legacy/dist/src/lib/agent-definitions.d.ts +0 -14
- package/legacy/dist/src/lib/agent-model-options.d.ts +0 -15
- package/legacy/dist/src/lib/agent-output.d.ts +0 -5
- package/legacy/dist/src/lib/cli-errors.d.ts +0 -2
- package/legacy/dist/src/lib/cli-path.d.ts +0 -4
- package/legacy/dist/src/lib/command-options.d.ts +0 -3
- package/legacy/dist/src/lib/component-patch.d.ts +0 -12
- package/legacy/dist/src/lib/debug-logger.d.ts +0 -39
- package/legacy/dist/src/lib/debug-preamble.d.ts +0 -7
- package/legacy/dist/src/lib/error-parser.d.ts +0 -40
- package/legacy/dist/src/lib/path-exists.d.ts +0 -1
- package/legacy/dist/src/lib/prompt-overrides.d.ts +0 -38
- package/legacy/dist/src/lib/terminal-capabilities.d.ts +0 -29
- package/legacy/dist/src/lib/user-agent.d.ts +0 -7
- package/legacy/dist/src/map-tokens/apply.d.ts +0 -12
- package/legacy/dist/src/map-tokens/command.d.ts +0 -2
- package/legacy/dist/src/map-tokens/resolve-defaults.d.ts +0 -32
- package/legacy/dist/src/map-tokens/tui/MapTokensView.d.ts +0 -13
- package/legacy/dist/src/output/format.d.ts +0 -23
- package/legacy/dist/src/print/command.d.ts +0 -11
- package/legacy/dist/src/print/validate/tui/ValidateView.d.ts +0 -15
- package/legacy/dist/src/print/validate/validators/cdf-validator.d.ts +0 -2
- package/legacy/dist/src/print/validate/validators/dtcg-validator.d.ts +0 -2
- package/legacy/dist/src/print/validate/validators/format-errors.d.ts +0 -12
- package/legacy/dist/src/print/validate/validators/read-json-file.d.ts +0 -10
- package/legacy/dist/src/program.d.ts +0 -25
- package/legacy/dist/src/runs/fingerprint.d.ts +0 -36
- package/legacy/dist/src/runs/save-path-resolver.d.ts +0 -11
- package/legacy/dist/src/runs/store.d.ts +0 -65
- package/legacy/dist/src/session/cache-keys.d.ts +0 -22
- package/legacy/dist/src/session/core/cdf/cdf-mappers.d.ts +0 -3
- package/legacy/dist/src/session/core/components/derive-component-id.d.ts +0 -1
- package/legacy/dist/src/session/core/components/hash-component-shape.d.ts +0 -5
- package/legacy/dist/src/session/core/shared/index-rows-by-key.d.ts +0 -1
- package/legacy/dist/src/session/core/tokens/build-dtcg-groups.d.ts +0 -12
- package/legacy/dist/src/session/core/tokens/build-dtcg-tokens.d.ts +0 -3
- package/legacy/dist/src/session/core/tokens/hash-token-content.d.ts +0 -1
- package/legacy/dist/src/session/db.d.ts +0 -200
- package/legacy/dist/src/session/migration.d.ts +0 -2
- package/legacy/dist/src/session/repositories/sessions/read.d.ts +0 -11
- package/legacy/dist/src/session/repositories/sessions/write.d.ts +0 -3
- package/legacy/dist/src/session/repositories/shared/with-transaction.d.ts +0 -2
- package/legacy/dist/src/session/repositories/steps/read.d.ts +0 -2
- package/legacy/dist/src/session/repositories/steps/write.d.ts +0 -5
- package/legacy/dist/src/session/repositories/tokens/read.d.ts +0 -15
- package/legacy/dist/src/session/repositories/tokens/write.d.ts +0 -16
- package/legacy/dist/src/session/resolve-session-id.d.ts +0 -1
- package/legacy/dist/src/session/services/session-resolver.d.ts +0 -9
- package/legacy/dist/src/session/services/tokens/apply-tool-calls.d.ts +0 -8
- package/legacy/dist/src/session/services/tokens/replace-raw-prop-token-paths.d.ts +0 -3
- package/legacy/dist/src/session/services/tokens/replace-raw-token-name-paths.d.ts +0 -3
- package/legacy/dist/src/session/services/tokens/store-dtcg-tokens.d.ts +0 -3
- package/legacy/dist/src/session/session-id.d.ts +0 -1
- package/legacy/dist/src/session/source-excerpt.d.ts +0 -26
- package/legacy/dist/src/setup/SetupScreen.d.ts +0 -28
- package/legacy/dist/src/setup/SetupStepper.d.ts +0 -7
- package/legacy/dist/src/setup/command.d.ts +0 -3
- package/legacy/dist/src/setup/lib/checks.d.ts +0 -57
- package/legacy/dist/src/setup/lib/shell.d.ts +0 -12
- package/legacy/dist/src/setup/steps/CodingAgentScreen.d.ts +0 -20
- package/legacy/dist/src/setup/steps/ContentfulCredentialsScreen.d.ts +0 -11
- package/legacy/dist/src/setup/steps/StepLayout.d.ts +0 -20
- package/legacy/dist/src/setup/steps/preferences/AnalyticsScreen.d.ts +0 -5
- package/legacy/dist/src/setup/steps/preferences/BooleanInput.d.ts +0 -21
- package/legacy/dist/src/setup/steps/preferences/ColorPreferenceScreen.d.ts +0 -5
- package/legacy/dist/src/setup/steps/preferences/CustomPromptScreen.d.ts +0 -14
- package/legacy/dist/src/setup/steps/preferences/DebugLogsScreen.d.ts +0 -5
- package/legacy/dist/src/setup/steps/preferences/PreferencesMenu.d.ts +0 -26
- package/legacy/dist/src/setup/steps/prerequisites/PrerequisitesScreen.d.ts +0 -16
- package/legacy/dist/src/setup/steps/prerequisites/build.d.ts +0 -2
- package/legacy/dist/src/setup/steps/prerequisites/deps.d.ts +0 -33
- package/legacy/dist/src/setup/steps/prerequisites/index.d.ts +0 -4
- package/legacy/dist/src/setup/steps/prerequisites/node.d.ts +0 -2
- package/legacy/dist/src/setup/steps/prerequisites/pnpm.d.ts +0 -2
- package/legacy/dist/src/tui/CommandCompletionView.d.ts +0 -13
- package/legacy/dist/src/tui/render-with-goodbye.d.ts +0 -7
- package/legacy/dist/src/types.d.ts +0 -2
- package/legacy/package.json +0 -80
- package/legacy/prompts/composition-edges.md +0 -11
- /package/dist/src/tui/{upgrade → home}/version.d.ts +0 -0
- /package/{legacy/dist/src/analyze → dist/src/tui/import/steps/07-scope-gate/graph}/composite-closure.d.ts +0 -0
- /package/{legacy/dist/src/analyze → dist/src/tui/import/steps/07-scope-gate/graph}/cycle-detection.d.ts +0 -0
- /package/{legacy/dist/src/analyze → dist/src/tui/import/steps/07-scope-gate/graph}/scope-gate-cascade.d.ts +0 -0
- /package/{legacy/dist/src/analyze → dist/src/tui/import/steps/07-scope-gate/graph}/search-neighborhood.d.ts +0 -0
- /package/{legacy/dist/src/analyze → dist/src/tui/import/steps/07-scope-gate/graph}/slot-graph.d.ts +0 -0
- /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/autocomplete.d.ts +0 -0
- /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/components/CompactControlBar.d.ts +0 -0
- /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/components/CounterStrip.d.ts +0 -0
- /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/components/HelpOverlay.d.ts +0 -0
- /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/components/SearchMatchSummary.d.ts +0 -0
- /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/hooks/sidebar-search-state.d.ts +0 -0
- /package/{legacy/dist/src/tui → dist/src/tui/import/steps/07-scope-gate/sidebar/hooks}/use-terminal-size.d.ts +0 -0
- /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/hooks/useImmediateInput.d.ts +0 -0
- /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/hooks/useOverlayPanel.d.ts +0 -0
- /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/sidebar-input.d.ts +0 -0
- /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/FinalizeDialog.d.ts +0 -0
- /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/HighlightedLine.d.ts +0 -0
- /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/JsonPanel.d.ts +0 -0
- /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/QuitDialog.d.ts +0 -0
- /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/RationaleLine.d.ts +0 -0
- /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/RationalePanel.d.ts +0 -0
- /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/removed-components-text.d.ts +0 -0
- /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/wrap-text.d.ts +0 -0
- /package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/09-review/helpers}/auto-reject-decision.d.ts +0 -0
- /package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/09-review/helpers}/breaking-change-format.d.ts +0 -0
- /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review/helpers}/sidebar-width.d.ts +0 -0
- /package/{legacy/dist/src/analyze/select → dist/src/tui/import/steps/09-review}/preview-annotations.d.ts +0 -0
- /package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/09-review}/review-json-panel.d.ts +0 -0
- /package/{legacy/dist/src/analyze/select/tui/hooks → dist/src/tui/import/steps/09-review}/scroll-offset.d.ts +0 -0
- /package/{legacy/dist/src/import/tui/useLivePreview.d.ts → dist/src/tui/import/steps/09-review/use-live-preview.d.ts} +0 -0
- /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
- /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/components}/CustomPromptBanner.d.ts +0 -0
- /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow}/components/SpaceEnvironment.d.ts +0 -0
- /package/{legacy/dist/src/runs/path-prompt.d.ts → dist/src/tui/import/steps/10-flow/screens/PathPrompt.d.ts} +0 -0
- /package/{legacy/dist/src/lib → dist/src/tui/import/steps/10-flow/support}/contentful-urls.d.ts +0 -0
- /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/support}/preview-confirmation-input.d.ts +0 -0
- /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/support}/push-progress.d.ts +0 -0
- /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/support}/run-print-files-helpers.d.ts +0 -0
- /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/support}/run-teaser.d.ts +0 -0
- /package/{legacy/dist/src/tui → dist/src/tui/import/steps/10-flow/support}/use-blinking-cursor.d.ts +0 -0
- /package/{legacy/dist/src/tui → dist/src/tui/import/steps/10-flow/support}/use-timed-spinner.d.ts +0 -0
- /package/dist/src/tui/settings/{utils → shared}/v1-store.d.ts +0 -0
- /package/{legacy/skills → skills}/generate-components.md +0 -0
- /package/{legacy/skills → skills}/generate-tokens.md +0 -0
- /package/{legacy/skills → skills}/map-tokens.md +0 -0
- /package/{legacy/skills → skills}/select-components.md +0 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { ImportHandoff } from '@contentful/experience-design-system-types/handoff';
|
|
2
|
+
import { type PreviewDeps } from './preview.js';
|
|
3
|
+
import { type PushDeps } from './push.js';
|
|
4
|
+
import { type SaveDeps } from './save.js';
|
|
5
|
+
import { type FlowState } from './types.js';
|
|
6
|
+
/** What the flow starts from: what the earlier stages produced, and the user's saved settings. */
|
|
7
|
+
export interface FlowStart {
|
|
8
|
+
handoff: ImportHandoff;
|
|
9
|
+
agent: string;
|
|
10
|
+
projectPath: string;
|
|
11
|
+
/** Where the files are saved by default. */
|
|
12
|
+
outDir: string;
|
|
13
|
+
rawTokensPath: string;
|
|
14
|
+
credentials: {
|
|
15
|
+
spaceId: string;
|
|
16
|
+
environmentId: string;
|
|
17
|
+
cmaToken: string;
|
|
18
|
+
host: string;
|
|
19
|
+
};
|
|
20
|
+
/** Set when the import only generates tokens: there is no extraction or generation, so the flow starts at saving. */
|
|
21
|
+
tokensOnly?: {
|
|
22
|
+
tokensPath: string;
|
|
23
|
+
tokenSessionId: string | null;
|
|
24
|
+
tokenCount: number;
|
|
25
|
+
outDir: string;
|
|
26
|
+
};
|
|
27
|
+
/** A custom prompt for `generate components`, shown as a warning above every step. */
|
|
28
|
+
generatePromptPath?: string;
|
|
29
|
+
}
|
|
30
|
+
/** The outside world the flow talks to besides the preview, push and save steps. */
|
|
31
|
+
export interface FlowDeps {
|
|
32
|
+
preview: PreviewDeps;
|
|
33
|
+
push: PushDeps;
|
|
34
|
+
save: SaveDeps;
|
|
35
|
+
/** Reads the accepted components, for the cycle check at finalize. */
|
|
36
|
+
loadAcceptedComponents: (sessionId: string) => Array<{
|
|
37
|
+
key: string;
|
|
38
|
+
entry: unknown;
|
|
39
|
+
}>;
|
|
40
|
+
mkdir: (path: string) => Promise<void>;
|
|
41
|
+
detectSaveConflict: (path: string) => Promise<boolean>;
|
|
42
|
+
buildTimestampedSubdir: (path: string) => string;
|
|
43
|
+
rejectComponentsByName: (sessionId: string, names: string[]) => Promise<unknown>;
|
|
44
|
+
/** Writes one line of the wizard's step log. */
|
|
45
|
+
log: (entry: Record<string, unknown>) => void;
|
|
46
|
+
stderr: (text: string) => void;
|
|
47
|
+
/**
|
|
48
|
+
* Called when the step is about to change, before anything is told about the new one. The host clears the terminal
|
|
49
|
+
* here so the next screen is drawn on a clean one. It has to be before: Ink paints as soon as it is told, and a clear
|
|
50
|
+
* after the paint wipes a static screen like the done step, which nothing draws again.
|
|
51
|
+
*/
|
|
52
|
+
beforeStepChange?: () => void;
|
|
53
|
+
}
|
|
54
|
+
export declare function startWizardLog(): void;
|
|
55
|
+
export declare function realFlowDeps(): FlowDeps;
|
|
56
|
+
export interface FlowController {
|
|
57
|
+
getState(): FlowState;
|
|
58
|
+
subscribe(listener: () => void): () => void;
|
|
59
|
+
finalize(accepted: number, rejected: number, unresolved: number): void;
|
|
60
|
+
submitPath(path: string): Promise<void>;
|
|
61
|
+
confirmPreview(acknowledgeBreakingChanges: boolean): void;
|
|
62
|
+
acknowledgeBreakingChanges(): void;
|
|
63
|
+
editDefinitions(): void;
|
|
64
|
+
skipValidationErrors(): Promise<void>;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The wizard's state machine, taken out of the screen so each transition can be tested without a terminal. It holds the
|
|
68
|
+
* state, applies the patches the steps return, and decides what runs next. It never exits the process: leaving is the
|
|
69
|
+
* screen's decision.
|
|
70
|
+
*/
|
|
71
|
+
export declare function createFlowController(start: FlowStart, deps: FlowDeps): FlowController;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { DatabaseSync } from 'node:sqlite';
|
|
2
|
+
import { patchReviewStateWithValidationErrors } from '@contentful/experience-design-system-backend-pipeline';
|
|
3
|
+
import { type CDFDocument, type DTCGTokenEntry, type ServerPreviewResponse } from '@contentful/experience-design-system-types';
|
|
4
|
+
import type { FlowPatch, FlowState } from './types.js';
|
|
5
|
+
type PreviewClient = {
|
|
6
|
+
previewImport(cdf: CDFDocument): Promise<ServerPreviewResponse>;
|
|
7
|
+
/** Request id of the most recent response, used by `recordContentfulContext` for analytics correlation. */
|
|
8
|
+
getLastRequestId(): string | undefined;
|
|
9
|
+
};
|
|
10
|
+
/** The outside world `runPreview` talks to, so each branch can be tested without a database or a network. */
|
|
11
|
+
export interface PreviewDeps {
|
|
12
|
+
createClient: (options: {
|
|
13
|
+
cmaToken: string;
|
|
14
|
+
spaceId: string;
|
|
15
|
+
environmentId: string;
|
|
16
|
+
host: string;
|
|
17
|
+
}) => PreviewClient;
|
|
18
|
+
openDb: () => DatabaseSync;
|
|
19
|
+
readTokens: (path: string) => Promise<DTCGTokenEntry[]>;
|
|
20
|
+
patchReviewState: typeof patchReviewStateWithValidationErrors;
|
|
21
|
+
verboseErrors: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare const realPreviewDeps: () => PreviewDeps;
|
|
24
|
+
export interface RunPreviewInput {
|
|
25
|
+
state: Pick<FlowState, 'credentialsSkipped'>;
|
|
26
|
+
extractSessionId: string | null;
|
|
27
|
+
tokensPath: string;
|
|
28
|
+
spaceId: string;
|
|
29
|
+
environmentId: string;
|
|
30
|
+
cmaToken: string;
|
|
31
|
+
host: string;
|
|
32
|
+
/** Set when nothing was accepted, so the document is present but empty and the server shows what would be deleted. */
|
|
33
|
+
deleteAll: boolean;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Loads what would be pushed and asks the server what that would change. Returns the patch the wizard applied: the
|
|
37
|
+
* preview gate, a terminal "done" when nothing would change, the validation error step for a 422, or an error.
|
|
38
|
+
*
|
|
39
|
+
* It also repairs two things the server's answer can reveal: components it says would be removed that are in fact local
|
|
40
|
+
* (the review dropped their CDF), and defaults it would change. Both are re-seeded from the response, and the preview is
|
|
41
|
+
* taken again.
|
|
42
|
+
*/
|
|
43
|
+
export declare function runPreview(input: RunPreviewInput, deps: PreviewDeps): Promise<FlowPatch>;
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { updateRun } from '@contentful/experience-design-system-backend-pipeline';
|
|
2
|
+
import { type ApplyOperationResponse, type CDFDocument, type ServerPreviewResponse } from '@contentful/experience-design-system-types';
|
|
3
|
+
import type { FlowPatch, FlowState } from './types.js';
|
|
4
|
+
type PushClient = {
|
|
5
|
+
applyImport(cdf: CDFDocument, options: {
|
|
6
|
+
acknowledgeBreakingChanges: boolean;
|
|
7
|
+
}): Promise<ApplyOperationResponse>;
|
|
8
|
+
pollOperation(operationId: string, options: {
|
|
9
|
+
onProgress?: (operation: ApplyOperationResponse) => void;
|
|
10
|
+
}): Promise<ApplyOperationResponse>;
|
|
11
|
+
/** Request id of the most recent response, used by `recordApplyOutcome` for analytics correlation. */
|
|
12
|
+
getLastRequestId(): string | undefined;
|
|
13
|
+
};
|
|
14
|
+
/** The outside world `runPush` talks to, so each branch can be tested without a network or a run history. */
|
|
15
|
+
export interface PushDeps {
|
|
16
|
+
createClient: (options: {
|
|
17
|
+
cmaToken: string;
|
|
18
|
+
spaceId: string;
|
|
19
|
+
environmentId: string;
|
|
20
|
+
host: string;
|
|
21
|
+
}) => PushClient;
|
|
22
|
+
updateRun: typeof updateRun;
|
|
23
|
+
/** Where the wizard's step log goes. A log that cannot be written is reported on stderr and never stops the push. */
|
|
24
|
+
log: (entry: Record<string, unknown>) => void;
|
|
25
|
+
warn: (message: string) => void;
|
|
26
|
+
verboseErrors: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare const realPushDeps: (log: PushDeps["log"]) => PushDeps;
|
|
29
|
+
export interface RunPushInput {
|
|
30
|
+
state: Pick<FlowState, 'credentialsSkipped' | 'lastRunId'>;
|
|
31
|
+
cdf: CDFDocument;
|
|
32
|
+
spaceId: string;
|
|
33
|
+
environmentId: string;
|
|
34
|
+
cmaToken: string;
|
|
35
|
+
host: string;
|
|
36
|
+
acknowledgeBreakingChanges: boolean;
|
|
37
|
+
preview?: ServerPreviewResponse | null;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Pushes the previewed document: the checks that refuse a push that cannot work, then the apply, polling its progress,
|
|
41
|
+
* and the result as the counts the done screen shows. `onPatch` receives the progress while it polls; the returned patch
|
|
42
|
+
* is where the flow ends up.
|
|
43
|
+
*/
|
|
44
|
+
export declare function runPush(input: RunPushInput, deps: PushDeps, onPatch: (patch: FlowPatch) => void): Promise<FlowPatch>;
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { DatabaseSync } from 'node:sqlite';
|
|
2
|
+
import { appendRun, buildSourceFingerprint } from '@contentful/experience-design-system-backend-pipeline';
|
|
3
|
+
import { type DTCGTokenEntry } from '@contentful/experience-design-system-types';
|
|
4
|
+
import type { FlowPatch, FlowState } from './types.js';
|
|
5
|
+
/** The outside world saving talks to, so each branch can be tested without a disk, a database or a clock. */
|
|
6
|
+
export interface SaveDeps {
|
|
7
|
+
openDb: () => DatabaseSync;
|
|
8
|
+
readTokens: (path: string) => Promise<DTCGTokenEntry[]>;
|
|
9
|
+
writeFile: (path: string, contents: string) => Promise<void>;
|
|
10
|
+
appendRun: typeof appendRun;
|
|
11
|
+
buildSourceFingerprint: typeof buildSourceFingerprint;
|
|
12
|
+
sleep: (ms: number) => Promise<void>;
|
|
13
|
+
warn: (message: string) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const realSaveDeps: () => SaveDeps;
|
|
16
|
+
export interface WriteFilesInput {
|
|
17
|
+
extractSessionId: string | null;
|
|
18
|
+
outDir: string;
|
|
19
|
+
tokenSessionId?: string | null;
|
|
20
|
+
tokensPath?: string;
|
|
21
|
+
skipGate?: boolean;
|
|
22
|
+
allowEmpty?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Writes `components.json` to `outDir`. Returns the patch for the step after (the print gate, or nothing when the save
|
|
26
|
+
* is part of a push and goes straight on), or an error patch when the document could not be built or written.
|
|
27
|
+
* `onPatch` receives the "printing" step while it works.
|
|
28
|
+
*/
|
|
29
|
+
export declare function runPrintFiles(input: WriteFilesInput, deps: SaveDeps, onPatch: (patch: FlowPatch) => void): Promise<{
|
|
30
|
+
ok: true;
|
|
31
|
+
patch: FlowPatch;
|
|
32
|
+
} | {
|
|
33
|
+
ok: false;
|
|
34
|
+
patch: FlowPatch;
|
|
35
|
+
}>;
|
|
36
|
+
export interface RecordRunInput {
|
|
37
|
+
state: Pick<FlowState, 'extractSessionId' | 'rawTokensPath' | 'projectPath' | 'generatedAcceptedCount' | 'generatedCount' | 'tokenCount' | 'tokenSessionId' | 'tokensPath' | 'agent' | 'generateSessionId'>;
|
|
38
|
+
savePath: string;
|
|
39
|
+
}
|
|
40
|
+
/** Records the run, so it can be found and pushed later. A run that cannot be recorded is warned about, never fatal. */
|
|
41
|
+
export declare function recordRun(input: RecordRunInput, deps: SaveDeps): Promise<string | null>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FlowController } from './controller.js';
|
|
3
|
+
import type { FlowState } from './types.js';
|
|
4
|
+
interface FlowScreenProps {
|
|
5
|
+
state: FlowState;
|
|
6
|
+
controller: FlowController;
|
|
7
|
+
livePreview?: boolean;
|
|
8
|
+
generatePromptPath?: string;
|
|
9
|
+
/** Leaves the import with the exit code the wizard would have exited with. */
|
|
10
|
+
onExit: (exitCode: number) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function FlowScreen({ state, controller, livePreview, generatePromptPath, onExit, }: FlowScreenProps): React.ReactElement;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { CDFDocument, ServerPreviewResponse } from '@contentful/experience-design-system-types';
|
|
2
|
+
import type { PreviewValidationError } from '@contentful/experience-design-system-backend-pipeline';
|
|
3
|
+
import type { PushProgress } from '../support/push-progress.js';
|
|
4
|
+
/**
|
|
5
|
+
* The steps of the import after the review, as the wizard had them. The ones that came before (credentials, extraction,
|
|
6
|
+
* the scope gate, generation) are v2 stages of their own now.
|
|
7
|
+
*/
|
|
8
|
+
type FlowStep = 'final-review' | 'previewing' | 'preview-gate' | 'pushing' | 'path-prompt' | 'printing' | 'print-gate' | 'done' | 'error' | 'preview-validation-error';
|
|
9
|
+
export type PushResult = {
|
|
10
|
+
componentTypes: {
|
|
11
|
+
created: number;
|
|
12
|
+
updated: number;
|
|
13
|
+
removed: number;
|
|
14
|
+
failed: number;
|
|
15
|
+
};
|
|
16
|
+
designTokens: {
|
|
17
|
+
created: number;
|
|
18
|
+
updated: number;
|
|
19
|
+
removed: number;
|
|
20
|
+
failed: number;
|
|
21
|
+
};
|
|
22
|
+
summary?: {
|
|
23
|
+
total: number;
|
|
24
|
+
succeeded: number;
|
|
25
|
+
failed: number;
|
|
26
|
+
};
|
|
27
|
+
failures?: Array<{
|
|
28
|
+
entityType: string;
|
|
29
|
+
entityId: string;
|
|
30
|
+
message: string;
|
|
31
|
+
}>;
|
|
32
|
+
};
|
|
33
|
+
/** Everything the flow keeps between steps. The same fields the wizard kept, minus those only the early stages used. */
|
|
34
|
+
export type FlowState = {
|
|
35
|
+
step: FlowStep;
|
|
36
|
+
agent: string;
|
|
37
|
+
projectPath: string;
|
|
38
|
+
outDir: string;
|
|
39
|
+
rawTokensPath: string;
|
|
40
|
+
tokensPath: string;
|
|
41
|
+
tokenSessionId: string | null;
|
|
42
|
+
tokenCount: number;
|
|
43
|
+
extractSessionId: string | null;
|
|
44
|
+
generateSessionId: string | null;
|
|
45
|
+
generatedCount: number;
|
|
46
|
+
generatedAcceptedCount: number;
|
|
47
|
+
componentsPath: string;
|
|
48
|
+
spaceId: string;
|
|
49
|
+
environmentId: string;
|
|
50
|
+
cmaToken: string;
|
|
51
|
+
host: string;
|
|
52
|
+
serverPreview: ServerPreviewResponse | null;
|
|
53
|
+
cdf: CDFDocument | null;
|
|
54
|
+
pushProgress: PushProgress;
|
|
55
|
+
pushResult: PushResult;
|
|
56
|
+
errorStep: string;
|
|
57
|
+
errorMessage: string;
|
|
58
|
+
errorAllowCredentialRetry: boolean;
|
|
59
|
+
errorAllowBreakingChangeAcknowledgment: boolean;
|
|
60
|
+
previewValidationErrors: PreviewValidationError[];
|
|
61
|
+
previewValidationMissingNames: string[];
|
|
62
|
+
mapTokensEligible: boolean | null;
|
|
63
|
+
credentialsSkipped: boolean;
|
|
64
|
+
lastRunId: string | null;
|
|
65
|
+
finalizeErrorBanner: string | null;
|
|
66
|
+
finalReviewPassed: boolean;
|
|
67
|
+
};
|
|
68
|
+
/** A change to the state. The steps of the flow return these instead of changing the state themselves. */
|
|
69
|
+
export type FlowPatch = Partial<FlowState>;
|
|
70
|
+
export declare const EMPTY_PUSH_RESULT: PushResult;
|
|
71
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type FlowController, type FlowDeps, type FlowStart } from './controller.js';
|
|
2
|
+
/**
|
|
3
|
+
* The flow for a start, once. `start` is undefined until the generation stage has finished, so the hook can be called
|
|
4
|
+
* unconditionally; the step log is started with the controller, as the wizard started it with its first render.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useFlow(start: FlowStart | undefined, options?: {
|
|
7
|
+
beforeStepChange?: () => void;
|
|
8
|
+
deps?: () => FlowDeps;
|
|
9
|
+
}): {
|
|
10
|
+
controller: FlowController;
|
|
11
|
+
state: ReturnType<FlowController['getState']>;
|
|
12
|
+
} | undefined;
|
package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/10-flow/screens}/DoneStep.d.ts
RENAMED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { Produced } from '../support/produced.js';
|
|
2
3
|
type EntityResult = {
|
|
3
4
|
created: number;
|
|
4
5
|
updated: number;
|
|
@@ -16,6 +17,10 @@ type DoneStepProps = {
|
|
|
16
17
|
spaceId: string;
|
|
17
18
|
environmentId: string;
|
|
18
19
|
host?: string;
|
|
20
|
+
/** What the import produced, so only the links to those things are offered. */
|
|
21
|
+
produced: Produced;
|
|
22
|
+
/** The user skipped the credentials, so nothing could be pushed: the files were only saved. */
|
|
23
|
+
credentialsSkipped?: boolean;
|
|
19
24
|
runTeaser?: string;
|
|
20
25
|
failures?: Array<{
|
|
21
26
|
entityType: string;
|
|
@@ -24,5 +29,5 @@ type DoneStepProps = {
|
|
|
24
29
|
}>;
|
|
25
30
|
onExit: () => void;
|
|
26
31
|
};
|
|
27
|
-
export declare function DoneStep({ componentTypes, designTokens, summary, spaceId, environmentId, host, failures, onExit, }: DoneStepProps): React.ReactElement;
|
|
32
|
+
export declare function DoneStep({ componentTypes, designTokens, summary, spaceId, environmentId, host, produced, credentialsSkipped, failures, onExit, }: DoneStepProps): React.ReactElement;
|
|
28
33
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PushProgress } from '../support/push-progress.js';
|
|
3
|
+
import { type Produced } from '../support/produced.js';
|
|
4
|
+
type PushingStepProps = {
|
|
5
|
+
progress: PushProgress;
|
|
6
|
+
produced: Produced;
|
|
7
|
+
};
|
|
8
|
+
export declare function PushingStep({ progress, produced }: PushingStepProps): React.ReactElement;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ServerPreviewResponse } from '@contentful/experience-design-system-types';
|
|
3
|
+
type WizardPreviewStepProps = {
|
|
4
|
+
preview: ServerPreviewResponse;
|
|
5
|
+
spaceId: string;
|
|
6
|
+
environmentId: string;
|
|
7
|
+
onConfirm: (acknowledge: boolean) => void;
|
|
8
|
+
onEdit?: () => void;
|
|
9
|
+
onQuit: () => void;
|
|
10
|
+
};
|
|
11
|
+
export declare function WizardPreviewStep({ preview, spaceId, environmentId, onConfirm, onEdit, onQuit, }: WizardPreviewStepProps): React.ReactElement;
|
|
12
|
+
export {};
|
package/{legacy/dist/src/import → dist/src/tui/import/steps/10-flow/support}/path-utils.d.ts
RENAMED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Expands a leading `~` to the user's home directory.
|
|
3
|
-
* Exported separately so it can be unit-tested and reused.
|
|
4
|
-
*/
|
|
5
|
-
export declare function expandTilde(input: string): string;
|
|
6
1
|
/**
|
|
7
2
|
* Normalizes a user-entered path to an absolute path, handling all common
|
|
8
3
|
* terminal path styles:
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ChangeClassification, ComponentTypeSummary } from '@contentful/experience-design-system-types';
|
|
2
|
+
export interface PropertyDiffLine {
|
|
3
|
+
key: string;
|
|
4
|
+
color: string;
|
|
5
|
+
text: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function computeComponentDiffLines(current: ComponentTypeSummary, proposed: Record<string, unknown>, changeClassification?: ChangeClassification): PropertyDiffLine[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { FlowState } from '../flow/types.js';
|
|
2
|
+
/** What an import produced, so the screens after the work can describe what happened and not a fixed pair. */
|
|
3
|
+
export interface Produced {
|
|
4
|
+
components: boolean;
|
|
5
|
+
tokens: boolean;
|
|
6
|
+
}
|
|
7
|
+
/** Components exist when extraction ran; tokens exist when the token stage left a catalog or a session behind. */
|
|
8
|
+
export declare function producedOf(state: Pick<FlowState, 'extractSessionId' | 'tokensPath' | 'tokenSessionId'>): Produced;
|
|
9
|
+
/**
|
|
10
|
+
* How the saved file is described: the file is always named `components.json`, but when only tokens were generated it
|
|
11
|
+
* holds just the tokens, and calling it a components file would mislead.
|
|
12
|
+
*/
|
|
13
|
+
export declare function fileSummaryLabel({ components }: Produced): string;
|
|
14
|
+
/** "component types and design tokens", "design tokens", or "component types": the things this run writes. */
|
|
15
|
+
export declare function writtenThings({ components, tokens }: Produced): string;
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
export declare function shouldGenerateAfterScopeGate(opts: {
|
|
2
|
-
acceptedCount: number;
|
|
3
|
-
}): boolean;
|
|
4
|
-
export declare function shouldGenerateAfterCredentialsValidated(opts: {
|
|
5
|
-
acceptedCount: number;
|
|
6
|
-
}): boolean;
|
|
7
|
-
export declare function shouldSkipFinalReviewAfterCredentials(state: {
|
|
8
|
-
generateSessionId: string | null;
|
|
9
|
-
finalReviewPassed: boolean;
|
|
10
|
-
}): boolean;
|
|
11
|
-
export declare function resolveNoCacheForGenerate(opts: {
|
|
12
|
-
cliNoCache: boolean;
|
|
13
|
-
}): boolean;
|
|
14
1
|
export declare function shouldBypassPreview(state: {
|
|
15
2
|
credentialsSkipped: boolean;
|
|
16
3
|
}): boolean;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
+
export { PreflightScreen } from './00-preflight/screen.js';
|
|
1
2
|
export { WelcomeScreen } from './01-welcome/screen.js';
|
|
2
3
|
export { TokenInputScreen } from './02-token-input/screen.js';
|
|
4
|
+
export { PathValidationScreen } from './03-path-validation/screen.js';
|
|
5
|
+
export { CredentialsScreen } from './04-credentials/screen.js';
|
|
6
|
+
export { ExtractionScreen } from './06-extraction/screen.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface PreviewValidationError {
|
|
2
|
+
componentName: string;
|
|
3
|
+
path: string;
|
|
4
|
+
message: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function matchedComponentNames(errors: readonly PreviewValidationError[], missingNames: readonly string[]): string[];
|
|
7
|
+
export declare function formatErrorLines(errors: readonly PreviewValidationError[]): string;
|
|
8
|
+
export declare function contextText(errors: readonly PreviewValidationError[], missingNames: readonly string[]): string;
|
|
9
|
+
export declare function skipLabel(matchedNames: readonly string[]): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type PreviewValidationError } from './logic.js';
|
|
3
|
+
interface PreviewValidationErrorScreenProps {
|
|
4
|
+
errors: readonly PreviewValidationError[];
|
|
5
|
+
missingNames: readonly string[];
|
|
6
|
+
onEdit: () => void;
|
|
7
|
+
onSkip: () => void;
|
|
8
|
+
onQuit: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function PreviewValidationErrorScreen({ errors, missingNames, onEdit, onSkip, onQuit, }: PreviewValidationErrorScreenProps): React.ReactElement;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type AgentName } from '@contentful/experience-design-system-backend-pipeline';
|
|
3
|
+
import { type AgentConfig } from './agent-store.js';
|
|
4
|
+
/**
|
|
5
|
+
* One agent's screen: what was found for it, its two settings, and the test. Saving writes the whole agent config, so the
|
|
6
|
+
* default agent and the other agents are kept. The test uses the values on screen, saved or not.
|
|
7
|
+
*/
|
|
8
|
+
export declare function AgentDetail({ name, config, setConfig, onBack, record, }: {
|
|
9
|
+
name: AgentName;
|
|
10
|
+
config: AgentConfig;
|
|
11
|
+
setConfig: (config: AgentConfig) => void;
|
|
12
|
+
onBack: () => void;
|
|
13
|
+
/** Adds a line to the debug log of this visit. The Agents list owns the log, since it is the screen that is open. */
|
|
14
|
+
record: (action: string, error?: unknown) => void;
|
|
15
|
+
}): React.ReactElement;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AgentName } from '@contentful/experience-design-system-backend-pipeline';
|
|
3
|
+
import { type AgentCheck, type StatusRow } from './agent-status.js';
|
|
4
|
+
export declare const TONE_COLOR: Record<StatusRow['tone'], string>;
|
|
5
|
+
/** The symbol and one-word state for an agent, shown on its row in the list. `binary` is the saved path, empty when none is saved. */
|
|
6
|
+
export declare function AgentStatusBadge({ name, checks, binary, }: {
|
|
7
|
+
name: AgentName;
|
|
8
|
+
checks: AgentCheck[] | undefined;
|
|
9
|
+
binary: string;
|
|
10
|
+
}): React.ReactElement;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Settings > Configuration > Agents. The list holds only what is needed to pick an agent: the name, a star on the default,
|
|
4
|
+
* and a one-word status. Below it, a panel shows the full detail for the focused agent and follows the cursor, so nothing
|
|
5
|
+
* has to be opened to read it. The "Default agent" line at the top is read-only: ↑/↓ move through the agents, Enter makes
|
|
6
|
+
* the focused one the default (saved at once), and → opens its own screen, where its path and model are edited and the
|
|
7
|
+
* test is run.
|
|
8
|
+
*/
|
|
9
|
+
export declare function AgentsScreen({ onDone }: {
|
|
10
|
+
onDone: () => void;
|
|
11
|
+
}): React.ReactElement;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type AgentName } from '@contentful/experience-design-system-backend-pipeline';
|
|
2
|
+
import type { Snapshot } from '../../shared/debug-trail.js';
|
|
3
|
+
import type { AgentConfig } from './agent-store.js';
|
|
4
|
+
/**
|
|
5
|
+
* The agent settings as flat text, for `diffSnapshots`: `default_agent`, then `<agent>.model` and `<agent>.binary` for
|
|
6
|
+
* every agent. Taken on entry and on exit, so the log shows what a visit changed.
|
|
7
|
+
*/
|
|
8
|
+
export declare function agentSnapshot(config: AgentConfig): Snapshot;
|
|
9
|
+
export type AgentEnvironment = {
|
|
10
|
+
/** Whether the command was found, and the path it resolved to. */
|
|
11
|
+
found: boolean;
|
|
12
|
+
resolved_path: string;
|
|
13
|
+
version: string;
|
|
14
|
+
/**
|
|
15
|
+
* The `EDS_AGENT_BINARY_<AGENT>` variable when it points somewhere other than the saved path. Settings copies a saved
|
|
16
|
+
* path into that variable at startup, so a value equal to the saved path is not an override and is left out.
|
|
17
|
+
*/
|
|
18
|
+
env_override: string;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* What is true about each agent on this machine, so "my agent does not work" can be read from the log: found or not,
|
|
22
|
+
* where, its version, and whether a shell variable is overriding the saved path. Uses the quick checks only, so it never
|
|
23
|
+
* spends a prompt.
|
|
24
|
+
*/
|
|
25
|
+
export declare function describeAgents(config: AgentConfig): Promise<Record<AgentName, AgentEnvironment>>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { type AgentName } from '@contentful/experience-design-system-backend-pipeline';
|
|
2
|
+
type AgentCheckStep = 'path' | 'version' | 'login' | 'prompt';
|
|
3
|
+
export type AgentCheck = {
|
|
4
|
+
step: AgentCheckStep;
|
|
5
|
+
ok: boolean;
|
|
6
|
+
/** One line for the user: the version string, the reason it failed, or what to run next. */
|
|
7
|
+
detail: string;
|
|
8
|
+
/** Only on the prompt step: the agent did not answer in time. That is not the same as a failure or a missing login. */
|
|
9
|
+
timedOut?: boolean;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* The one-word state shown on an agent's row. `not-configured` means no path is saved and the command is not on the
|
|
13
|
+
* PATH; `not-found` means a saved path does not work. `unknown` means it runs but its login cannot be checked.
|
|
14
|
+
*/
|
|
15
|
+
export type AgentStatus = 'checking' | 'ready' | 'not-configured' | 'not-found' | 'not-logged-in' | 'test-failed' | 'timed-out' | 'unknown';
|
|
16
|
+
/** The model the agent runs with when none is saved ("haiku", "gpt-mini", or the agent's own pick), for the model row. */
|
|
17
|
+
export declare function defaultModelLabel(name: AgentName): string;
|
|
18
|
+
/**
|
|
19
|
+
* Steps 1 to 3 against `binary`. Never throws and never spends tokens, so it is safe to run for every row on open.
|
|
20
|
+
* Checks the path the user typed, not what is saved, so the form can test a value before it is written.
|
|
21
|
+
*/
|
|
22
|
+
export declare function inspectAgent(name: AgentName, binary: string): Promise<AgentCheck[]>;
|
|
23
|
+
/** Steps 1 to 4. The prompt step is the only way to verify login and model name for agents other than claude. */
|
|
24
|
+
export declare function testAgent(name: AgentName, binary: string, model: string): Promise<AgentCheck[]>;
|
|
25
|
+
/** Collapses a list of checks into the status shown on the row. */
|
|
26
|
+
export declare function statusFromChecks(name: AgentName, checks: readonly AgentCheck[], savedBinary: string): AgentStatus;
|
|
27
|
+
export type StatusRow = {
|
|
28
|
+
label: string;
|
|
29
|
+
value: string;
|
|
30
|
+
tone: 'ok' | 'bad' | 'muted';
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* How a full test went, in one line for a banner on the agent's screen. Undefined when no test has run (the quick checks
|
|
34
|
+
* alone are not a test), so the banner only appears after the user asked for one.
|
|
35
|
+
*/
|
|
36
|
+
export declare function testOutcome(checks: readonly AgentCheck[] | undefined): {
|
|
37
|
+
ok: boolean;
|
|
38
|
+
text: string;
|
|
39
|
+
} | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* The short form of a status for the list, where every row has to be scannable at a glance. The wording is plainer than
|
|
42
|
+
* the detail panel's: "not installed" covers both "nothing saved" and "saved path broken", which the panel tells apart.
|
|
43
|
+
*/
|
|
44
|
+
export declare const LIST_STATUS: Record<AgentStatus, {
|
|
45
|
+
symbol: string;
|
|
46
|
+
text: string;
|
|
47
|
+
tone: StatusRow['tone'];
|
|
48
|
+
}>;
|
|
49
|
+
/**
|
|
50
|
+
* The rows of the detail panel under the list, for the focused agent. Everything here is read-only and comes from
|
|
51
|
+
* checks already collected, so moving the cursor never runs anything.
|
|
52
|
+
*/
|
|
53
|
+
export declare function panelRows(name: AgentName, checks: readonly AgentCheck[] | undefined, settings: {
|
|
54
|
+
binary: string;
|
|
55
|
+
model: string;
|
|
56
|
+
}): StatusRow[];
|
|
57
|
+
/**
|
|
58
|
+
* What the Status section of an agent's screen shows: the shared rows, then the login and the test, which only this
|
|
59
|
+
* view has. The login row is always there once the command is found, because for most agents it has to say that login
|
|
60
|
+
* cannot be checked without a test.
|
|
61
|
+
*/
|
|
62
|
+
export declare function statusRows(name: AgentName, checks: readonly AgentCheck[] | undefined, savedBinary: string): StatusRow[];
|
|
63
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type AgentName } from '@contentful/experience-design-system-backend-pipeline';
|
|
2
|
+
export type AgentSettings = {
|
|
3
|
+
/** Passed as --model. Empty: the agent's built-in default (see defaultModelLabel). */
|
|
4
|
+
model: string;
|
|
5
|
+
/** Path to the agent's command. Empty: the command name is looked up on the PATH. */
|
|
6
|
+
binary: string;
|
|
7
|
+
};
|
|
8
|
+
export type AgentConfig = {
|
|
9
|
+
/** The agent the CLI uses when `--agent` is not given. Claude when nothing was chosen. */
|
|
10
|
+
defaultAgent: AgentName;
|
|
11
|
+
/**
|
|
12
|
+
* Whether the user chose the default agent. Only then is `agent` written to config.json, so someone who never chose
|
|
13
|
+
* keeps the import's built-in default, including if that default changes in a later version.
|
|
14
|
+
*/
|
|
15
|
+
defaultChosen?: boolean;
|
|
16
|
+
agents: Record<AgentName, AgentSettings>;
|
|
17
|
+
};
|
|
18
|
+
export declare const AGENT_LABELS: Record<AgentName, string>;
|
|
19
|
+
export declare function emptyAgents(): Record<AgentName, AgentSettings>;
|
|
20
|
+
export declare function readAgentConfig(): Promise<AgentConfig>;
|
|
21
|
+
export declare function writeAgentConfig(config: AgentConfig): Promise<void>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { AgentConfig } from './agent-store.js';
|
|
2
|
+
/**
|
|
3
|
+
* The pipeline picks an agent's binary from `EDS_AGENT_BINARY_<AGENT>` and nowhere else. This copies each saved
|
|
4
|
+
* `agents.<name>.binary` into that variable, so the saved path reaches every place that spawns an agent (the import,
|
|
5
|
+
* the generation package and the legacy commands) without touching their call sites.
|
|
6
|
+
*
|
|
7
|
+
* Called once at startup, and again after Settings saves a binary so a change applies without a restart.
|
|
8
|
+
*
|
|
9
|
+
* Settings wins over a variable already in the shell, so a forgotten `EDS_AGENT_BINARY_CLAUDE` cannot silently override
|
|
10
|
+
* what the user sees on screen. An agent with no saved path leaves the shell's variable alone, and clearing a path
|
|
11
|
+
* puts the shell's value back.
|
|
12
|
+
*/
|
|
13
|
+
export declare function applyBinaryOverrides(config: AgentConfig): void;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
/** How long a debug log is kept before the CLI deletes it. Only these values are offered. */
|
|
2
|
+
export declare const RETENTION_CHOICES: readonly [7, 14, 30];
|
|
3
|
+
type RetentionDays = (typeof RETENTION_CHOICES)[number];
|
|
1
4
|
export type DebugModeSetting = {
|
|
2
5
|
enabled: boolean;
|
|
6
|
+
retentionDays: RetentionDays;
|
|
3
7
|
};
|
|
4
8
|
export declare function readDebugModeSetting(): Promise<DebugModeSetting>;
|
|
5
|
-
|
|
9
|
+
/** Saves the given fields and keeps the others, so turning logging off does not forget the retention. */
|
|
10
|
+
export declare function writeDebugModeSetting(change: Partial<DebugModeSetting>): Promise<void>;
|
|
11
|
+
export {};
|