@contentful/experience-design-system-cli 2.37.1-dev-build-91ca3bb8.0 → 2.37.1-dev-build-a7704a7f.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.js +248 -999
- package/dist/index.js +319 -1217
- package/dist/package.json +1 -1
- package/dist/src/tui/settings/contentful-configuration/ContentfulConfigScreen.d.ts +0 -1
- package/package.json +3 -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/help/file-locations.d.ts +0 -23
- package/dist/src/tui/settings/agents/AgentDetail.d.ts +0 -13
- package/dist/src/tui/settings/agents/AgentScreens.d.ts +0 -11
- package/dist/src/tui/settings/agents/AgentStatusBadge.d.ts +0 -10
- package/dist/src/tui/settings/agents/agent-status.d.ts +0 -80
- package/dist/src/tui/settings/agents/agent-store.d.ts +0 -17
- package/dist/src/tui/settings/agents/apply-binary-overrides.d.ts +0 -13
- package/dist/src/tui/settings/contentful-configuration/ProjectConfigScreen.d.ts +0 -5
- package/dist/src/tui/settings/shared/FieldForm.d.ts +0 -35
- package/legacy/bin/cli.js +0 -58
- package/legacy/dist/package.json +0 -76
- package/legacy/dist/src/analytics/exit.d.ts +0 -4
- package/legacy/dist/src/analytics/index.d.ts +0 -3
- package/legacy/dist/src/analyze/composite-closure.d.ts +0 -26
- 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/cycle-detection.d.ts +0 -27
- 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/issue-inheritance.d.ts +0 -8
- package/legacy/dist/src/analyze/lineage.d.ts +0 -29
- package/legacy/dist/src/analyze/search-neighborhood.d.ts +0 -3
- 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/preview-annotations.d.ts +0 -26
- 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/ComponentRationalePanel.d.ts +0 -10
- package/legacy/dist/src/analyze/select/tui/components/FieldEditor.d.ts +0 -67
- package/legacy/dist/src/analyze/select/tui/components/FinalizeDialog.d.ts +0 -22
- package/legacy/dist/src/analyze/select/tui/components/GotoBanner.d.ts +0 -31
- package/legacy/dist/src/analyze/select/tui/components/GroupedSidebar.d.ts +0 -94
- package/legacy/dist/src/analyze/select/tui/components/HelpOverlay.d.ts +0 -21
- package/legacy/dist/src/analyze/select/tui/components/HighlightedLine.d.ts +0 -9
- package/legacy/dist/src/analyze/select/tui/components/JsonEditor.d.ts +0 -10
- package/legacy/dist/src/analyze/select/tui/components/JsonPanel.d.ts +0 -11
- package/legacy/dist/src/analyze/select/tui/components/PreviewSummaryBar.d.ts +0 -8
- package/legacy/dist/src/analyze/select/tui/components/QuitDialog.d.ts +0 -8
- package/legacy/dist/src/analyze/select/tui/components/RationaleLine.d.ts +0 -21
- package/legacy/dist/src/analyze/select/tui/components/RationalePanel.d.ts +0 -15
- package/legacy/dist/src/analyze/select/tui/components/ScrollablePanel.d.ts +0 -14
- 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/TokenReviewPanel.d.ts +0 -30
- package/legacy/dist/src/analyze/select/tui/components/TopBar.d.ts +0 -10
- package/legacy/dist/src/analyze/select/tui/components/removed-components-text.d.ts +0 -7
- package/legacy/dist/src/analyze/select/tui/components/wrap-text.d.ts +0 -1
- package/legacy/dist/src/analyze/select/tui/hooks/list-scroll-input.d.ts +0 -13
- package/legacy/dist/src/analyze/select/tui/hooks/scroll-offset.d.ts +0 -30
- package/legacy/dist/src/analyze/select/tui/hooks/useImmediateInput.d.ts +0 -19
- 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/analyze/selection-cascade.d.ts +0 -3
- package/legacy/dist/src/analyze/slot-graph.d.ts +0 -11
- 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/index.d.ts +0 -1
- package/legacy/dist/src/index.js +0 -25166
- 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/contentful-urls.d.ts +0 -15
- 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/tui/use-terminal-size.d.ts +0 -6
- package/legacy/dist/src/tui/windowed-panel.d.ts +0 -37
- package/legacy/dist/src/types.d.ts +0 -2
- package/legacy/package.json +0 -85
- package/legacy/prompts/composition-edges.md +0 -11
- package/legacy/skills/generate-components.md +0 -612
- package/legacy/skills/generate-tokens.md +0 -194
- package/legacy/skills/map-tokens.md +0 -102
- package/legacy/skills/select-components.md +0 -235
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { DatabaseSync } from 'node:sqlite';
|
|
2
|
-
import type { RawComponentDefinition } from '../types.js';
|
|
3
|
-
import type { CDFComponentEntry } from '@contentful/experience-design-system-types';
|
|
4
|
-
import type { ToolCall, ComponentSourceRef } from '@contentful/experience-design-system-generation';
|
|
5
|
-
import type { ComponentTypeSummary } from '@contentful/experience-design-system-types';
|
|
6
|
-
import type { SlotCycle, SlotEdge } from '../analyze/cycle-detection.js';
|
|
7
|
-
import { type MatchHints as SessionMatchHints } from './repositories/sessions/read.js';
|
|
8
|
-
import { type SessionResolution } from './services/session-resolver.js';
|
|
9
|
-
export { hashComponentShape as computeComponentInputHash } from './core/components/hash-component-shape.js';
|
|
10
|
-
export { hashTokenContent as computeTokenInputHash } from './core/tokens/hash-token-content.js';
|
|
11
|
-
export { getDtcgTokensForSession as loadDTCGTokens, getRawTokenNamePaths as loadRawTokenNamePaths, getRawTokenNamePathRows as loadRawTokenNamePathRows, } from './repositories/tokens/read.js';
|
|
12
|
-
export { storeDtcgTokens as storeDTCGTokens } from './services/tokens/store-dtcg-tokens.js';
|
|
13
|
-
export { applyTokenToolCalls } from './services/tokens/apply-tool-calls.js';
|
|
14
|
-
export { replaceRawTokenNamePaths } from './services/tokens/replace-raw-token-name-paths.js';
|
|
15
|
-
export { replaceRawPropTokenPaths } from './services/tokens/replace-raw-prop-token-paths.js';
|
|
16
|
-
export type CommandName = 'analyze extract' | 'analyze select' | 'generate components' | 'generate tokens' | 'apply' | 'print components' | 'print tokens' | 'map tokens' | 'fetch existing entities' | 'import';
|
|
17
|
-
export declare function getPipelineDbPath(): string;
|
|
18
|
-
export declare function openPipelineDb(dbPath?: string): DatabaseSync;
|
|
19
|
-
export interface ApplyToolCallsResult {
|
|
20
|
-
classified: number;
|
|
21
|
-
excluded: number;
|
|
22
|
-
slots: number;
|
|
23
|
-
warnings: string[];
|
|
24
|
-
}
|
|
25
|
-
export interface ApplyToolCallsOptions {
|
|
26
|
-
/** Component names that may appear in generated slot allowed-components lists. */
|
|
27
|
-
allowedComponentNames?: ReadonlySet<string>;
|
|
28
|
-
}
|
|
29
|
-
export interface ComponentReviewMetadata {
|
|
30
|
-
sourcePath: string | null;
|
|
31
|
-
componentSource: string | null;
|
|
32
|
-
props: Record<string, {
|
|
33
|
-
rationale: string | null;
|
|
34
|
-
sourceStartLine: number | null;
|
|
35
|
-
sourceEndLine: number | null;
|
|
36
|
-
}>;
|
|
37
|
-
}
|
|
38
|
-
export declare function loadComponentReviewMetadata(db: DatabaseSync, sessionId: string, componentName: string): ComponentReviewMetadata | null;
|
|
39
|
-
export interface ComponentRationale {
|
|
40
|
-
name: string;
|
|
41
|
-
description: string | null;
|
|
42
|
-
descriptionRationale: string | null;
|
|
43
|
-
propsRationale: string | null;
|
|
44
|
-
slotsRationale: string | null;
|
|
45
|
-
props: Array<{
|
|
46
|
-
name: string;
|
|
47
|
-
category: string | null;
|
|
48
|
-
description: string | null;
|
|
49
|
-
rationale: string | null;
|
|
50
|
-
}>;
|
|
51
|
-
slots: Array<{
|
|
52
|
-
name: string;
|
|
53
|
-
description: string | null;
|
|
54
|
-
rationale: string | null;
|
|
55
|
-
}>;
|
|
56
|
-
}
|
|
57
|
-
export declare function loadComponentRationale(db: DatabaseSync, sessionId: string, componentName: string): ComponentRationale | null;
|
|
58
|
-
export declare function applyToolCalls(db: DatabaseSync, sessionId: string, componentId: string, componentName: string, calls: ToolCall[], incomingWarnings: string[], options?: ApplyToolCallsOptions): ApplyToolCallsResult;
|
|
59
|
-
export type MatchHints = SessionMatchHints;
|
|
60
|
-
export type { SessionResolution };
|
|
61
|
-
export declare function getOrCreateSession(db: DatabaseSync, sessionFlag: string | undefined, sessionName: string | undefined, hints: MatchHints): SessionResolution;
|
|
62
|
-
export declare function createStep(db: DatabaseSync, sessionId: string, command: CommandName, inputs: Record<string, string>): number;
|
|
63
|
-
export declare function updateStep(db: DatabaseSync, stepId: number, status: 'complete' | 'failed', outputs: Record<string, string>, error?: string): void;
|
|
64
|
-
export declare function storeRawComponents(db: DatabaseSync, sessionId: string, components: RawComponentDefinition[], options?: {
|
|
65
|
-
status?: string;
|
|
66
|
-
preserveCDF?: boolean;
|
|
67
|
-
preserveStatus?: boolean;
|
|
68
|
-
}): void;
|
|
69
|
-
export type RawComponentWithId = RawComponentDefinition & {
|
|
70
|
-
component_id: string;
|
|
71
|
-
};
|
|
72
|
-
export declare function loadRawComponents(db: DatabaseSync, sessionId: string, allowedNames?: Set<string>): RawComponentWithId[];
|
|
73
|
-
export declare function loadComponentSourceRef(name: string, sourcePath: string, propNames?: string[], propTypes?: string[]): Promise<ComponentSourceRef>;
|
|
74
|
-
export declare function loadComponentSourceRefs(db: DatabaseSync, sessionId: string): Promise<ComponentSourceRef[]>;
|
|
75
|
-
export declare function renameEmptySlots(db: DatabaseSync, sessionId: string, componentId: string, componentName: string, slotCount: number): {
|
|
76
|
-
renames: Array<{
|
|
77
|
-
oldName: string;
|
|
78
|
-
newName: string;
|
|
79
|
-
}>;
|
|
80
|
-
warnings: string[];
|
|
81
|
-
};
|
|
82
|
-
export declare function storeCDFComponents(db: DatabaseSync, sessionId: string, components: Array<{
|
|
83
|
-
key: string;
|
|
84
|
-
entry: CDFComponentEntry;
|
|
85
|
-
}>): void;
|
|
86
|
-
export declare function loadCDFComponents(db: DatabaseSync, sessionId: string): Array<{
|
|
87
|
-
key: string;
|
|
88
|
-
entry: CDFComponentEntry;
|
|
89
|
-
}>;
|
|
90
|
-
export type ScopeComponentRow = {
|
|
91
|
-
name: string;
|
|
92
|
-
componentId: string;
|
|
93
|
-
aiDecision: 'accepted' | 'rejected' | null;
|
|
94
|
-
aiReason: string | null;
|
|
95
|
-
needsReview: boolean;
|
|
96
|
-
slots: Array<{
|
|
97
|
-
name: string;
|
|
98
|
-
allowedComponents: string[];
|
|
99
|
-
}>;
|
|
100
|
-
};
|
|
101
|
-
export declare function loadScopeComponents(db: DatabaseSync, sessionId: string): ScopeComponentRow[];
|
|
102
|
-
export declare function applyScopeDecisions(db: DatabaseSync, sessionId: string, decisions: {
|
|
103
|
-
accepted: string[];
|
|
104
|
-
rejected: string[];
|
|
105
|
-
}): void;
|
|
106
|
-
export declare function findLatestSessionForCommand(db: DatabaseSync, command: CommandName): string | null;
|
|
107
|
-
export declare function seedCDFFromPriorSession(db: DatabaseSync, targetSessionId: string): number;
|
|
108
|
-
export declare function seedCDFFromPreviewResponse(db: DatabaseSync, sessionId: string, removedItems: ComponentTypeSummary[]): number;
|
|
109
|
-
export declare function seedDefaultsFromChangedItems(db: DatabaseSync, sessionId: string, changedItems: Array<{
|
|
110
|
-
current: ComponentTypeSummary;
|
|
111
|
-
proposed: object;
|
|
112
|
-
}>): number;
|
|
113
|
-
export declare function backfillUnclassifiedProps(db: DatabaseSync, sessionId: string): number;
|
|
114
|
-
export type CacheEntityType = 'component' | 'token_set' | 'token_mapping';
|
|
115
|
-
export interface CacheEntry {
|
|
116
|
-
inputHash: string;
|
|
117
|
-
entityType: CacheEntityType;
|
|
118
|
-
entityId: string;
|
|
119
|
-
sourceSessionId: string;
|
|
120
|
-
humanEdited: boolean;
|
|
121
|
-
promptHash: string;
|
|
122
|
-
createdAt: string;
|
|
123
|
-
updatedAt: string;
|
|
124
|
-
}
|
|
125
|
-
export declare function computeMapTokensInputHash(db: DatabaseSync, sessionId: string, componentSourceRefs?: readonly ComponentSourceRef[]): string;
|
|
126
|
-
export declare function lookupCache(db: DatabaseSync, inputHash: string, entityType: CacheEntityType, entityId: string, promptHash?: string): CacheEntry | null;
|
|
127
|
-
export declare function lookupCacheByEntity(db: DatabaseSync, entityType: CacheEntityType, entityId: string): CacheEntry | null;
|
|
128
|
-
export declare function storeCache(db: DatabaseSync, inputHash: string, entityType: CacheEntityType, entityId: string, sourceSessionId: string, humanEdited: boolean, promptHash?: string): void;
|
|
129
|
-
export declare function storeCaches(db: DatabaseSync, entries: Array<{
|
|
130
|
-
inputHash: string;
|
|
131
|
-
entityType: CacheEntityType;
|
|
132
|
-
entityId: string;
|
|
133
|
-
sourceSessionId: string;
|
|
134
|
-
humanEdited: boolean;
|
|
135
|
-
promptHash?: string;
|
|
136
|
-
}>): void;
|
|
137
|
-
export declare function storeScannedFiles(db: DatabaseSync, sessionId: string, filePaths: string[]): void;
|
|
138
|
-
export declare function loadScannedFiles(db: DatabaseSync, sessionId: string): string[];
|
|
139
|
-
export declare function storeSlotCycles(db: DatabaseSync, sessionId: string, cycles: Array<SlotCycle & {
|
|
140
|
-
suggestedBreak?: SlotEdge | null;
|
|
141
|
-
}>): void;
|
|
142
|
-
export interface StoredSlotCycle extends SlotCycle {
|
|
143
|
-
suggestedBreak: SlotEdge | null;
|
|
144
|
-
}
|
|
145
|
-
export declare function loadSlotCycles(db: DatabaseSync, sessionId: string): StoredSlotCycle[];
|
|
146
|
-
export declare function clearSlotCycles(db: DatabaseSync, sessionId: string): void;
|
|
147
|
-
export declare function markCacheHumanEdited(db: DatabaseSync, entityType: 'component' | 'token_set', entityId: string): void;
|
|
148
|
-
export interface UnknownSlotAllowedComponent {
|
|
149
|
-
componentId: string;
|
|
150
|
-
componentName: string;
|
|
151
|
-
slotName: string;
|
|
152
|
-
allowedComponent: string;
|
|
153
|
-
}
|
|
154
|
-
export declare function findUnknownSlotAllowedComponents(db: DatabaseSync, sessionId: string, allowedComponentNames: ReadonlySet<string>, componentId?: string): UnknownSlotAllowedComponent[];
|
|
155
|
-
/** Remove slot references that cannot resolve in the current manifest or target space. */
|
|
156
|
-
export declare function filterUnknownSlotAllowedComponents(db: DatabaseSync, sessionId: string, allowedComponentNames: ReadonlySet<string>): UnknownSlotAllowedComponent[];
|
|
157
|
-
export interface CopyComponentFromCacheOptions {
|
|
158
|
-
allowedComponentNames?: ReadonlySet<string>;
|
|
159
|
-
}
|
|
160
|
-
export declare function copyComponentFromCache(db: DatabaseSync, sourceSessionId: string, targetSessionId: string, componentId: string, manageTransaction?: boolean, options?: CopyComponentFromCacheOptions): void;
|
|
161
|
-
export declare function copyComponentsFromCache(db: DatabaseSync, entries: Array<{
|
|
162
|
-
sourceSessionId: string;
|
|
163
|
-
targetSessionId: string;
|
|
164
|
-
componentId: string;
|
|
165
|
-
}>, options?: CopyComponentFromCacheOptions): void;
|
|
166
|
-
export declare function copyTokensFromCache(db: DatabaseSync, sourceSessionId: string, targetSessionId: string): void;
|
|
167
|
-
export declare function copyMapTokensFromCache(db: DatabaseSync, sourceSessionId: string, targetSessionId: string): number;
|
|
168
|
-
export declare function getCliCacheVersion(): Promise<string>;
|
|
169
|
-
export interface ExtractCacheEntry {
|
|
170
|
-
filePath: string;
|
|
171
|
-
fileHash: string;
|
|
172
|
-
cliVersion: string;
|
|
173
|
-
createdAt: string;
|
|
174
|
-
updatedAt: string;
|
|
175
|
-
components: RawComponentDefinition[];
|
|
176
|
-
}
|
|
177
|
-
export declare function storeExtractCache(db: DatabaseSync, filePath: string, fileHash: string, cliVersion: string, components: RawComponentDefinition[]): void;
|
|
178
|
-
export declare function lookupExtractCache(db: DatabaseSync, fileHash: string, cliVersion: string): ExtractCacheEntry | null;
|
|
179
|
-
/**
|
|
180
|
-
* Content-addressed cache for the composition resolver's raw agent output
|
|
181
|
-
* (authored parser source or emitted-edge JSONL). Keyed by a hash of the
|
|
182
|
-
* candidate files + producer identity (`composition-cache-key.ts`), scoped by
|
|
183
|
-
* `cli_version` so a prompt/skill change invalidates stale entries. Replaces
|
|
184
|
-
* the former on-disk `~/.contentful/.../composition-cache` store so all CLI
|
|
185
|
-
* caches live in the one pipeline DB.
|
|
186
|
-
*/
|
|
187
|
-
export declare function storeCompositionCache(db: DatabaseSync, inputHash: string, cliVersion: string, agentOutput: string): void;
|
|
188
|
-
export declare function lookupCompositionCache(db: DatabaseSync, inputHash: string, cliVersion: string): string | null;
|
|
189
|
-
export type SelectDecision = 'accepted' | 'rejected';
|
|
190
|
-
export interface SelectCacheEntry {
|
|
191
|
-
componentHash: string;
|
|
192
|
-
promptHash: string;
|
|
193
|
-
cliVersion: string;
|
|
194
|
-
decision: SelectDecision;
|
|
195
|
-
reason: string | null;
|
|
196
|
-
createdAt: string;
|
|
197
|
-
updatedAt: string;
|
|
198
|
-
}
|
|
199
|
-
export declare function storeSelectCache(db: DatabaseSync, componentHash: string, promptHash: string, cliVersion: string, decision: SelectDecision, reason: string | null): void;
|
|
200
|
-
export declare function lookupSelectCache(db: DatabaseSync, componentHash: string, promptHash: string, cliVersion: string): SelectCacheEntry | null;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { DatabaseSync } from 'node:sqlite';
|
|
2
|
-
import type { CommandName } from '../../db.js';
|
|
3
|
-
export interface MatchHints {
|
|
4
|
-
command: CommandName;
|
|
5
|
-
inputPath?: string;
|
|
6
|
-
outDir?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function getSessionById(db: DatabaseSync, sessionId: string): {
|
|
9
|
-
id: string;
|
|
10
|
-
} | null;
|
|
11
|
-
export declare function getLatestCompletedSessionForCommand(db: DatabaseSync, command: CommandName): string | null;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { DatabaseSync } from 'node:sqlite';
|
|
2
|
-
export declare function createSession(db: DatabaseSync, id: string, name: string | null, timestamp: string): void;
|
|
3
|
-
export declare function updateSessionTimestamp(db: DatabaseSync, sessionId: string, timestamp: string): void;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { DatabaseSync } from 'node:sqlite';
|
|
2
|
-
import type { CommandName } from '../../db.js';
|
|
3
|
-
export declare function updatePendingStepsToInterrupted(db: DatabaseSync, sessionId: string, command: CommandName, timestamp: string): void;
|
|
4
|
-
export declare function createPendingStep(db: DatabaseSync, sessionId: string, command: CommandName, inputs: Record<string, string>, timestamp: string): number;
|
|
5
|
-
export declare function updateStepStatus(db: DatabaseSync, stepId: number, status: 'complete' | 'failed', outputs: Record<string, string>, error: string | null, timestamp: string): void;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { DatabaseSync } from 'node:sqlite';
|
|
2
|
-
import type { DTCGTokenEntry, DTCGTokenGroup } from '@contentful/experience-design-system-types';
|
|
3
|
-
export type RawTokenNamePaths = Record<string, string>;
|
|
4
|
-
export type RawTokenNamePathSource = 'automatic' | 'manual';
|
|
5
|
-
export interface RawTokenNamePath {
|
|
6
|
-
rawName: string;
|
|
7
|
-
path: string;
|
|
8
|
-
source: RawTokenNamePathSource;
|
|
9
|
-
}
|
|
10
|
-
export declare function getDtcgTokensForSession(db: DatabaseSync, sessionId: string): {
|
|
11
|
-
groups: DTCGTokenGroup[];
|
|
12
|
-
tokens: DTCGTokenEntry[];
|
|
13
|
-
};
|
|
14
|
-
export declare function getRawTokenNamePaths(db: DatabaseSync, sessionId: string): RawTokenNamePaths;
|
|
15
|
-
export declare function getRawTokenNamePathRows(db: DatabaseSync, sessionId: string): RawTokenNamePath[];
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { DatabaseSync } from 'node:sqlite';
|
|
2
|
-
import type { DTCGTokenEntry, DTCGTokenGroup } from '@contentful/experience-design-system-types';
|
|
3
|
-
import type { TokenToolCall } from '@contentful/experience-design-system-generation';
|
|
4
|
-
import type { RawTokenNamePaths, RawTokenNamePathSource } from './read.js';
|
|
5
|
-
export type RawPropTokenPathSource = 'agent' | 'review';
|
|
6
|
-
export declare function deleteRawTokensForSession(db: DatabaseSync, sessionId: string): void;
|
|
7
|
-
export declare function createRawTokenGroups(db: DatabaseSync, sessionId: string, groups: DTCGTokenGroup[]): void;
|
|
8
|
-
export declare function createRawTokens(db: DatabaseSync, sessionId: string, tokens: DTCGTokenEntry[]): void;
|
|
9
|
-
export declare function upsertRawToken(db: DatabaseSync, sessionId: string, call: Extract<TokenToolCall, {
|
|
10
|
-
tool: 'set_token';
|
|
11
|
-
}>): void;
|
|
12
|
-
export declare function upsertRawTokenGroup(db: DatabaseSync, sessionId: string, call: Extract<TokenToolCall, {
|
|
13
|
-
tool: 'set_group';
|
|
14
|
-
}>): void;
|
|
15
|
-
export declare function updateRawTokenNamePaths(db: DatabaseSync, sessionId: string, tokenNamePaths: RawTokenNamePaths, source: RawTokenNamePathSource): void;
|
|
16
|
-
export declare function updateRawPropTokenPaths(db: DatabaseSync, sessionId: string, componentId: string, propName: string, paths: string[], source: RawPropTokenPathSource): void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function resolveExtractSessionId(sessionFlag: string | undefined, onMissing: () => Promise<string> | string): Promise<string>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { DatabaseSync } from 'node:sqlite';
|
|
2
|
-
import { type MatchHints } from '../repositories/sessions/read.js';
|
|
3
|
-
export type { MatchHints };
|
|
4
|
-
export interface SessionResolution {
|
|
5
|
-
sessionId: string;
|
|
6
|
-
isNew: boolean;
|
|
7
|
-
isResumed: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare function getOrCreateSessionForCommand(db: DatabaseSync, sessionFlag: string | undefined, sessionName: string | undefined, _hints: MatchHints): SessionResolution;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { DatabaseSync } from 'node:sqlite';
|
|
2
|
-
import type { TokenToolCall } from '@contentful/experience-design-system-generation';
|
|
3
|
-
export interface ApplyTokenToolCallsResult {
|
|
4
|
-
tokens: number;
|
|
5
|
-
groups: number;
|
|
6
|
-
warnings: string[];
|
|
7
|
-
}
|
|
8
|
-
export declare function applyTokenToolCalls(db: DatabaseSync, sessionId: string, calls: TokenToolCall[], incomingWarnings: string[]): ApplyTokenToolCallsResult;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { DatabaseSync } from 'node:sqlite';
|
|
2
|
-
import { type RawPropTokenPathSource } from '../../repositories/tokens/write.js';
|
|
3
|
-
export declare function replaceRawPropTokenPaths(db: DatabaseSync, sessionId: string, componentId: string, propName: string, paths: string[], source: RawPropTokenPathSource): void;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { DatabaseSync } from 'node:sqlite';
|
|
2
|
-
import type { RawTokenNamePaths, RawTokenNamePathSource } from '../../repositories/tokens/read.js';
|
|
3
|
-
export declare function replaceRawTokenNamePaths(db: DatabaseSync, sessionId: string, tokenNamePaths: RawTokenNamePaths, source?: RawTokenNamePathSource): void;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { DatabaseSync } from 'node:sqlite';
|
|
2
|
-
import type { DTCGTokenEntry, DTCGTokenGroup } from '@contentful/experience-design-system-types';
|
|
3
|
-
export declare function storeDtcgTokens(db: DatabaseSync, sessionId: string, groups: DTCGTokenGroup[], tokens: DTCGTokenEntry[]): void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function generateSessionId(): string;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bounded source excerpts that keep the lines that matter.
|
|
3
|
-
*
|
|
4
|
-
* Head truncation of a styles module keeps its imports and top-level
|
|
5
|
-
* constants and drops the one line that decides a property's classification —
|
|
6
|
-
* the place the value is interpolated into a style. An excerpt built from
|
|
7
|
-
* windows around each property name's occurrences spends the same byte budget
|
|
8
|
-
* on that line instead.
|
|
9
|
-
*/
|
|
10
|
-
export interface SourceExcerpt {
|
|
11
|
-
content: string;
|
|
12
|
-
/**
|
|
13
|
-
* Names with at least one occurrence that did not fit in `content`. The
|
|
14
|
-
* reader cannot see that use, so its absence from the excerpt is a gap, not
|
|
15
|
-
* evidence. Empty when every occurrence is shown.
|
|
16
|
-
*/
|
|
17
|
-
usesNotShown: string[];
|
|
18
|
-
}
|
|
19
|
-
export declare function escapeForRegExp(value: string): string;
|
|
20
|
-
/**
|
|
21
|
-
* Returns `text` whole when it fits `maxChars`. Otherwise returns windows of
|
|
22
|
-
* `contextLines` lines around every line that mentions one of `names`, merged
|
|
23
|
-
* where they overlap, in file order, until the budget is spent. With no
|
|
24
|
-
* occurrences at all it falls back to the head of the file.
|
|
25
|
-
*/
|
|
26
|
-
export declare function excerptAroundNames(text: string, names: string[], maxChars: number, contextLines?: number): SourceExcerpt;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export type SetupResultEntry = {
|
|
3
|
-
name: string;
|
|
4
|
-
status: 'completed' | 'skipped' | 'failed';
|
|
5
|
-
required: boolean;
|
|
6
|
-
};
|
|
7
|
-
export declare function formatSetupCompletionMessage(results: readonly SetupResultEntry[]): string;
|
|
8
|
-
/** Prompts and output are UI-owned; the screen supplies the rest itself. */
|
|
9
|
-
export type SetupSkipFlags = {
|
|
10
|
-
skipBuild?: boolean;
|
|
11
|
-
skipAgent?: boolean;
|
|
12
|
-
skipCredentials?: boolean;
|
|
13
|
-
skipOptional?: boolean;
|
|
14
|
-
};
|
|
15
|
-
export type SetupOutcome = {
|
|
16
|
-
results: SetupResultEntry[];
|
|
17
|
-
exitCode: number;
|
|
18
|
-
};
|
|
19
|
-
type SetupScreenProps = {
|
|
20
|
-
version: string;
|
|
21
|
-
repoRoot: string;
|
|
22
|
-
skip?: SetupSkipFlags;
|
|
23
|
-
/** Defaults to the live Ink stdout columns. */
|
|
24
|
-
columns?: number;
|
|
25
|
-
onComplete: (outcome: SetupOutcome) => void;
|
|
26
|
-
};
|
|
27
|
-
export declare function SetupScreen({ version, repoRoot, skip, columns: columnsOverride, onComplete, }: SetupScreenProps): React.ReactElement;
|
|
28
|
-
export {};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { binaryExists, pathExists, runSpawn, type ShellCommandResult } from './shell.js';
|
|
2
|
-
/**
|
|
3
|
-
* The decision half of each prerequisite check, shared by `experiences doctor`
|
|
4
|
-
* and the setup wizard's Prerequisites step. Neither writes output from here:
|
|
5
|
-
* doctor streams ANSI, setup emits events for Ink, and both need the same
|
|
6
|
-
* verdict. Anything a caller needs for its own wording is returned rather than
|
|
7
|
-
* printed.
|
|
8
|
-
*/
|
|
9
|
-
export interface NodeVersionCheck {
|
|
10
|
-
passed: boolean;
|
|
11
|
-
version: string;
|
|
12
|
-
major: number;
|
|
13
|
-
required: number;
|
|
14
|
-
}
|
|
15
|
-
export declare function checkNodeVersion(nodeVersion?: string): NodeVersionCheck;
|
|
16
|
-
/** Which Node version manager is available, so callers can offer the right fix. */
|
|
17
|
-
export interface NodeVersionManagers {
|
|
18
|
-
nvm: boolean;
|
|
19
|
-
fnm: boolean;
|
|
20
|
-
nvmScript: string;
|
|
21
|
-
}
|
|
22
|
-
export declare function detectNodeVersionManagers(homeDir: string, deps?: {
|
|
23
|
-
binaryExists: typeof binaryExists;
|
|
24
|
-
pathExists: typeof pathExists;
|
|
25
|
-
}): Promise<NodeVersionManagers>;
|
|
26
|
-
export type PnpmCheck = {
|
|
27
|
-
status: 'missing';
|
|
28
|
-
} | {
|
|
29
|
-
status: 'broken';
|
|
30
|
-
} | {
|
|
31
|
-
status: 'unusable-in-repo';
|
|
32
|
-
version: string;
|
|
33
|
-
} | {
|
|
34
|
-
status: 'ok';
|
|
35
|
-
version: string;
|
|
36
|
-
};
|
|
37
|
-
type PnpmDeps = {
|
|
38
|
-
binaryExists: typeof binaryExists;
|
|
39
|
-
run: typeof runSpawn;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* `detectPnpm` plus proof that pnpm can execute inside the repo. A store built
|
|
43
|
-
* against a different Node version still passes `--version` but fails there,
|
|
44
|
-
* which is the failure operators actually hit — so both doctor and setup check it.
|
|
45
|
-
*/
|
|
46
|
-
export declare function checkPnpm(pkgRoot: string, deps?: PnpmDeps): Promise<PnpmCheck>;
|
|
47
|
-
export interface CommandCheck {
|
|
48
|
-
passed: boolean;
|
|
49
|
-
result: ShellCommandResult;
|
|
50
|
-
}
|
|
51
|
-
export declare function installDependencies(repoRoot: string, deps?: {
|
|
52
|
-
run: typeof runSpawn;
|
|
53
|
-
}): Promise<CommandCheck>;
|
|
54
|
-
export declare function buildCli(repoRoot: string, deps?: {
|
|
55
|
-
run: typeof runSpawn;
|
|
56
|
-
}): Promise<CommandCheck>;
|
|
57
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare const REQUIRED_NODE_MAJOR = 24;
|
|
2
|
-
export interface ShellCommandResult {
|
|
3
|
-
exitCode: number;
|
|
4
|
-
stdout: string;
|
|
5
|
-
stderr: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function binaryExists(name: string): Promise<boolean>;
|
|
8
|
-
export declare function pathExists(path: string): Promise<boolean>;
|
|
9
|
-
export declare function runSpawn(cmd: string, args: string[], opts?: {
|
|
10
|
-
cwd?: string;
|
|
11
|
-
env?: NodeJS.ProcessEnv;
|
|
12
|
-
}): Promise<ShellCommandResult>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { AgentName } from '@contentful/experience-design-system-generation';
|
|
3
|
-
import { type AgentDefinition } from '../../lib/agent-definitions.js';
|
|
4
|
-
import { binaryExists, runSpawn } from '../lib/shell.js';
|
|
5
|
-
import { type StepDone } from './StepLayout.js';
|
|
6
|
-
export declare function detectAgents(exists?: (binary: string) => Promise<boolean>): Promise<AgentDefinition[]>;
|
|
7
|
-
/** Codex needs a model only when it authenticates through a ChatGPT account. */
|
|
8
|
-
export declare function needsCodexModel(agent: AgentName, env: NodeJS.ProcessEnv): boolean;
|
|
9
|
-
export type CodingAgentDeps = {
|
|
10
|
-
binaryExists: typeof binaryExists;
|
|
11
|
-
run: typeof runSpawn;
|
|
12
|
-
env: NodeJS.ProcessEnv;
|
|
13
|
-
};
|
|
14
|
-
type CodingAgentScreenProps = {
|
|
15
|
-
onDone: StepDone;
|
|
16
|
-
/** Injected so tests can drive detection and install without spawning. */
|
|
17
|
-
deps?: CodingAgentDeps;
|
|
18
|
-
};
|
|
19
|
-
export declare function CodingAgentScreen({ onDone, deps }: CodingAgentScreenProps): React.ReactElement;
|
|
20
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type StepDone } from './StepLayout.js';
|
|
3
|
-
/**
|
|
4
|
-
* Env vars still act as a fallback when a field on disk is empty, so an operator
|
|
5
|
-
* who skips this step should know an ambient value would take effect.
|
|
6
|
-
*/
|
|
7
|
-
export declare function envShadowingWarning(env: NodeJS.ProcessEnv): string | null;
|
|
8
|
-
export declare function maskToken(token: string): string;
|
|
9
|
-
export declare function ContentfulCredentialsScreen({ onDone }: {
|
|
10
|
-
onDone: StepDone;
|
|
11
|
-
}): React.ReactElement;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export type StepStatus = 'completed' | 'skipped' | 'failed';
|
|
3
|
-
export type StepDone = (status: StepStatus) => void;
|
|
4
|
-
type StepLayoutProps = {
|
|
5
|
-
helpText?: string;
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
prompt?: React.ReactNode;
|
|
8
|
-
};
|
|
9
|
-
export declare function StepLayout({ helpText, children, prompt }: StepLayoutProps): React.ReactElement;
|
|
10
|
-
export declare function StepSuccess({ children }: {
|
|
11
|
-
children: React.ReactNode;
|
|
12
|
-
}): React.ReactElement;
|
|
13
|
-
export declare function StepWarning({ children }: {
|
|
14
|
-
children: React.ReactNode;
|
|
15
|
-
}): React.ReactElement;
|
|
16
|
-
export declare function StepValue({ label, value }: {
|
|
17
|
-
label: string;
|
|
18
|
-
value: string | undefined;
|
|
19
|
-
}): React.ReactElement;
|
|
20
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type ExperiencesCredentials } from '../../../credentials-store.js';
|
|
3
|
-
import { type StepDone } from '../StepLayout.js';
|
|
4
|
-
type BooleanPreferenceProps = {
|
|
5
|
-
helpText: string;
|
|
6
|
-
question: string;
|
|
7
|
-
/** What choosing each option means, named after the outcome rather than yes/no. */
|
|
8
|
-
labels: {
|
|
9
|
-
on: string;
|
|
10
|
-
off: string;
|
|
11
|
-
};
|
|
12
|
-
/** Reads the stored value; `undefined` means the operator has never set it. */
|
|
13
|
-
read: (credentials: ExperiencesCredentials) => boolean | undefined;
|
|
14
|
-
/** Applied to the stored credentials when the answer differs from the default. */
|
|
15
|
-
write: (credentials: ExperiencesCredentials, value: boolean) => ExperiencesCredentials;
|
|
16
|
-
/** What the setting means when it has never been set. */
|
|
17
|
-
fallback: boolean;
|
|
18
|
-
onDone: StepDone;
|
|
19
|
-
};
|
|
20
|
-
export declare function BooleanInput({ helpText, question, labels, read, write, fallback, onDone, }: BooleanPreferenceProps): React.ReactElement;
|
|
21
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type ExperiencesCredentials } from '../../../credentials-store.js';
|
|
3
|
-
import { type StepDone } from '../StepLayout.js';
|
|
4
|
-
/**
|
|
5
|
-
* Interpret an answer to a custom prompt path question: empty keeps whatever is
|
|
6
|
-
* stored, `-` clears it, anything else is the new path.
|
|
7
|
-
*/
|
|
8
|
-
export declare function parseCustomSkillPath(answer: string): string | undefined | null;
|
|
9
|
-
export declare function customSkillPathQuestion(current: string | undefined): string;
|
|
10
|
-
/** Apply a parsed answer to the credentials, clearing the field on `null`. */
|
|
11
|
-
export declare function applyCustomSkillPath(credentials: ExperiencesCredentials, parsed: string | undefined | null): ExperiencesCredentials;
|
|
12
|
-
export declare function CustomPromptsScreen({ onDone }: {
|
|
13
|
-
onDone: StepDone;
|
|
14
|
-
}): React.ReactElement;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type StepDone } from '../StepLayout.js';
|
|
3
|
-
type PreferenceScreenProps = {
|
|
4
|
-
onDone: StepDone;
|
|
5
|
-
};
|
|
6
|
-
export declare const PREFERENCE_OPTIONS: readonly [{
|
|
7
|
-
readonly key: "customPrompts";
|
|
8
|
-
readonly label: "Custom prompts";
|
|
9
|
-
readonly Screen: ({ onDone }: PreferenceScreenProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
}, {
|
|
11
|
-
readonly key: "debug";
|
|
12
|
-
readonly label: "Debug logging";
|
|
13
|
-
readonly Screen: ({ onDone }: PreferenceScreenProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
}, {
|
|
15
|
-
readonly key: "analytics";
|
|
16
|
-
readonly label: "Usage analytics";
|
|
17
|
-
readonly Screen: ({ onDone }: PreferenceScreenProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
}, {
|
|
19
|
-
readonly key: "noColor";
|
|
20
|
-
readonly label: "Terminal colors";
|
|
21
|
-
readonly Screen: ({ onDone }: PreferenceScreenProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
}];
|
|
23
|
-
export declare function PreferencesMenu({ onDone }: {
|
|
24
|
-
onDone: StepDone;
|
|
25
|
-
}): React.ReactElement;
|
|
26
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { PrerequisiteDeps, PrerequisitesOutcome } from './deps.js';
|
|
3
|
-
export type PrerequisitesScreenProps = {
|
|
4
|
-
repoRoot: string;
|
|
5
|
-
skipBuild?: boolean;
|
|
6
|
-
onDone: (outcome: PrerequisitesOutcome) => void;
|
|
7
|
-
/** Injected so tests can drive the checks without spawning processes. */
|
|
8
|
-
deps?: Pick<PrerequisiteDeps, 'nodeVersion' | 'homeDir' | 'binaryExists' | 'pathExists' | 'run'>;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Prerequisites runs as soon as the wizard opens and reports each check as it
|
|
12
|
-
* finishes. It keeps a driver rather than a per-question screen because the flow
|
|
13
|
-
* is sequential — a failed check may offer an install, and the next check depends
|
|
14
|
-
* on that answer.
|
|
15
|
-
*/
|
|
16
|
-
export declare function PrerequisitesScreen({ repoRoot, skipBuild, onDone, deps, }: PrerequisitesScreenProps): React.ReactElement;
|