@contentful/experience-design-system-cli 2.34.5-dev-build-d08439d.0 → 2.34.5-dev-build-5e798cb1.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 (109) hide show
  1. package/README.md +35 -276
  2. package/dist/package.json +2 -1
  3. package/dist/src/analytics/constants.d.ts +2 -2
  4. package/dist/src/analytics/index.d.ts +1 -1
  5. package/dist/src/analytics/normalize.d.ts +1 -1
  6. package/dist/src/analytics/types.d.ts +1 -1
  7. package/dist/src/analyze/composition/composition-cache-key.d.ts +2 -3
  8. package/dist/src/analyze/composition/interchange-schema.d.ts +2 -2
  9. package/dist/src/analyze/composition/prompt-loader.d.ts +3 -0
  10. package/dist/src/analyze/composition/resolve-mapping-cli.d.ts +1 -5
  11. package/dist/src/analyze/composition/resolve-mapping.d.ts +7 -8
  12. package/dist/src/analyze/extract-command.d.ts +3 -0
  13. package/dist/src/analyze/select/command.d.ts +3 -25
  14. package/dist/src/analyze/select/preview-annotations.d.ts +6 -6
  15. package/dist/src/analyze/select/tui/components/GotoBanner.d.ts +1 -1
  16. package/dist/src/apply/api-client.d.ts +4 -6
  17. package/dist/src/apply/command.d.ts +25 -4
  18. package/dist/src/apply/preview-utils.d.ts +2 -6
  19. package/dist/src/apply/tokens.d.ts +1 -0
  20. package/dist/src/apply/tui/ServerApplyView.d.ts +3 -6
  21. package/dist/src/apply/tui/ServerPreviewView.d.ts +1 -2
  22. package/dist/src/credentials-store.d.ts +0 -10
  23. package/dist/src/generate/command.d.ts +1 -1
  24. package/dist/src/helpers/read-existing-contentful-entities-from-session.d.ts +1 -1
  25. package/dist/src/import/agent-model-resolve.d.ts +1 -1
  26. package/dist/src/import/composition-options.d.ts +0 -8
  27. package/dist/src/import/tui/CustomPromptBanner.d.ts +1 -2
  28. package/dist/src/import/tui/WizardApp.d.ts +14 -41
  29. package/dist/src/import/tui/final-review-host.d.ts +1 -5
  30. package/dist/src/import/tui/hooks/useReviewPreview.d.ts +1 -2
  31. package/dist/src/import/tui/hooks/useReviewSession.d.ts +21 -0
  32. package/dist/src/import/tui/lineage-input.d.ts +2 -2
  33. package/dist/src/import/tui/preview-confirmation-input.d.ts +1 -2
  34. package/dist/src/import/tui/review-step-props.d.ts +0 -1
  35. package/dist/src/import/tui/runLivePreview.d.ts +0 -3
  36. package/dist/src/import/tui/runScopeGate.d.ts +0 -10
  37. package/dist/src/import/tui/scope-gate-host.d.ts +3 -7
  38. package/dist/src/import/tui/steps/ErrorStep.d.ts +2 -1
  39. package/dist/src/import/tui/steps/GenerateReviewStep.d.ts +1 -1
  40. package/dist/src/import/tui/steps/ScopeGateStep.d.ts +1 -1
  41. package/dist/src/import/tui/steps/WizardPreviewStep.d.ts +2 -6
  42. package/dist/src/import/tui/useFinalizePreview.d.ts +3 -8
  43. package/dist/src/import/tui/useLivePreview.d.ts +2 -4
  44. package/dist/src/import/tui/wizard-422-helpers.d.ts +1 -1
  45. package/dist/src/import/tui/wizard-state-transitions.d.ts +2 -4
  46. package/dist/src/index.js +22009 -29339
  47. package/dist/src/lib/command-options.d.ts +0 -3
  48. package/dist/src/lib/contentful-urls.d.ts +2 -4
  49. package/dist/src/lib/debug-logger.d.ts +0 -2
  50. package/dist/src/runs/fingerprint.d.ts +0 -12
  51. package/dist/src/runs/save-path-resolver.d.ts +0 -46
  52. package/dist/src/runs/store.d.ts +2 -18
  53. package/dist/src/session/cache-keys.d.ts +1 -1
  54. package/dist/src/session/db.d.ts +3 -6
  55. package/dist/src/setup/command.d.ts +1 -2
  56. package/package.json +7 -6
  57. package/skills/generate-components.md +1 -1
  58. package/dist/src/analytics/env.d.ts +0 -2
  59. package/dist/src/analyze/build-analyze-view-rows.d.ts +0 -32
  60. package/dist/src/analyze/command.d.ts +0 -14
  61. package/dist/src/analyze/composition/agent-parser/author-prompt.d.ts +0 -4
  62. package/dist/src/analyze/composition/agent-parser/extract-parser.d.ts +0 -8
  63. package/dist/src/analyze/composition/agent-parser/load-prompt.d.ts +0 -7
  64. package/dist/src/analyze/composition/agent-parser/resolve-via-parser.d.ts +0 -46
  65. package/dist/src/analyze/composition/agent-parser/sandbox.d.ts +0 -45
  66. package/dist/src/analyze/composition/candidate-critic-agent.d.ts +0 -7
  67. package/dist/src/analyze/composition/candidate-critic.d.ts +0 -32
  68. package/dist/src/analyze/select-agent/command.d.ts +0 -4
  69. package/dist/src/analyze/select-agent/context-builder.d.ts +0 -50
  70. package/dist/src/analyze/select-agent/show-rationale.d.ts +0 -9
  71. package/dist/src/analyze/tui/AnalyzeView.d.ts +0 -39
  72. package/dist/src/apply/manifest.d.ts +0 -1
  73. package/dist/src/apply/tui/SelectView.d.ts +0 -18
  74. package/dist/src/generate/edit/command.d.ts +0 -2
  75. package/dist/src/import/auto-filter-resolve.d.ts +0 -3
  76. package/dist/src/import/orchestrator.d.ts +0 -76
  77. package/dist/src/import/picker-dispatch.d.ts +0 -28
  78. package/dist/src/import/print-prompt.d.ts +0 -34
  79. package/dist/src/import/strip-allowed-components.d.ts +0 -18
  80. package/dist/src/import/tui/auto-filter-error.d.ts +0 -1
  81. package/dist/src/import/tui/components/AutoFilterBanner.d.ts +0 -10
  82. package/dist/src/import/tui/merge-ai-decisions.d.ts +0 -5
  83. package/dist/src/import/tui/steps/AtomicGenerateReviewStep.d.ts +0 -28
  84. package/dist/src/import/tui/steps/AtomicScopeGateStep.d.ts +0 -3
  85. package/dist/src/import/tui/wizard-save-flow.d.ts +0 -37
  86. package/dist/src/lib/composition-mode.d.ts +0 -30
  87. package/dist/src/runs/export-helpers.d.ts +0 -5
  88. package/dist/src/runs/ls-command.d.ts +0 -12
  89. package/dist/src/runs/modify-launcher.d.ts +0 -34
  90. package/dist/src/runs/picker-labels.d.ts +0 -24
  91. package/dist/src/runs/push-creds-prompt.d.ts +0 -25
  92. package/dist/src/runs/push-helpers.d.ts +0 -20
  93. package/dist/src/runs/push-launcher.d.ts +0 -52
  94. package/dist/src/runs/replay-helpers.d.ts +0 -71
  95. package/dist/src/runs/resolve-run-target.d.ts +0 -12
  96. package/dist/src/runs/run-picker-mount.d.ts +0 -46
  97. package/dist/src/runs/run-picker.d.ts +0 -18
  98. package/dist/src/runs/staleness.d.ts +0 -38
  99. package/dist/src/runs/wizard-launcher.d.ts +0 -2
  100. package/dist/src/runs/wizard-seed.d.ts +0 -20
  101. package/dist/src/session/cli.d.ts +0 -2
  102. package/dist/src/session/stats.d.ts +0 -26
  103. package/dist/src/setup/auto-filter-prompt.d.ts +0 -13
  104. package/dist/src/setup/composition-mode-prompt.d.ts +0 -14
  105. package/prompts/composition-dir-critic.md +0 -7
  106. package/prompts/composition-parser-repair-empty.md +0 -1
  107. package/prompts/composition-parser-repair-error.md +0 -2
  108. package/prompts/composition-parser.md +0 -49
  109. /package/dist/src/analyze/select/tui/{App.d.ts → LegacySelectApp.d.ts} +0 -0
