@contentful/experience-design-system-cli 2.34.5-dev-build-5e798cb1.0 → 2.34.5-dev-build-ea694b2.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 +2 -1
- package/dist/src/analyze/composition/interchange-schema.d.ts +4 -24
- package/dist/src/analyze/composition/resolve-mapping-cli.d.ts +0 -11
- package/dist/src/analyze/composition/resolve-mapping.d.ts +5 -7
- package/dist/src/credentials-store.d.ts +2 -15
- package/dist/src/doctor/checks.d.ts +5 -0
- package/dist/src/doctor/command.d.ts +2 -0
- package/dist/src/doctor/report.d.ts +7 -0
- package/dist/src/import/agent-model-resolve.d.ts +8 -4
- package/dist/src/import/composition-options.d.ts +0 -2
- package/dist/src/import/tui/WizardApp.d.ts +3 -2
- package/dist/src/import/tui/run-selection-agent.d.ts +8 -0
- package/dist/src/index.js +24384 -23435
- package/dist/src/lib/agent-definitions.d.ts +14 -0
- package/dist/src/lib/agent-model-options.d.ts +4 -4
- package/dist/src/lib/debug-logger.d.ts +2 -3
- package/dist/src/program.d.ts +1 -1
- package/dist/src/setup/SetupScreen.d.ts +28 -0
- package/dist/src/setup/SetupStepper.d.ts +7 -0
- package/dist/src/setup/command.d.ts +1 -7
- package/dist/src/setup/lib/checks.d.ts +57 -0
- package/dist/src/setup/lib/shell.d.ts +12 -0
- package/dist/src/setup/steps/CodingAgentScreen.d.ts +20 -0
- package/dist/src/setup/steps/ContentfulCredentialsScreen.d.ts +11 -0
- package/dist/src/setup/steps/StepLayout.d.ts +20 -0
- package/dist/src/setup/steps/preferences/AnalyticsScreen.d.ts +5 -0
- package/dist/src/setup/steps/preferences/BooleanInput.d.ts +21 -0
- package/dist/src/setup/steps/preferences/ColorPreferenceScreen.d.ts +5 -0
- package/dist/src/setup/steps/preferences/CustomPromptScreen.d.ts +14 -0
- package/dist/src/setup/steps/preferences/DebugLogsScreen.d.ts +5 -0
- package/dist/src/setup/steps/preferences/PreferencesMenu.d.ts +26 -0
- package/dist/src/setup/steps/prerequisites/PrerequisitesScreen.d.ts +16 -0
- package/dist/src/setup/steps/prerequisites/build.d.ts +2 -0
- package/dist/src/setup/steps/prerequisites/deps.d.ts +33 -0
- package/dist/src/setup/steps/prerequisites/index.d.ts +4 -0
- package/dist/src/setup/steps/prerequisites/node.d.ts +2 -0
- package/dist/src/setup/steps/prerequisites/pnpm.d.ts +2 -0
- package/package.json +7 -6
- package/dist/src/setup/analytics-prompt.d.ts +0 -13
- package/dist/src/setup/debug-mode-prompt.d.ts +0 -11
- package/dist/src/setup/prompt-helpers.d.ts +0 -1
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.34.5-dev-build-
|
|
3
|
+
"version": "2.34.5-dev-build-ea694b2.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@contentful/experience-design-system-cli-v2": "workspace:*",
|
|
42
42
|
"@contentful/experience-design-system-types": "workspace:*",
|
|
43
|
+
"@inkjs/ui": "^2.0.0",
|
|
43
44
|
"@segment/analytics-node": "^3.0.0",
|
|
44
45
|
"@vue/compiler-sfc": "^3.5.31",
|
|
45
46
|
"commander": "^13.1.0",
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The CLI-owned composition interchange format (spec T1).
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* `--composition-map` consumes and the resolver can emit.
|
|
8
|
-
* - `CompositionEdge[]` — the flat internal runtime view, one edge per
|
|
9
|
-
* parent→child relationship, carrying optional `slot` (T7), `confidence`,
|
|
10
|
-
* and `provenance`. Easier to merge/dedupe across sources (T2).
|
|
11
|
-
*
|
|
12
|
-
* This module owns both shapes and the converters between them.
|
|
4
|
+
* `CompositionEdge[]` is the flat internal runtime view, one edge per
|
|
5
|
+
* parent→child relationship, carrying optional `slot` (T7), `confidence`,
|
|
6
|
+
* and `provenance`. It is easier to merge and dedupe across sources (T2).
|
|
13
7
|
*/
|
|
14
|
-
export type EdgeProvenance = '
|
|
8
|
+
export type EdgeProvenance = 'typed-slot' | 'structural' | 'manifest' | 'doc' | `adapter:${string}` | 'agent';
|
|
15
9
|
export type CompositionEdge = {
|
|
16
10
|
parent: string;
|
|
17
11
|
child: string;
|
|
@@ -21,17 +15,3 @@ export type CompositionEdge = {
|
|
|
21
15
|
confidence?: number;
|
|
22
16
|
provenance: EdgeProvenance;
|
|
23
17
|
};
|
|
24
|
-
export type InterchangeMap = {
|
|
25
|
-
version: 1;
|
|
26
|
-
groups: Record<string, string[]>;
|
|
27
|
-
};
|
|
28
|
-
export type ValidateResult = {
|
|
29
|
-
valid: true;
|
|
30
|
-
map: InterchangeMap;
|
|
31
|
-
} | {
|
|
32
|
-
valid: false;
|
|
33
|
-
errors: string[];
|
|
34
|
-
};
|
|
35
|
-
export declare function validateInterchangeMap(input: unknown): ValidateResult;
|
|
36
|
-
export declare function groupsToEdges(map: InterchangeMap, provenance: EdgeProvenance): CompositionEdge[];
|
|
37
|
-
export declare function edgesToGroups(edges: CompositionEdge[]): InterchangeMap;
|
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
import { type InterchangeMap } from './interchange-schema.js';
|
|
2
1
|
export type CompositionCliOptions = {
|
|
3
|
-
/** `--composition-map <path>` — hand-authored interchange file. */
|
|
4
|
-
compositionMap?: string;
|
|
5
2
|
/** `--composition-refresh` — force edge emission to run even over resolved residue. */
|
|
6
3
|
compositionRefresh?: boolean;
|
|
7
4
|
};
|
|
8
|
-
export type LoadUserMapResult = {
|
|
9
|
-
ok: true;
|
|
10
|
-
map: InterchangeMap;
|
|
11
|
-
} | {
|
|
12
|
-
ok: false;
|
|
13
|
-
error: string;
|
|
14
|
-
};
|
|
15
|
-
export declare function loadUserMap(path: string): Promise<LoadUserMapResult>;
|
|
16
5
|
export type ResolvedCompositionSources = {
|
|
17
6
|
forceAgent: boolean;
|
|
18
7
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { RawComponentDefinition } from '../../types.js';
|
|
2
|
-
import {
|
|
2
|
+
import type { CompositionEdge } from './interchange-schema.js';
|
|
3
3
|
import { type EdgeConflict } from './merge-edges.js';
|
|
4
4
|
export type ResolveMappingResult = {
|
|
5
5
|
components: RawComponentDefinition[];
|
|
6
|
-
userMap?: InterchangeMap;
|
|
7
6
|
edges: CompositionEdge[];
|
|
8
7
|
conflicts: EdgeConflict[];
|
|
9
8
|
warnings: string[];
|
|
@@ -11,9 +10,9 @@ export type ResolveMappingResult = {
|
|
|
11
10
|
/**
|
|
12
11
|
* Orchestrate composition-edge acquisition and enrichment.
|
|
13
12
|
*
|
|
14
|
-
* Sources by rank:
|
|
15
|
-
*
|
|
16
|
-
*
|
|
13
|
+
* Sources by rank: typed-slot / "code slots" (2) > structural usage evidence
|
|
14
|
+
* (3) > manifest (4) > doc (5) > adapter-resolved / extraEdges (6) >
|
|
15
|
+
* edge-emitting agent (7). Manifest/doc edges are computed deterministically outside
|
|
17
16
|
* this function (see manifest-doc-evidence.ts) and joined via `extraEdges`.
|
|
18
17
|
* ALL sources — including the code slots already on the incoming components —
|
|
19
18
|
* are fed into one ranked merge and unioned; non-conflicting edges from every
|
|
@@ -28,7 +27,6 @@ export type ResolveMappingResult = {
|
|
|
28
27
|
*/
|
|
29
28
|
export declare function resolveMapping(input: {
|
|
30
29
|
components: RawComponentDefinition[];
|
|
31
|
-
userMap?: InterchangeMap;
|
|
32
30
|
forceAgent?: boolean;
|
|
33
31
|
files: Array<{
|
|
34
32
|
path: string;
|
|
@@ -55,7 +53,7 @@ export declare function resolveMapping(input: {
|
|
|
55
53
|
/**
|
|
56
54
|
* Pre-resolved edges from an external source (e.g. manifest or documentation)
|
|
57
55
|
* path). They join the ranked merge at their own provenance rank alongside
|
|
58
|
-
* code slots and
|
|
56
|
+
* code slots and other automatic mapping sources.
|
|
59
57
|
*/
|
|
60
58
|
extraEdges?: CompositionEdge[];
|
|
61
59
|
}): Promise<ResolveMappingResult>;
|
|
@@ -9,23 +9,10 @@ export type ExperiencesCredentials = {
|
|
|
9
9
|
generatePromptPath?: string;
|
|
10
10
|
/** Feature: default debug-mode (writes JSONL trace of every decision) for all commands. */
|
|
11
11
|
debug?: boolean;
|
|
12
|
-
/**
|
|
12
|
+
/** Print plain text with no color; an exported NO_COLOR still wins. */
|
|
13
|
+
noColor?: boolean;
|
|
13
14
|
analyticsDisabled?: boolean;
|
|
14
15
|
};
|
|
15
|
-
/**
|
|
16
|
-
* Read persisted Contentful credentials.
|
|
17
|
-
*
|
|
18
|
-
* Precedence (INTEG-4410): what the operator saved on disk via
|
|
19
|
-
* `experiences setup` or the wizard's credentials step wins over ambient
|
|
20
|
-
* `CONTENTFUL_*` / `EDS_HOST` env vars. Env vars are still consulted as a
|
|
21
|
-
* fallback when the field on disk is missing or empty — this preserves
|
|
22
|
-
* back-compat for CI / scripts that only export env and never call setup.
|
|
23
|
-
*
|
|
24
|
-
* The pre-INTEG-4410 order (env-first) silently shadowed saved values, so
|
|
25
|
-
* operators who saved a different space via setup kept seeing the env one
|
|
26
|
-
* pre-filled in the wizard. The saved value now wins; the env fallback only
|
|
27
|
-
* fires when the on-disk field is empty.
|
|
28
|
-
*/
|
|
29
16
|
export declare function readExperiencesCredentials(): Promise<ExperiencesCredentials>;
|
|
30
17
|
export declare function writeExperiencesCredentials(creds: ExperiencesCredentials): Promise<void>;
|
|
31
18
|
export declare function experiencesCredentialsPath(): string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function reportNode(): Promise<boolean>;
|
|
2
|
+
export declare function reportPnpm(pkgRoot: string): Promise<boolean>;
|
|
3
|
+
export declare function reportDependencies(pkgRoot: string): Promise<boolean>;
|
|
4
|
+
export declare function reportBuild(pkgRoot: string): Promise<boolean>;
|
|
5
|
+
export declare function reportAgent(): Promise<boolean>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function ok(msg: string): void;
|
|
2
|
+
export declare function fail(msg: string): void;
|
|
3
|
+
export declare function warn(msg: string): void;
|
|
4
|
+
export declare function info(msg: string): void;
|
|
5
|
+
export declare function section(title: string): void;
|
|
6
|
+
/** Echo the first `limit` lines of a failed command's stderr. */
|
|
7
|
+
export declare function infoStderr(stderr: string, limit: number): void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Resolution chain for
|
|
2
|
+
* Resolution chain for the combined `--agent` override on `experiences import`.
|
|
3
3
|
*
|
|
4
4
|
* The wizard path previously hard-defaulted `--agent` to `'claude'` at the
|
|
5
5
|
* commander layer, which (a) shadowed the stored `credentials.json` value when
|
|
6
6
|
* the user passed no flag, and (b) made it impossible to distinguish "user
|
|
7
|
-
* explicitly passed --agent claude" from "user passed nothing".
|
|
8
|
-
*
|
|
7
|
+
* explicitly passed --agent claude" from "user passed nothing". The combined
|
|
8
|
+
* flag accepts either `agent:model` or `agent model`.
|
|
9
9
|
*
|
|
10
10
|
* These helpers produce the resolved values to feed into `WizardApp` /
|
|
11
11
|
* the import wizard:
|
|
@@ -15,9 +15,13 @@
|
|
|
15
15
|
* `experiences setup`) is used.
|
|
16
16
|
* 3. Otherwise, the built-in default (currently `'claude'`) is used for
|
|
17
17
|
* the agent. Model has no default — agents pick a small/fast model
|
|
18
|
-
* themselves when
|
|
18
|
+
* themselves when no model is included in `--agent`.
|
|
19
19
|
*/
|
|
20
20
|
/** Built-in fallback agent when neither a flag nor a stored preference is set. */
|
|
21
21
|
export declare const DEFAULT_AGENT = "claude";
|
|
22
|
+
export declare function parseAgentModel(value: string | undefined): {
|
|
23
|
+
agent?: string;
|
|
24
|
+
model?: string;
|
|
25
|
+
};
|
|
22
26
|
export declare function resolveAgent(flagValue: string | undefined, storedValue: string | undefined): string;
|
|
23
27
|
export declare function resolveModel(flagValue: string | undefined, storedValue: string | undefined): string | undefined;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
export type CompositionOptionInput = {
|
|
2
|
-
compositionMap?: string;
|
|
3
2
|
prompt?: string[];
|
|
4
3
|
};
|
|
5
4
|
export type CompositionForwardingOptions = {
|
|
6
|
-
compositionMap?: string;
|
|
7
5
|
promptOverrides?: string[];
|
|
8
6
|
};
|
|
9
7
|
export declare function buildCompositionForwardingOptions(options: CompositionOptionInput): CompositionForwardingOptions;
|
|
@@ -17,6 +17,7 @@ export declare function buildGenerateTokensArgs(opts: {
|
|
|
17
17
|
model?: string;
|
|
18
18
|
bedrock?: boolean;
|
|
19
19
|
noCache?: boolean;
|
|
20
|
+
promptOverrides?: string[];
|
|
20
21
|
}): string[];
|
|
21
22
|
export declare function buildMapTokensArgs(opts: {
|
|
22
23
|
sessionId: string;
|
|
@@ -24,6 +25,7 @@ export declare function buildMapTokensArgs(opts: {
|
|
|
24
25
|
model?: string;
|
|
25
26
|
noCache?: boolean;
|
|
26
27
|
skipAgent?: boolean;
|
|
28
|
+
promptOverrides?: string[];
|
|
27
29
|
existingEntitiesPath?: string;
|
|
28
30
|
}): string[];
|
|
29
31
|
export declare function shouldRunMapTokens(opts: {
|
|
@@ -51,7 +53,6 @@ export type WizardAppProps = {
|
|
|
51
53
|
bedrock?: boolean;
|
|
52
54
|
initialProjectPath?: string;
|
|
53
55
|
host?: string;
|
|
54
|
-
compositionMap?: string;
|
|
55
56
|
promptOverrides?: string[];
|
|
56
57
|
noCache?: boolean;
|
|
57
58
|
livePreview?: boolean;
|
|
@@ -59,4 +60,4 @@ export type WizardAppProps = {
|
|
|
59
60
|
skipMapTokens?: boolean;
|
|
60
61
|
initialRawTokensPath?: string;
|
|
61
62
|
};
|
|
62
|
-
export declare function WizardApp({ initialSpaceId, initialEnvironmentId, initialCmaToken, initialHost, initialAgent, initialModel, bedrock, initialProjectPath, host,
|
|
63
|
+
export declare function WizardApp({ initialSpaceId, initialEnvironmentId, initialCmaToken, initialHost, initialAgent, initialModel, bedrock, initialProjectPath, host, promptOverrides, noCache, livePreview, generatePromptPath, skipMapTokens, initialRawTokensPath, }?: WizardAppProps): React.ReactElement;
|