@contentful/experience-design-system-cli 2.35.1-dev-build-9605c7ee.0 → 2.35.1-dev-build-45d6c918.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.35.1-dev-build-9605c7ee.0",
3
+ "version": "2.35.1-dev-build-45d6c918.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -164,12 +164,19 @@ var init_render_with_goodbye = __esm({
164
164
  function isAgentName(value) {
165
165
  return AGENT_NAMES.includes(value);
166
166
  }
167
- var AGENT_NAMES, DEFAULT_AGENT_NAME;
167
+ var AGENT_NAMES, DEFAULT_AGENT_NAME, AGENT_BINARIES;
168
168
  var init_agent_names = __esm({
169
169
  "packages/experience-design-system-generation/dist/src/agent-names.js"() {
170
170
  "use strict";
171
171
  AGENT_NAMES = ["claude", "codex", "opencode", "cursor", "copilot"];
172
172
  DEFAULT_AGENT_NAME = "claude";
173
+ AGENT_BINARIES = {
174
+ claude: "claude",
175
+ codex: "codex",
176
+ opencode: "opencode",
177
+ cursor: "cursor-agent",
178
+ copilot: "copilot"
179
+ };
173
180
  }
174
181
  });
175
182
 
@@ -643,17 +650,10 @@ function resolveAgentBinary(agent) {
643
650
  return override.trim();
644
651
  return AGENT_BINARIES[agent];
645
652
  }
646
- var AGENT_BINARIES;
647
653
  var init_resolve_agent_binary = __esm({
648
654
  "packages/experience-design-system-generation/dist/src/services/agent/helpers/resolve-agent-binary.js"() {
649
655
  "use strict";
650
- AGENT_BINARIES = {
651
- claude: "claude",
652
- codex: "codex",
653
- opencode: "opencode",
654
- cursor: "cursor-agent",
655
- copilot: "copilot"
656
- };
656
+ init_agent_names();
657
657
  }
658
658
  });
659
659
 
@@ -722,13 +722,19 @@ var init_build_agent_args = __esm({
722
722
  }
723
723
  });
724
724
 
725
- // packages/experience-design-system-generation/dist/src/services/agent/run-agent.js
726
- import { spawn } from "node:child_process";
725
+ // packages/experience-design-system-generation/dist/src/services/agent/helpers/describe-agent-failure.js
727
726
  function describeAgentFailure(result, maxDetail = 800) {
728
727
  const base = result.exitCode !== 0 ? `agent exited with code ${result.exitCode}` : "agent produced no tool calls";
729
728
  const detail = (result.stderr.trim() || result.stdout.trim()).slice(-maxDetail).trim();
730
729
  return detail ? `${base} \u2014 ${detail}` : base;
731
730
  }
