@contentful/experience-design-system-generation 2.30.1-dev-build-8718ee4.0 → 2.30.1-dev-build-d59d797.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-generation",
3
- "version": "2.30.1-dev-build-8718ee4.0",
3
+ "version": "2.30.1-dev-build-d59d797.0",
4
4
  "description": "Agent-invocation and skill-prompt engine for the Contentful Experience Design System SDK",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,4 +1,4 @@
1
- export declare const AGENT_NAMES: readonly ["claude", "codex", "opencode", "cursor"];
1
+ export declare const AGENT_NAMES: readonly ["claude", "codex", "opencode", "cursor", "copilot"];
2
2
  export type AgentName = (typeof AGENT_NAMES)[number];
3
3
  export declare const DEFAULT_AGENT_NAME: AgentName;
4
4
  export declare function isAgentName(value: string): value is AgentName;
@@ -1,4 +1,4 @@
1
- export const AGENT_NAMES = ['claude', 'codex', 'opencode', 'cursor'];
1
+ export const AGENT_NAMES = ['claude', 'codex', 'opencode', 'cursor', 'copilot'];
2
2
  export const DEFAULT_AGENT_NAME = 'claude';
3
3
  export function isAgentName(value) {
4
4
  return AGENT_NAMES.includes(value);
@@ -271,6 +271,7 @@ const AGENT_BINARIES = {
271
271
  codex: 'codex',
272
272
  opencode: 'opencode',
273
273
  cursor: 'cursor-agent',
274
+ copilot: 'copilot',
274
275
  };
275
276
  export function resolveBinary(agent) {
276
277
  const envKey = `EDS_AGENT_BINARY_${agent.toUpperCase()}`;
@@ -289,6 +290,7 @@ const DEFAULT_MODELS = {
289
290
  codex: 'gpt-5.4-mini', // requires OPENAI_API_KEY; ChatGPT account users must pass --model
290
291
  opencode: 'claude-haiku-4-5',
291
292
  cursor: 'gpt-mini', // cursor alias for gpt-5.4-mini-medium; haiku not in cursor's catalog
293
+ copilot: 'Auto', // the only model guaranteed on every Copilot plan (Free/Pro/Business/Enterprise); Pro+ users override via EDS_AGENT_MODEL_COPILOT
292
294
  };
293
295
  /**
294
296
  * Resolve the model for an agent. Explicit flag/creds value wins, then a
@@ -321,6 +323,25 @@ export function buildArgs(agent, prompt, model, promptViaStdin = false) {
321
323
  case 'cursor':
322
324
  // cursor-agent uses --print for non-interactive stdout output
323
325
  return ['--print', ...modelArg, ...promptArg];
326
+ case 'copilot': {
327
+ // copilot's -p takes the prompt as its value — it MUST come immediately
328
+ // after -p or the CLI rejects with "Invalid command format".
329
+ // --allow-all-tools mirrors codex's sandbox bypass for non-interactive
330
+ // use.
331
+ //
332
+ // Model handling is special: copilot's UI shows "Auto" as the default
333
+ // pick, but the CLI rejects --model Auto ("not available"). Auto is a
334
+ // UI-only label — internally, omitting --model IS Auto. So we only
335
+ // pass --model when the user set an explicit override (via flag or
336
+ // EDS_AGENT_MODEL_COPILOT); the sentinel string 'Auto' means "omit".
337
+ //
338
+ // Stdin fallback is unsupported: copilot -p requires an inline prompt
339
+ // value, so promptViaStdin will fail here — callers must pass the
340
+ // prompt inline for copilot.
341
+ const copilotModel = resolveAgentModel('copilot', model);
342
+ const copilotModelArg = copilotModel === 'Auto' ? [] : ['--model', copilotModel];
343
+ return ['-p', ...promptArg, ...copilotModelArg, '--allow-all-tools'];
344
+ }
324
345
  }
325
346
  }
326
347
  export async function runAgent(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-generation",
3
- "version": "2.30.1-dev-build-8718ee4.0",
3
+ "version": "2.30.1-dev-build-d59d797.0",
4
4
  "description": "Agent-invocation and skill-prompt engine for the Contentful Experience Design System SDK",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -22,7 +22,7 @@
22
22
  "skills/"
23
23
  ],
24
24
  "dependencies": {
25
- "@contentful/experience-design-system-types": "2.30.1-dev-build-8718ee4.0"
25
+ "@contentful/experience-design-system-types": "2.30.1-dev-build-d59d797.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@tsconfig/node24": "^24.0.4",