@@ -1,26 +1,16 @@
1
- import type { Command } from 'commander';
2
1
  import type { ReviewSessionSnapshot } from './types.js';
3
2
  import type { PreviewValidationError } from '../../apply/api-client.js';
4
3
  /**
5
4
  * Load components from the pipeline DB and re-run extraction validation.
6
5
  *
7
6
  * `validationIssues` is intentionally not persisted (the validator is pure
8
- * and cheap to re-run), so any cold-start of `analyze select` from a prior
9
- * `analyze extract` session needs to recompute it before building the
10
- * review snapshot — otherwise the TUI sees no validation errors at all.
7
+ * and cheap to re-run), so any cold-start of the review state needs to
8
+ * recompute it before building the review snapshot.
11
9
  */
12
10
  export declare function loadAndValidateForReview(sessionId: string, projectRoot: string | undefined): Promise<ReviewSessionSnapshot>;
13
11
  /**
14
12
  * Synthesize SERVER_VALIDATION_FAILED issues onto the review state file's
15
- * matching components. Used by the wizard's 422 recovery path: after a
16
- * preview-API validation error, this runs before re-launching the
17
- * analyze-select TUI so the Sidebar's existing red-warning rendering
18
- * pins the offenders to the top.
19
- *
20
- * Idempotent on identical input is NOT a contract: each call appends.
21
- * The wizard's 422 path is a one-shot per preview attempt, so duplicate
22
- * issues only matter if a caller invokes this twice without the user
23
- * round-tripping through the TUI in between.
13
+ * matching components for the wizard's 422 recovery path.
24
14
  */
