@contentful/experience-design-system-cli 2.37.1-dev-build-f18643c3.0 → 2.37.1-dev-build-a1707be5.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 +8 -3
- package/dist/index.js +10 -4
- package/dist/package.json +1 -1
- package/dist/src/tui/import/steps/07-scope-gate/cache-check.d.ts +0 -7
- package/dist/src/tui/import/steps/08-generation/logic.d.ts +0 -4
- package/dist/src/tui/import/steps/08-generation/run.d.ts +0 -10
- package/legacy/package.json +1 -1
- package/package.json +3 -3
package/dist/app.js
CHANGED
|
@@ -14772,7 +14772,7 @@ async function runMapTokens(request) {
|
|
|
14772
14772
|
}
|
|
14773
14773
|
const agent = request.agent;
|
|
14774
14774
|
const noCache = request.cache === false || process.env["EDS_NO_CACHE"] === "1";
|
|
14775
|
-
const promptHash = await hashPromptForSkill("map-tokens", agent, request.model,
|
|
14775
|
+
const promptHash = await hashPromptForSkill("map-tokens", agent, request.model, request.skillPathOverride, request.existingEntitiesInline ? [hashContent(request.existingEntitiesInline)] : [], request.skillContentOverride);
|
|
14776
14776
|
const inputHash = computeMapTokensInputHash(db, sessionId, componentSourceRefs);
|
|
14777
14777
|
if (!noCache) {
|
|
14778
14778
|
const cached = lookupCache(db, inputHash, "token_mapping", "__map_tokens__", promptHash);
|
|
@@ -16482,11 +16482,12 @@ async function checkGenerateComponentsCache(request) {
|
|
|
16482
16482
|
var DEFAULT_COMPONENT_CONCURRENCY = Number(process.env["EDS_GENERATE_CONCURRENCY"] ?? 10);
|
|
16483
16483
|
async function runGenerateComponentsSession(request) {
|
|
16484
16484
|
const prompt = await resolveGeneratePrompt(request.promptOverrides);
|
|
16485
|
+
const effectiveSkillPath = prompt.path ?? request.skillPath;
|
|
16485
16486
|
const existingEntities = await readExistingEntities(request);
|
|
16486
16487
|
const existingTokensInline = existingEntities ? JSON.stringify(summarizeForMapTokens({ entities: existingEntities })) : void 0;
|
|
16487
16488
|
const existingTokensHash = existingTokensInline ? [hashContent(existingTokensInline)] : [];
|
|
16488
16489
|
const agent = request.agent;
|
|
16489
|
-
const promptHash = await hashPromptForSkill("components", agent, request.agentModel,
|
|
16490
|
+
const promptHash = await hashPromptForSkill("components", agent, request.agentModel, effectiveSkillPath, existingTokensHash, prompt.text);
|
|
16490
16491
|
const db = openPipelineDb();
|
|
16491
16492
|
try {
|
|
16492
16493
|
const acceptedNames = await loadAcceptedNames(request.sessionId);
|
|
@@ -16513,7 +16514,7 @@ async function runGenerateComponentsSession(request) {
|
|
|
16513
16514
|
tokenMapInline: request.tokenMapInline,
|
|
16514
16515
|
verbose: request.verbose ?? false,
|
|
16515
16516
|
noCache: request.noCache,
|
|
16516
|
-
skillPathOverride:
|
|
16517
|
+
skillPathOverride: effectiveSkillPath,
|
|
16517
16518
|
skillContentOverride: prompt.text,
|
|
16518
16519
|
promptHash,
|
|
16519
16520
|
existingContentfulEntities: existingEntities,
|
|
@@ -20413,6 +20414,8 @@ async function saveDecisions(input) {
|
|
|
20413
20414
|
}
|
|
20414
20415
|
|
|
20415
20416
|
// packages/experience-design-system-cli/src/tui/import/steps/08-generation/run.ts
|
|
20417
|
+
var COMPONENTS_SKILL_PATH = findSkillPath("generate-components.md");
|
|
20418
|
+
var MAP_TOKENS_SKILL_PATH = findSkillPath("map-tokens.md");
|
|
20416
20419
|
var realDeps3 = {
|
|
20417
20420
|
checkAgentAuth,
|
|
20418
20421
|
saveDecisions,
|
|
@@ -20447,6 +20450,7 @@ async function runGeneration(input, onProgress, deps = realDeps3) {
|
|
|
20447
20450
|
agent: input.agent,
|
|
20448
20451
|
...input.agentModel ? { agentModel: input.agentModel } : {},
|
|
20449
20452
|
promptOverrides: appendGeneratePromptOverride(input),
|
|
20453
|
+
skillPath: COMPONENTS_SKILL_PATH,
|
|
20450
20454
|
noCache: input.noCache,
|
|
20451
20455
|
existingEntitiesPath: input.existingEntitiesPath,
|
|
20452
20456
|
precomputedCachedNames: new Set(handedOverNames),
|
|
@@ -20476,6 +20480,7 @@ async function runGeneration(input, onProgress, deps = realDeps3) {
|
|
|
20476
20480
|
agent: input.agent,
|
|
20477
20481
|
...input.agentModel ? { model: input.agentModel } : {},
|
|
20478
20482
|
cache: !input.noCache,
|
|
20483
|
+
skillPathOverride: MAP_TOKENS_SKILL_PATH,
|
|
20479
20484
|
...mapTokensOptions
|
|
20480
20485
|
});
|
|
20481
20486
|
} catch (error) {
|
package/dist/index.js
CHANGED
|
@@ -16593,7 +16593,7 @@ async function runMapTokens(request) {
|
|
|
16593
16593
|
}
|
|
16594
16594
|
const agent = request.agent;
|
|
16595
16595
|
const noCache = request.cache === false || process.env["EDS_NO_CACHE"] === "1";
|
|
16596
|
-
const promptHash = await hashPromptForSkill("map-tokens", agent, request.model,
|
|
16596
|
+
const promptHash = await hashPromptForSkill("map-tokens", agent, request.model, request.skillPathOverride, request.existingEntitiesInline ? [hashContent(request.existingEntitiesInline)] : [], request.skillContentOverride);
|
|
16597
16597
|
const inputHash = computeMapTokensInputHash(db, sessionId, componentSourceRefs);
|
|
16598
16598
|
if (!noCache) {
|
|
16599
16599
|
const cached = lookupCache(db, inputHash, "token_mapping", "__map_tokens__", promptHash);
|
|
@@ -19491,11 +19491,12 @@ var init_check_generate_components_cache = __esm({
|
|
|
19491
19491
|
// packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-generate-components-session/run-generate-components-session.js
|
|
19492
19492
|
async function runGenerateComponentsSession(request) {
|
|
19493
19493
|
const prompt = await resolveGeneratePrompt(request.promptOverrides);
|
|
19494
|
+
const effectiveSkillPath = prompt.path ?? request.skillPath;
|
|
19494
19495
|
const existingEntities = await readExistingEntities(request);
|
|
19495
19496
|
const existingTokensInline = existingEntities ? JSON.stringify(summarizeForMapTokens({ entities: existingEntities })) : void 0;
|
|
19496
19497
|
const existingTokensHash = existingTokensInline ? [hashContent(existingTokensInline)] : [];
|
|
19497
19498
|
const agent = request.agent;
|
|
19498
|
-
const promptHash = await hashPromptForSkill("components", agent, request.agentModel,
|
|
19499
|
+
const promptHash = await hashPromptForSkill("components", agent, request.agentModel, effectiveSkillPath, existingTokensHash, prompt.text);
|
|
19499
19500
|
const db = openPipelineDb();
|
|
19500
19501
|
try {
|
|
19501
19502
|
const acceptedNames = await loadAcceptedNames(request.sessionId);
|
|
@@ -19522,7 +19523,7 @@ async function runGenerateComponentsSession(request) {
|
|
|
19522
19523
|
tokenMapInline: request.tokenMapInline,
|
|
19523
19524
|
verbose: request.verbose ?? false,
|
|
19524
19525
|
noCache: request.noCache,
|
|
19525
|
-
skillPathOverride:
|
|
19526
|
+
skillPathOverride: effectiveSkillPath,
|
|
19526
19527
|
skillContentOverride: prompt.text,
|
|
19527
19528
|
promptHash,
|
|
19528
19529
|
existingContentfulEntities: existingEntities,
|
|
@@ -24066,6 +24067,7 @@ async function runGeneration(input, onProgress, deps = realDeps3) {
|
|
|
24066
24067
|
agent: input.agent,
|
|
24067
24068
|
...input.agentModel ? { agentModel: input.agentModel } : {},
|
|
24068
24069
|
promptOverrides: appendGeneratePromptOverride(input),
|
|
24070
|
+
skillPath: COMPONENTS_SKILL_PATH,
|
|
24069
24071
|
noCache: input.noCache,
|
|
24070
24072
|
existingEntitiesPath: input.existingEntitiesPath,
|
|
24071
24073
|
precomputedCachedNames: new Set(handedOverNames),
|
|
@@ -24095,6 +24097,7 @@ async function runGeneration(input, onProgress, deps = realDeps3) {
|
|
|
24095
24097
|
agent: input.agent,
|
|
24096
24098
|
...input.agentModel ? { model: input.agentModel } : {},
|
|
24097
24099
|
cache: !input.noCache,
|
|
24100
|
+
skillPathOverride: MAP_TOKENS_SKILL_PATH,
|
|
24098
24101
|
...mapTokensOptions
|
|
24099
24102
|
});
|
|
24100
24103
|
} catch (error) {
|
|
@@ -24146,14 +24149,17 @@ function applyProgressEvent2(event, previous, total) {
|
|
|
24146
24149
|
}
|
|
24147
24150
|
return previous;
|
|
24148
24151
|
}
|
|
24149
|
-
var realDeps3, fail2, errorMessage3;
|
|
24152
|
+
var COMPONENTS_SKILL_PATH, MAP_TOKENS_SKILL_PATH, realDeps3, fail2, errorMessage3;
|
|
24150
24153
|
var init_run2 = __esm({
|
|
24151
24154
|
"packages/experience-design-system-cli/src/tui/import/steps/08-generation/run.ts"() {
|
|
24152
24155
|
"use strict";
|
|
24153
24156
|
init_src4();
|
|
24157
|
+
init_find_skill_path();
|
|
24154
24158
|
init_logic9();
|
|
24155
24159
|
init_map_tokens();
|
|
24156
24160
|
init_save_decisions();
|
|
24161
|
+
COMPONENTS_SKILL_PATH = findSkillPath("generate-components.md");
|
|
24162
|
+
MAP_TOKENS_SKILL_PATH = findSkillPath("map-tokens.md");
|
|
24157
24163
|
realDeps3 = {
|
|
24158
24164
|
checkAgentAuth,
|
|
24159
24165
|
saveDecisions,
|
package/dist/package.json
CHANGED
|
@@ -7,11 +7,4 @@ export interface CacheCheckInput {
|
|
|
7
7
|
existingEntitiesPath: string | null;
|
|
8
8
|
noCache: boolean;
|
|
9
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
10
|
export declare function checkGenerationCache(input: CacheCheckInput): Promise<string[]>;
|
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
import type { GenerationProgress } from './types.js';
|
|
2
2
|
export declare function initialProgress(): GenerationProgress;
|
|
3
|
-
/** Token mapping runs only when there is something to map and tokens to map it from. */
|
|
4
3
|
export declare function shouldRunMapTokens(counts: {
|
|
5
4
|
mappablePropCount: number;
|
|
6
5
|
rawTokenCount: number;
|
|
7
6
|
}): boolean;
|
|
8
|
-
/** "5 components accepted." or, with some left out, "5 components accepted, 2 excluded due to validation errors." */
|
|
9
7
|
export declare function formatAcceptanceSummary(counts: {
|
|
10
8
|
accepted: number;
|
|
11
9
|
autoRejected: number;
|
|
12
10
|
}): string;
|
|
13
|
-
/** The screen's description: what was accepted, what is happening to it, and whether the tokens are used. */
|
|
14
11
|
export declare function describeGeneration(input: {
|
|
15
12
|
acceptedCount: number;
|
|
16
13
|
agent: string;
|
|
17
14
|
hasTokens: boolean;
|
|
18
15
|
}): string;
|
|
19
|
-
/** The rows the generating screen shows for this progress. */
|
|
20
16
|
export declare function progressRows(progress: GenerationProgress, agent: string): Array<{
|
|
21
17
|
text: string;
|
|
22
18
|
complete: boolean;
|
|
@@ -9,14 +9,4 @@ export interface GenerationDeps {
|
|
|
9
9
|
runMapTokens: typeof runMapTokens;
|
|
10
10
|
prepareMapTokens: typeof prepareMapTokens;
|
|
11
11
|
}
|
|
12
|
-
/**
|
|
13
|
-
* The whole stage, in the order the wizard ran it:
|
|
14
|
-
* 1. Wait for the cache check that ran while the scope gate was open, then save the decisions. Both write to the
|
|
15
|
-
* pipeline database and the cache has to be restored first. With nothing accepted the stage ends here.
|
|
16
|
-
* 2. Generate the accepted components in-process. The orchestrator handles per-component cache lookup, so the names
|
|
17
|
-
* from the cache check are forwarded as `precomputedCachedNames` to skip a redundant lookup.
|
|
18
|
-
* 3. Map tokens onto the generated session. Skipped when there is nothing to map.
|
|
19
|
-
* A failed token mapping after a successful generation is an error to show. It neither retries nor throws away what was
|
|
20
|
-
* generated.
|
|
21
|
-
*/
|
|
22
12
|
export declare function runGeneration(input: GenerationInput, onProgress: (progress: GenerationProgress) => void, deps?: GenerationDeps): Promise<GenerationResult>;
|
package/legacy/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.37.1-dev-build-
|
|
3
|
+
"version": "2.37.1-dev-build-a1707be5.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"ts-morph": "^27.0.2",
|
|
46
46
|
"typescript": "^5.9.3",
|
|
47
47
|
"zod": "^4.6.5",
|
|
48
|
-
"@contentful/experience-design-system-
|
|
49
|
-
"@contentful/experience-design-system-
|
|
48
|
+
"@contentful/experience-design-system-backend-pipeline": "2.37.1-dev-build-a1707be5.0",
|
|
49
|
+
"@contentful/experience-design-system-types": "2.37.1-dev-build-a1707be5.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@tsconfig/node24": "^24.0.4",
|