@contentful/experience-design-system-cli 2.35.1-dev-build-08991bee.0 → 2.35.1-dev-build-fa264c11.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 (47) hide show
  1. package/dist/index.js +10 -1
  2. package/dist/package.json +1 -1
  3. package/dist/src/legacy/forwarded-import-args.d.ts +1 -0
  4. package/legacy/dist/src/analyze/controller/create-analyze-extract-endpoint.d.ts +13 -0
  5. package/legacy/dist/src/analyze/helpers/resolve-composition-agent.d.ts +9 -0
  6. package/legacy/dist/src/analyze/helpers/resolve-no-cache.d.ts +4 -0
  7. package/legacy/dist/src/analyze/helpers/resolve-unreachable-mode.d.ts +1 -0
  8. package/legacy/dist/src/analyze/helpers/retry-db-write.d.ts +1 -0
  9. package/legacy/dist/src/analyze/orchestrator/execute-analyze-extract.d.ts +21 -0
  10. package/legacy/dist/src/analyze/services/collect-source-files.d.ts +1 -0
  11. package/legacy/dist/src/analyze/services/extract-with-cache.d.ts +17 -0
  12. package/legacy/dist/src/analyze/services/persist-extract-results.d.ts +11 -0
  13. package/legacy/dist/src/analyze/services/resolve-composition-mapping.d.ts +22 -0
  14. package/legacy/dist/src/analyze/services/resolve-source-directory.d.ts +1 -0
  15. package/legacy/dist/src/apply/command.d.ts +3 -41
  16. package/legacy/dist/src/apply/controller/run-apply.d.ts +1 -0
  17. package/legacy/dist/src/apply/helpers/build-apply-output.d.ts +55 -0
  18. package/legacy/dist/src/apply/helpers/has-breaking-changes.d.ts +2 -0
  19. package/legacy/dist/src/apply/helpers/poll-apply-operation.d.ts +9 -0
  20. package/legacy/dist/src/apply/helpers/read-token-files.d.ts +7 -0
  21. package/legacy/dist/src/apply/helpers/slot-validation.d.ts +20 -0
  22. package/legacy/dist/src/apply/services/apply-interactive.d.ts +13 -0
  23. package/legacy/dist/src/apply/services/apply-non-interactive.d.ts +10 -0
  24. package/legacy/dist/src/apply/services/resolve-apply-inputs.d.ts +14 -0
  25. package/legacy/dist/src/generate/command.d.ts +18 -0
  26. package/legacy/dist/src/generate/controller/run-generate-components.d.ts +2 -0
  27. package/legacy/dist/src/generate/controller/run-generate-tokens.d.ts +2 -0
  28. package/legacy/dist/src/generate/helpers/assert-file-exists.d.ts +1 -0
  29. package/legacy/dist/src/generate/helpers/normalize-component-for-cache.d.ts +6 -0
  30. package/legacy/dist/src/generate/helpers/parse-precomputed-cached-names.d.ts +1 -0
  31. package/legacy/dist/src/generate/helpers/print-fallback-instructions.d.ts +6 -0
  32. package/legacy/dist/src/generate/helpers/read-file-inline.d.ts +1 -0
  33. package/legacy/dist/src/generate/services/invoke-all-component-agents.d.ts +6 -0
  34. package/legacy/dist/src/generate/services/invoke-component-agent.d.ts +36 -0
  35. package/legacy/dist/src/generate/services/load-accepted-names.d.ts +1 -0
  36. package/legacy/dist/src/generate/services/resolve-component-cache.d.ts +13 -0
  37. package/legacy/dist/src/generate/services/resolve-generate-agent.d.ts +9 -0
  38. package/legacy/dist/src/generate/services/show-generate-view.d.ts +2 -0
  39. package/legacy/dist/src/generate/services/verify-agent-binary.d.ts +2 -0
  40. package/legacy/dist/src/index.js +24277 -23988
  41. package/legacy/dist/src/lib/pluralize.d.ts +1 -0
  42. package/legacy/dist/src/map-tokens/controller/run-map-tokens.d.ts +12 -0
  43. package/legacy/dist/src/map-tokens/services/render-map-tokens-result.d.ts +2 -0
  44. package/legacy/dist/src/map-tokens/services/resolve-token-name-paths.d.ts +8 -0
  45. package/legacy/package.json +1 -1
  46. package/package.json +2 -2
  47. package/legacy/dist/src/analyze/extract-command.d.ts +0 -7
