@contentful/experience-design-system-generation 2.26.5-dev-build-e549301.0 → 2.26.5-dev-build-00663c7.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.26.5-dev-build-
|
|
3
|
+
"version": "2.26.5-dev-build-00663c7.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",
|
|
@@ -19,11 +19,6 @@ export interface ClassifyPropCall {
|
|
|
19
19
|
/** Internal LLM rationale; not customer-facing. Persisted to raw_props.rationale. */
|
|
20
20
|
reason?: string;
|
|
21
21
|
}
|
|
22
|
-
export interface ExcludePropCall {
|
|
23
|
-
tool: 'exclude_prop';
|
|
24
|
-
prop: string;
|
|
25
|
-
reason: string;
|
|
26
|
-
}
|
|
27
22
|
export interface ClassifyComponentCall {
|
|
28
23
|
tool: 'classify_component';
|
|
29
24
|
description?: string;
|
|
@@ -47,7 +42,7 @@ export interface ClassifySlotCall {
|
|
|
47
42
|
/** Per-slot rationale; persisted to raw_slots.rationale. */
|
|
48
43
|
rationale?: string;
|
|
49
44
|
}
|
|
50
|
-
export type ToolCall = ClassifyPropCall |
|
|
45
|
+
export type ToolCall = ClassifyPropCall | ClassifyComponentCall | ClassifySlotCall;
|
|
51
46
|
export interface SelectComponentCall {
|
|
52
47
|
tool: 'select_component';
|
|
53
48
|
name: string;
|
package/dist/src/agent-runner.js
CHANGED
|
@@ -43,7 +43,7 @@ export function parseSelectToolCallLines(stdout) {
|
|
|
43
43
|
}
|
|
44
44
|
return { calls, warnings };
|
|
45
45
|
}
|
|
46
|
-
const VALID_TOOL_NAMES = new Set(['classify_prop', '
|
|
46
|
+
const VALID_TOOL_NAMES = new Set(['classify_prop', 'classify_component', 'classify_slot']);
|
|
47
47
|
const VALID_TOKEN_TOOL_NAMES = new Set(['set_token', 'set_group']);
|
|
48
48
|
const VALID_CDF_TYPES = new Set(['string', 'richtext', 'media', 'enum', 'token', 'boolean']);
|
|
49
49
|
const VALID_CATEGORIES = new Set(['content', 'design', 'state']);
|
|
@@ -104,17 +104,6 @@ export function parseToolCallLines(stdout) {
|
|
|
104
104
|
call.reason = rec.reason;
|
|
105
105
|
calls.push(call);
|
|
106
106
|
}
|
|
107
|
-
else if (tool === 'exclude_prop') {
|
|
108
|
-
if (typeof rec.prop !== 'string' || !rec.prop) {
|
|
109
|
-
warnings.push('exclude_prop missing prop name — skipped');
|
|
110
|
-
continue;
|
|
111
|
-
}
|
|
112
|
-
calls.push({
|
|
113
|
-
tool: 'exclude_prop',
|
|
114
|
-
prop: rec.prop,
|
|
115
|
-
reason: typeof rec.reason === 'string' ? rec.reason : '',
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
107
|
else if (tool === 'classify_component') {
|
|
119
108
|
const call = { tool: 'classify_component' };
|
|
120
109
|
if (typeof rec.description === 'string')
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { AGENT_NAMES, DEFAULT_AGENT_NAME, isAgentName } from './agent-names.js';
|
|
2
2
|
export type { AgentName } from './agent-names.js';
|
|
3
3
|
export { buildArgs, checkAgentAuth, describeAgentFailure, extractSentinelOutput, parseSelectToolCallLines, parseTokenToolCallLines, parseToolCallLines, resolveAgentModel, resolveBinary, runAgent, } from './agent-runner.js';
|
|
4
|
-
export type { AgentAuthStatus, AgentDebugEvent, AgentRunResult, ClassifyComponentCall, ClassifyPropCall, ClassifySlotCall,
|
|
4
|
+
export type { AgentAuthStatus, AgentDebugEvent, AgentRunResult, ClassifyComponentCall, ClassifyPropCall, ClassifySlotCall, 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';
|
|
7
7
|
export { buildPrompt, formatCustomPromptBanner, resolveSkillPath } from './prompt-builder.js';
|
|
@@ -132,7 +132,7 @@ The three tool calls you may emit are:
|
|
|
132
132
|
|
|
133
133
|
Rules:
|
|
134
134
|
- Emit exactly one JSON object per line. No multi-line JSON. No markdown fences around the lines.
|
|
135
|
-
- Every prop in the input must have exactly one classify_prop call.
|
|
135
|
+
- Every prop in the input must have exactly one classify_prop call.
|
|
136
136
|
- Every slot in the input must have exactly one classify_slot call.
|
|
137
137
|
- Valid cdf_type values: string, richtext, media, enum, token, boolean
|
|
138
138
|
- Valid cdf_category values: content, design, state
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-generation",
|
|
3
|
-
"version": "2.26.5-dev-build-
|
|
3
|
+
"version": "2.26.5-dev-build-00663c7.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.26.5-dev-build-
|
|
25
|
+
"@contentful/experience-design-system-types": "2.26.5-dev-build-00663c7.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@tsconfig/node24": "^24.0.4",
|
|
@@ -66,7 +66,7 @@ It is correct approximately 80% of the time for simple props. You should:
|
|
|
66
66
|
|
|
67
67
|
## Target schema
|
|
68
68
|
|
|
69
|
-
The CLI assembles your output into CDF (Component Definition Format), a JSON schema with `$schema: "https://contentful.com/schemas/cdf/v1"`. Each component you classify produces a CDF component entry (`$type: "component"`) in the pipeline database. Properties carry `$category` (`content`, `design`, or `state`) and a `$type`.
|
|
69
|
+
The CLI assembles your output into CDF (Component Definition Format), a JSON schema with `$schema: "https://contentful.com/schemas/cdf/v1"`. Each component you classify produces a CDF component entry (`$type: "component"`) in the pipeline database. Properties carry `$category` (`content`, `design`, or `state`) and a `$type`. You do not produce this JSON directly — emit tool calls and the CLI writes the DB columns.
|
|
70
70
|
|
|
71
71
|
## Output protocol
|
|
72
72
|
|
|
@@ -82,7 +82,7 @@ Emit one JSON object per line. The CLI parses lines starting with `{`. Lines not
|
|
|
82
82
|
{"tool":"classify_slot","slot":"<slotName>","required":<bool>,"allowed_components":["ComponentName"],"description":"<short customer-facing description>","rationale":"<why this slot was kept / its role>"}
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
Every prop — including framework internals, DOM/accessibility pass-through, and props with no clean flat representation — must produce a `classify_prop` call. Props that are not marketer-configurable are classified with `cdf_category: "state"`: they still ship in the CDF (visible in review, editable if someone wants to override the category), but stay unattached from the content/design editing surfaces by default. See "Valid cdf_category values" below for exactly what falls into `state`.
|
|
86
86
|
|
|
87
87
|
**Rules:**
|
|
88
88
|
- Emit exactly one JSON object per line. No multi-line JSON.
|
|
@@ -135,7 +135,7 @@ Exactly **6** valid types:
|
|
|
135
135
|
|---|---|
|
|
136
136
|
| `content` | Data the component *displays* — what a copywriter or editor fills in: text, labels, headings, body copy, rich text, images, media, URLs, link targets, counts, locale |
|
|
137
137
|
| `design` | Values that control *how the component looks* — what a designer sets: color, size (sm/md/lg), variant (primary/secondary/ghost), layout orientation, alignment, background, visual toggles (imageOnLeft, enableEffect), design tokens |
|
|
138
|
-
| `state` | Two groups, both unattached from the content/design editing surfaces by default: (1) runtime behavioral or interactive flags — disabled, loading, expanded, isOpen, isSearchVisible, preview, identifiers used for analytics/tracking (componentId, sectionKey, componentName); (2) props that aren't marketer-configurable at all — framework internals, DOM/accessibility pass-through, callbacks, refs, and any type with no clean flat representation.
|
|
138
|
+
| `state` | Two groups, both unattached from the content/design editing surfaces by default: (1) runtime behavioral or interactive flags — disabled, loading, expanded, isOpen, isSearchVisible, preview, identifiers used for analytics/tracking (componentId, sectionKey, componentName); (2) props that aren't marketer-configurable at all — framework internals, DOM/accessibility pass-through, callbacks, refs, and any type with no clean flat representation. |
|
|
139
139
|
|
|
140
140
|
The pre-classified `category` in the raw input is a starting point — correct it when it is wrong. Contentful uses this category to decide where the property appears in the editor UI, so accuracy matters.
|
|
141
141
|
|