@contentful/experience-design-system-cli 2.26.1-dev-build-a852362.0 → 2.26.1-dev-build-f1d1f30.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/package.json +14 -10
- package/dist/src/index.js +34937 -9
- package/dist/src/lib/cli-path.d.ts +4 -0
- package/dist/src/runs/export-helpers.d.ts +1 -12
- package/dist/src/runs/push-helpers.d.ts +1 -6
- package/package.json +12 -7
- package/skills/generate-components.md +427 -0
- package/skills/generate-tokens.md +194 -0
- package/skills/select-components.md +224 -0
- package/dist/src/analytics/apply.js +0 -30
- package/dist/src/analytics/client.js +0 -81
- package/dist/src/analytics/constants.js +0 -4
- package/dist/src/analytics/env.js +0 -14
- package/dist/src/analytics/exit.js +0 -24
- package/dist/src/analytics/index.js +0 -9
- package/dist/src/analytics/normalize.js +0 -18
- package/dist/src/analytics/os.js +0 -13
- package/dist/src/analytics/session.js +0 -15
- package/dist/src/analytics/tracker.js +0 -126
- package/dist/src/analytics/types.js +0 -1
- package/dist/src/analyze/build-analyze-view-rows.js +0 -63
- package/dist/src/analyze/command.js +0 -599
- package/dist/src/analyze/composite-closure.js +0 -0
- package/dist/src/analyze/composition/agent-parser/author-prompt.js +0 -22
- package/dist/src/analyze/composition/agent-parser/extract-parser.js +0 -44
- package/dist/src/analyze/composition/agent-parser/load-prompt.js +0 -31
- package/dist/src/analyze/composition/agent-parser/resolve-via-parser.js +0 -88
- package/dist/src/analyze/composition/agent-parser/sandbox.js +0 -187
- package/dist/src/analyze/composition/apply-mapping.js +0 -67
- package/dist/src/analyze/composition/candidate-critic-agent.js +0 -39
- package/dist/src/analyze/composition/candidate-critic.js +0 -63
- package/dist/src/analyze/composition/candidate-files.js +0 -131
- package/dist/src/analyze/composition/composition-cache-key.js +0 -19
- package/dist/src/analyze/composition/interchange-schema.js +0 -61
- package/dist/src/analyze/composition/manifest-doc-evidence.js +0 -136
- package/dist/src/analyze/composition/merge-edges.js +0 -70
- package/dist/src/analyze/composition/parse-map-edges.js +0 -55
- package/dist/src/analyze/composition/resolve-mapping-cli.js +0 -29
- package/dist/src/analyze/composition/resolve-mapping.js +0 -111
- package/dist/src/analyze/cycle-detection.js +0 -234
- package/dist/src/analyze/cycle-view.js +0 -28
- package/dist/src/analyze/fuzzy-search.js +0 -55
- package/dist/src/analyze/issue-inheritance.js +0 -108
- package/dist/src/analyze/lineage.js +0 -0
- package/dist/src/analyze/scope-gate-cascade.js +0 -170
- package/dist/src/analyze/search-neighborhood.js +0 -56
- package/dist/src/analyze/select/command.js +0 -484
- package/dist/src/analyze/select/index.js +0 -5
- package/dist/src/analyze/select/parser.js +0 -53
- package/dist/src/analyze/select/persistence.js +0 -80
- package/dist/src/analyze/select/preview-annotations.js +0 -62
- package/dist/src/analyze/select/stdout.js +0 -3
- package/dist/src/analyze/select/tui/App.js +0 -483
- package/dist/src/analyze/select/tui/components/ComponentDetail.js +0 -48
- package/dist/src/analyze/select/tui/components/ComponentRationalePanel.js +0 -125
- package/dist/src/analyze/select/tui/components/FieldEditor.js +0 -1131
- package/dist/src/analyze/select/tui/components/FinalizeDialog.js +0 -36
- package/dist/src/analyze/select/tui/components/GotoBanner.js +0 -30
- package/dist/src/analyze/select/tui/components/GroupedSidebar.js +0 -517
- package/dist/src/analyze/select/tui/components/HelpOverlay.js +0 -17
- package/dist/src/analyze/select/tui/components/JsonEditor.js +0 -131
- package/dist/src/analyze/select/tui/components/JsonPanel.js +0 -66
- package/dist/src/analyze/select/tui/components/LineagePanel.js +0 -22
- package/dist/src/analyze/select/tui/components/PreviewSummaryBar.js +0 -29
- package/dist/src/analyze/select/tui/components/QuitDialog.js +0 -14
- package/dist/src/analyze/select/tui/components/RationalePanel.js +0 -80
- package/dist/src/analyze/select/tui/components/Sidebar.js +0 -92
- package/dist/src/analyze/select/tui/components/SourcePanel.js +0 -52
- package/dist/src/analyze/select/tui/components/StatusBar.js +0 -7
- package/dist/src/analyze/select/tui/components/TopBar.js +0 -10
- package/dist/src/analyze/select/tui/components/removed-components-text.js +0 -11
- package/dist/src/analyze/select/tui/hooks/scroll-offset.js +0 -26
- package/dist/src/analyze/select/tui/hooks/useImmediateInput.js +0 -66
- package/dist/src/analyze/select/tui/hooks/useKeymap.js +0 -67
- package/dist/src/analyze/select/tui/hooks/useSession.js +0 -52
- package/dist/src/analyze/select/tui/hooks/useUndo.js +0 -26
- package/dist/src/analyze/select/tui/theme.js +0 -28
- package/dist/src/analyze/select/types.js +0 -39
- package/dist/src/analyze/select-agent/command.js +0 -558
- package/dist/src/analyze/select-agent/context-builder.js +0 -197
- package/dist/src/analyze/select-agent/show-rationale.js +0 -92
- package/dist/src/analyze/selection-cascade.js +0 -19
- package/dist/src/analyze/slot-graph.js +0 -17
- package/dist/src/analyze/tui/AnalyzeView.js +0 -64
- package/dist/src/apply/api-client.js +0 -440
- package/dist/src/apply/command.js +0 -845
- package/dist/src/apply/manifest.js +0 -1
- package/dist/src/apply/preview-utils.js +0 -26
- package/dist/src/apply/tui/SelectView.js +0 -34
- package/dist/src/apply/tui/ServerApplyView.js +0 -49
- package/dist/src/apply/tui/ServerPreviewView.js +0 -23
- package/dist/src/credentials-store.js +0 -74
- package/dist/src/generate/command.js +0 -597
- package/dist/src/generate/edit/command.js +0 -127
- package/dist/src/generate/tui/GenerateView.js +0 -10
- package/dist/src/host-utils.js +0 -26
- package/dist/src/import/agent-model-resolve.js +0 -35
- package/dist/src/import/auto-filter-resolve.js +0 -16
- package/dist/src/import/command.js +0 -380
- package/dist/src/import/cycle-auto-reject.js +0 -14
- package/dist/src/import/orchestrator.js +0 -603
- package/dist/src/import/path-utils.js +0 -30
- package/dist/src/import/picker-dispatch.js +0 -44
- package/dist/src/import/print-prompt.js +0 -31
- package/dist/src/import/strip-allowed-components.js +0 -22
- package/dist/src/import/tui/CustomPromptBanner.js +0 -8
- package/dist/src/import/tui/WizardApp.js +0 -1670
- package/dist/src/import/tui/ai-flag.js +0 -6
- package/dist/src/import/tui/auto-filter-error.js +0 -29
- package/dist/src/import/tui/autocomplete.js +0 -32
- package/dist/src/import/tui/components/AutoFilterBanner.js +0 -19
- package/dist/src/import/tui/components/CounterStrip.js +0 -12
- package/dist/src/import/tui/components/LegendEntry.js +0 -6
- package/dist/src/import/tui/cycle-panel-scroll.js +0 -33
- package/dist/src/import/tui/final-review-host.js +0 -25
- package/dist/src/import/tui/group-collapse.js +0 -11
- package/dist/src/import/tui/history.js +0 -53
- package/dist/src/import/tui/hooks/useLineage.js +0 -50
- package/dist/src/import/tui/hooks/useOverlayPanel.js +0 -27
- package/dist/src/import/tui/lineage-layout.js +0 -82
- package/dist/src/import/tui/merge-ai-decisions.js +0 -22
- package/dist/src/import/tui/push-decision-gate-helpers.js +0 -8
- package/dist/src/import/tui/push-progress.js +0 -1
- package/dist/src/import/tui/run-print-files-helpers.js +0 -8
- package/dist/src/import/tui/run-teaser.js +0 -9
- package/dist/src/import/tui/runLivePreview.js +0 -82
- package/dist/src/import/tui/runScopeGate.js +0 -28
- package/dist/src/import/tui/scope-gate-columns.js +0 -94
- package/dist/src/import/tui/scope-gate-host.js +0 -28
- package/dist/src/import/tui/sidebar-width.js +0 -3
- package/dist/src/import/tui/spawn-generate.js +0 -53
- package/dist/src/import/tui/step-filters.js +0 -42
- package/dist/src/import/tui/steps/AtomicGenerateReviewStep.js +0 -726
- package/dist/src/import/tui/steps/AtomicScopeGateStep.js +0 -210
- package/dist/src/import/tui/steps/CredentialsStep.js +0 -108
- package/dist/src/import/tui/steps/DoneStep.js +0 -24
- package/dist/src/import/tui/steps/ErrorStep.js +0 -16
- package/dist/src/import/tui/steps/GateStep.js +0 -22
- package/dist/src/import/tui/steps/GenerateReviewStep.js +0 -1618
- package/dist/src/import/tui/steps/PathValidationStep.js +0 -152
- package/dist/src/import/tui/steps/PreviewStep.js +0 -37
- package/dist/src/import/tui/steps/PreviewValidationErrorStep.js +0 -23
- package/dist/src/import/tui/steps/PushDecisionGateStep.js +0 -73
- package/dist/src/import/tui/steps/PushingStep.js +0 -24
- package/dist/src/import/tui/steps/RunningStep.js +0 -21
- package/dist/src/import/tui/steps/ScopeGateStep.js +0 -907
- package/dist/src/import/tui/steps/TokenInputStep.js +0 -88
- package/dist/src/import/tui/steps/WelcomeStep.js +0 -34
- package/dist/src/import/tui/steps/WizardPreviewStep.js +0 -169
- package/dist/src/import/tui/steps/auto-reject-decision.js +0 -9
- package/dist/src/import/tui/steps/breaking-change-format.js +0 -24
- package/dist/src/import/tui/steps/enumerate-cycle-breaks.js +0 -0
- package/dist/src/import/tui/steps/preview-diff.js +0 -175
- package/dist/src/import/tui/useFinalizePreview.js +0 -0
- package/dist/src/import/tui/useLivePreview.js +0 -122
- package/dist/src/import/tui/wizard-422-helpers.js +0 -60
- package/dist/src/import/tui/wizard-generate-progress.js +0 -25
- package/dist/src/import/tui/wizard-save-flow.js +0 -20
- package/dist/src/import/tui/wizard-state-transitions.js +0 -32
- package/dist/src/lib/agent-model-options.js +0 -15
- package/dist/src/lib/command-options.js +0 -30
- package/dist/src/lib/composition-mode.js +0 -39
- package/dist/src/lib/contentful-urls.js +0 -27
- package/dist/src/lib/debug-logger.js +0 -229
- package/dist/src/lib/debug-preamble.js +0 -33
- package/dist/src/lib/error-parser.js +0 -269
- package/dist/src/lib/prompt-overrides.js +0 -69
- package/dist/src/lib/terminal-capabilities.js +0 -51
- package/dist/src/lib/user-agent.js +0 -29
- package/dist/src/output/format.js +0 -110
- package/dist/src/print/command.js +0 -221
- package/dist/src/print/validate/tui/ValidateView.js +0 -37
- package/dist/src/print/validate/validators/cdf-validator.js +0 -104
- package/dist/src/print/validate/validators/dtcg-validator.js +0 -110
- package/dist/src/print/validate/validators/format-errors.js +0 -18
- package/dist/src/program.js +0 -105
- package/dist/src/runs/export-helpers.js +0 -59
- package/dist/src/runs/fingerprint.js +0 -75
- package/dist/src/runs/ls-command.js +0 -137
- package/dist/src/runs/modify-launcher.js +0 -42
- package/dist/src/runs/path-prompt.js +0 -72
- package/dist/src/runs/push-creds-prompt.js +0 -39
- package/dist/src/runs/push-helpers.js +0 -72
- package/dist/src/runs/push-launcher.js +0 -77
- package/dist/src/runs/replay-helpers.js +0 -164
- package/dist/src/runs/resolve-run-target.js +0 -45
- package/dist/src/runs/run-picker-mount.js +0 -72
- package/dist/src/runs/run-picker.js +0 -129
- package/dist/src/runs/save-conflict.js +0 -56
- package/dist/src/runs/save-path-resolver.js +0 -75
- package/dist/src/runs/staleness.js +0 -140
- package/dist/src/runs/store.js +0 -136
- package/dist/src/session/cache-keys.js +0 -44
- package/dist/src/session/command.js +0 -261
- package/dist/src/session/db.js +0 -1538
- package/dist/src/session/migration.js +0 -117
- package/dist/src/session/session-id.js +0 -212
- package/dist/src/session/stats.js +0 -89
- package/dist/src/setup/analytics-prompt.js +0 -24
- package/dist/src/setup/auto-filter-prompt.js +0 -24
- package/dist/src/setup/command.js +0 -966
- package/dist/src/setup/composition-mode-prompt.js +0 -37
- package/dist/src/setup/debug-mode-prompt.js +0 -22
- package/dist/src/types.js +0 -1
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { useImmediateInput } from './useImmediateInput.js';
|
|
2
|
-
export function useKeymap(context, handlers) {
|
|
3
|
-
useImmediateInput((input, key) => {
|
|
4
|
-
if (context.disabled)
|
|
5
|
-
return;
|
|
6
|
-
if (context.dialogOpen)
|
|
7
|
-
return;
|
|
8
|
-
if (context.editMode)
|
|
9
|
-
return;
|
|
10
|
-
if (input === 'q') {
|
|
11
|
-
handlers.onQuit();
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
if (input === '?') {
|
|
15
|
-
handlers.onToggleHelp();
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
if (key.tab) {
|
|
19
|
-
handlers.onToggleFocus();
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
if (input === 'A') {
|
|
23
|
-
handlers.onApproveAll();
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
if (input === 'F') {
|
|
27
|
-
handlers.onFinalize();
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
// a/r/e/s work regardless of sidebar focus
|
|
31
|
-
if (input === 'a') {
|
|
32
|
-
handlers.onAccept();
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
if (input === 'r') {
|
|
36
|
-
handlers.onReject();
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
if (input === 'e') {
|
|
40
|
-
handlers.onEnterEditMode();
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
if (input === 's') {
|
|
44
|
-
handlers.onToggleSource();
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
if (context.sidebarFocused) {
|
|
48
|
-
if (key.upArrow || input === 'k') {
|
|
49
|
-
handlers.onSidebarUp();
|
|
50
|
-
}
|
|
51
|
-
else if (key.downArrow || input === 'j') {
|
|
52
|
-
handlers.onSidebarDown();
|
|
53
|
-
}
|
|
54
|
-
else if (key.return) {
|
|
55
|
-
handlers.onSidebarSelect();
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
if (key.upArrow || input === 'k') {
|
|
60
|
-
handlers.onScrollUp();
|
|
61
|
-
}
|
|
62
|
-
else if (key.downArrow || input === 'j') {
|
|
63
|
-
handlers.onScrollDown();
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from 'react';
|
|
2
|
-
import { loadReviewInput } from '../../parser.js';
|
|
3
|
-
import { appendReviewEvent, ensureRefineSession, getRefineSessionPaths, saveReviewState } from '../../persistence.js';
|
|
4
|
-
import { openPipelineDb, loadRawComponents } from '../../../../session/db.js';
|
|
5
|
-
export function useSession({ sessionId, artifactsRoot, reviewRoot }) {
|
|
6
|
-
const [state, setState] = useState({ session: null, paths: null, loading: true, error: null });
|
|
7
|
-
useEffect(() => {
|
|
8
|
-
async function load() {
|
|
9
|
-
const db = openPipelineDb();
|
|
10
|
-
let rawComponents;
|
|
11
|
-
try {
|
|
12
|
-
rawComponents = loadRawComponents(db, sessionId);
|
|
13
|
-
}
|
|
14
|
-
finally {
|
|
15
|
-
db.close();
|
|
16
|
-
}
|
|
17
|
-
const initialSnapshot = await loadReviewInput(rawComponents, { reviewRoot });
|
|
18
|
-
const paths = await getRefineSessionPaths(sessionId, artifactsRoot);
|
|
19
|
-
const session = await ensureRefineSession(sessionId, artifactsRoot, initialSnapshot);
|
|
20
|
-
const isResume = session.components.some((c) => c.status !== 'needs-review');
|
|
21
|
-
await appendReviewEvent(paths.eventsPath, {
|
|
22
|
-
type: isResume ? 'session_resumed' : 'session_started',
|
|
23
|
-
payload: { componentCount: session.components.length },
|
|
24
|
-
});
|
|
25
|
-
setState({ session, paths, loading: false, error: null });
|
|
26
|
-
}
|
|
27
|
-
load().catch((err) => setState({
|
|
28
|
-
session: null,
|
|
29
|
-
paths: null,
|
|
30
|
-
loading: false,
|
|
31
|
-
error: String(err),
|
|
32
|
-
}));
|
|
33
|
-
}, []);
|
|
34
|
-
const saveState = async (updatedSession) => {
|
|
35
|
-
if (!state.paths)
|
|
36
|
-
return;
|
|
37
|
-
await saveReviewState(state.paths.statePath, updatedSession);
|
|
38
|
-
};
|
|
39
|
-
const appendEvent = async (event) => {
|
|
40
|
-
if (!state.paths)
|
|
41
|
-
return;
|
|
42
|
-
await appendReviewEvent(state.paths.eventsPath, event);
|
|
43
|
-
};
|
|
44
|
-
return {
|
|
45
|
-
session: state.session,
|
|
46
|
-
paths: state.paths,
|
|
47
|
-
loading: state.loading,
|
|
48
|
-
error: state.error,
|
|
49
|
-
saveState,
|
|
50
|
-
appendEvent,
|
|
51
|
-
};
|
|
52
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
2
|
-
export function useUndo(initial, maxSize = 50) {
|
|
3
|
-
const [stack, setStack] = useState([]);
|
|
4
|
-
const [current, setCurrent] = useState(initial);
|
|
5
|
-
return {
|
|
6
|
-
current,
|
|
7
|
-
push: (next) => {
|
|
8
|
-
setStack((prev) => {
|
|
9
|
-
const newStack = [...prev, current];
|
|
10
|
-
return newStack.length > maxSize ? newStack.slice(1) : newStack;
|
|
11
|
-
});
|
|
12
|
-
setCurrent(next);
|
|
13
|
-
},
|
|
14
|
-
undo: () => {
|
|
15
|
-
setStack((prev) => {
|
|
16
|
-
if (prev.length === 0)
|
|
17
|
-
return prev;
|
|
18
|
-
const newStack = prev.slice(0, -1);
|
|
19
|
-
setCurrent(prev[prev.length - 1]);
|
|
20
|
-
return newStack;
|
|
21
|
-
});
|
|
22
|
-
},
|
|
23
|
-
canUndo: stack.length > 0,
|
|
24
|
-
clear: () => setStack([]),
|
|
25
|
-
};
|
|
26
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export const PALETTE = {
|
|
2
|
-
info: '#1773EB',
|
|
3
|
-
success: '#00C459',
|
|
4
|
-
error: '#E44F20',
|
|
5
|
-
warning: '#FFDA00',
|
|
6
|
-
fg: '#000000',
|
|
7
|
-
inverse: '#FFFFFF',
|
|
8
|
-
muted: '#A6B5C7',
|
|
9
|
-
border: '#C4D1DE',
|
|
10
|
-
subtle: '#DDE5EC',
|
|
11
|
-
bg: '#EFF2F6',
|
|
12
|
-
};
|
|
13
|
-
export function statusPaletteColor(status, validationErrorCount, validationWarningCount) {
|
|
14
|
-
if (validationErrorCount > 0)
|
|
15
|
-
return PALETTE.error;
|
|
16
|
-
if (validationWarningCount > 0)
|
|
17
|
-
return PALETTE.warning;
|
|
18
|
-
switch (status) {
|
|
19
|
-
case 'accepted':
|
|
20
|
-
return PALETTE.success;
|
|
21
|
-
case 'rejected':
|
|
22
|
-
return PALETTE.error;
|
|
23
|
-
case 'reviewed':
|
|
24
|
-
return PALETTE.warning;
|
|
25
|
-
case 'needs-review':
|
|
26
|
-
return PALETTE.muted;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export function countValidationIssues(component) {
|
|
2
|
-
const issues = component.validationIssues ?? [];
|
|
3
|
-
let errors = 0;
|
|
4
|
-
let warnings = 0;
|
|
5
|
-
for (const issue of issues) {
|
|
6
|
-
if (issue.severity === 'error')
|
|
7
|
-
errors++;
|
|
8
|
-
else if (issue.severity === 'warning')
|
|
9
|
-
warnings++;
|
|
10
|
-
}
|
|
11
|
-
return { errors, warnings };
|
|
12
|
-
}
|
|
13
|
-
export function createReviewSessionSummary(session) {
|
|
14
|
-
return {
|
|
15
|
-
components: session.components.map((component) => {
|
|
16
|
-
const counts = countValidationIssues(component.originalProposal);
|
|
17
|
-
return {
|
|
18
|
-
id: component.id,
|
|
19
|
-
name: component.name,
|
|
20
|
-
status: component.status,
|
|
21
|
-
extractionConfidence: component.originalProposal.extractionConfidence ?? null,
|
|
22
|
-
needsReview: component.originalProposal.needsReview ?? false,
|
|
23
|
-
validationErrorCount: counts.errors,
|
|
24
|
-
validationWarningCount: counts.warnings,
|
|
25
|
-
};
|
|
26
|
-
}),
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
export function createReviewSessionDetail(session) {
|
|
30
|
-
return {
|
|
31
|
-
components: session.components.map((component) => ({
|
|
32
|
-
id: component.id,
|
|
33
|
-
name: component.name,
|
|
34
|
-
originalProposal: component.originalProposal,
|
|
35
|
-
editedProposal: component.editedProposal,
|
|
36
|
-
status: component.status,
|
|
37
|
-
})),
|
|
38
|
-
};
|
|
39
|
-
}
|