@contentful/experience-design-system-cli 2.37.1-dev-build-2582b468.0 → 2.37.1-dev-build-41b62bf7.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-2582b468.0",
3
+ "version": "2.37.1-dev-build-41b62bf7.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -5,9 +5,11 @@ import { type AgentConfig } from './agent-store.js';
5
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
6
  * default agent and the other agents are kept. The test uses the values on screen, saved or not.
7
7
  */
8
- export declare function AgentDetail({ name, config, setConfig, onBack, }: {
8
+ export declare function AgentDetail({ name, config, setConfig, onBack, record, }: {
9
9
  name: AgentName;
10
10
  config: AgentConfig;
11
11
  setConfig: (config: AgentConfig) => void;
12
12
  onBack: () => void;
13
+ /** Adds a line to the debug log of this visit. The Agents list owns the log, since it is the screen that is open. */
14
+ record: (action: string, error?: unknown) => void;
13
15
  }): React.ReactElement;
@@ -0,0 +1,25 @@
1
+ import { type AgentName } from '@contentful/experience-design-system-backend-pipeline';
2
+ import type { Snapshot } from '../../shared/debug-trail.js';
3
+ import type { AgentConfig } from './agent-store.js';
4
+ /**
5
+ * The agent settings as flat text, for `diffSnapshots`: `default_agent`, then `<agent>.model` and `<agent>.binary` for
6
+ * every agent. Taken on entry and on exit, so the log shows what a visit changed.
7
+ */
8
+ export declare function agentSnapshot(config: AgentConfig): Snapshot;
9
+ export type AgentEnvironment = {
10
+ /** Whether the command was found, and the path it resolved to. */
11
+ found: boolean;
12
+ resolved_path: string;
13
+ version: string;
14
+ /**
15
+ * The `EDS_AGENT_BINARY_<AGENT>` variable when it points somewhere other than the saved path. Settings copies a saved
16
+ * path into that variable at startup, so a value equal to the saved path is not an override and is left out.
17
+ */
18
+ env_override: string;
19
+ };
20
+ /**
21
+ * What is true about each agent on this machine, so "my agent does not work" can be read from the log: found or not,
22
+ * where, its version, and whether a shell variable is overriding the saved path. Uses the quick checks only, so it never
23
+ * spends a prompt.
24
+ */
25
+ export declare function describeAgents(config: AgentConfig): Promise<Record<AgentName, AgentEnvironment>>;
@@ -0,0 +1,35 @@
1
+ /** One screen's values, as flat text, taken when the screen opens and again when it closes. */
2
+ export type Snapshot = Record<string, string>;
3
+ export type Change = {
4
+ changed: boolean;
5
+ /** Field names that differ between the two snapshots, in the order the fields appear. Never the values. */
6
+ changed_fields: string[];
7
+ };
8
+ /**
9
+ * Compares the snapshot taken on entry with the one taken on exit. A field that exists in only one of them counts as
10
+ * changed. Only names are returned, so the result can be logged without repeating a secret.
11
+ */
12
+ export declare function diffSnapshots(before: Snapshot, after: Snapshot): Change;
13
+ export type Trail = {
14
+ /** Adds one action, such as `edited spaceId`, `saved`, or `made Codex the default`. Field names, never values. */
15
+ record(action: string): void;
16
+ /** The recorded actions in order, oldest first. Once the limit is passed the oldest are dropped. */
17
+ entries(): string[];
18
+ };
19
+ /** Keeps the last `limit` actions of a visit, so a long visit cannot make the log grow without bound. */
20
+ export declare function createTrail(limit?: number): Trail;
21
+ /**
22
+ * The message of a failed load or save, safe to log: any of `secrets` that appears in it is replaced. The CMA token is
23
+ * only redacted by key elsewhere, so an error that quotes it would otherwise get through. A secret is matched as it is
24
+ * and as it looks URL-encoded, which is how it appears in a request error.
25
+ */
26
+ export declare function scrubError(error: unknown, secrets: readonly string[]): string;
27
+ /**
28
+ * Where Project's settings live and what could be moving them: the settings file path, whether `EDS_HOME` relocated it,
29
+ * and whether the file exists. Facts for the log, with no values read from the file.
30
+ */
31
+ export declare function describeSettingsFile(): {
32
+ path: string;
33
+ eds_home_set: boolean;
34
+ exists: boolean;
35
+ };
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-2582b468.0",
3
+ "version": "2.37.1-dev-build-41b62bf7.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-2582b468.0",
49
- "@contentful/experience-design-system-types": "2.37.1-dev-build-2582b468.0"
48
+ "@contentful/experience-design-system-backend-pipeline": "2.37.1-dev-build-41b62bf7.0",
49
+ "@contentful/experience-design-system-types": "2.37.1-dev-build-41b62bf7.0"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@tsconfig/node24": "^24.0.4",