@contentful/experience-design-system-generation 2.32.1-dev-build-d5e6302.0 → 2.32.1-dev-build-1c6a348.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 +1 -1
- package/dist/src/agent-runner.d.ts +1 -1
- package/dist/src/agent-runner.js +9 -15
- package/package.json +2 -2
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-generation",
|
|
3
|
-
"version": "2.32.1-dev-build-
|
|
3
|
+
"version": "2.32.1-dev-build-1c6a348.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",
|
|
@@ -111,7 +111,7 @@ export declare function agentSupportsBedrock(agent: AgentName): boolean;
|
|
|
111
111
|
* agents whose model id changes shape under Bedrock (codex, opencode) — an
|
|
112
112
|
* explicit value or env override is never rewritten.
|
|
113
113
|
*/
|
|
114
|
-
export declare function resolveAgentModel(agent: AgentName, explicit?: string, bedrock?: boolean): string
|
|
114
|
+
export declare function resolveAgentModel(agent: AgentName, explicit?: string, bedrock?: boolean): string;
|
|
115
115
|
export type AgentDebugEvent = (name: string, payload?: Record<string, unknown>) => void;
|
|
116
116
|
export declare function buildArgs(agent: AgentName, prompt: string, model?: string, promptViaStdin?: boolean, bedrock?: boolean): string[];
|
|
117
117
|
export declare function runAgent(options: {
|
package/dist/src/agent-runner.js
CHANGED
|
@@ -295,21 +295,18 @@ export function agentSupportsBedrock(agent) {
|
|
|
295
295
|
return BEDROCK_CAPABLE_AGENTS.has(agent);
|
|
296
296
|
}
|
|
297
297
|
const DEFAULT_CODEX_BEDROCK_REGION = 'us-east-1';
|
|
298
|
-
const DEFAULT_OPENCODE_MODEL = 'claude-haiku-4-5';
|
|
299
298
|
/**
|
|
300
299
|
* Default models per agent — lightweight/fast picks to control cost when no
|
|
301
300
|
* explicit model is configured. cursor uses `gpt-mini` (verified alias from
|
|
302
|
-
* GetUsableModels; haiku is not available in cursor's model catalog).
|
|
303
|
-
*
|
|
304
|
-
*
|
|
305
|
-
*
|
|
306
|
-
* Bedrock it still needs an explicit id, since the model id there carries an
|
|
307
|
-
* `openai.` prefix required by the Bedrock provider and absent from the
|
|
308
|
-
* direct api.openai.com id — see DEFAULT_CODEX_BEDROCK_MODEL.
|
|
301
|
+
* GetUsableModels; haiku is not available in cursor's model catalog). codex's
|
|
302
|
+
* default differs on Bedrock: the model id there carries an `openai.` prefix,
|
|
303
|
+
* required by the Bedrock provider and absent from the direct api.openai.com
|
|
304
|
+
* id.
|
|
309
305
|
*/
|
|
310
306
|
const DEFAULT_MODELS = {
|
|
311
307
|
claude: 'haiku',
|
|
312
|
-
|
|
308
|
+
codex: 'gpt-5.6-luna', // requires OPENAI_API_KEY; ChatGPT account users must pass --model
|
|
309
|
+
opencode: 'claude-haiku-4-5',
|
|
313
310
|
cursor: 'gpt-mini', // cursor alias for gpt-5.4-mini-medium; haiku not in cursor's catalog
|
|
314
311
|
copilot: 'Auto', // the only model guaranteed on every Copilot plan (Free/Pro/Business/Enterprise); Pro+ users override via EDS_AGENT_MODEL_COPILOT
|
|
315
312
|
};
|
|
@@ -331,7 +328,7 @@ export function resolveAgentModel(agent, explicit, bedrock = false) {
|
|
|
331
328
|
if (bedrock && agent === 'codex')
|
|
332
329
|
return DEFAULT_CODEX_BEDROCK_MODEL;
|
|
333
330
|
if (bedrock && agent === 'opencode')
|
|
334
|
-
return withBedrockProviderPrefix(
|
|
331
|
+
return withBedrockProviderPrefix(DEFAULT_MODELS.opencode);
|
|
335
332
|
return DEFAULT_MODELS[agent];
|
|
336
333
|
}
|
|
337
334
|
/**
|
|
@@ -356,10 +353,7 @@ function codexBedrockConfigArgs() {
|
|
|
356
353
|
return ['-c', 'model_provider=amazon-bedrock', '-c', `model_providers.amazon-bedrock.region=${region}`];
|
|
357
354
|
}
|
|
358
355
|
export function buildArgs(agent, prompt, model, promptViaStdin = false, bedrock = false) {
|
|
359
|
-
|
|
360
|
-
// entirely so the CLI picks its own account-compatible default.
|
|
361
|
-
const resolvedModel = resolveAgentModel(agent, model, bedrock);
|
|
362
|
-
const modelArg = resolvedModel ? ['--model', resolvedModel] : [];
|
|
356
|
+
const modelArg = ['--model', resolveAgentModel(agent, model, bedrock)];
|
|
363
357
|
// When the prompt is delivered on stdin, omit it from argv — a large prompt
|
|
364
358
|
// as a command-line argument overflows ARG_MAX (spawn E2BIG). All four CLIs
|
|
365
359
|
// read the prompt from stdin when it isn't passed positionally.
|
|
@@ -393,7 +387,7 @@ export function buildArgs(agent, prompt, model, promptViaStdin = false, bedrock
|
|
|
393
387
|
// value, so promptViaStdin will fail here — callers must pass the
|
|
394
388
|
// prompt inline for copilot.
|
|
395
389
|
const copilotModel = resolveAgentModel('copilot', model);
|
|
396
|
-
const copilotModelArg =
|
|
390
|
+
const copilotModelArg = copilotModel === 'Auto' ? [] : ['--model', copilotModel];
|
|
397
391
|
return ['-p', ...promptArg, ...copilotModelArg, '--allow-all-tools'];
|
|
398
392
|
}
|
|
399
393
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-generation",
|
|
3
|
-
"version": "2.32.1-dev-build-
|
|
3
|
+
"version": "2.32.1-dev-build-1c6a348.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.32.1-dev-build-
|
|
25
|
+
"@contentful/experience-design-system-types": "2.32.1-dev-build-1c6a348.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@tsconfig/node24": "^24.0.4",
|