@contentful/experience-design-system-cli 2.35.1-dev-build-459d7e23.0 → 2.35.1-dev-build-e76d41c1.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.
Files changed (70) hide show
  1. package/bin/cli.js +1 -1
  2. package/dist/package.json +1 -5
  3. package/dist/src/tui/home/home.d.ts +0 -1
  4. package/dist/src/tui/home/home.theme.d.ts +0 -11
  5. package/legacy/bin/cli.js +23 -19
  6. package/legacy/dist/src/analyze/composition/candidate-files.d.ts +34 -0
  7. package/legacy/dist/src/analyze/composition/composition-cache-key.d.ts +18 -0
  8. package/legacy/dist/src/analyze/composition/interchange-schema.d.ts +1 -7
  9. package/legacy/dist/src/analyze/composition/parse-map-edges.d.ts +16 -0
  10. package/legacy/dist/src/analyze/composition/prompt-loader.d.ts +3 -0
  11. package/legacy/dist/src/analyze/composition/resolve-mapping-cli.d.ts +10 -0
  12. package/legacy/dist/src/analyze/composition/resolve-mapping.d.ts +34 -11
  13. package/legacy/dist/src/analyze/controller/run-analyze-extract.d.ts +12 -0
  14. package/legacy/dist/src/analyze/extract-command.d.ts +2 -1
  15. package/legacy/dist/src/analyze/helpers/resolve-composition-agent.d.ts +9 -0
  16. package/legacy/dist/src/analyze/helpers/resolve-no-cache.d.ts +4 -0
  17. package/legacy/dist/src/analyze/helpers/resolve-unreachable-mode.d.ts +1 -0
  18. package/legacy/dist/src/analyze/helpers/retry-db-write.d.ts +1 -0
  19. package/legacy/dist/src/analyze/orchestrator/execute-analyze-extract.d.ts +21 -0
  20. package/legacy/dist/src/analyze/services/collect-source-files.d.ts +1 -0
  21. package/legacy/dist/src/analyze/services/extract-with-cache.d.ts +17 -0
  22. package/legacy/dist/src/analyze/services/persist-extract-results.d.ts +11 -0
  23. package/legacy/dist/src/analyze/services/resolve-composition-mapping.d.ts +22 -0
  24. package/legacy/dist/src/analyze/services/resolve-source-directory.d.ts +1 -0
  25. package/legacy/dist/src/apply/command.d.ts +3 -41
  26. package/legacy/dist/src/apply/controller/run-apply.d.ts +1 -0
  27. package/legacy/dist/src/apply/helpers/build-apply-output.d.ts +55 -0
  28. package/legacy/dist/src/apply/helpers/has-breaking-changes.d.ts +2 -0
  29. package/legacy/dist/src/apply/helpers/poll-apply-operation.d.ts +9 -0
  30. package/legacy/dist/src/apply/helpers/read-token-files.d.ts +7 -0
  31. package/legacy/dist/src/apply/helpers/slot-validation.d.ts +20 -0
  32. package/legacy/dist/src/apply/services/apply-interactive.d.ts +13 -0
  33. package/legacy/dist/src/apply/services/apply-non-interactive.d.ts +10 -0
  34. package/legacy/dist/src/apply/services/resolve-apply-inputs.d.ts +14 -0
  35. package/legacy/dist/src/generate/command.d.ts +18 -0
  36. package/legacy/dist/src/generate/controller/run-generate-components.d.ts +2 -0
  37. package/legacy/dist/src/generate/controller/run-generate-tokens.d.ts +2 -0
  38. package/legacy/dist/src/generate/helpers/assert-file-exists.d.ts +1 -0
  39. package/legacy/dist/src/generate/helpers/normalize-component-for-cache.d.ts +6 -0
  40. package/legacy/dist/src/generate/helpers/parse-precomputed-cached-names.d.ts +1 -0
  41. package/legacy/dist/src/generate/helpers/print-fallback-instructions.d.ts +6 -0
  42. package/legacy/dist/src/generate/helpers/read-file-inline.d.ts +1 -0
  43. package/legacy/dist/src/generate/services/invoke-all-component-agents.d.ts +6 -0
  44. package/legacy/dist/src/generate/services/invoke-component-agent.d.ts +36 -0
  45. package/legacy/dist/src/generate/services/load-accepted-names.d.ts +1 -0
  46. package/legacy/dist/src/generate/services/resolve-component-cache.d.ts +13 -0
  47. package/legacy/dist/src/generate/services/resolve-generate-agent.d.ts +9 -0
  48. package/legacy/dist/src/generate/services/show-generate-view.d.ts +2 -0
  49. package/legacy/dist/src/generate/services/verify-agent-binary.d.ts +2 -0
  50. package/legacy/dist/src/import/tui/WizardApp.d.ts +7 -1
  51. package/legacy/dist/src/import/tui/ai-flag.d.ts +1 -0
  52. package/legacy/dist/src/import/tui/run-selection-agent.d.ts +1 -0
  53. package/legacy/dist/src/import/tui/steps/ScopeGateStep.d.ts +1 -0
  54. package/legacy/dist/src/import/tui/wizard-state-transitions.d.ts +3 -0
  55. package/legacy/dist/src/index.js +18277 -16691
  56. package/legacy/dist/src/lib/pluralize.d.ts +1 -0
  57. package/legacy/dist/src/map-tokens/controller/run-map-tokens.d.ts +12 -0
  58. package/legacy/dist/src/map-tokens/services/render-map-tokens-result.d.ts +2 -0
  59. package/legacy/dist/src/map-tokens/services/resolve-token-name-paths.d.ts +8 -0
  60. package/legacy/dist/src/map-tokens/tui/MapTokensView.d.ts +1 -0
  61. package/legacy/dist/src/session/cache-keys.d.ts +22 -0
  62. package/legacy/dist/src/session/core/components/hash-component-shape.d.ts +5 -0
  63. package/legacy/dist/src/session/core/tokens/hash-token-content.d.ts +1 -0
  64. package/legacy/dist/src/session/db.d.ts +73 -4
  65. package/legacy/package.json +1 -5
  66. package/legacy/prompts/composition-edges.md +11 -0
  67. package/legacy/skills/select-components.md +8 -43
  68. package/package.json +3 -7
  69. package/legacy/dist/src/analyze/composition/source-call-site-evidence.d.ts +0 -30
  70. package/legacy/skills/debate-select.md +0 -23
