@contentful/experience-design-system-cli 2.38.0 → 2.38.1-dev-build-6d903339.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 +3 -6
- package/dist/app.js +28155 -642
- package/dist/index.js +32060 -421
- package/dist/package.json +8 -3
- package/dist/src/commands/import-options.d.ts +12 -0
- package/dist/src/commands/import.d.ts +2 -1
- package/dist/src/tui/home/home.theme.d.ts +1 -2
- 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 +14 -0
- package/dist/src/tui/import/shared/gate-step/logic.d.ts +11 -0
- package/dist/src/tui/import/shared/index.d.ts +3 -0
- package/dist/src/tui/import/shared/running-step/logic.d.ts +12 -0
- package/dist/src/tui/import/shared/running-step/running-step.d.ts +11 -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/03-path-validation/controls.d.ts +13 -0
- package/dist/src/tui/import/steps/03-path-validation/helpers/scan-files.d.ts +10 -0
- package/dist/src/tui/import/steps/03-path-validation/logic.d.ts +43 -0
- package/dist/src/tui/import/steps/03-path-validation/screen.d.ts +12 -0
- package/dist/src/tui/import/steps/04-credentials/controls.d.ts +21 -0
- package/dist/src/tui/import/steps/04-credentials/logic.d.ts +15 -0
- package/dist/src/tui/import/steps/04-credentials/screen.d.ts +17 -0
- package/dist/src/tui/import/steps/04-credentials/validate.d.ts +8 -0
- package/dist/src/tui/import/steps/05-token-reuse/logic.d.ts +21 -0
- package/dist/src/tui/import/steps/05-token-reuse/screen.d.ts +10 -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 +48 -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 +10 -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 +46 -0
- package/dist/src/tui/import/steps/06-extraction/use-extraction.d.ts +14 -0
- package/dist/src/tui/import/steps/07-scope-gate/cache-check.d.ts +17 -0
- package/{legacy/dist/src/import/tui/scope-gate-columns.d.ts → dist/src/tui/import/steps/07-scope-gate/columns.d.ts} +22 -2
- package/dist/src/tui/import/steps/07-scope-gate/graph/composite-closure.d.ts +26 -0
- package/dist/src/tui/import/steps/07-scope-gate/graph/cycle-detection.d.ts +27 -0
- package/dist/src/tui/import/steps/07-scope-gate/graph/fuzzy-search.d.ts +3 -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 +29 -0
- package/dist/src/tui/import/steps/07-scope-gate/graph/search-neighborhood.d.ts +3 -0
- package/dist/src/tui/import/steps/07-scope-gate/graph/slot-graph.d.ts +11 -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/dist/src/tui/import/steps/07-scope-gate/sidebar/components/GotoBanner.d.ts +32 -0
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/components/GroupedSidebar.d.ts +93 -0
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/components/HelpOverlay.d.ts +21 -0
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/components/badge.d.ts +13 -0
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/components/windowed-panel.d.ts +31 -0
- 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/hooks/use-terminal-size.d.ts +6 -0
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/hooks/useImmediateInput.d.ts +19 -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/dist/src/tui/import/steps/07-scope-gate/sidebar/theme.d.ts +8 -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 +76 -0
- package/dist/src/tui/import/steps/08-generation/logic.d.ts +27 -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 +22 -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 +12 -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/dist/src/tui/import/steps/09-review/components/ComponentRationalePanel.d.ts +10 -0
- package/dist/src/tui/import/steps/09-review/components/FieldEditor.d.ts +67 -0
- package/dist/src/tui/import/steps/09-review/components/FinalizeDialog.d.ts +22 -0
- package/dist/src/tui/import/steps/09-review/components/HighlightedLine.d.ts +9 -0
- package/dist/src/tui/import/steps/09-review/components/JsonPanel.d.ts +11 -0
- package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/components/LivePreviewSummary.d.ts +2 -2
- package/dist/src/tui/import/steps/09-review/components/QuitDialog.d.ts +8 -0
- package/dist/src/tui/import/steps/09-review/components/RationaleLine.d.ts +21 -0
- package/dist/src/tui/import/steps/09-review/components/RationalePanel.d.ts +15 -0
- 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/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/components/ReviewDialogs.d.ts +2 -2
- package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/components/ReviewStatus.d.ts +1 -1
- package/dist/src/tui/import/steps/09-review/components/ScrollablePanel.d.ts +14 -0
- package/dist/src/tui/import/steps/09-review/components/TokenReviewPanel.d.ts +30 -0
- package/dist/src/tui/import/steps/09-review/components/removed-components-text.d.ts +7 -0
- package/dist/src/tui/import/steps/09-review/components/wrap-text.d.ts +1 -0
- package/{legacy/dist/src/import/tui/steps/GenerateReviewStep.d.ts → dist/src/tui/import/steps/09-review/generate-review-step.d.ts} +1 -1
- 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/dist/src/tui/import/steps/09-review/graph/issue-inheritance.d.ts +8 -0
- package/dist/src/tui/import/steps/09-review/graph/selection-cascade.d.ts +3 -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/dist/src/tui/import/steps/09-review/preview-annotations.d.ts +26 -0
- 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 -3
- package/dist/src/tui/import/steps/09-review/scroll-offset.d.ts +30 -0
- package/dist/src/tui/import/steps/09-review/session.d.ts +26 -0
- package/dist/src/tui/import/steps/09-review/theme.d.ts +9 -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/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 +21 -0
- package/dist/src/tui/import/steps/10-flow/flow/controller.d.ts +65 -0
- package/dist/src/tui/import/steps/10-flow/flow/preview.d.ts +56 -0
- package/dist/src/tui/import/steps/10-flow/flow/push.d.ts +43 -0
- package/dist/src/tui/import/steps/10-flow/flow/save.d.ts +50 -0
- package/dist/src/tui/import/steps/10-flow/flow/screen.d.ts +17 -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 +9 -0
- package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/10-flow/screens}/PushingStep.d.ts +1 -1
- package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/10-flow/screens}/WizardPreviewStep.d.ts +0 -1
- package/dist/src/tui/import/steps/10-flow/support/contentful-urls.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/10-flow/theme.d.ts +13 -0
- package/dist/src/tui/import/steps/index.d.ts +4 -0
- package/dist/src/tui/import/steps/preview-validation-error/logic.d.ts +12 -0
- package/dist/src/tui/import/steps/preview-validation-error/screen.d.ts +11 -0
- package/dist/src/tui/user-agent.d.ts +5 -0
- package/legacy/dist/package.json +4 -1
- package/legacy/dist/src/analyze/select/tui/components/ScrollablePanel.d.ts +2 -2
- package/legacy/dist/src/analyze/select/tui/theme.d.ts +1 -1
- package/legacy/dist/src/index.js +15073 -23076
- package/legacy/package.json +8 -3
- package/package.json +8 -3
- package/skills/generate-components.md +612 -0
- package/skills/generate-tokens.md +194 -0
- package/skills/map-tokens.md +102 -0
- package/skills/select-components.md +235 -0
- package/dist/src/tui/import/spawn-v1-import.d.ts +0 -29
- package/dist/src/tui/import/terminal-input.d.ts +0 -2
- 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/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/PathValidationStep.d.ts +0 -10
- package/legacy/dist/src/import/tui/steps/PreviewValidationErrorStep.d.ts +0 -11
- 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/wizard-422-helpers.d.ts +0 -48
- package/legacy/dist/src/import/tui/wizard-generate-progress.d.ts +0 -21
- /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/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/ai-flag.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/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/components/LegendEntry.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/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}/lineage-layout.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/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/step-filters.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}/cycle-panel-scroll.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/import/tui/steps → dist/src/tui/import/steps/09-review}/review-json-panel.d.ts +0 -0
- /package/{legacy/dist/src/import/tui/useFinalizePreview.d.ts → dist/src/tui/import/steps/09-review/use-finalize-preview.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/import/tui → dist/src/tui/import/steps/10-flow}/components/StepHeader.d.ts +0 -0
- /package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/10-flow/screens}/DoneStep.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/import → dist/src/tui/import/steps/10-flow/support}/path-utils.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/steps → dist/src/tui/import/steps/10-flow/support}/preview-diff.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.38.0",
|
|
3
|
+
"version": "2.38.1-dev-build-6d903339.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"files": [
|
|
26
26
|
"bin/",
|
|
27
27
|
"dist/",
|
|
28
|
-
"legacy/"
|
|
28
|
+
"legacy/",
|
|
29
|
+
"skills/"
|
|
29
30
|
],
|
|
30
31
|
"scripts": {
|
|
31
32
|
"build": "nx build experience-design-system-cli",
|
|
@@ -37,10 +38,12 @@
|
|
|
37
38
|
"dev": "node scripts/dev.mjs"
|
|
38
39
|
},
|
|
39
40
|
"dependencies": {
|
|
41
|
+
"@contentful/experience-design-system-backend-pipeline": "workspace:*",
|
|
40
42
|
"@contentful/experience-design-system-types": "workspace:*",
|
|
41
43
|
"@inkjs/ui": "^2.0.0",
|
|
42
44
|
"@segment/analytics-node": "^3.0.0",
|
|
43
45
|
"@vue/compiler-sfc": "^3.5.31",
|
|
46
|
+
"ajv": "^8.18.0",
|
|
44
47
|
"commander": "^13.1.0",
|
|
45
48
|
"contentful-management": "^12.17.0",
|
|
46
49
|
"figures": "6.1.0",
|
|
@@ -51,7 +54,8 @@
|
|
|
51
54
|
"semver": "^7.7.2",
|
|
52
55
|
"svelte": "^5.56.4",
|
|
53
56
|
"ts-morph": "^27.0.2",
|
|
54
|
-
"typescript": "^5.9.3"
|
|
57
|
+
"typescript": "^5.9.3",
|
|
58
|
+
"zod": "^4.6.5"
|
|
55
59
|
},
|
|
56
60
|
"devDependencies": {
|
|
57
61
|
"@tsconfig/node24": "^24.0.4",
|
|
@@ -62,6 +66,7 @@
|
|
|
62
66
|
"eslint": "^9.39.5",
|
|
63
67
|
"eslint-config-prettier": "^10.1.8",
|
|
64
68
|
"eslint-plugin-prettier": "^5.5.6",
|
|
69
|
+
"ink-testing-library": "^4.0.0",
|
|
65
70
|
"typescript-eslint": "^8.67.0",
|
|
66
71
|
"vitest": "^4.0.16"
|
|
67
72
|
},
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ImportOptions {
|
|
2
|
+
agent?: string;
|
|
3
|
+
prompt: string[];
|
|
4
|
+
cache: boolean;
|
|
5
|
+
}
|
|
6
|
+
interface RawImportOptions {
|
|
7
|
+
agent?: string;
|
|
8
|
+
prompt?: string[];
|
|
9
|
+
cache?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function toImportOptions(raw: RawImportOptions): ImportOptions;
|
|
12
|
+
export {};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import type { Command } from 'commander';
|
|
2
|
-
|
|
2
|
+
import { type ImportOptions } from './import-options.js';
|
|
3
|
+
export declare function registerImportCommand(program: Command, openTui: (options: ImportOptions) => Promise<void>): void;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
export declare const PALETTE: {
|
|
2
2
|
readonly accent: "#1773EB";
|
|
3
|
-
readonly heading: "#FFFFFF";
|
|
4
3
|
readonly success: "#00C459";
|
|
5
4
|
readonly error: "#E44F20";
|
|
6
5
|
readonly warning: "#FFDA00";
|
|
7
|
-
readonly muted: "#
|
|
6
|
+
readonly muted: "#8B8D91";
|
|
8
7
|
readonly border: "#C4D1DE";
|
|
9
8
|
};
|
|
10
9
|
export declare function brandBar(width: number, ramp?: readonly string[]): {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resolveUserPath(raw: string): string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
interface ErrorStepProps {
|
|
3
3
|
stepName: string;
|
|
4
4
|
message: string;
|
|
5
5
|
onExit: () => void;
|
|
6
6
|
onRetryCredentials?: () => void;
|
|
7
7
|
onAcknowledgeBreakingChanges?: () => void;
|
|
8
|
-
}
|
|
8
|
+
}
|
|
9
9
|
export declare function ErrorStep({ stepName, message, onExit, onRetryCredentials, onAcknowledgeBreakingChanges, }: ErrorStepProps): React.ReactElement;
|
|
10
10
|
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface Key {
|
|
2
|
+
return: boolean;
|
|
3
|
+
escape: boolean;
|
|
4
|
+
}
|
|
5
|
+
export type ErrorAction = 'exit' | 'retry' | 'acknowledge' | null;
|
|
6
|
+
interface Available {
|
|
7
|
+
canRetry: boolean;
|
|
8
|
+
canAcknowledge: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function errorAction(input: string, key: Key, available: Available): ErrorAction;
|
|
11
|
+
export declare function errorControls(available: Available): {
|
|
12
|
+
keys: string;
|
|
13
|
+
label: string;
|
|
14
|
+
}[];
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface GateStepProps {
|
|
3
|
+
message: string;
|
|
4
|
+
onContinue: () => void;
|
|
5
|
+
onQuit: () => void;
|
|
6
|
+
summary?: string;
|
|
7
|
+
context?: string;
|
|
8
|
+
continueLabel?: string;
|
|
9
|
+
skipLabel?: string;
|
|
10
|
+
onSkip?: () => void;
|
|
11
|
+
intent?: 'success' | 'error';
|
|
12
|
+
}
|
|
13
|
+
export declare function GateStep({ message, onContinue, onQuit, summary, context, continueLabel, skipLabel, onSkip, intent, }: GateStepProps): React.ReactElement;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface Key {
|
|
2
|
+
return: boolean;
|
|
3
|
+
escape: boolean;
|
|
4
|
+
}
|
|
5
|
+
export type GateAction = 'continue' | 'skip' | 'quit' | null;
|
|
6
|
+
export declare function gateAction(input: string, key: Key, canSkip: boolean): GateAction;
|
|
7
|
+
export declare function gateControls(continueLabel: string, skipLabel: string, canSkip: boolean): {
|
|
8
|
+
keys: string;
|
|
9
|
+
label: string;
|
|
10
|
+
}[];
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface Progress {
|
|
2
|
+
done: number;
|
|
3
|
+
total: number;
|
|
4
|
+
}
|
|
5
|
+
export interface RunningLine {
|
|
6
|
+
text: string;
|
|
7
|
+
complete?: boolean;
|
|
8
|
+
progress?: Progress;
|
|
9
|
+
}
|
|
10
|
+
export declare function progressPercent(progress: Progress): number;
|
|
11
|
+
export declare function formatElapsed(totalSeconds: number): string;
|
|
12
|
+
export declare function stepLabel(stepNumber: number, totalSteps: number, title: string): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type RunningLine } from './logic.js';
|
|
3
|
+
interface RunningStepProps {
|
|
4
|
+
stepNumber: number;
|
|
5
|
+
totalSteps: number;
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
lines?: readonly RunningLine[];
|
|
9
|
+
}
|
|
10
|
+
export declare function RunningStep({ stepNumber, totalSteps, title, description, lines, }: RunningStepProps): React.ReactElement;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useElapsed(): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type PathPhase } from './logic.js';
|
|
2
|
+
interface Control {
|
|
3
|
+
keys: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
interface PathValidationHandlers {
|
|
7
|
+
onConfirm: () => void;
|
|
8
|
+
onChangePath: () => void;
|
|
9
|
+
onBack: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function controlsFor(phase: PathPhase): readonly Control[];
|
|
12
|
+
export declare function usePathValidationControls(phase: PathPhase, handlers: PathValidationHandlers): void;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { collectFiles } from '@contentful/experience-design-system-backend-pipeline';
|
|
2
|
+
import type { FileCounts as LocalFileCounts, ScanResult } from '../logic.js';
|
|
3
|
+
type CollectedFilesOutcome = ReturnType<typeof collectFiles>;
|
|
4
|
+
type PipelineFileCounts = Extract<CollectedFilesOutcome, {
|
|
5
|
+
ok: true;
|
|
6
|
+
}>['result']['counts'];
|
|
7
|
+
export declare function scanFiles(directory: string): ScanResult;
|
|
8
|
+
export declare function toScanResult(outcome: CollectedFilesOutcome): ScanResult;
|
|
9
|
+
export declare function foldSvelteAndMdIntoOther(counts: PipelineFileCounts): LocalFileCounts;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
type FileCategory = 'tsx' | 'ts' | 'vue' | 'astro' | 'jsx' | 'js' | 'json' | 'other';
|
|
2
|
+
export type FileCounts = Record<FileCategory, number> & {
|
|
3
|
+
total: number;
|
|
4
|
+
};
|
|
5
|
+
export type ScanFailureCode = 'not-found' | 'permission-denied' | 'is-file' | 'not-directory' | 'unreadable';
|
|
6
|
+
export type ScanResult = {
|
|
7
|
+
ok: true;
|
|
8
|
+
counts: FileCounts;
|
|
9
|
+
filePaths: string[];
|
|
10
|
+
warnings: string[];
|
|
11
|
+
} | {
|
|
12
|
+
ok: false;
|
|
13
|
+
failure: ScanFailureCode;
|
|
14
|
+
};
|
|
15
|
+
export type PathPhase = 'scanning' | 'ready' | 'failed';
|
|
16
|
+
export type KeyAction = 'confirm' | 'change-path' | 'back';
|
|
17
|
+
export interface SummaryRow {
|
|
18
|
+
label: string;
|
|
19
|
+
count: number;
|
|
20
|
+
tone: 'default' | 'accent' | 'muted';
|
|
21
|
+
}
|
|
22
|
+
export interface Summary {
|
|
23
|
+
total: number;
|
|
24
|
+
rows: SummaryRow[];
|
|
25
|
+
warning?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface FailureMessage {
|
|
28
|
+
headline: string;
|
|
29
|
+
hints: string[];
|
|
30
|
+
}
|
|
31
|
+
interface Key {
|
|
32
|
+
escape: boolean;
|
|
33
|
+
return: boolean;
|
|
34
|
+
}
|
|
35
|
+
export declare function emptyCounts(): FileCounts;
|
|
36
|
+
export declare function addFile(counts: FileCounts, fileName: string): FileCounts;
|
|
37
|
+
export declare function mergeCounts(a: FileCounts, b: FileCounts): FileCounts;
|
|
38
|
+
export declare function failureFromErrorCode(code: string | undefined): ScanFailureCode;
|
|
39
|
+
export declare function describeFailure(failure: ScanFailureCode, path: string): FailureMessage;
|
|
40
|
+
export declare function summarize(counts: FileCounts): Summary;
|
|
41
|
+
export declare function phaseOf(scan: ScanResult | undefined): PathPhase;
|
|
42
|
+
export declare function keyAction(phase: PathPhase, input: string, key: Key): KeyAction | undefined;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface PathValidationScreenProps {
|
|
3
|
+
projectPath: string;
|
|
4
|
+
onConfirm: (result: {
|
|
5
|
+
projectPath: string;
|
|
6
|
+
filePaths: string[];
|
|
7
|
+
}) => void;
|
|
8
|
+
onChangePath: () => void;
|
|
9
|
+
onBack: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function PathValidationScreen({ projectPath, onConfirm, onChangePath, onBack, }: PathValidationScreenProps): React.ReactElement;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const CREDENTIALS_CONTROLS: readonly [{
|
|
2
|
+
readonly keys: "Enter";
|
|
3
|
+
readonly label: "Next field / Continue";
|
|
4
|
+
}, {
|
|
5
|
+
readonly keys: "Tab";
|
|
6
|
+
readonly label: "Switch field";
|
|
7
|
+
}, {
|
|
8
|
+
readonly keys: "Ctrl+S";
|
|
9
|
+
readonly label: "Skip (no push)";
|
|
10
|
+
}, {
|
|
11
|
+
readonly keys: "Esc";
|
|
12
|
+
readonly label: "Back";
|
|
13
|
+
}];
|
|
14
|
+
interface CredentialsHandlers {
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
onBack: () => void;
|
|
17
|
+
onNextField: () => void;
|
|
18
|
+
onSkip: () => void;
|
|
19
|
+
}
|
|
20
|
+
export declare function useCredentialsControls(handlers: CredentialsHandlers): void;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const FIELDS: readonly ["spaceId", "environmentId", "cmaToken", "host"];
|
|
2
|
+
export type CredentialField = (typeof FIELDS)[number];
|
|
3
|
+
export type CredentialValues = Record<CredentialField, string>;
|
|
4
|
+
interface Key {
|
|
5
|
+
escape: boolean;
|
|
6
|
+
tab: boolean;
|
|
7
|
+
ctrl: boolean;
|
|
8
|
+
}
|
|
9
|
+
export type KeyAction = 'back' | 'next-field' | 'skip' | null;
|
|
10
|
+
export declare function keyAction(input: string, key: Key): KeyAction;
|
|
11
|
+
export declare function nextField(field: CredentialField): CredentialField;
|
|
12
|
+
export declare function normalize(values: CredentialValues): CredentialValues;
|
|
13
|
+
export declare function missingField(values: CredentialValues): boolean;
|
|
14
|
+
export declare function isUnchanged(current: CredentialValues, initial: CredentialValues): boolean;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type CredentialValues } from './logic.js';
|
|
3
|
+
import { type ValidationResult } from './validate.js';
|
|
4
|
+
export type CredentialsResult = {
|
|
5
|
+
skipped: false;
|
|
6
|
+
credentials: CredentialValues;
|
|
7
|
+
} | {
|
|
8
|
+
skipped: true;
|
|
9
|
+
};
|
|
10
|
+
interface CredentialsScreenProps {
|
|
11
|
+
onDone: (result: CredentialsResult) => void;
|
|
12
|
+
onBack: () => void;
|
|
13
|
+
initial?: Partial<CredentialValues>;
|
|
14
|
+
validate?: (values: CredentialValues) => Promise<ValidationResult>;
|
|
15
|
+
}
|
|
16
|
+
export declare function CredentialsScreen({ onDone, onBack, initial, validate, }: CredentialsScreenProps): React.ReactElement;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type { TokenStrategy } from '../06-extraction/types.js';
|
|
2
|
+
export type TokensState = {
|
|
3
|
+
kind: 'none';
|
|
4
|
+
} | {
|
|
5
|
+
kind: 'cached';
|
|
6
|
+
tokensPath: string;
|
|
7
|
+
sourceChanged: boolean;
|
|
8
|
+
};
|
|
9
|
+
interface InspectInput {
|
|
10
|
+
rawTokensPath: string;
|
|
11
|
+
outDir: string;
|
|
12
|
+
cache: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function inspectTokens({ rawTokensPath, outDir, cache }: InspectInput): Promise<TokensState>;
|
|
15
|
+
export declare function gateText({ tokensPath, sourceChanged }: {
|
|
16
|
+
tokensPath: string;
|
|
17
|
+
sourceChanged: boolean;
|
|
18
|
+
}): {
|
|
19
|
+
summary: string;
|
|
20
|
+
context?: string;
|
|
21
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface TokenReuseScreenProps {
|
|
3
|
+
tokensPath: string;
|
|
4
|
+
sourceChanged: boolean;
|
|
5
|
+
onReuse: () => void;
|
|
6
|
+
onRegenerate: () => void;
|
|
7
|
+
onQuit: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function TokenReuseScreen({ tokensPath, sourceChanged, onReuse, onRegenerate, onQuit, }: TokenReuseScreenProps): React.ReactElement;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function findSkillPath(fileName: string): string;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ExtractAndComposeProgress } from '@contentful/experience-design-system-backend-pipeline';
|
|
2
|
+
import type { ExtractionProgress } from './types.js';
|
|
3
|
+
/** Structured progress events emitted by the orchestrator (extraction + composition). */
|
|
4
|
+
export type ProgressEvent = ExtractAndComposeProgress;
|
|
5
|
+
/**
|
|
6
|
+
* Every job the stage will run starts on the first frame, so no row appears later as a surprise. A job that does not
|
|
7
|
+
* apply stays 'idle' and has no row: existing entities need credentials, token definitions need a raw tokens file, and
|
|
8
|
+
* reused tokens are already complete.
|
|
9
|
+
*/
|
|
10
|
+
export declare function initialProgress(input: {
|
|
11
|
+
hasCredentials: boolean;
|
|
12
|
+
hasRawTokens: boolean;
|
|
13
|
+
reuseTokens: boolean;
|
|
14
|
+
}): ExtractionProgress;
|
|
15
|
+
export declare function applyProgressEvent(progress: ExtractionProgress, event: ProgressEvent): ExtractionProgress;
|
|
16
|
+
/** The rows the screen shows, in the order the wizard showed them. Rows that do not apply are left out. */
|
|
17
|
+
export declare function progressRows(progress: ExtractionProgress, agent: string): Array<{
|
|
18
|
+
text: string;
|
|
19
|
+
complete: boolean;
|
|
20
|
+
}>;
|
|
21
|
+
/** True when every job is already done, so the screen would only flash. The wizard shows nothing in this case. */
|
|
22
|
+
export declare function isFullCacheHit(progress: ExtractionProgress): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The wizard's step counts: three fixed steps, one more when there is a token stage, two more when components are
|
|
25
|
+
* imported, and one more when the tokens can be mapped (not known yet at this stage, so it adds nothing here).
|
|
26
|
+
* Extraction is step 2 when there is a token stage, otherwise step 1.
|
|
27
|
+
*/
|
|
28
|
+
export declare function stepNumbers(input: {
|
|
29
|
+
hasRawTokens: boolean;
|
|
30
|
+
skipComponents?: boolean;
|
|
31
|
+
mapTokensEligible?: boolean | null;
|
|
32
|
+
}): {
|
|
33
|
+
stepNumber: number;
|
|
34
|
+
totalSteps: number;
|
|
35
|
+
};
|
|
36
|
+
export declare function noComponentsMessage(projectPath: string): string;
|
|
37
|
+
export declare function agentAuthMessage(agent: string, status: 'not-found' | 'unauthenticated'): string;
|
|
38
|
+
/**
|
|
39
|
+
* The agent and model the import runs with: what was typed after `--agent` (either `agent` or `agent:model`), else
|
|
40
|
+
* what `experiences setup` saved, else Claude with no model. Same chain the legacy import command uses.
|
|
41
|
+
*/
|
|
42
|
+
export declare function resolveAgentChoice(flag: string | undefined, stored: {
|
|
43
|
+
agent?: unknown;
|
|
44
|
+
agentModel?: unknown;
|
|
45
|
+
}): {
|
|
46
|
+
agent: string;
|
|
47
|
+
agentModel?: string;
|
|
48
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { checkAgentAuth, runExtractAndComposeSession, runGenerateTokensSession } from '@contentful/experience-design-system-backend-pipeline';
|
|
2
|
+
import { runSelection } from './selection.js';
|
|
3
|
+
import type { ExtractionInput, ExtractionProgress, ExtractionResult } from './types.js';
|
|
4
|
+
/** The outside world the stage talks to, so the order of events can be tested without a network, an agent or a CLI. */
|
|
5
|
+
export interface ExtractionDeps {
|
|
6
|
+
checkAgentAuth: typeof checkAgentAuth;
|
|
7
|
+
fetchEntities: (credentials: NonNullable<ExtractionInput['credentials']>, outDir: string) => Promise<string | null>;
|
|
8
|
+
runExtractAndComposeSession: typeof runExtractAndComposeSession;
|
|
9
|
+
runGenerateTokensSession: typeof runGenerateTokensSession;
|
|
10
|
+
runSelection: typeof runSelection;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Runs the stage. The jobs overlap exactly as they did when extract was a
|
|
14
|
+
* subprocess:
|
|
15
|
+
*
|
|
16
|
+
* entities fetch ───────────────────┐
|
|
17
|
+
* extract + compose (in-process) │
|
|
18
|
+
* └─ onSessionCreated(id) ────────┴─ selection agent (waits for fetch) ──┐
|
|
19
|
+
* └──────────────────────── returns (composition done) ─────────────────┴─ result
|
|
20
|
+
* token generation (only when the tokens are not being reused)
|
|
21
|
+
*
|
|
22
|
+
* Selection starts the moment the orchestrator mints the sessionId, so it
|
|
23
|
+
* overlaps with composition. When more than one job fails, the error reported
|
|
24
|
+
* is the first of: extract, no components, selection, token generation.
|
|
25
|
+
*/
|
|
26
|
+
export declare function runExtraction(input: ExtractionInput, onProgress: (progress: ExtractionProgress) => void, deps?: ExtractionDeps): Promise<ExtractionResult>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ExtractionProgress } from './types.js';
|
|
3
|
+
interface ExtractionScreenProps {
|
|
4
|
+
progress: ExtractionProgress;
|
|
5
|
+
agent: string;
|
|
6
|
+
stepNumber: number;
|
|
7
|
+
totalSteps: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function ExtractionScreen({ progress, agent, stepNumber, totalSteps, }: ExtractionScreenProps): React.ReactElement;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type AgentName } from '@contentful/experience-design-system-backend-pipeline';
|
|
2
|
+
export interface SelectionOptions {
|
|
3
|
+
sessionId: string;
|
|
4
|
+
agent: AgentName;
|
|
5
|
+
model?: string;
|
|
6
|
+
promptText?: string;
|
|
7
|
+
promptPath?: string;
|
|
8
|
+
noCache: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The selection agent run, as the legacy wizard ran it.
|
|
12
|
+
*
|
|
13
|
+
* Reads the extracted components from the session database and skips the ones already decided (cache keyed by
|
|
14
|
+
* component hash, prompt hash and CLI version). It asks the agent about the rest, then writes accepted or rejected to
|
|
15
|
+
* raw_components and stores the new decisions in the cache in one transaction. Throws on a timeout, a non-zero exit,
|
|
16
|
+
* or a database error.
|
|
17
|
+
*/
|
|
18
|
+
export declare function runSelection(options: SelectionOptions): Promise<void>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ExtractionHandoff, ImportHandoff } from '@contentful/experience-design-system-types/handoff';
|
|
2
|
+
export type TokenStrategy = ImportHandoff['tokens']['strategy'];
|
|
3
|
+
export interface ExtractionInput {
|
|
4
|
+
projectPath: string;
|
|
5
|
+
/** Absolute source files from the path-validation step (collectFiles output). */
|
|
6
|
+
filePaths: string[];
|
|
7
|
+
/** Raw tokens file the user pointed at (always set: v2 asks for one). */
|
|
8
|
+
rawTokensPath: string;
|
|
9
|
+
/** From the token reuse step. 'reuse' skips token generation entirely. */
|
|
10
|
+
tokenStrategy: TokenStrategy;
|
|
11
|
+
/** Null when the user skipped credentials: no existing-entities fetch happens. */
|
|
12
|
+
credentials: {
|
|
13
|
+
spaceId: string;
|
|
14
|
+
environmentId: string;
|
|
15
|
+
cmaToken: string;
|
|
16
|
+
host: string;
|
|
17
|
+
} | null;
|
|
18
|
+
agent: string;
|
|
19
|
+
agentModel?: string;
|
|
20
|
+
promptOverrides: string[];
|
|
21
|
+
noCache: boolean;
|
|
22
|
+
}
|
|
23
|
+
type CompositionPhase = 'resolving' | 'cache-hit' | 'done' | `agent:${string}`;
|
|
24
|
+
type JobStatus = 'idle' | 'running' | 'complete' | 'failed';
|
|
25
|
+
/** Everything the extracting screen shows. One field per row. */
|
|
26
|
+
export interface ExtractionProgress {
|
|
27
|
+
scan: {
|
|
28
|
+
scanned: number;
|
|
29
|
+
total: number | null;
|
|
30
|
+
} | null;
|
|
31
|
+
composition: CompositionPhase;
|
|
32
|
+
selection: 'running' | 'complete';
|
|
33
|
+
existingEntities: JobStatus;
|
|
34
|
+
tokens: JobStatus;
|
|
35
|
+
}
|
|
36
|
+
/** The label the error screen shows, as the wizard labelled it. */
|
|
37
|
+
type ExtractionStepName = 'analyze extract' | 'selection agent' | 'generate tokens' | 'print tokens' | `${string} auth check`;
|
|
38
|
+
export type ExtractionResult = {
|
|
39
|
+
ok: true;
|
|
40
|
+
extraction: ExtractionHandoff;
|
|
41
|
+
} | {
|
|
42
|
+
ok: false;
|
|
43
|
+
step: ExtractionStepName;
|
|
44
|
+
message: string;
|
|
45
|
+
};
|
|
46
|
+
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,17 @@
|
|
|
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
|
+
/**
|
|
11
|
+
* Runs the generation cache check in-process while the scope gate is open.
|
|
12
|
+
* Restores cached CDF entries into the pipeline database as a side-effect so
|
|
13
|
+
* the generate run that follows can skip them. A failed check is
|
|
14
|
+
* indistinguishable from "nothing cached", as in legacy. INTEG-5050 tracks
|
|
15
|
+
* surfacing it.
|
|
16
|
+
*/
|
|
17
|
+
export declare function checkGenerationCache(input: CacheCheckInput): Promise<string[]>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { Closure } from '
|
|
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
|
-
|
|
6
|
+
import type { Decision } from './types.js';
|
|
7
7
|
export declare const SCOPE_GATE_MAIN_COLUMN_WIDTH = 54;
|
|
8
8
|
export declare const ACCEPTED_COMPONENTS_COLUMN_WIDTH = 36;
|
|
9
9
|
export interface ScopeGatePanelLayout {
|
|
@@ -34,3 +34,23 @@ export declare function computeCounters(components: ScopeComponentLike[], closur
|
|
|
34
34
|
groups: number;
|
|
35
35
|
total: number;
|
|
36
36
|
};
|
|
37
|
+
export declare function sideColumnLabelStyle(input: {
|
|
38
|
+
isCycle: boolean;
|
|
39
|
+
isSelected: boolean;
|
|
40
|
+
focused: boolean;
|
|
41
|
+
}): {
|
|
42
|
+
nameColor: string | undefined;
|
|
43
|
+
nameBold: boolean;
|
|
44
|
+
nameInverse: boolean;
|
|
45
|
+
nameUnderline: boolean;
|
|
46
|
+
suffixColor: string | undefined;
|
|
47
|
+
suffixDim: boolean;
|
|
48
|
+
suffixInverse: boolean;
|
|
49
|
+
suffixUnderline: boolean;
|
|
50
|
+
};
|
|
51
|
+
export declare function computeColumnWindow(total: number, cursor: number, visibleCount: number): {
|
|
52
|
+
start: number;
|
|
53
|
+
end: number;
|
|
54
|
+
above: number;
|
|
55
|
+
below: number;
|
|
56
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface ComponentGraphNode {
|
|
2
|
+
name: string;
|
|
3
|
+
slots: Array<{
|
|
4
|
+
name: string;
|
|
5
|
+
allowedComponents?: string[];
|
|
6
|
+
}>;
|
|
7
|
+
}
|
|
8
|
+
interface ClosureNode {
|
|
9
|
+
name: string;
|
|
10
|
+
depth: number;
|
|
11
|
+
path: string[];
|
|
12
|
+
parents: string[];
|
|
13
|
+
}
|
|
14
|
+
export interface Closure {
|
|
15
|
+
root: string;
|
|
16
|
+
nodes: ClosureNode[];
|
|
17
|
+
containsCycle: boolean;
|
|
18
|
+
cyclePath?: string[];
|
|
19
|
+
}
|
|
20
|
+
export type NodeStatus = 'ok' | 'warning' | 'error';
|
|
21
|
+
export declare function findRoots(components: ComponentGraphNode[], selected?: Set<string>): string[];
|
|
22
|
+
export declare function computeClosure(root: string, components: ComponentGraphNode[]): Closure;
|
|
23
|
+
export declare function computeAllClosures(components: ComponentGraphNode[], selected?: Set<string>): Map<string, Closure>;
|
|
24
|
+
export declare function aggregateStatus(closure: Closure, perNodeStatus: Map<string, NodeStatus>): NodeStatus;
|
|
25
|
+
export declare function findSharedDeps(closures: Map<string, Closure>): Map<string, string[]>;
|
|
26
|
+
export {};
|