package/dist/index.js CHANGED
@@ -1394,6 +1394,11 @@ var init_app = __esm({
1394
1394
  import { readFileSync as readFileSync3 } from "node:fs";
1395
1395
  import { Command } from "commander";
1396
1396
 
1397
+ // packages/experience-design-system-cli/src/legacy/forwarded-import-args.ts
1398
+ function forwardedImportArgs(argv) {
1399
+ return argv[0] === "import" ? argv.slice(1) : argv;
1400
+ }
1401
+
1397
1402
  // packages/experience-design-system-cli/src/legacy/run-legacy.ts
1398
1403
  init_legacy_cli_path();
1399
1404
  import { spawn } from "node:child_process";
@@ -1447,7 +1452,11 @@ function registerForwardedCommands(program) {
1447
1452
  }
1448
1453
  function createProgram() {
1449
1454
  const program = new Command().name("experiences").description("Contentful Experiences design system import CLI").version(pkg.version, "--version", "Print version number");
1450
- program.command("import", { isDefault: true }).description("Launch the Experiences CLI").action(async () => {
1455
+ program.command("import", { isDefault: true }).description("Launch the Experiences CLI").allowUnknownOption().allowExcessArguments().helpOption(false).argument("[args...]").action(async () => {
1456
+ const forwarded = forwardedImportArgs(process.argv.slice(2));
1457
+ if (forwarded.length > 0) {
1458
+ process.exit(await runLegacy(["import", ...forwarded]));
1459
+ }
1451
1460
  const { render } = await import("ink");
1452
1461
  const { runApp: runApp2 } = await Promise.resolve().then(() => (init_app(), app_exports));
1453
1462
  await runApp2(render);
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.35.1-dev-build-08991bee.0",
3
+ "version": "2.35.1-dev-build-fa264c11.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -0,0 +1 @@
1
+ export declare function forwardedImportArgs(argv: string[]): string[];
@@ -0,0 +1,13 @@
1
+ import { type AnalyzeExtractOrchestratorResult } from '../orchestrator/execute-analyze-extract.js';
2
+ export interface AnalyzeExtractEndpointRequest {
3
+ projectPath: string;
4
+ agent?: string;
5
+ noCache: boolean;
6
+ promptOverrides?: string[];
7
+ bedrock?: boolean;
8
+ onScanProgress?: (count: number) => void;
9
+ onCompositionProgress?: (phase: string) => void;
10
+ onSessionCreated?: (sessionId: string) => Promise<void> | void;
11
+ }
12
+ export type AnalyzeExtractEndpointResponse = AnalyzeExtractOrchestratorResult;
13
+ export declare function analyzeExtractEndpoint(request: AnalyzeExtractEndpointRequest): Promise<AnalyzeExtractEndpointResponse>;
@@ -0,0 +1,9 @@
1
+ import type { AgentName } from '@contentful/experience-design-system-generation';
2
+ export declare function resolveCompositionAgentName(flagValue?: string): AgentName;
3
+ export declare function readCandidateFiles(components: Array<{
4
+ sourcePath?: string;
5
+ source?: string;
6
+ }>, extraFiles?: string[]): Promise<Array<{
7
+ path: string;
8
+ content: string;
9
+ }>>;
@@ -0,0 +1,4 @@
1
+ export declare function resolveExtractNoCache(opts: {
2
+ cache?: boolean;
3
+ noCache?: boolean;
4
+ }): boolean;
@@ -0,0 +1 @@
1
+ export declare function resolveUnreachableMode(value: string | undefined): 'auto' | 'always' | 'never';
@@ -0,0 +1 @@
1
+ export declare function retryDatabaseWrite<T>(operation: () => T, attempts?: number): Promise<T>;
@@ -0,0 +1,21 @@
1
+ import type { AgentName } from '@contentful/experience-design-system-generation';
2
+ export interface AnalyzeExtractOrchestratorRequest {
3
+ projectRoot: string;
4
+ sourceDirectory: string;
5
+ outDir: string;
6
+ noCache: boolean;
7
+ forceAgent: boolean;
8
+ agent: AgentName;
9
+ compositionPrompt?: string;
10
+ resolveUnreachable: 'auto' | 'always' | 'never';
11
+ onScanProgress?: (count: number) => void;
12
+ onCompositionProgress?: (phase: string) => void;
13
+ onSessionCreated?: (sessionId: string) => void | Promise<void>;
14
+ }
15
+ export interface AnalyzeExtractOrchestratorResult {
16
+ sessionId: string;
17
+ sourceFileCount: number;
18
+ componentCount: number;
19
+ warnings: string[];
20
+ }
21
+ export declare function executeAnalyzeExtractOrchestrator(request: AnalyzeExtractOrchestratorRequest): Promise<AnalyzeExtractOrchestratorResult>;
@@ -0,0 +1 @@
1
+ export declare function collectSourceFiles(directory: string, onProgress?: (scannedCount: number) => void): Promise<string[]>;
@@ -0,0 +1,17 @@
1
+ import type { RawComponentDefinition } from '../../types.js';
2
+ import type { openPipelineDb } from '../../session/db.js';
3
+ export interface ExtractionWithCacheOptions {
4
+ db: ReturnType<typeof openPipelineDb>;
5
+ sourceFiles: string[];
6
+ noCache: boolean;
7
+ resolveUnreachable?: 'auto' | 'always' | 'never';
8
+ projectRoot?: string;
9
+ cacheVersion: string;
10
+ onProgress?: (filesProcessed: number) => void;
11
+ }
12
+ export interface ExtractionWithCacheResult {
13
+ components: RawComponentDefinition[];
14
+ warnings: string[];
15
+ cacheHits: number;
16
+ }
17
+ export declare function runExtractionWithCache(options: ExtractionWithCacheOptions): Promise<ExtractionWithCacheResult>;
@@ -0,0 +1,11 @@
1
+ import type { RawComponentDefinition } from '../../types.js';
2
+ import type { openPipelineDb } from '../../session/db.js';
3
+ export interface PersistExtractResultsOptions {
4
+ db: ReturnType<typeof openPipelineDb>;
5
+ sessionId: string;
6
+ stepId: number;
7
+ projectRoot: string;
8
+ sourceFiles: string[];
9
+ components: RawComponentDefinition[];
10
+ }
11
+ export declare function persistExtractResults(options: PersistExtractResultsOptions): Promise<void>;
@@ -0,0 +1,22 @@
1
+ import type { AgentName } from '@contentful/experience-design-system-generation';
2
+ import type { RawComponentDefinition } from '../../types.js';
3
+ import type { openPipelineDb } from '../../session/db.js';
4
+ export interface CompositionMappingOptions {
5
+ db: ReturnType<typeof openPipelineDb>;
6
+ components: RawComponentDefinition[];
7
+ allFiles: Array<{
8
+ path: string;
9
+ content: string;
10
+ }>;
11
+ noCache: boolean;
12
+ forceAgent: boolean;
13
+ agent: AgentName;
14
+ promptOverride?: string;
15
+ cacheVersion: string;
16
+ onProgress?: (phase: string) => void;
17
+ }
18
+ export interface CompositionMappingResult {
19
+ components: RawComponentDefinition[];
20
+ warnings: string[];
21
+ }
22
+ export declare function resolveCompositionMapping(options: CompositionMappingOptions): Promise<CompositionMappingResult>;
@@ -0,0 +1 @@
1
+ export declare function resolveSourceDirectory(projectRoot: string, dir: string | undefined): Promise<string>;
@@ -1,43 +1,5 @@
1
1
  import type { Command } from 'commander';
2
- import type { CDFComponentEntry, CDFTokenEntry, CDFValidationError, DTCGTokenEntry } from '@contentful/experience-design-system-types';
3
- import { findSlotCycles } from '../analyze/cycle-detection.js';
4
- import type { ServerPreviewResponse } from '@contentful/experience-design-system-types';
5
- export declare function readTokensFromPath(flag: string, p: string): Promise<DTCGTokenEntry[]>;
6
- /** Adapts flat DTCGTokenEntry[] (path alongside the leaf) into the
7
- * {path, entry} pairs buildCDF/buildFilteredCDF expect. */
8
- export declare function toCDFTokens(tokens: DTCGTokenEntry[]): Array<{
9
- path: string;
10
- entry: CDFTokenEntry;
11
- }>;
12
- export declare function detectSlotCycles(components: Array<{
13
- key: string;
14
- entry: CDFComponentEntry;
15
- }>): ReturnType<typeof findSlotCycles>;
16
- export declare function formatSlotCycleReport(cycles: ReturnType<typeof findSlotCycles>): string[];
17
- export declare function assertNoSlotCycles(components: Array<{
18
- key: string;
19
- entry: CDFComponentEntry;
20
- }>): Promise<void>;
21
- /**
22
- * Client-side pre-flight for `$allowedComponents` references that are absent
23
- * from this document, so a typo'd or renamed reference fails fast instead of
24
- * waiting on the `previewImport`/`applyImport` round-trip. Only catches
25
- * document-internal misses — a name that resolves against an *existing*
26
- * target-environment Component still needs the network round-trip to
27
- * confirm, so this cannot replace the server-side check.
28
- *
29
- * `validateSlotReferences` is the detection step (shared with
30
- * `WizardApp.tsx` via `formatUnresolvedSlotReferences` below, mirroring how
31
- * `detectSlotCycles`/`formatSlotCycleReport` split for the cycle check).
32
- */
33
- export declare function formatUnresolvedSlotReferences(errors: CDFValidationError[]): string[];
34
- export declare function assertNoUnresolvedSlotReferences(components: Array<{
35
- key: string;
36
- entry: CDFComponentEntry;
37
- }>): Promise<void>;
38
- export declare function extractComponents(cdf: Record<string, unknown> | null | undefined): Array<{
39
- key: string;
40
- entry: CDFComponentEntry;
41
- }>;
42
- export declare function hasBreakingChangesWithImpact(preview: ServerPreviewResponse): boolean;
2
+ export { readTokensFromPath, toCDFTokens } from './helpers/read-token-files.js';
3
+ export { detectSlotCycles, formatSlotCycleReport, assertNoSlotCycles, formatUnresolvedSlotReferences, assertNoUnresolvedSlotReferences, extractComponents, } from './helpers/slot-validation.js';
4
+ export { hasBreakingChangesWithImpact } from './helpers/has-breaking-changes.js';
43
5
  export declare function registerApplyCommand(program: Command): void;
@@ -0,0 +1 @@
1
+ export declare function runApply(file: string): Promise<void>;
@@ -0,0 +1,55 @@
1
+ import type { ApplyOperationResponse, ServerPreviewResponse } from '@contentful/experience-design-system-types';
2
+ export declare function buildPreviewOutput(preview: ServerPreviewResponse, spaceId: string, environmentId: string): {
3
+ spaceId: string;
4
+ environmentId: string;
5
+ components: {
6
+ new: number;
7
+ changed: number;
8
+ unchanged: number;
9
+ removed: number;
10
+ breaking: number;
11
+ draftOverwrites: number;
12
+ };
13
+ tokens: {
14
+ new: number;
15
+ changed: number;
16
+ unchanged: number;
17
+ removed: number;
18
+ draftOverwrites: number;
19
+ };
20
+ taxonomies: {
21
+ new: number;
22
+ changed: number;
23
+ unchanged: number;
24
+ removed: number;
25
+ };
26
+ };
27
+ export declare function buildApplyOutput(operation: ApplyOperationResponse, spaceId: string, environmentId: string, host: string | undefined): {
28
+ status: import("@contentful/experience-design-system-types").ApplyOperationStatus;
29
+ operationId: string;
30
+ spaceId: string;
31
+ environmentId: string;
32
+ summary: {
33
+ total: number;
34
+ pending: number;
35
+ succeeded: number;
36
+ failed: number;
37
+ };
38
+ componentTypes: {
39
+ created: number;
40
+ updated: number;
41
+ failed: number;
42
+ };
43
+ designTokens: {
44
+ created: number;
45
+ updated: number;
46
+ failed: number;
47
+ };
48
+ viewUrl: string;
49
+ tokensUrl: string;
50
+ failures: {
51
+ entityType: "ComponentType" | "DesignToken";
52
+ entityId: string;
53
+ error: string;
54
+ }[];
55
+ };
@@ -0,0 +1,2 @@
1
+ import type { ServerPreviewResponse } from '@contentful/experience-design-system-types';
2
+ export declare function hasBreakingChangesWithImpact(preview: ServerPreviewResponse): boolean;
@@ -0,0 +1,9 @@
1
+ import { ApiError, ImportApiClient } from '../api-client.js';
2
+ import type { ApplyOperationResponse } from '@contentful/experience-design-system-types';
3
+ export interface PollApplyOptions {
4
+ acknowledgeBreakingChanges: boolean;
5
+ onProgress?: (status: 'applying' | 'polling', operationId?: string) => void;
6
+ onStarted?: (operationId: string) => void;
7
+ onApiError: (error: ApiError) => Promise<void> | void;
8
+ }
9
+ export declare function pollApplyOperation(client: ImportApiClient, cdf: Parameters<ImportApiClient['applyImport']>[0], options: PollApplyOptions): Promise<ApplyOperationResponse | null>;
@@ -0,0 +1,7 @@
1
+ import type { CDFTokenEntry, DTCGTokenEntry } from '@contentful/experience-design-system-types';
2
+ export declare function readJsonFile(flag: string, p: string): Promise<unknown>;
3
+ export declare function readTokensFromPath(flag: string, p: string): Promise<DTCGTokenEntry[]>;
4
+ export declare function toCDFTokens(tokens: DTCGTokenEntry[]): Array<{
5
+ path: string;
6
+ entry: CDFTokenEntry;
7
+ }>;
@@ -0,0 +1,20 @@
1
+ import type { CDFComponentEntry, CDFValidationError } from '@contentful/experience-design-system-types';
2
+ import { findSlotCycles } from '../../analyze/cycle-detection.js';
3
+ export declare function detectSlotCycles(components: Array<{
4
+ key: string;
5
+ entry: CDFComponentEntry;
6
+ }>): ReturnType<typeof findSlotCycles>;
7
+ export declare function formatSlotCycleReport(cycles: ReturnType<typeof findSlotCycles>): string[];
8
+ export declare function assertNoSlotCycles(components: Array<{
9
+ key: string;
10
+ entry: CDFComponentEntry;
11
+ }>): Promise<void>;
12
+ export declare function formatUnresolvedSlotReferences(errors: CDFValidationError[]): string[];
13
+ export declare function assertNoUnresolvedSlotReferences(components: Array<{
14
+ key: string;
15
+ entry: CDFComponentEntry;
16
+ }>): Promise<void>;
17
+ export declare function extractComponents(cdf: Record<string, unknown> | null | undefined): Array<{
18
+ key: string;
19
+ entry: CDFComponentEntry;
20
+ }>;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { ImportApiClient } from '../api-client.js';
3
+ export interface ApplyInteractiveOptions {
4
+ client: ImportApiClient;
5
+ cdf: Parameters<ImportApiClient['applyImport']>[0];
6
+ spaceId: string;
7
+ environmentId: string;
8
+ host?: string;
9
+ acknowledgeBreakingChanges: boolean;
10
+ rerender: (element: React.ReactElement) => void;
11
+ onDone: () => void;
12
+ }
13
+ export declare function applyInteractive(options: ApplyInteractiveOptions): Promise<void>;
@@ -0,0 +1,10 @@
1
+ import { ImportApiClient } from '../api-client.js';
2
+ export interface ApplyNonInteractiveOptions {
3
+ client: ImportApiClient;
4
+ cdf: Parameters<ImportApiClient['applyImport']>[0];
5
+ spaceId: string;
6
+ environmentId: string;
7
+ host?: string;
8
+ acknowledgeBreakingChanges: boolean;
9
+ }
10
+ export declare function applyNonInteractive(options: ApplyNonInteractiveOptions): Promise<void>;
@@ -0,0 +1,14 @@
1
+ import type { CDFComponentEntry, DTCGTokenEntry } from '@contentful/experience-design-system-types';
2
+ import { ImportApiClient } from '../api-client.js';
3
+ export interface ApplyInputs {
4
+ components: Array<{
5
+ key: string;
6
+ entry: CDFComponentEntry;
7
+ }>;
8
+ tokens: DTCGTokenEntry[];
9
+ client: ImportApiClient;
10
+ spaceId: string;
11
+ environmentId: string;
12
+ host?: string;
13
+ }
14
+ export declare function resolveApplyInputsOrDie(file: string): Promise<ApplyInputs>;
@@ -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>;