@@ -1,2 +1,20 @@
1
1
  import type { Command } from 'commander';
2
+ export interface GenerateSubcommandOptions {
3
+ agent?: string;
4
+ model?: string;
5
+ bedrock?: boolean;
6
+ session?: string;
7
+ rawTokens?: string;
8
+ tokens?: string;
9
+ tokenMap?: string;
10
+ dryRun?: boolean;
11
+ verbose?: boolean;
12
+ cache?: boolean;
13
+ generatePromptPath?: string;
14
+ prompt?: string[];
15
+ existingEntitiesPath?: string;
16
+ cacheStatus?: boolean;
17
+ restoreCache?: boolean;
18
+ cachedComponents?: string;
19
+ }
2
20
  export declare function registerInternalGenerateCommand(program: Command): void;
@@ -0,0 +1,2 @@
1
+ import type { GenerateSubcommandOptions } from '../command.js';
2
+ export declare function runGenerateComponents(opts: GenerateSubcommandOptions, verbose: boolean): Promise<void>;
@@ -0,0 +1,2 @@
1
+ import type { GenerateSubcommandOptions } from '../command.js';
2
+ export declare function runGenerateTokens(opts: GenerateSubcommandOptions, _verbose: boolean): Promise<void>;
@@ -0,0 +1 @@
1
+ export declare function assertFileExists(flag: string, p: string): Promise<void>;
@@ -0,0 +1,6 @@
1
+ import type { RawComponentDefinition } from '../../types.js';
2
+ export declare function normalizeComponentForCache(component: RawComponentDefinition & {
3
+ component_id?: string;
4
+ }): RawComponentDefinition & {
5
+ component_id?: string;
6
+ };
@@ -0,0 +1 @@
1
+ export declare function parsePrecomputedCachedNames(value: string | undefined): Set<string>;
@@ -0,0 +1,6 @@
1
+ import type { Skill } from '@contentful/experience-design-system-generation';
2
+ export declare function printFallbackInstructions(options: {
3
+ agent: string;
4
+ skill: Skill;
5
+ sessionId: string;
6
+ }): void;
@@ -0,0 +1 @@
1
+ export declare function readFileInline(path: string | undefined): Promise<string | undefined>;
@@ -0,0 +1,6 @@
1
+ import type { RawComponentDefinition } from '../../types.js';
2
+ import type { ComponentAgentOptions, ComponentRunResult } from './invoke-component-agent.js';
3
+ export type { ComponentAgentOptions, ComponentRunResult };
4
+ export declare function invokeAllComponentAgents(options: ComponentAgentOptions, components: Array<RawComponentDefinition & {
5
+ component_id: string;
6
+ }>): Promise<ComponentRunResult[]>;
@@ -0,0 +1,36 @@
1
+ import type { AgentInvoker, AgentName } from '@contentful/experience-design-system-generation';
2
+ import type { RawComponentDefinition } from '../../types.js';
3
+ import type { openPipelineDb } from '../../session/db.js';
4
+ import type { ExistingContentfulEntities } from '../../helpers/fetch-existing-contentful-entities.js';
5
+ export interface ComponentRunResult {
6
+ componentName: string;
7
+ classified: number;
8
+ excluded: number;
9
+ slots: number;
10
+ warnings: string[];
11
+ failed: boolean;
12
+ error?: string;
13
+ cached?: boolean;
14
+ renamedSlotsCount: number;
15
+ }
16
+ export interface ComponentAgentOptions {
17
+ agent: AgentName;
18
+ model: string | undefined;
19
+ invoker: AgentInvoker;
20
+ db: ReturnType<typeof openPipelineDb>;
21
+ sessionId: string;
22
+ tokensInline: string | undefined;
23
+ tokenMapInline: string | undefined;
24
+ verbose: boolean;
25
+ noCache: boolean;
26
+ skillPathOverride: string | undefined;
27
+ skillContentOverride: string | undefined;
28
+ promptHash: string;
29
+ existingContentfulEntities: ExistingContentfulEntities | undefined;
30
+ existingTokensInline: string | undefined;
31
+ precomputedCachedNames: ReadonlySet<string>;
32
+ allowedComponentNames: ReadonlySet<string>;
33
+ }
34
+ export declare function invokeComponentAgent(options: ComponentAgentOptions, component: RawComponentDefinition & {
35
+ component_id: string;
36
+ }, index: number, total: number): Promise<ComponentRunResult>;
@@ -0,0 +1 @@
1
+ export declare function loadAcceptedNames(sessionId: string): Promise<Set<string> | null>;
@@ -0,0 +1,13 @@
1
+ import { lookupCache } from '../../session/db.js';
2
+ import type { openPipelineDb } from '../../session/db.js';
3
+ import type { RawComponentDefinition } from '../../types.js';
4
+ export type ComponentCacheResolution = {
5
+ entry: NonNullable<ReturnType<typeof lookupCache>>;
6
+ humanEdited: boolean;
7
+ };
8
+ export declare function lookupComponentCache(db: ReturnType<typeof openPipelineDb>, component: RawComponentDefinition & {
9
+ component_id: string;
10
+ }, promptHash: string): ReturnType<typeof lookupCache>;
11
+ export declare function resolveComponentCache(db: ReturnType<typeof openPipelineDb>, component: RawComponentDefinition & {
12
+ component_id: string;
13
+ }, promptHash: string, allowedComponentNames: ReadonlySet<string>): ComponentCacheResolution | null;
@@ -0,0 +1,9 @@
1
+ import type { AgentName } from '@contentful/experience-design-system-generation';
2
+ import { readExperiencesCredentials } from '../../credentials-store.js';
3
+ import type { GenerateSubcommandOptions } from '../command.js';
4
+ export interface ResolvedGenerateAgent {
5
+ agent: AgentName;
6
+ model: string | undefined;
7
+ savedCreds: Awaited<ReturnType<typeof readExperiencesCredentials>>;
8
+ }
9
+ export declare function resolveGenerateAgent(opts: Pick<GenerateSubcommandOptions, 'agent' | 'model' | 'bedrock'>): Promise<ResolvedGenerateAgent>;
@@ -0,0 +1,2 @@
1
+ import type { GenerateViewResult } from '../tui/GenerateView.js';
2
+ export declare function showGenerateView(result: GenerateViewResult): Promise<void>;
@@ -0,0 +1,2 @@
1
+ import type { AgentName, Skill } from '@contentful/experience-design-system-generation';
2
+ export declare function verifyAgentBinary(agent: AgentName, skill: Skill, sessionId: string): Promise<boolean>;
@@ -7,21 +7,26 @@ export declare function buildGenerateComponentsArgs(opts: {
7
7
  agent: string;
8
8
  model?: string;
9
9
  bedrock?: boolean;
10
+ noCache?: boolean;
10
11
  generatePromptPath?: string;
11
12
  promptOverrides?: string[];
12
13
  existingEntitiesPath?: string;
14
+ restoreCache?: boolean;
15
+ cachedComponents?: string[];
13
16
  }): string[];
