@contentful/experience-design-system-cli 2.37.1-dev-build-a1acf318.0 → 2.37.1-dev-build-2eb3abd8.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.37.1-dev-build-a1acf318.0",
3
+ "version": "2.37.1-dev-build-2eb3abd8.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- /** Settings > Configuration: a short menu that opens the Project settings or the Agent settings. */
3
2
  export declare function ConfigurationScreen({ onDone }: {
4
3
  onDone: () => void;
5
4
  }): React.ReactElement;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.37.1-dev-build-a1acf318.0",
3
+ "version": "2.37.1-dev-build-2eb3abd8.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -45,8 +45,8 @@
45
45
  "ts-morph": "^27.0.2",
46
46
  "typescript": "^5.9.3",
47
47
  "zod": "^4.6.5",
48
- "@contentful/experience-design-system-backend-pipeline": "2.37.1-dev-build-a1acf318.0",
49
- "@contentful/experience-design-system-types": "2.37.1-dev-build-a1acf318.0"
48
+ "@contentful/experience-design-system-types": "2.37.1-dev-build-2eb3abd8.0",
49
+ "@contentful/experience-design-system-backend-pipeline": "2.37.1-dev-build-2eb3abd8.0"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@tsconfig/node24": "^24.0.4",
@@ -1,23 +0,0 @@
1
- export interface FileLocationInput {
2
- /** The Root Project Directory from Settings > Configuration > Project. Empty when not set. */
3
- contentfulBaseDir: string;
4
- /** Whether Debug Mode is on. Debug logs and the per-run folders only exist while it is. */
5
- debugModeEnabled: boolean;
6
- /** This terminal session's folder, once it has started. */
7
- currentSessionDir: string | undefined;
8
- }
9
- export interface FileLocations {
10
- debugLogs: string;
11
- importFiles: string;
12
- }
13
- /**
14
- * Where the CLI writes the files a user goes looking for, from the settings that decide it (see `startImportRun`).
15
- *
16
- * With Debug Mode on, everything goes in this terminal session's folder, `<base>/.contentful/<date>-session-N/`:
17
- * the debug logs in `debug/` and, for each import, a `dsi-import-N/` folder with `tokens.json` and `components.json`.
18
- * `<base>` is the Root Project Directory, or the project being imported when none is set. With Debug Mode off there is
19
- * no session folder and no logs, and the files go to `<project>/.contentful/`.
20
- *
21
- * Names that are only known when a session or an import starts are shown as patterns, never guessed.
22
- */
23
- export declare function describeFileLocations({ contentfulBaseDir, debugModeEnabled, currentSessionDir, }: FileLocationInput): FileLocations;
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import type { AgentName } from '@contentful/experience-design-system-backend-pipeline';
3
- import { type AgentConfig } from './agent-store.js';
4
- /**
5
- * One agent's screen: what was found for it, its two settings, and the test. Saving writes the whole agent config, so the
6
- * default agent and the other agents are kept. The test uses the values on screen, saved or not.
7
- */
8
- export declare function AgentDetail({ name, config, setConfig, onBack, }: {
9
- name: AgentName;
10
- config: AgentConfig;
11
- setConfig: (config: AgentConfig) => void;
12
- onBack: () => void;
13
- }): React.ReactElement;
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- /**
3
- * Settings > Configuration > Agents. The list holds only what is needed to pick an agent: the name, a star on the default,
4
- * and a one-word status. Below it, a panel shows the full detail for the focused agent and follows the cursor, so nothing
5
- * has to be opened to read it. The "Default agent" line at the top is read-only: ↑/↓ move through the agents, Enter makes
6
- * the focused one the default (saved at once), and → opens its own screen, where its path and model are edited and the
7
- * test is run.
8
- */
9
- export declare function AgentsScreen({ onDone }: {
10
- onDone: () => void;
11
- }): React.ReactElement;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import type { AgentName } from '@contentful/experience-design-system-backend-pipeline';
3
- import { type AgentCheck, type StatusRow } from './agent-status.js';
4
- export declare const TONE_COLOR: Record<StatusRow['tone'], string>;
5
- /** The symbol and one-word state for an agent, shown on its row in the list. `binary` is the saved path, empty when none is saved. */
6
- export declare function AgentStatusBadge({ name, checks, binary, }: {
7
- name: AgentName;
8
- checks: AgentCheck[] | undefined;
9
- binary: string;
10
- }): React.ReactElement;
@@ -1,68 +0,0 @@
1
- import { type AgentName } from '@contentful/experience-design-system-backend-pipeline';
2
- type AgentCheckStep = 'path' | 'version' | 'login' | 'prompt';
3
- export type AgentCheck = {
4
- step: AgentCheckStep;
5
- ok: boolean;
6
- /** One line for the user: the version string, the reason it failed, or what to run next. */
7
- detail: string;
8
- /** Only on the prompt step: the agent did not answer in time. That is not the same as a failure or a missing login. */
9
- timedOut?: boolean;
10
- };
11
- /**
12
- * The one-word state shown on an agent's row. `not-configured` means no path is saved and the command is not on the
13
- * PATH; `not-found` means a saved path does not work. `unknown` means it runs but its login cannot be checked.
14
- */
15
- export type AgentStatus = 'checking' | 'ready' | 'not-configured' | 'not-found' | 'not-logged-in' | 'test-failed' | 'timed-out' | 'unknown';
16
- /** The model the agent runs with when none is saved ("haiku", "gpt-mini", or the agent's own pick), for the model row. */
17
- export declare function defaultModelLabel(name: AgentName): string;
18
- /**
19
- * Steps 1 to 3 against `binary`. Never throws and never spends tokens, so it is safe to run for every row on open.
20
- * Checks the path the user typed, not what is saved, so the form can test a value before it is written.
21
- */
22
- export declare function inspectAgent(name: AgentName, binary: string): Promise<AgentCheck[]>;
23
- /** Steps 1 to 4. The prompt step is the only way to verify login and model name for agents other than claude. */
24
- export declare function testAgent(name: AgentName, binary: string, model: string): Promise<AgentCheck[]>;
25
- /** Collapses a list of checks into the status shown on the row. */
26
- export declare function statusFromChecks(name: AgentName, checks: readonly AgentCheck[], savedBinary: string): AgentStatus;
27
- /**
28
- * What to tell a user whose agent is not ready: the install command, or the login command. Empty when nothing is needed.
29
- * Shown on the list's panel and on the agent's own screen, so it cannot say where the command path is ("below"): it
30
- * names the settings instead, which is the same place from both.
31
- */
32
- export declare function setupHint(name: AgentName, status: AgentStatus): string;
33
- export type StatusRow = {
34
- label: string;
35
- value: string;
36
- tone: 'ok' | 'bad' | 'muted';
37
- };
38
- /**
39
- * How a full test went, in one line for a banner on the agent's screen. Undefined when no test has run (the quick checks
40
- * alone are not a test), so the banner only appears after the user asked for one.
41
- */
42
- export declare function testOutcome(checks: readonly AgentCheck[] | undefined): {
43
- ok: boolean;
44
- text: string;
45
- } | undefined;
46
- /**
47
- * The short form of a status for the list, where every row has to be scannable at a glance. The wording is plainer than
48
- * the detail panel's: "not installed" covers both "nothing saved" and "saved path broken", which the panel tells apart.
49
- */
50
- export declare const LIST_STATUS: Record<AgentStatus, {
51
- symbol: string;
52
- text: string;
53
- tone: StatusRow['tone'];
54
- }>;
55
- /**
56
- * The rows of the detail panel under the list, for the focused agent. Everything here is read-only and comes from
57
- * checks already collected, so moving the cursor never runs anything.
58
- */
59
- export declare function panelRows(name: AgentName, checks: readonly AgentCheck[] | undefined, settings: {
60
- binary: string;
61
- model: string;
62
- }): StatusRow[];
63
- /**
64
- * What the Status section of an agent's screen shows, one row per thing that was checked. The login row is always
65
- * there once the command is found, because for most agents it has to say that login cannot be checked without a test.
66
- */
67
- export declare function statusRows(_name: AgentName, checks: readonly AgentCheck[] | undefined, savedBinary: string): StatusRow[];
68
- export {};
@@ -1,17 +0,0 @@
1
- import { type AgentName } from '@contentful/experience-design-system-backend-pipeline';
2
- export type AgentSettings = {
3
- /** Passed as --model. Empty: the agent's built-in default (see defaultModelLabel). */
4
- model: string;
5
- /** Path to the agent's command. Empty: the command name is looked up on the PATH. */
6
- binary: string;
7
- };
8
- export type AgentConfig = {
9
- /** The agent the CLI uses when `--agent` is not given. */
10
- defaultAgent: AgentName;
11
- agents: Record<AgentName, AgentSettings>;
12
- };
13
- export declare const AGENT_LABELS: Record<AgentName, string>;
14
- export declare const AGENT_HINTS: Record<AgentName, string>;
15
- export declare function emptyAgents(): Record<AgentName, AgentSettings>;
16
- export declare function readAgentConfig(): Promise<AgentConfig>;
17
- export declare function writeAgentConfig(config: AgentConfig): Promise<void>;
@@ -1,13 +0,0 @@
1
- import type { AgentConfig } from './agent-store.js';
2
- /**
3
- * The pipeline picks an agent's binary from `EDS_AGENT_BINARY_<AGENT>` and nowhere else. This copies each saved
4
- * `agents.<name>.binary` into that variable, so the saved path reaches every place that spawns an agent (the import,
5
- * the generation package and the legacy commands) without touching their call sites.
6
- *
7
- * Called once at startup, and again after Settings saves a binary so a change applies without a restart.
8
- *
9
- * Settings wins over a variable already in the shell, so a forgotten `EDS_AGENT_BINARY_CLAUDE` cannot silently override
10
- * what the user sees on screen. An agent with no saved path leaves the shell's variable alone, and clearing a path
11
- * puts the shell's value back.
12
- */
13
- export declare function applyBinaryOverrides(config: AgentConfig): void;
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- /** The Contentful project settings: the space, credentials, defaults and where `.contentful` goes. */
3
- export declare function ProjectConfigScreen({ onDone }: {
4
- onDone: () => void;
5
- }): React.ReactElement;
@@ -1,35 +0,0 @@
1
- import React from 'react';
2
- export interface FormField<K extends string> {
3
- key: K;
4
- label: string;
5
- /** A short note shown dimmed after the value, so the label column stays narrow. */
6
- hint?: string;
7
- /** Shows dots instead of the value, for secrets. */
8
- masked?: boolean;
9
- }
10
- export type FormNotice = {
11
- kind: 'success' | 'error';
12
- text: string;
13
- };
14
- interface FieldFormProps<K extends string> {
15
- title: string;
16
- /** What this form is for, shown dimmed under the title. */
17
- subtitle?: string;
18
- fields: readonly FormField<K>[];
19
- values: Record<K, string>;
20
- onChange: (key: K, value: string) => void;
21
- onSave: () => void;
22
- /** Leaves without saving. */
23
- onQuit: () => void;
24
- notice?: FormNotice | null;
25
- /** Ignores keys while a load or save is in flight. */
26
- busy?: boolean;
27
- /** Shown above the controls, for a screen's own explanation. */
28
- footer?: React.ReactNode;
29
- }
30
- /**
31
- * The edit-in-place form the Configuration pages share. Fields are read-only until Enter opens one; Enter again closes it.
32
- * While one is open, keys type into it (so a "q" in a path is just a "q"), and Esc closes it and restores the old value.
33
- */
34
- export declare function FieldForm<K extends string>({ title, subtitle, fields, values, onChange, onSave, onQuit, notice, busy, footer, }: FieldFormProps<K>): React.ReactElement;
35
- export {};
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- export declare function UpgradeScreen({ onDone }: {
3
- onDone: () => void;
4
- }): React.ReactElement;