@contentful/experience-design-system-cli 2.34.5-dev-build-fcf31517.0 → 2.34.5-dev-build-04d687d.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.34.5-dev-build-fcf31517.0",
3
+ "version": "2.34.5-dev-build-04d687d.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,17 +1,11 @@
1
1
  /**
2
2
  * The CLI-owned composition interchange format (spec T1).
3
3
  *
4
- * Two views of the same data:
5
- * - `InterchangeMap` — the human-authored / on-disk `{ version, groups }`
6
- * shape (parent → children), consumed by the composition-map option.
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 = 'user' | 'typed-slot' | 'structural' | 'manifest' | 'doc' | `adapter:${string}` | 'agent';
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 { type CompositionEdge, type InterchangeMap } from './interchange-schema.js';
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: user map (1) > typed-slot / "code slots" (2) > structural
15
- * usage evidence (3) > manifest (4) > doc (5) > adapter-resolved / extraEdges
16
- * (6) > edge-emitting agent (7). Manifest/doc edges are computed deterministically outside
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 the user map.
56
+ * code slots and other automatic mapping sources.
59
57
  */
60
58
  extraEdges?: CompositionEdge[];
61
59
  }): Promise<ResolveMappingResult>;
@@ -1,11 +1,11 @@
1
1
  /**
2
- * Resolution chain for `--agent` and `--model` overrides on `experiences import`.
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". `--model` was
8
- * registered but never threaded into the wizard subprocesses at all.
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 `--model` is omitted.
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, compositionMap, promptOverrides, noCache, livePreview, generatePromptPath, skipMapTokens, initialRawTokensPath, }?: WizardAppProps): React.ReactElement;
63
+ export declare function WizardApp({ initialSpaceId, initialEnvironmentId, initialCmaToken, initialHost, initialAgent, initialModel, bedrock, initialProjectPath, host, promptOverrides, noCache, livePreview, generatePromptPath, skipMapTokens, initialRawTokensPath, }?: WizardAppProps): React.ReactElement;
@@ -0,0 +1,8 @@
1
+ import { type AgentName } from '@contentful/experience-design-system-generation';
2
+ export declare function runSelectionAgent(options: {
3
+ sessionId: string;
4
+ agent: AgentName;
5
+ model?: string;
6
+ promptText?: string;
7
+ promptPath?: string;
8
+ }): Promise<void>;
@@ -1,7 +1,18 @@
1
1
  import React from 'react';
2
2
  import type { BreakingChange, CDFComponentEntry, ComponentTypeSummary, DownstreamImpact, ServerPreviewResponse } from '@contentful/experience-design-system-types';
3
- import type { ReviewStepProps } from '../review-step-props.js';
4
- type GenerateReviewStepProps = ReviewStepProps;
3
+ type GenerateReviewStepProps = {
4
+ extractSessionId: string | null;
5
+ tokenSessionId?: string | null;
6
+ onFinalize: (accepted: number, rejected: number, unresolved: number) => void;
7
+ onQuit: () => void;
8
+ livePreview?: boolean;
9
+ spaceId?: string;
10
+ environmentId?: string;
11
+ cmaToken?: string;
12
+ host?: string;
13
+ tokensPath?: string;
14
+ initialFinalizeError?: string | null;
15
+ };
5
16
  export declare function sortComponentsForSidebar<T extends {
6
17
  key: string;
7
18
  entry: CDFComponentEntry;
@@ -23,4 +34,4 @@ export interface BreakingRow {
23
34
  }
24
35
  export declare function buildBreakingRows(breakingChanges: BreakingComponent[]): BreakingRow[];
25
36
  export declare function deriveBreakingChanges(response: ServerPreviewResponse): BreakingComponent[];
26
- export declare function GenerateReviewStep({ extractSessionId, tokenSessionId, onFinalize, onQuit, livePreview, spaceId, environmentId, cmaToken, host, tokensPath, initialFinalizeError, }: GenerateReviewStepProps): React.ReactElement;
37
+ export declare function GenerateReviewStep(props: GenerateReviewStepProps): React.ReactElement;
@@ -25,7 +25,7 @@ export type ScopeGateStepProps = {
25
25
  aiFilterError?: string | null;
26
26
  onCancelAutoFilter?: () => void;
27
27
  };
28
- export declare function ScopeGateStep({ components, onConfirm, onQuit }: ScopeGateStepProps): React.ReactElement;
28
+ export declare function ScopeGateStep(props: ScopeGateStepProps): React.ReactElement;
29
29
  export declare function sideColumnLabelStyle(input: {
30
30
  isCycle: boolean;
31
31
  isSelected: boolean;