@contentful/experience-design-system-cli 2.43.1-dev-build-044e6594.0 → 2.43.1-dev-build-30e824d7.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/app.js +15027 -14951
- package/dist/index.js +424 -332
- package/dist/package.json +1 -1
- package/dist/src/tui/debug-store.d.ts +11 -3
- package/dist/src/tui/import/steps/00-preflight/log.d.ts +25 -0
- package/dist/src/tui/import/steps/00-preflight/logic.d.ts +2 -0
- package/dist/src/tui/import/steps/01-welcome/log.d.ts +13 -0
- package/dist/src/tui/settings/configuration/agents/agent-debug.d.ts +10 -0
- package/package.json +3 -3
package/dist/package.json
CHANGED
|
@@ -22,15 +22,23 @@ export declare function startDebugRun({ flow, step, menuOption, inputs, }: {
|
|
|
22
22
|
flow: string;
|
|
23
23
|
step: string;
|
|
24
24
|
menuOption: string;
|
|
25
|
-
|
|
25
|
+
/** What the step starts with. A step that writes a `summary` when it finishes leaves this out and puts its facts in the data. */
|
|
26
|
+
inputs?: Record<string, unknown>;
|
|
26
27
|
}): void;
|
|
27
28
|
/** Keeps what the open run has so far, in memory. It is only written if the run is cut short. */
|
|
28
29
|
export declare function setDebugRunProgress(outputs: Record<string, unknown>): void;
|
|
29
30
|
/** Resolves once every log that has been finished is on disk. */
|
|
30
31
|
export declare function settleDebugLogs(): Promise<void>;
|
|
31
|
-
|
|
32
|
+
type FinishArgs = {
|
|
32
33
|
outputs: Record<string, unknown>;
|
|
34
|
+
/**
|
|
35
|
+
* The facts for a person, one line each; a line indented by two spaces is a sub-point of the one above. With it the log
|
|
36
|
+
* has a Summary (for people) and a Data (for AI, the outputs) section that say the same thing twice. Without it the log
|
|
37
|
+
* keeps its Inputs and Outputs sections. The lines are written as given, so a step must not put a secret in one.
|
|
38
|
+
*/
|
|
39
|
+
summary?: string[];
|
|
33
40
|
status: Status;
|
|
34
41
|
exitMethod: ExitMethod;
|
|
35
|
-
}
|
|
42
|
+
};
|
|
43
|
+
export declare function finishDebugRun(args: FinishArgs): Promise<void>;
|
|
36
44
|
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type AgentName } from '@contentful/experience-design-system-backend-pipeline';
|
|
2
|
+
import { type AgentReadiness } from '@tui/settings/configuration/agents/agent-debug.js';
|
|
3
|
+
import { type ImportTarget } from './logic.js';
|
|
4
|
+
export type PreflightContext = {
|
|
5
|
+
settings: {
|
|
6
|
+
default_agent: AgentName;
|
|
7
|
+
base_dir_set: boolean;
|
|
8
|
+
analytics: boolean;
|
|
9
|
+
};
|
|
10
|
+
agents: Record<AgentName, AgentReadiness>;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* The settings in effect and each agent's state. Collected while the user reads the screen, because the agent checks run
|
|
14
|
+
* a command each. Undefined when they cannot be read: logging must never get in the way of the import.
|
|
15
|
+
*/
|
|
16
|
+
export declare function collectPreflightContext(): Promise<PreflightContext | undefined>;
|
|
17
|
+
export type TerminalSize = {
|
|
18
|
+
columns?: number;
|
|
19
|
+
rows?: number;
|
|
20
|
+
};
|
|
21
|
+
/** The log's two sections: `summary` for a person, `data` for AI, both carrying the same facts. */
|
|
22
|
+
export declare function preflightLog(chosen: ImportTarget | null, terminal: TerminalSize, context: PreflightContext | undefined): {
|
|
23
|
+
summary: string[];
|
|
24
|
+
data: Record<string, unknown>;
|
|
25
|
+
};
|
|
@@ -4,6 +4,8 @@ export declare const IMPORT_TARGET_OPTIONS: ReadonlyArray<{
|
|
|
4
4
|
target: ImportTarget;
|
|
5
5
|
label: string;
|
|
6
6
|
}>;
|
|
7
|
+
/** The words the user saw for a choice. The logs of the steps after the preflight say it, since it decides which steps run. */
|
|
8
|
+
export declare function importModeLabel(target: ImportTarget): string;
|
|
7
9
|
export declare function overviewFor(target: ImportTarget): readonly OverviewStep[];
|
|
8
10
|
export type ImportStepId = 'project' | 'token-file' | 'path-validation' | 'credentials' | 'component-extraction' | 'token-generation' | 'scope-gate' | 'generation' | 'review' | 'save-push';
|
|
9
11
|
export declare function stepsFor(target: ImportTarget): readonly ImportStepId[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ImportTarget } from '../00-preflight/logic.js';
|
|
2
|
+
/** The log's two sections: `summary` for a person, `data` for AI, both carrying the same facts. */
|
|
3
|
+
export declare function welcomeLog({ mode, projectPath, initialPath, emptySubmits, }: {
|
|
4
|
+
mode: ImportTarget;
|
|
5
|
+
/** The path the user continued with, or null when they left the import. */
|
|
6
|
+
projectPath: string | null;
|
|
7
|
+
initialPath: string;
|
|
8
|
+
/** How many times Enter was pressed on an empty field, which does nothing and can look like a stuck screen. */
|
|
9
|
+
emptySubmits: number;
|
|
10
|
+
}): {
|
|
11
|
+
summary: string[];
|
|
12
|
+
data: Record<string, unknown>;
|
|
13
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type AgentName } from '@contentful/experience-design-system-backend-pipeline';
|
|
2
2
|
import type { Snapshot } from '@tui/shared/debug-trail.js';
|
|
3
|
+
import { type AgentStatus } from './agent-status.js';
|
|
3
4
|
import type { AgentConfig } from './agent-store.js';
|
|
4
5
|
/**
|
|
5
6
|
* The agent settings as flat text, for `diffSnapshots`: `default_agent`, then `<agent>.model` and `<agent>.binary` for
|
|
@@ -23,3 +24,12 @@ export type AgentEnvironment = {
|
|
|
23
24
|
* spends a prompt.
|
|
24
25
|
*/
|
|
25
26
|
export declare function describeAgents(config: AgentConfig): Promise<Record<AgentName, AgentEnvironment>>;
|
|
27
|
+
export type AgentReadiness = {
|
|
28
|
+
status: AgentStatus;
|
|
29
|
+
version: string;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* The one-word state the Agents list shows for every agent, with its version, for a log that needs to say which agents
|
|
33
|
+
* could run. Uses the quick checks only, so it never spends a prompt.
|
|
34
|
+
*/
|
|
35
|
+
export declare function agentReadiness(config: AgentConfig): Promise<Record<AgentName, AgentReadiness>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.43.1-dev-build-
|
|
3
|
+
"version": "2.43.1-dev-build-30e824d7.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"ts-morph": "^27.0.2",
|
|
46
46
|
"typescript": "^5.9.3",
|
|
47
47
|
"zod": "^4.6.5",
|
|
48
|
-
"@contentful/experience-design-system-types": "2.43.1-dev-build-
|
|
48
|
+
"@contentful/experience-design-system-types": "2.43.1-dev-build-30e824d7.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@tsconfig/node24": "^24.0.4",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"ink-testing-library": "^4.0.0",
|
|
60
60
|
"typescript-eslint": "^8.67.0",
|
|
61
61
|
"vitest": "^4.0.16",
|
|
62
|
-
"@contentful/experience-design-system-backend-pipeline": "2.43.1-dev-build-
|
|
62
|
+
"@contentful/experience-design-system-backend-pipeline": "2.43.1-dev-build-30e824d7.0"
|
|
63
63
|
},
|
|
64
64
|
"repository": {
|
|
65
65
|
"type": "git",
|