14
17
  export declare function buildGenerateTokensArgs(opts: {
15
18
  rawTokensPath: string;
16
19
  agent: string;
17
20
  model?: string;
18
21
  bedrock?: boolean;
22
+ noCache?: boolean;
19
23
  promptOverrides?: string[];
20
24
  }): string[];
21
25
  export declare function buildMapTokensArgs(opts: {
22
26
  sessionId: string;
23
27
  agent: string;
24
28
  model?: string;
29
+ noCache?: boolean;
25
30
  skipAgent?: boolean;
26
31
  promptOverrides?: string[];
27
32
  existingEntitiesPath?: string;
@@ -52,10 +57,11 @@ export type WizardAppProps = {
52
57
  initialProjectPath?: string;
53
58
  host?: string;
54
59
  promptOverrides?: string[];
60
+ noCache?: boolean;
55
61
  livePreview?: boolean;
56
62
  generatePromptPath?: string;
57
63
  skipMapTokens?: boolean;
58
64
  initialRawTokensPath?: string;
59
65
  initialAgentAuth?: Promise<AgentAuthStatus>;
60
66
  };
61
- export declare function WizardApp({ initialSpaceId, initialEnvironmentId, initialCmaToken, initialHost, initialAgent, initialModel, bedrock, initialProjectPath, host, promptOverrides, livePreview, generatePromptPath, skipMapTokens, initialRawTokensPath, initialAgentAuth, }?: WizardAppProps): React.ReactElement;
67
+ export declare function WizardApp({ initialSpaceId, initialEnvironmentId, initialCmaToken, initialHost, initialAgent, initialModel, bedrock, initialProjectPath, host, promptOverrides, noCache, livePreview, generatePromptPath, skipMapTokens, initialRawTokensPath, initialAgentAuth, }?: WizardAppProps): React.ReactElement;
@@ -1,5 +1,6 @@
1
1
  export type AiFlaggable = {
2
2
  aiDecision?: 'accepted' | 'rejected' | 'failed' | null;
3
+ needsReview?: boolean;
3
4
  };
4
5
  export declare function isAiFlagged(row: AiFlaggable): boolean;
5
6
  export declare function isDefaultIncluded(row: AiFlaggable): boolean;
@@ -5,4 +5,5 @@ export declare function runSelectionAgent(options: {
5
5
  model?: string;
6
6
  promptText?: string;
7
7
  promptPath?: string;
8
+ noCache?: boolean;
8
9
  }): Promise<void>;
@@ -4,6 +4,7 @@ export type ScopeComponent = {
4
4
  componentId: string;
5
5
  aiDecision?: 'accepted' | 'rejected' | 'failed' | null;
6
6
  aiReason?: string | null;
7
+ needsReview?: boolean;
7
8
  slots?: Array<{
8
9
  name: string;
9
10
  allowedComponents: string[];
@@ -8,6 +8,9 @@ export declare function shouldSkipFinalReviewAfterCredentials(state: {
8
8
  generateSessionId: string | null;
9
9
  finalReviewPassed: boolean;
10
10
  }): boolean;
11
+ export declare function resolveNoCacheForGenerate(opts: {
12
+ cliNoCache: boolean;
13
+ }): boolean;
11
14
  export declare function shouldBypassPreview(state: {
12
15
  credentialsSkipped: boolean;
13
16
  }): boolean;