731
+ var init_describe_agent_failure = __esm({
732
+ "packages/experience-design-system-generation/dist/src/services/agent/helpers/describe-agent-failure.js"() {
733
+ "use strict";
734
+ }
735
+ });
736
+
737
+ // packages/experience-design-system-generation/dist/src/services/agent/helpers/extract-sentinel-output.js
732
738
  function extractSentinelOutput(stdout) {
733
739
  const START = "<<<EDS_OUTPUT_START>>>";
734
740
  const END = "<<<EDS_OUTPUT_END>>>";
@@ -745,6 +751,14 @@ function extractSentinelOutput(stdout) {
745
751
  return "multiple";
746
752
  return stdout.slice(startIdx + START.length, endIdx).trim();
747
753
  }
754
+ var init_extract_sentinel_output = __esm({
755
+ "packages/experience-design-system-generation/dist/src/services/agent/helpers/extract-sentinel-output.js"() {
756
+ "use strict";
757
+ }
758
+ });
759
+
760
+ // packages/experience-design-system-generation/dist/src/services/agent/run-agent.js
761
+ import { spawn } from "node:child_process";
748
762
  async function runAgent(options) {
749
763
  const { agent, prompt, timeoutMs, model, onOutput, promptViaStdin, onDebugEvent } = options;
750
764
  const bedrock = options.bedrock ?? process.env.EDS_BEDROCK === "1";
@@ -793,12 +807,7 @@ async function runAgent(options) {
793
807
  });
794
808
  child.on("close", (code, signal) => {
795
809
  clearTimeout(timer);
796
- const result = {
797
- exitCode: signal ? 1 : code ?? 1,
798
- stdout,
799
- stderr,
800
- timedOut
801
- };
810
+ const result = { exitCode: signal ? 1 : code ?? 1, stdout, stderr, timedOut };
802
811
  onDebugEvent?.("run.end", {
803
812
  agent,
804
813
  model,
@@ -819,25 +828,14 @@ var init_run_agent = __esm({
819
828
  "use strict";
820
829
  init_resolve_agent_binary();
821
830
  init_build_agent_args();
831
+ init_describe_agent_failure();
832
+ init_extract_sentinel_output();
822
833
  }
823
834
  });
824
835
 
825
- // packages/experience-design-system-generation/dist/src/services/agent/helpers/check-agent-auth.js
836
+ // packages/experience-design-system-generation/dist/src/services/agent/helpers/check-claude-auth.js
826
837
  import { spawn as spawn2 } from "node:child_process";
827
- async function checkAgentAuth(agent) {
828
- const binary = resolveAgentBinary(agent);
829
- const binaryExists2 = await new Promise((resolve21) => {
830
- if (binary.startsWith("/")) {
831
- import("node:fs/promises").then((fs2) => fs2.access(binary).then(() => resolve21(true), () => resolve21(false)));
832
- return;
833
- }
834
- const child = spawn2(process.platform === "win32" ? "where" : "which", [binary], { stdio: "ignore" });
835
- child.on("close", (code) => resolve21(code === 0));
836
- });
837
- if (!binaryExists2)
838
- return "not-found";
839
- if (agent !== "claude")
840
- return "ok";
838
+ function checkClaudeAuth(binary) {
841
839
  return new Promise((resolve21) => {
842
840
  const child = spawn2(binary, ["auth", "status", "--json"], {
843
841
  stdio: ["ignore", "pipe", "pipe"]
@@ -872,10 +870,35 @@ async function checkAgentAuth(agent) {
872
870
  });
873
871
  });
874
872
  }
873
+ var init_check_claude_auth = __esm({
874
+ "packages/experience-design-system-generation/dist/src/services/agent/helpers/check-claude-auth.js"() {
875
+ "use strict";
876
+ }
877
+ });
878
+
879
+ // packages/experience-design-system-generation/dist/src/services/agent/helpers/check-agent-auth.js
880
+ import { spawn as spawn3 } from "node:child_process";
881
+ async function checkAgentAuth(agent) {
882
+ const binary = resolveAgentBinary(agent);
883
+ const binaryExists2 = await new Promise((resolve21) => {
884
+ if (binary.startsWith("/")) {
885
+ import("node:fs/promises").then((fs2) => fs2.access(binary).then(() => resolve21(true), () => resolve21(false)));
886
+ return;
887
+ }
888
+ const child = spawn3(process.platform === "win32" ? "where" : "which", [binary], { stdio: "ignore" });
889
+ child.on("close", (code) => resolve21(code === 0));
890
+ });
891
+ if (!binaryExists2)
892
+ return "not-found";
893
+ if (agent !== "claude")
894
+ return "ok";
895
+ return checkClaudeAuth(binary);
896
+ }
875
897
  var init_check_agent_auth = __esm({
876
898
  "packages/experience-design-system-generation/dist/src/services/agent/helpers/check-agent-auth.js"() {
877
899
  "use strict";
878
900
  init_resolve_agent_binary();
901
+ init_check_claude_auth();
879
902
  }
880
903
  });
881
904
 
@@ -1211,6 +1234,7 @@ var init_progress = __esm({
1211
1234
  // packages/experience-design-system-generation/dist/src/index.js
1212
1235
  var src_exports = {};
1213
1236
  __export(src_exports, {
1237
+ AGENT_BINARIES: () => AGENT_BINARIES,
1214
1238
  AGENT_NAMES: () => AGENT_NAMES,
1215
1239
  DEFAULT_AGENT_NAME: () => DEFAULT_AGENT_NAME,
1216
1240
  agentSupportsBedrock: () => agentSupportsBedrock,
@@ -18919,9 +18943,9 @@ var init_wizard_generate_progress = __esm({
18919
18943
  });
18920
18944
 
18921
18945
  // packages/experience-design-system-cli-legacy/src/import/tui/spawn-generate.ts
18922
- import { spawn as spawn3 } from "node:child_process";
18946
+ import { spawn as spawn4 } from "node:child_process";
18923
18947
  function spawnGenerateChild(opts) {
18924
- const child = spawn3(opts.command, opts.args);
18948
+ const child = spawn4(opts.command, opts.args);
18925
18949
  let stdout = "";
18926
18950
  let stderr = "";
18927
18951
  child.stdout?.on("data", (d) => {
@@ -27234,7 +27258,7 @@ import { join as join20, resolve as resolve17 } from "node:path";
27234
27258
  import { appendFileSync as appendFileSync2, writeFileSync } from "node:fs";
27235
27259
  import { access as access7, stat as stat5, writeFile as writeFile6 } from "node:fs/promises";
27236
27260
  import { tmpdir } from "node:os";
27237
- import { execFile as execFile2, spawn as spawn4 } from "node:child_process";
27261
+ import { execFile as execFile2, spawn as spawn5 } from "node:child_process";
27238
27262
  import { mkdir as mkdir5 } from "node:fs/promises";
27239
27263
  import { buildCDF as buildCDF3, validateCDF as validateCDF3, validateSlotReferences as validateSlotReferences2 } from "@contentful/experience-design-system-types";
27240
27264
  import { jsx as jsx50, jsxs as jsxs43 } from "react/jsx-runtime";
@@ -27296,7 +27320,7 @@ function runCli(args) {
27296
27320
  }
27297
27321
  function runSpawnedCli(args, onStderr, onStdout) {
27298
27322
  return new Promise((res) => {
27299
- const child = spawn4("node", args);
27323
+ const child = spawn5("node", args);
27300
27324
  let stdout = "";
27301
27325
  let stderr = "";
27302
27326
  child.stdout.on("data", (d) => {
@@ -29591,7 +29615,7 @@ var init_agent_definitions = __esm({
29591
29615
  });
29592
29616
 
29593
29617
  // packages/experience-design-system-cli-legacy/src/setup/lib/shell.ts
29594
- import { execFile as execFile3, spawn as spawn5 } from "node:child_process";
29618
+ import { execFile as execFile3, spawn as spawn6 } from "node:child_process";
29595
29619
  import { access as access8 } from "node:fs/promises";
29596
29620
  import { promisify as promisify2 } from "node:util";
29597
29621
  async function binaryExists(name) {
@@ -29607,7 +29631,7 @@ async function pathExists3(path) {
29607
29631
  }
29608
29632
  function runSpawn(cmd, args, opts = {}) {
29609
29633
  return new Promise((resolve21) => {
29610
- const child = spawn5(cmd, args, {
29634
+ const child = spawn6(cmd, args, {
29611
29635
  cwd: opts.cwd,
29612
29636
  env: opts.env ?? process.env,
29613
29637
  stdio: ["ignore", "pipe", "pipe"]
@@ -32037,7 +32061,7 @@ __export(program_exports, {
32037
32061
  resolveBedrockFromAncestors: () => resolveBedrockFromAncestors,
32038
32062
  runBuild: () => runBuild
32039
32063
  });
32040
- import { spawn as spawn6 } from "node:child_process";
32064
+ import { spawn as spawn7 } from "node:child_process";
32041
32065
  import { fileURLToPath as fileURLToPath4 } from "node:url";
32042
32066
  import { dirname as dirname13, join as join26, resolve as resolve20 } from "node:path";
32043
32067
  import { readFileSync as readFileSync10 } from "node:fs";
@@ -32072,7 +32096,7 @@ function registerBuildCommand(program) {
32072
32096
  const pkgRoot = resolve20(dirname13(fileURLToPath4(import.meta.url)), "..", "..");
32073
32097
  process.stderr.write("\u2699 Building from source...\n");
32074
32098
  const { exitCode } = await runBuild({
32075
- spawnFn: () => spawn6("pnpm", ["build"], { cwd: pkgRoot, stdio: "inherit" }),
32099
+ spawnFn: () => spawn7("pnpm", ["build"], { cwd: pkgRoot, stdio: "inherit" }),
32076
32100
  stderrWrite: (s) => process.stderr.write(s)
32077
32101
  });
32078
32102
  process.exit(exitCode);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.35.1-dev-build-9605c7ee.0",
3
+ "version": "2.35.1-dev-build-45d6c918.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.35.1-dev-build-9605c7ee.0",
3
+ "version": "2.35.1-dev-build-45d6c918.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -41,7 +41,7 @@
41
41
  "svelte": "^5.56.4",
42
42
  "ts-morph": "^27.0.2",
43
43
  "typescript": "^5.9.3",
44
- "@contentful/experience-design-system-types": "2.35.1-dev-build-9605c7ee.0"
44
+ "@contentful/experience-design-system-types": "2.35.1-dev-build-45d6c918.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@tsconfig/node24": "^24.0.4",