@contentful/experience-design-system-cli 2.34.5-dev-build-d08439d.0 → 2.34.5-dev-build-75bf00ac.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/README.md +34 -275
- package/dist/package.json +2 -1
- package/dist/src/analytics/constants.d.ts +2 -2
- package/dist/src/analytics/index.d.ts +1 -1
- package/dist/src/analytics/normalize.d.ts +1 -1
- package/dist/src/analytics/types.d.ts +1 -1
- package/dist/src/analyze/composition/composition-cache-key.d.ts +2 -3
- package/dist/src/analyze/composition/interchange-schema.d.ts +2 -2
- package/dist/src/analyze/composition/prompt-loader.d.ts +3 -0
- package/dist/src/analyze/composition/resolve-mapping-cli.d.ts +1 -5
- package/dist/src/analyze/composition/resolve-mapping.d.ts +7 -8
- package/dist/src/analyze/extract-command.d.ts +3 -0
- package/dist/src/analyze/select/command.d.ts +3 -25
- package/dist/src/analyze/select/preview-annotations.d.ts +6 -6
- package/dist/src/analyze/select/tui/components/GotoBanner.d.ts +1 -1
- package/dist/src/apply/api-client.d.ts +4 -6
- package/dist/src/apply/command.d.ts +25 -4
- package/dist/src/apply/preview-utils.d.ts +2 -6
- package/dist/src/apply/tokens.d.ts +1 -0
- package/dist/src/apply/tui/ServerApplyView.d.ts +3 -6
- package/dist/src/apply/tui/ServerPreviewView.d.ts +1 -2
- package/dist/src/credentials-store.d.ts +0 -10
- package/dist/src/generate/command.d.ts +1 -1
- package/dist/src/helpers/read-existing-contentful-entities-from-session.d.ts +1 -1
- package/dist/src/import/agent-model-resolve.d.ts +1 -1
- package/dist/src/import/composition-options.d.ts +0 -8
- package/dist/src/import/tui/CustomPromptBanner.d.ts +1 -2
- package/dist/src/import/tui/WizardApp.d.ts +7 -41
- package/dist/src/import/tui/final-review-host.d.ts +1 -5
- package/dist/src/import/tui/hooks/useReviewPreview.d.ts +1 -2
- package/dist/src/import/tui/hooks/useReviewSession.d.ts +21 -0
- package/dist/src/import/tui/lineage-input.d.ts +2 -2
- package/dist/src/import/tui/preview-confirmation-input.d.ts +1 -2
- package/dist/src/import/tui/review-step-props.d.ts +0 -1
- package/dist/src/import/tui/runLivePreview.d.ts +0 -3
- package/dist/src/import/tui/runScopeGate.d.ts +0 -10
- package/dist/src/import/tui/scope-gate-host.d.ts +3 -7
- package/dist/src/import/tui/steps/ErrorStep.d.ts +2 -1
- package/dist/src/import/tui/steps/GenerateReviewStep.d.ts +1 -1
- package/dist/src/import/tui/steps/ScopeGateStep.d.ts +1 -1
- package/dist/src/import/tui/steps/WizardPreviewStep.d.ts +2 -6
- package/dist/src/import/tui/useFinalizePreview.d.ts +3 -8
- package/dist/src/import/tui/useLivePreview.d.ts +2 -4
- package/dist/src/import/tui/wizard-422-helpers.d.ts +1 -1
- package/dist/src/import/tui/wizard-state-transitions.d.ts +2 -4
- package/dist/src/index.js +23547 -30878
- package/dist/src/lib/command-options.d.ts +0 -3
- package/dist/src/lib/contentful-urls.d.ts +2 -4
- package/dist/src/lib/debug-logger.d.ts +0 -2
- package/dist/src/runs/fingerprint.d.ts +0 -12
- package/dist/src/runs/save-path-resolver.d.ts +0 -46
- package/dist/src/runs/store.d.ts +2 -18
- package/dist/src/session/cache-keys.d.ts +1 -1
- package/dist/src/session/db.d.ts +3 -6
- package/dist/src/setup/command.d.ts +1 -2
- package/package.json +7 -6
- package/skills/generate-components.md +1 -1
- package/dist/src/analytics/env.d.ts +0 -2
- package/dist/src/analyze/build-analyze-view-rows.d.ts +0 -32
- package/dist/src/analyze/command.d.ts +0 -14
- package/dist/src/analyze/composition/agent-parser/author-prompt.d.ts +0 -4
- package/dist/src/analyze/composition/agent-parser/extract-parser.d.ts +0 -8
- package/dist/src/analyze/composition/agent-parser/load-prompt.d.ts +0 -7
- package/dist/src/analyze/composition/agent-parser/resolve-via-parser.d.ts +0 -46
- package/dist/src/analyze/composition/agent-parser/sandbox.d.ts +0 -45
- package/dist/src/analyze/composition/candidate-critic-agent.d.ts +0 -7
- package/dist/src/analyze/composition/candidate-critic.d.ts +0 -32
- package/dist/src/analyze/select-agent/command.d.ts +0 -4
- package/dist/src/analyze/select-agent/context-builder.d.ts +0 -50
- package/dist/src/analyze/select-agent/show-rationale.d.ts +0 -9
- package/dist/src/analyze/tui/AnalyzeView.d.ts +0 -39
- package/dist/src/apply/manifest.d.ts +0 -1
- package/dist/src/apply/tui/SelectView.d.ts +0 -18
- package/dist/src/generate/edit/command.d.ts +0 -2
- package/dist/src/import/auto-filter-resolve.d.ts +0 -3
- package/dist/src/import/orchestrator.d.ts +0 -76
- package/dist/src/import/picker-dispatch.d.ts +0 -28
- package/dist/src/import/print-prompt.d.ts +0 -34
- package/dist/src/import/strip-allowed-components.d.ts +0 -18
- package/dist/src/import/tui/auto-filter-error.d.ts +0 -1
- package/dist/src/import/tui/components/AutoFilterBanner.d.ts +0 -10
- package/dist/src/import/tui/merge-ai-decisions.d.ts +0 -5
- package/dist/src/import/tui/steps/AtomicGenerateReviewStep.d.ts +0 -28
- package/dist/src/import/tui/steps/AtomicScopeGateStep.d.ts +0 -3
- package/dist/src/import/tui/wizard-save-flow.d.ts +0 -37
- package/dist/src/lib/composition-mode.d.ts +0 -30
- package/dist/src/runs/export-helpers.d.ts +0 -5
- package/dist/src/runs/ls-command.d.ts +0 -12
- package/dist/src/runs/modify-launcher.d.ts +0 -34
- package/dist/src/runs/picker-labels.d.ts +0 -24
- package/dist/src/runs/push-creds-prompt.d.ts +0 -25
- package/dist/src/runs/push-helpers.d.ts +0 -20
- package/dist/src/runs/push-launcher.d.ts +0 -52
- package/dist/src/runs/replay-helpers.d.ts +0 -71
- package/dist/src/runs/resolve-run-target.d.ts +0 -12
- package/dist/src/runs/run-picker-mount.d.ts +0 -46
- package/dist/src/runs/run-picker.d.ts +0 -18
- package/dist/src/runs/staleness.d.ts +0 -38
- package/dist/src/runs/wizard-launcher.d.ts +0 -2
- package/dist/src/runs/wizard-seed.d.ts +0 -20
- package/dist/src/session/cli.d.ts +0 -2
- package/dist/src/session/stats.d.ts +0 -26
- package/dist/src/setup/auto-filter-prompt.d.ts +0 -13
- package/dist/src/setup/composition-mode-prompt.d.ts +0 -14
- package/prompts/composition-dir-critic.md +0 -7
- package/prompts/composition-parser-repair-empty.md +0 -1
- package/prompts/composition-parser-repair-error.md +0 -2
- package/prompts/composition-parser.md +0 -49
- /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
|
|
9
|
-
*
|
|
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
|
|
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
|
|
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
|
|
17
|
-
* we can perform the set difference. Removed components from the server
|
|
18
|
-
* aren't in the local
|
|
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
|
|
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 {
|
|
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
|
|
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(
|
|
56
|
-
applyImport(
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
|
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.
|
|
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
|
-
|
|
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,
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
*
|
|
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({
|
|
5
|
+
export declare function CustomPromptBanner({ generatePromptPath }: CustomPromptBannerProps): React.ReactElement | null;
|
|
@@ -1,34 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
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
|
+
export declare function buildGenerateComponentsArgs(opts: {
|
|
7
3
|
sessionId: string;
|
|
4
|
+
tokensPath?: string;
|
|
8
5
|
agent: string;
|
|
9
6
|
model?: string;
|
|
10
7
|
bedrock?: boolean;
|
|
11
|
-
selectPromptPath?: string;
|
|
12
8
|
noCache?: boolean;
|
|
9
|
+
generatePromptPath?: string;
|
|
10
|
+
promptOverrides?: string[];
|
|
13
11
|
existingEntitiesPath?: string;
|
|
14
12
|
}): string[];
|
|
15
|
-
export
|
|
16
|
-
|
|
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;
|
|
13
|
+
export declare function buildGenerateTokensArgs(opts: {
|
|
14
|
+
rawTokensPath: string;
|
|
26
15
|
agent: string;
|
|
27
16
|
model?: string;
|
|
28
17
|
bedrock?: boolean;
|
|
29
18
|
noCache?: boolean;
|
|
30
|
-
generatePromptPath?: string;
|
|
31
|
-
existingEntitiesPath?: string;
|
|
32
19
|
}): string[];
|
|
33
20
|
export declare function buildMapTokensArgs(opts: {
|
|
34
21
|
sessionId: string;
|
|
@@ -57,33 +44,12 @@ export type WizardAppProps = {
|
|
|
57
44
|
bedrock?: boolean;
|
|
58
45
|
initialProjectPath?: string;
|
|
59
46
|
host?: string;
|
|
60
|
-
autoAcceptScope?: boolean;
|
|
61
|
-
autoRejectCycles?: boolean;
|
|
62
|
-
compositionMode?: CompositionMode;
|
|
63
47
|
compositionMap?: string;
|
|
64
|
-
compositionAgent?: boolean;
|
|
65
|
-
compositionAgentMode?: string;
|
|
66
|
-
compositionRefresh?: boolean;
|
|
67
|
-
generateMap?: string;
|
|
68
48
|
promptOverrides?: string[];
|
|
69
49
|
noCache?: boolean;
|
|
70
|
-
autoFilter?: boolean;
|
|
71
50
|
livePreview?: boolean;
|
|
72
|
-
noPush?: boolean;
|
|
73
|
-
noSave?: boolean;
|
|
74
|
-
outDirOverride?: string;
|
|
75
|
-
onConflictMode?: ConflictMode;
|
|
76
|
-
selectPromptPath?: string;
|
|
77
51
|
generatePromptPath?: string;
|
|
78
52
|
skipMapTokens?: boolean;
|
|
79
|
-
seedExtractSessionId?: string;
|
|
80
|
-
seedGenerateSessionId?: string;
|
|
81
|
-
seedTokenSessionId?: string;
|
|
82
|
-
seedTokensPath?: string;
|
|
83
|
-
initialStep?: 'scope-gate' | 'final-review' | 'push-from-picker';
|
|
84
53
|
initialRawTokensPath?: string;
|
|
85
|
-
initialRuns?: RunRecord[];
|
|
86
|
-
onRunPicked?: (selection: RunPickerSelection) => void;
|
|
87
|
-
allowDeletions?: boolean;
|
|
88
54
|
};
|
|
89
|
-
export declare function WizardApp({ initialSpaceId, initialEnvironmentId, initialCmaToken, initialHost, initialAgent, initialModel, bedrock, initialProjectPath, host,
|
|
55
|
+
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,
|
|
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,
|
|
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({
|
|
9
|
-
input
|
|
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,
|
|
4
|
+
export declare function usePreviewConfirmationInput(breakingWithImpact: boolean, onConfirm: (acknowledge: boolean) => void): (input: string, key: PreviewConfirmationKey) => boolean;
|
|
6
5
|
export {};
|
|
@@ -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
|
-
|
|
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,
|
|
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,
|
|
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
|
|
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
|
-
|
|
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,
|
|
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
|
|
33
|
-
*
|
|
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
|
|
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
|
|
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
|
|
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
|
*/
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export type WizardStepAfterScope = '
|
|
1
|
+
export type WizardStepAfterScope = 'generating' | 'push-decision-gate';
|
|
2
2
|
export type WizardStepAfterCredentials = 'generating' | 'push-decision-gate';
|
|
3
3
|
export declare function nextStepAfterScopeGate(opts: {
|
|
4
4
|
acceptedCount: number;
|
|
5
|
-
noPush: boolean;
|
|
6
5
|
}): WizardStepAfterScope;
|
|
7
6
|
export declare function nextStepAfterCredentialsValidated(opts: {
|
|
8
7
|
acceptedCount: number;
|
|
@@ -21,10 +20,9 @@ export declare function buildSkippedPreviewTransition(): {
|
|
|
21
20
|
step: 'push-decision-gate';
|
|
22
21
|
serverPreview: null;
|
|
23
22
|
};
|
|
24
|
-
export type CycleGateAction = 'block' | '
|
|
23
|
+
export type CycleGateAction = 'block' | 'proceed';
|
|
25
24
|
export declare function resolveCycleGateAction(opts: {
|
|
26
25
|
hasCycles: boolean;
|
|
27
|
-
autoRejectCycles: boolean;
|
|
28
26
|
}): CycleGateAction;
|
|
29
27
|
export declare function shouldRefusePush(state: {
|
|
30
28
|
credentialsSkipped: boolean;
|