@contentful/experience-design-system-generation 2.27.5-dev-build-c49af6a.0 → 2.27.5-dev-build-288ad9b.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.27.5-dev-build-
|
|
3
|
+
"version": "2.27.5-dev-build-288ad9b.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",
|
|
@@ -90,7 +90,6 @@ export interface ParsedToolCalls {
|
|
|
90
90
|
export declare function parseToolCallLines(stdout: string): ParsedToolCalls;
|
|
91
91
|
export declare function parseTokenToolCallLines(stdout: string): ParsedTokenToolCalls;
|
|
92
92
|
export declare function resolveBinary(agent: AgentName): string;
|
|
93
|
-
export declare function agentSupportsBedrock(agent: AgentName): boolean;
|
|
94
93
|
/**
|
|
95
94
|
* Resolve the model for an agent. Explicit flag/creds value wins, then a
|
|
96
95
|
* per-agent `EDS_AGENT_MODEL_<AGENT>` env override (mirrors the
|
|
@@ -105,8 +104,6 @@ export declare function runAgent(options: {
|
|
|
105
104
|
prompt: string;
|
|
106
105
|
timeoutMs: number;
|
|
107
106
|
model?: string;
|
|
108
|
-
/** Apply the selected agent's Bedrock-routing env vars when enabled. */
|
|
109
|
-
bedrock?: boolean;
|
|
110
107
|
onOutput?: (chunk: string) => void;
|
|
111
108
|
/**
|
|
112
109
|
* Deliver the prompt on stdin instead of as an argv positional. Required for
|
package/dist/src/agent-runner.js
CHANGED
|
@@ -234,13 +234,6 @@ export function resolveBinary(agent) {
|
|
|
234
234
|
return override.trim();
|
|
235
235
|
return AGENT_BINARIES[agent];
|
|
236
236
|
}
|
|
237
|
-
/** Per-agent env vars that switch model calls to AWS Bedrock. */
|
|
238
|
-
const BEDROCK_ENV_BY_AGENT = {
|
|
239
|
-
claude: { CLAUDE_CODE_USE_BEDROCK: '1' },
|
|
240
|
-
};
|
|
241
|
-
export function agentSupportsBedrock(agent) {
|
|
242
|
-
return agent in BEDROCK_ENV_BY_AGENT;
|
|
243
|
-
}
|
|
244
237
|
/**
|
|
245
238
|
* Default models per agent — lightweight/fast picks to control cost when no
|
|
246
239
|
* explicit model is configured. cursor uses `gpt-mini` (verified alias from
|
|
@@ -287,11 +280,6 @@ export function buildArgs(agent, prompt, model, promptViaStdin = false) {
|
|
|
287
280
|
}
|
|
288
281
|
export async function runAgent(options) {
|
|
289
282
|
const { agent, prompt, timeoutMs, model, onOutput, promptViaStdin, onDebugEvent } = options;
|
|
290
|
-
// Fall back to the process-wide EDS_BEDROCK signal (set once by the CLI's
|
|
291
|
-
// top-level --bedrock resolution and inherited by every spawned subprocess)
|
|
292
|
-
// when a call site doesn't pass `bedrock` explicitly — closes the gap for
|
|
293
|
-
// call sites that forget to thread the flag through by hand.
|
|
294
|
-
const bedrock = options.bedrock ?? process.env.EDS_BEDROCK === '1';
|
|
295
283
|
const binary = resolveBinary(agent);
|
|
296
284
|
const useStdin = !!promptViaStdin;
|
|
297
285
|
const args = buildArgs(agent, prompt, model, useStdin);
|
|
@@ -300,16 +288,13 @@ export async function runAgent(options) {
|
|
|
300
288
|
agent,
|
|
301
289
|
binary,
|
|
302
290
|
model,
|
|
303
|
-
bedrock: !!bedrock,
|
|
304
291
|
timeoutMs,
|
|
305
292
|
promptLen: prompt.length,
|
|
306
293
|
promptHead: prompt.slice(0, 500),
|
|
307
294
|
});
|
|
308
295
|
return new Promise((resolve) => {
|
|
309
|
-
const bedrockEnv = bedrock ? BEDROCK_ENV_BY_AGENT[agent] : undefined;
|
|
310
296
|
const child = spawn(binary, args, {
|
|
311
297
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
312
|
-
...(bedrockEnv ? { env: { ...process.env, ...bedrockEnv } } : {}),
|
|
313
298
|
});
|
|
314
299
|
if (useStdin && child.stdin) {
|
|
315
300
|
// Guard against EPIPE: the child may close stdin before we finish
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { AGENT_NAMES, DEFAULT_AGENT_NAME, isAgentName } from './agent-names.js';
|
|
2
2
|
export type { AgentName } from './agent-names.js';
|
|
3
|
-
export {
|
|
3
|
+
export { buildArgs, checkAgentAuth, describeAgentFailure, extractSentinelOutput, parseSelectToolCallLines, parseTokenToolCallLines, parseToolCallLines, resolveAgentModel, resolveBinary, runAgent, } from './agent-runner.js';
|
|
4
4
|
export type { AgentAuthStatus, AgentDebugEvent, AgentRunResult, ClassifyComponentCall, ClassifyPropCall, ClassifySlotCall, ExcludePropCall, ParsedSelectToolCalls, ParsedTokenToolCalls, ParsedToolCalls, RejectComponentCall, SelectComponentCall, SelectToolCall, SetGroupCall, SetTokenCall, ToolCall, TokenToolCall, } from './agent-runner.js';
|
|
5
5
|
export { createLocalCliAgentInvoker } from './agent-invoker.js';
|
|
6
6
|
export type { AgentInvoker, CreateLocalCliAgentInvokerOptions, InvokeAgentOptions } from './agent-invoker.js';
|
package/dist/src/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Agent identity
|
|
2
2
|
export { AGENT_NAMES, DEFAULT_AGENT_NAME, isAgentName } from './agent-names.js';
|
|
3
3
|
// Agent invocation (low-level)
|
|
4
|
-
export {
|
|
4
|
+
export { buildArgs, checkAgentAuth, describeAgentFailure, extractSentinelOutput, parseSelectToolCallLines, parseTokenToolCallLines, parseToolCallLines, resolveAgentModel, resolveBinary, runAgent, } from './agent-runner.js';
|
|
5
5
|
// Agent invocation (interface)
|
|
6
6
|
export { createLocalCliAgentInvoker } from './agent-invoker.js';
|
|
7
7
|
// Prompt building
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-generation",
|
|
3
|
-
"version": "2.27.5-dev-build-
|
|
3
|
+
"version": "2.27.5-dev-build-288ad9b.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.27.5-dev-build-
|
|
25
|
+
"@contentful/experience-design-system-types": "2.27.5-dev-build-288ad9b.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@tsconfig/node24": "^24.0.4",
|