25
15
  export declare function patchReviewStateWithValidationErrors(sessionId: string, errors: PreviewValidationError[], opts?: {
26
16
  artifactsRoot?: string;
@@ -31,19 +21,7 @@ export declare function patchReviewStateWithValidationErrors(sessionId: string,
31
21
  /**
32
22
  * Exclude components whose names appear in `names` from the next preview/push.
33
23
  * Used by the wizard's "skip and retry" path after a 422.
34
- *
35
- * Two stores are updated:
36
- * - Pipeline DB (`raw_components.status` → `'generate-rejected'`) so that
37
- * `loadCDFComponents()` excludes them from the next manifest. This is the
38
- * load-bearing change — preview reads from the DB, not the JSON file.
39
- * - Review state JSON (`status` → `'rejected'`) so that if the user re-enters
40
- * the analyze-select TUI later, the rejected status is reflected.
41
- *
42
- * `'generate-rejected'` matches the existing convention for "component was
43
- * generated successfully but later excluded" (see GenerateReviewStep) — the
44
- * component generated fine locally but failed server-side validation.
45
24
  */
46
25
  export declare function rejectComponentsByName(sessionId: string, names: string[], opts?: {
47
26
  artifactsRoot?: string;
48
27
  }): Promise<void>;
49
- export declare function registerAnalyzeEditCommand(program: Command): void;
@@ -8,15 +8,15 @@ import type { PreviewAnnotation } from './types.js';
8
8
  *
9
9
  * The `new` bucket of `ServerPreviewResponse.components` is `CDFComponentEntry[]`
10
10
  * — those entries do NOT carry a `name` field on the wire (the name is the
11
- * KEY in the parent manifest). So instead of trying to read names off entries,
12
- * we derive the "new" set as:
11
+ * KEY in the parent CDF document). So instead of trying to read names off
12
+ * entries, we derive the "new" set as:
13
13
  *
14
14
  * new = localNames \ (unchangedNames ∪ changedNames ∪ removedNames)
15
15
  *
16
- * Callers must pass the local manifest's component keys as `localNames` so
17
- * we can perform the set difference. Removed components from the server that
18
- * aren't in the local manifest are still annotated as `'removed'` (so the
19
- * detail panel can list them).
16
+ * Callers must pass the local CDF document's component keys as `localNames`
17
+ * so we can perform the set difference. Removed components from the server
18
+ * that aren't in the local document are still annotated as `'removed'` (so
19
+ * the detail panel can list them).
20
20
  *
21
21
  * Precedence: `breaking` > `changed` > `removed` > `new`.
22
22
  *
@@ -24,7 +24,7 @@ export interface GotoBannerProps {
24
24
  /**
25
25
  * Escape hatch for feature-specific row rendering. Receives the row, its
26
26
  * index into `rows`, and whether the cursor is on it. Falls back to a
27
- * generic ▶-pointer row.
27
+ * generic pointer row.
28
28
  */
29
29
  renderRow?: (row: GotoRow, index: number, isCursor: boolean) => React.ReactElement;
30
30
  }
@@ -1,7 +1,6 @@
1
- import type { ManifestPayload, ServerPreviewResponse, ApplyOperationResponse } from '@contentful/experience-design-system-types';
1
+ import type { CDFDocument, ServerPreviewResponse, ApplyOperationResponse } from '@contentful/experience-design-system-types';
2
2
  export declare const PREVIEW_ERROR_PREFIX = "preview failed:";
3
3
  export declare const APPLY_ERROR_PREFIX = "apply failed:";
4
- export declare const VALIDATION_FAILED_CODE = "\"ValidationFailed\"";
5
4
  export interface ApiClientOptions {
6
5
  host?: string;
7
6
  cmaToken: string;
@@ -33,7 +32,7 @@ export interface PreviewValidationError {
33
32
  * Path shape: `manifest:components/<Name>/$slots/<key>` or
34
33
  * `manifest:components/<Name>/$properties/<key>`. Only the component
35
34
  * name is extracted today; `path` and `message` are kept verbatim so
36
- * future surfaces (debug logging, headless retry in SP-4) can render
35
+ * future diagnostic surfaces can render
37
36
  * the field-level detail.
38
37
  */
39
38
  export declare function parsePreviewValidationErrors(body: string): PreviewValidationError[];
@@ -52,10 +51,9 @@ export declare class ImportApiClient {
52
51
  private requestWithRetry;
53
52
  validateToken(): Promise<void>;
54
53
  checkPreflight(): Promise<void>;
55
- previewImport(manifest: ManifestPayload, allowDeletions?: boolean): Promise<ServerPreviewResponse>;
56
- applyImport(manifest: ManifestPayload, options: {
54
+ previewImport(cdf: CDFDocument): Promise<ServerPreviewResponse>;
55
+ applyImport(cdf: CDFDocument, options: {
57
56
  acknowledgeBreakingChanges: boolean;
58
- allowDeletions?: boolean;
59
57
  }): Promise<ApplyOperationResponse>;
60
58
  pollOperation(operationId: string, opts?: {
61
59
  intervalMs?: number;
@@ -1,8 +1,14 @@
1
1
  import type { Command } from 'commander';
2
- import type { CDFComponentEntry, DTCGTokenEntry } from '@contentful/experience-design-system-types';
2
+ import type { CDFComponentEntry, CDFTokenEntry, CDFValidationError, DTCGTokenEntry } from '@contentful/experience-design-system-types';
3
3
  import { findSlotCycles } from '../analyze/cycle-detection.js';
4
4
  import type { ServerPreviewResponse } from '@contentful/experience-design-system-types';
5
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
+ }>;
6
12
  export declare function detectSlotCycles(components: Array<{
7
13
  key: string;
8
14
  entry: CDFComponentEntry;
@@ -12,9 +18,24 @@ export declare function assertNoSlotCycles(components: Array<{
12
18
  key: string;
13
19
  entry: CDFComponentEntry;
14
20
  }>): Promise<void>;
15
- export declare function extractComponentsFromManifest(manifest: {
16
- componentsManifest?: Record<string, unknown>;
17
- } | null | undefined): Array<{
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<{
18
39
  key: string;
19
40
  entry: CDFComponentEntry;
20
41
  }>;
@@ -4,13 +4,9 @@ import type { ServerPreviewResponse } from '@contentful/experience-design-system
4
4
  * every diff bucket (components, tokens, taxonomies). Used by:
5
5
  * - `experiences apply` (CLI): short-circuit the confirm-and-push step.
6
6
  * - `experiences import` wizard: block finalize when the resulting push
7
- * would be a pure no-op (INTEG-4411 refined guard).
7
+ * would be a pure no-op.
8
8
  *
9
9
  * A push that produces ANY entry in ANY bucket — including a rejection that
10
- * removes a server-side component — is NOT empty. Note the server hides
11
- * removals entirely (empty removed[]) unless the preview was fetched with
12
- * allowDeletions: true, so "empty" here also correctly describes a preview
13
- * with pending-but-hidden deletions: pushing without --allow-deletions is a
14
- * genuine no-op in that case too, since the apply gate hides them the same way.
10
+ * removes a server-side component — is NOT empty.
15
11
  */
16
12
  export declare function isEmptyPreview(preview: ServerPreviewResponse): boolean;
@@ -0,0 +1 @@
1
+ export { readTokensFromPath, hasBreakingChangesWithImpact, toCDFTokens } from './command.js';
@@ -5,19 +5,16 @@ interface ServerPreviewConfirmProps {
5
5
  spaceId: string;
6
6
  environmentId: string;
7
7
  breakingWithImpact: boolean;
8
- /** The value the preview was actually fetched with. */
9
- allowDeletions: boolean;
10
- onConfirm: (acknowledge: boolean, allowDeletions: boolean) => void;
8
+ onConfirm: (acknowledge: boolean) => void;
11
9
  onCancel: () => void;
12
10
  }
13
- export declare function ServerPreviewConfirm({ preview, spaceId, environmentId, breakingWithImpact, allowDeletions: fetchedAllowDeletions, onConfirm, onCancel, }: ServerPreviewConfirmProps): React.ReactElement;
11
+ export declare function ServerPreviewConfirm({ preview, spaceId, environmentId, breakingWithImpact, onConfirm, onCancel, }: ServerPreviewConfirmProps): React.ReactElement;
14
12
  interface ServerPreviewAppProps {
15
13
  preview: ServerPreviewResponse;
16
14
  spaceId: string;
17
15
  environmentId: string;
18
- allowDeletions: boolean;
19
16
  }
20
- export declare function ServerPreviewApp({ preview, spaceId, environmentId, allowDeletions, }: ServerPreviewAppProps): React.ReactElement;
17
+ export declare function ServerPreviewApp({ preview, spaceId, environmentId }: ServerPreviewAppProps): React.ReactElement;
21
18
  interface ServerApplyProgressProps {
22
19
  spaceId: string;
23
20
  environmentId: string;
@@ -4,7 +4,6 @@ interface ServerPreviewViewProps {
4
4
  preview: ServerPreviewResponse;
5
5
  spaceId: string;
6
6
  environmentId: string;
7
- allowDeletions: boolean;
8
7
  }
9
- export declare function ServerPreviewView({ preview, spaceId, environmentId, allowDeletions, }: ServerPreviewViewProps): React.ReactElement;
8
+ export declare function ServerPreviewView({ preview, spaceId, environmentId }: ServerPreviewViewProps): React.ReactElement;
10
9
  export {};
@@ -1,4 +1,3 @@
1
- import { type CompositionMode } from './lib/composition-mode.js';
2
1
  export type ExperiencesCredentials = {
3
2
  spaceId: string;
4
3
  environmentId: string;
@@ -6,21 +5,12 @@ export type ExperiencesCredentials = {
6
5
  host?: string;
7
6
  agent?: string;
8
7
  agentModel?: string;
9
- /** Feature 8: persisted custom prompt path for `analyze select-agent`. */
10
- selectPromptPath?: string;
11
8
  /** Feature 8: persisted custom prompt path for `generate components`. */
12
9
  generatePromptPath?: string;
13
- autoFilter?: boolean;
14
10
  /** Feature: default debug-mode (writes JSONL trace of every decision) for all commands. */
15
11
  debug?: boolean;
16
12
  /** Persisted opt-out for anonymous CLI usage analytics, set via `experiences setup`. */
17
13
  analyticsDisabled?: boolean;
18
- /**
19
- * Feature (atomic mode): default composition mode. `atomic` (default) imports
20
- * flat components with no embedded-component hierarchy; `composite` opts into
21
- * the slot-graph machinery. Resolved `flag > env > this > default`.
22
- */
23
- compositionMode?: CompositionMode;
24
14
  };
25
15
  /**
26
16
  * Read persisted Contentful credentials.
@@ -1,2 +1,2 @@
1
1
  import type { Command } from 'commander';
2
- export declare function registerGenerateCommand(program: Command): void;
2
+ export declare function registerInternalGenerateCommand(program: Command): void;
@@ -1,6 +1,6 @@
1
1
  import type { ExistingContentfulEntities } from './fetch-existing-contentful-entities.js';
2
2
  /**
3
- * Read the session file the orchestrator writes after
3
+ * Read the session file written after
4
4
  * `fetchExistingContentfulEntitiesFromContentful()`. Returns undefined on
5
5
  * any failure — this is optional enrichment and must never block the step.
6
6
  */
@@ -8,7 +8,7 @@
8
8
  * registered but never threaded into the wizard subprocesses at all.
9
9
  *
10
10
  * These helpers produce the resolved values to feed into `WizardApp` /
11
- * `runPipeline`:
11
+ * the import wizard:
12
12
  *
13
13
  * 1. CLI flag wins when provided.
14
14
  * 2. Otherwise, the value persisted in `credentials.json` (written by
@@ -1,17 +1,9 @@
1
1
  export type CompositionOptionInput = {
2
2
  compositionMap?: string;
3
- compositionAgent?: boolean;
4
- compositionAgentMode?: string;
5
- compositionRefresh?: boolean;
6
- generateMap?: string;
7
3
  prompt?: string[];
8
4
  };
9
5
  export type CompositionForwardingOptions = {
10
6
  compositionMap?: string;
11
- compositionAgent?: boolean;
12
- compositionAgentMode?: string;
13
- compositionRefresh?: boolean;
14
- generateMap?: string;
15
7
  promptOverrides?: string[];
16
8
  };
17
9
  export declare function buildCompositionForwardingOptions(options: CompositionOptionInput): CompositionForwardingOptions;
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  export interface CustomPromptBannerProps {
3
- selectPromptPath?: string;
4
3
  generatePromptPath?: string;
5
4
  }
6
- export declare function CustomPromptBanner({ selectPromptPath, generatePromptPath, }: CustomPromptBannerProps): React.ReactElement | null;
5
+ export declare function CustomPromptBanner({ generatePromptPath }: CustomPromptBannerProps): React.ReactElement | null;
@@ -1,34 +1,22 @@
1
1
  import React from 'react';
2
- import { type RunPickerSelection } from '../../runs/run-picker.js';
3
- import type { RunRecord } from '../../runs/store.js';
4
- import { type ConflictMode } from '../../runs/save-path-resolver.js';
5
- import type { CompositionMode } from '../../lib/composition-mode.js';
6
- export declare function buildSelectAgentArgs(opts: {
2
+ import type { CDFDocument, CDFComponentEntry, DTCGTokenEntry } from '@contentful/experience-design-system-types';
3
+ export declare function buildGenerateComponentsArgs(opts: {
7
4
  sessionId: string;
5
+ tokensPath?: string;
8
6
  agent: string;
9
7
  model?: string;
10
8
  bedrock?: boolean;
11
- selectPromptPath?: string;
12
9
  noCache?: boolean;
10
+ generatePromptPath?: string;
11
+ promptOverrides?: string[];
13
12
  existingEntitiesPath?: string;
14
13
  }): string[];
15
- export type AutoFilterProgress = {
16
- n: number;
17
- total: number;
18
- decision: 'accepted' | 'rejected' | 'failed';
19
- name: string;
20
- reason: string;
21
- };
22
- export declare function parseAutoFilterProgressLine(line: string): AutoFilterProgress | null;
23
- export declare function buildGenerateComponentsArgs(opts: {
24
- sessionId: string;
25
- tokensPath?: string;
14
+ export declare function buildGenerateTokensArgs(opts: {
15
+ rawTokensPath: string;
26
16
  agent: string;
27
17
  model?: string;
28
18
  bedrock?: boolean;
29
19
  noCache?: boolean;
30
- generatePromptPath?: string;
31
- existingEntitiesPath?: string;
32
20
  }): string[];
33
21
  export declare function buildMapTokensArgs(opts: {
34
22
  sessionId: string;
@@ -42,6 +30,12 @@ export declare function shouldRunMapTokens(opts: {
42
30
  mappablePropCount: number;
43
31
  rawTokenCount: number;
44
32
  }): boolean;
33
+ export declare function buildSavedCDF(components: Array<{
34
+ key: string;
35
+ entry: CDFComponentEntry;
36
+ }>, tokens: DTCGTokenEntry[], opts?: {
37
+ deleteAll?: boolean;
38
+ }): CDFDocument;
45
39
  export declare function formatAcceptanceSummary(opts: {
46
40
  accepted: number;
47
41
  autoRejected: number;
@@ -57,33 +51,12 @@ export type WizardAppProps = {
57
51
  bedrock?: boolean;
58
52
  initialProjectPath?: string;
59
53
  host?: string;
60
- autoAcceptScope?: boolean;
61
- autoRejectCycles?: boolean;
62
- compositionMode?: CompositionMode;
63
54
  compositionMap?: string;
64
- compositionAgent?: boolean;
65
- compositionAgentMode?: string;
66
- compositionRefresh?: boolean;
67
- generateMap?: string;
68
55
  promptOverrides?: string[];
69
56
  noCache?: boolean;
70
- autoFilter?: boolean;
71
57
  livePreview?: boolean;
72
- noPush?: boolean;
73
- noSave?: boolean;
74
- outDirOverride?: string;
75
- onConflictMode?: ConflictMode;
76
- selectPromptPath?: string;
77
58
  generatePromptPath?: string;
78
59
  skipMapTokens?: boolean;
79
- seedExtractSessionId?: string;
80
- seedGenerateSessionId?: string;
81
- seedTokenSessionId?: string;
82
- seedTokensPath?: string;
83
- initialStep?: 'scope-gate' | 'final-review' | 'push-from-picker';
84
60
  initialRawTokensPath?: string;
85
- initialRuns?: RunRecord[];
86
- onRunPicked?: (selection: RunPickerSelection) => void;
87
- allowDeletions?: boolean;
88
61
  };
89
- export declare function WizardApp({ initialSpaceId, initialEnvironmentId, initialCmaToken, initialHost, initialAgent, initialModel, bedrock, initialProjectPath, host, autoAcceptScope, autoRejectCycles, compositionMode, compositionMap, compositionAgent, compositionAgentMode, compositionRefresh, generateMap, promptOverrides, noCache, autoFilter, livePreview, noPush, noSave, outDirOverride, onConflictMode, selectPromptPath, generatePromptPath, skipMapTokens, seedExtractSessionId, seedGenerateSessionId, seedTokenSessionId, seedTokensPath, initialStep, initialRawTokensPath, initialRuns, onRunPicked, allowDeletions, }?: WizardAppProps): React.ReactElement;
62
+ export declare function WizardApp({ initialSpaceId, initialEnvironmentId, initialCmaToken, initialHost, initialAgent, initialModel, bedrock, initialProjectPath, host, compositionMap, promptOverrides, noCache, livePreview, generatePromptPath, skipMapTokens, initialRawTokensPath, }?: WizardAppProps): React.ReactElement;
@@ -1,10 +1,6 @@
1
1
  import React from 'react';
2
- import type { CompositionMode } from '../../lib/composition-mode.js';
3
2
  import type { ReviewStepProps } from './review-step-props.js';
4
3
  export type FinalReviewHostProps = Omit<ReviewStepProps, 'extractSessionId'> & {
5
4
  extractSessionId: string | null;
6
- generatedCount: number;
7
- autoAccept: boolean;
8
- compositionMode?: CompositionMode;
9
5
  };
10
- export declare function FinalReviewHost({ extractSessionId, tokenSessionId, generatedCount, autoAccept, compositionMode, onFinalize, onQuit, livePreview, spaceId, environmentId, cmaToken, host, tokensPath, initialFinalizeError, allowDeletions, }: FinalReviewHostProps): React.ReactElement;
6
+ export declare function FinalReviewHost({ extractSessionId, tokenSessionId, onFinalize, onQuit, livePreview, spaceId, environmentId, cmaToken, host, tokensPath, initialFinalizeError, }: FinalReviewHostProps): React.ReactElement;
@@ -14,7 +14,6 @@ export type UseReviewPreviewOptions = {
14
14
  cmaToken: string;
15
15
  host: string;
16
16
  deleteAllComponents?: boolean;
17
- allowDeletions?: boolean;
18
17
  onResult?: (response: ServerPreviewResponse) => void;
19
18
  };
20
19
  export type UseReviewPreviewResult = {
@@ -23,4 +22,4 @@ export type UseReviewPreviewResult = {
23
22
  livePreviewHook: UseLivePreviewReturn;
24
23
  livePreviewSpinner: string;
25
24
  };
26
- export declare function useReviewPreview({ components, loading, livePreview, sessionId, tokensPath, spaceId, environmentId, cmaToken, host, deleteAllComponents, allowDeletions, onResult, }: UseReviewPreviewOptions): UseReviewPreviewResult;
25
+ export declare function useReviewPreview({ components, loading, livePreview, sessionId, tokensPath, spaceId, environmentId, cmaToken, host, deleteAllComponents, onResult, }: UseReviewPreviewOptions): UseReviewPreviewResult;
@@ -71,4 +71,25 @@ export type ReviewFinalizeCounts = {
71
71
  unresolved: number;
72
72
  };
73
73
  export declare function finalizeReviewSession(extractSessionId: string, components: CdfReviewEntry[]): ReviewFinalizeCounts;
74
+ export type UseReviewFinalizeOptions = {
75
+ showFinalize: boolean;
76
+ extractSessionId: string;
77
+ tokensPath: string;
78
+ spaceId: string;
79
+ environmentId: string;
80
+ cmaToken: string;
81
+ host: string;
82
+ components: CdfReviewEntry[];
83
+ onFinalize: (accepted: number, rejected: number, unresolved: number) => void;
84
+ };
85
+ /**
86
+ * Shared by both the composite and atomic generate-review steps: the Finalize
87
+ * dialog's scoped preview (`useReviewFinalizePreview`) plus the confirm
88
+ * handler that reclassifies rejected/unresolved components and reports the
89
+ * final counts back to the wizard.
90
+ */
91
+ export declare function useReviewFinalize({ showFinalize, extractSessionId, tokensPath, spaceId, environmentId, cmaToken, host, components, onFinalize, }: UseReviewFinalizeOptions): {
92
+ finalizePreview: import("../useFinalizePreview.js").UseFinalizePreviewReturn;
93
+ handleFinalizeConfirm: () => void;
94
+ };
74
95
  export {};
@@ -5,8 +5,8 @@ type LineageInputKey = {
5
5
  tab: boolean;
6
6
  return: boolean;
7
7
  };
8
- export declare function handleLineageNavigation({ input, key, cursor, jumpables, onCursorChange, onJump, onClose, allowTab, }: {
9
- input: string;
8
+ export declare function handleLineageNavigation({ key, cursor, jumpables, onCursorChange, onJump, onClose, allowTab, }: {
9
+ input?: string;
10
10
  key: LineageInputKey;
11
11
  cursor: number;
12
12
  jumpables: LineageJumpable[];
@@ -1,6 +1,5 @@
1
- import { type Dispatch, type SetStateAction } from 'react';
2
1
  type PreviewConfirmationKey = {
3
2
  return: boolean;
4
3
  };
5
- export declare function usePreviewConfirmationInput(breakingWithImpact: boolean, allowDeletions: boolean, fetchedAllowDeletions: boolean, removedCount: number, onConfirm: (acknowledge: boolean, allowDeletions: boolean) => void, setAllowDeletions: Dispatch<SetStateAction<boolean>>): (input: string, key: PreviewConfirmationKey) => boolean;
4
+ export declare function usePreviewConfirmationInput(breakingWithImpact: boolean, onConfirm: (acknowledge: boolean) => void): (input: string, key: PreviewConfirmationKey) => boolean;
6
5
  export {};
@@ -10,5 +10,4 @@ export type ReviewStepProps = {
10
10
  host?: string;
11
11
  tokensPath?: string;
12
12
  initialFinalizeError?: string | null;
13
- allowDeletions?: boolean;
14
13
  };
@@ -26,9 +26,6 @@ export type RunLivePreviewOptions = {
26
26
  * full delete. Lets the Finalize dialog show exactly what the accepted push
27
27
  * would delete, independent of the session's on-disk generated rows. */
28
28
  acceptedKeys?: ReadonlySet<string>;
29
- /** Forwarded verbatim to `previewImport`. Governs whether the response
30
- * includes removed entities or a suppressed-count summary instead. */
31
- allowDeletions?: boolean;
32
29
  };
33
30
  /**
34
31
  * Pure async helper used by `useLivePreview` to re-fire `previewImport` after a
@@ -4,16 +4,6 @@ export declare function runScopeGate(opts: {
4
4
  accepted: string[];
5
5
  rejected: string[];
6
6
  };
7
- /**
8
- * Optional cancellation hook for the auto-filter (`select-agent`) subprocess.
9
- * If supplied, it will be awaited BEFORE the review-state snapshot is written
10
- * so the operator's full decision set is the last writer to the snapshot
11
- * file. Without this gate the subprocess can race the operator's confirm
12
- * (see PR #43): if select-agent finishes a batch after the operator presses
13
- * `f`, it overwrites the snapshot with a partial view and components silently
14
- * disappear from final-review. Resolves when the subprocess has exited.
15
- */
16
- cancelAutoFilter?: () => Promise<void> | void;
17
7
  onAdvanceToGenerate: (info: {
18
8
  sessionId: string;
19
9
  acceptedCount: number;
@@ -1,23 +1,19 @@
1
1
  import React from 'react';
2
2
  import type { ScopeComponent } from './steps/ScopeGateStep.js';
3
- import type { CompositionMode } from '../../lib/composition-mode.js';
4
3
  export type { ScopeComponent };
5
- type AutoFilterStatus = 'idle' | 'running' | 'complete' | 'cancelled' | 'failed';
6
4
  export type ScopeGateHostProps = {
7
5
  components: ReadonlyArray<ScopeComponent>;
8
- autoAccept: boolean;
9
- compositionMode?: CompositionMode;
10
6
  onConfirm: (decisions: {
11
7
  accepted: string[];
12
8
  rejected: string[];
13
9
  }) => void;
14
10
  onQuit: () => void;
15
- aiFilterStatus?: AutoFilterStatus;
11
+ /** Retained for fixture compatibility; filtering is no longer performed here. */
12
+ aiFilterStatus?: string;
16
13
  aiFilterProgress?: {
17
14
  done: number;
18
15
  total: number;
19
16
  } | null;
20
17
  aiFilterError?: string | null;
21
- onCancelAutoFilter?: () => void;
22
18
  };
23
- export declare function ScopeGateHost({ components, autoAccept, compositionMode, onConfirm, onQuit, aiFilterStatus, aiFilterProgress, aiFilterError, onCancelAutoFilter, }: ScopeGateHostProps): React.ReactElement;
19
+ export declare function ScopeGateHost({ components, onConfirm, onQuit }: ScopeGateHostProps): React.ReactElement;
@@ -4,6 +4,7 @@ type ErrorStepProps = {
4
4
  message: string;
5
5
  onExit: () => void;
6
6
  onRetryCredentials?: () => void;
7
+ onAcknowledgeBreakingChanges?: () => void;
7
8
  };
8
- export declare function ErrorStep({ stepName, message, onExit, onRetryCredentials }: ErrorStepProps): React.ReactElement;
9
+ export declare function ErrorStep({ stepName, message, onExit, onRetryCredentials, onAcknowledgeBreakingChanges, }: ErrorStepProps): React.ReactElement;
9
10
  export {};
@@ -23,4 +23,4 @@ export interface BreakingRow {
23
23
  }
24
24
  export declare function buildBreakingRows(breakingChanges: BreakingComponent[]): BreakingRow[];
25
25
  export declare function deriveBreakingChanges(response: ServerPreviewResponse): BreakingComponent[];
26
- export declare function GenerateReviewStep({ extractSessionId, tokenSessionId, onFinalize, onQuit, livePreview, spaceId, environmentId, cmaToken, host, tokensPath, initialFinalizeError, allowDeletions, }: GenerateReviewStepProps): React.ReactElement;
26
+ export declare function GenerateReviewStep({ extractSessionId, tokenSessionId, onFinalize, onQuit, livePreview, spaceId, environmentId, cmaToken, host, tokensPath, initialFinalizeError, }: 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, aiFilterStatus, aiFilterProgress, aiFilterError, onCancelAutoFilter, }: ScopeGateStepProps): React.ReactElement;
28
+ export declare function ScopeGateStep({ components, onConfirm, onQuit }: ScopeGateStepProps): React.ReactElement;
29
29
  export declare function sideColumnLabelStyle(input: {
30
30
  isCycle: boolean;
31
31
  isSelected: boolean;
@@ -12,14 +12,10 @@ type WizardPreviewStepProps = {
12
12
  environmentId: string;
13
13
  stepNumber: number;
14
14
  totalSteps: number;
15
- /** The value the preview was actually fetched with — not a hint. When
16
- * `false`, the server never returned removed entities, so there is
17
- * nothing to render item-by-item or toggle over. */
18
- allowDeletions?: boolean;
19
- onConfirm: (acknowledge: boolean, allowDeletions: boolean) => void;
15
+ onConfirm: (acknowledge: boolean) => void;
20
16
  onEdit?: () => void;
21
17
  onSaveFiles?: () => void;
22
18
  onQuit: () => void;
23
19
  };
24
- export declare function WizardPreviewStep({ preview, spaceId, environmentId, stepNumber, totalSteps, allowDeletions: fetchedAllowDeletions, onConfirm, onEdit, onSaveFiles, onQuit, }: WizardPreviewStepProps): React.ReactElement;
20
+ export declare function WizardPreviewStep({ preview, spaceId, environmentId, stepNumber, totalSteps, onConfirm, onEdit, onSaveFiles, onQuit, }: WizardPreviewStepProps): React.ReactElement;
25
21
  export {};
@@ -11,8 +11,6 @@ export type UseFinalizePreviewOptions = {
11
11
  host: string;
12
12
  /** Component keys the operator has accepted; drives the scoped preview. */
13
13
  acceptedKeys: ReadonlySet<string>;
14
- /** Forwarded verbatim to `runLivePreview`/`previewImport`. */
15
- allowDeletions?: boolean;
16
14
  };
17
15
  export type UseFinalizePreviewReturn = {
18
16
  status: FinalizePreviewStatus;
@@ -29,16 +27,13 @@ export type UseReviewFinalizePreviewOptions = Omit<UseFinalizePreviewOptions, 'a
29
27
  };
30
28
  export declare function useReviewFinalizePreview({ components, ...options }: UseReviewFinalizePreviewOptions): UseFinalizePreviewReturn;
31
29
  /**
32
- * Shared Finalize-dialog deletion preview, used by both the composite and
33
- * atomic generate-review steps so the "what will this push delete" experience
34
- * is identical.
30
+ * Shared Finalize-dialog preview, used by both the composite and atomic
31
+ * generate-review steps.
35
32
  *
36
33
  * When the dialog opens it fires a preview scoped to the ACCEPTED set (so the
37
34
  * result reflects exactly what the push does, independent of the session's
38
35
  * not-yet-reclassified generated rows), tracks loading/error, and owns the
39
- * scroll offset for the (windowed) removed list. Credentials-missing (e.g.
40
- * `--no-push`) short-circuits to `done` with an empty list — the dialog then
41
- * simply omits the deletion section.
36
+ * scroll offset for the preview list.
42
37
  */
43
38
  export declare function useFinalizePreview(opts: UseFinalizePreviewOptions): UseFinalizePreviewReturn;
44
39
  export {};
@@ -9,11 +9,9 @@ export type UseLivePreviewOptions = {
9
9
  host: string;
10
10
  onResult: (response: ServerPreviewResponse | null) => void;
11
11
  debounceMs?: number;
12
- /** Preview an empty-but-present manifest (delete-all diff) when nothing is
13
- * accepted, so the final-review UI can show what a push would delete. */
12
+ /** Preview an empty-but-present CDF document (delete-all diff) when nothing
13
+ * is accepted, so the final-review UI can show what a push would delete. */
14
14
  deleteAllComponents?: boolean;
15
- /** Forwarded verbatim to `runLivePreview`/`previewImport`. */
16
- allowDeletions?: boolean;
17
15
  };
18
16
  type LivePreviewStatus = 'idle' | 'running';
19
17
  export type UseLivePreviewReturn = {
@@ -41,7 +41,7 @@ export declare function clearedValidationErrorState(): {
41
41
  * assertions. No-op when sessionId is null or errors are empty.
42
42
  *
43
43
  * The DB update inside `rejectComponentsByName` is what makes the next
44
- * preview see a manifest with the offenders excluded — see SP-3 retro
44
+ * preview see a CDF document with the offenders excluded — see SP-3 retro
45
45
  * Bug 1: writing to the JSON state file alone is not enough because
46
46
  * `loadCDFComponents` reads from the pipeline DB.
47
47
  */