@adobe/design-data-agent-mcp 1.8.20 → 1.8.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/design-data-agent-mcp",
3
- "version": "1.8.20",
3
+ "version": "1.8.24",
4
4
  "description": "MCP server and Claude Code skill for the design-data agent surface — read tools run in-process via wasm",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
@@ -30,9 +30,9 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@modelcontextprotocol/sdk": "^1.27.1",
33
- "@adobe/design-data": "3.0.3",
34
- "@adobe/design-data-wasm": "0.4.4",
35
- "@adobe/spectrum-design-data": "2.0.0"
33
+ "@adobe/design-data": "3.0.4",
34
+ "@adobe/design-data-wasm": "0.4.5",
35
+ "@adobe/spectrum-design-data": "2.2.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "ava": "^6.0.1"
@@ -6,7 +6,7 @@ description: >
6
6
  system, token lookup, spec-conformance, drift detection, or token authoring on custom data.
7
7
  metadata:
8
8
  author: adobe
9
- version: "1.8.20"
9
+ version: "1.8.24"
10
10
  when_to_use: >
11
11
  Trigger on: design system, design tokens, spec-conformant, drift, validate tokens, token
12
12
  authoring, custom dataset, DESIGN_DATA_PATH, design-data validate, design-data diff,
package/src/config.js CHANGED
@@ -70,6 +70,10 @@ export const config = {
70
70
  anchorPath(process.env.DESIGN_DATA_COMPONENTS) ??
71
71
  resolveDataPackageDir("components") ??
72
72
  null,
73
+ relationshipsDir:
74
+ anchorPath(process.env.DESIGN_DATA_RELATIONSHIPS) ??
75
+ resolveDataPackageDir("relationships") ??
76
+ null,
73
77
  fieldsDir:
74
78
  anchorPath(process.env.DESIGN_DATA_FIELDS) ??
75
79
  resolveDataPackageDir("fields") ??
package/src/tools/read.js CHANGED
@@ -175,7 +175,7 @@ export function createReadTools() {
175
175
  {
176
176
  name: "describe_component",
177
177
  description:
178
- "Return the JSON schema and token bindings for a design system component by its ID.",
178
+ "Return the JSON schema and token relationships (bindings) for a design system component by its ID.",
179
179
  inputSchema: {
180
180
  type: "object",
181
181
  required: ["id"],
@@ -210,7 +210,23 @@ export function createReadTools() {
210
210
  : `Call primer to see available component IDs.`;
211
211
  throw new Error(`Component not found: "${id}". ${hint}`);
212
212
  }
213
- return JSON.parse(readFileSync(componentFile, "utf-8"));
213
+ const component = JSON.parse(readFileSync(componentFile, "utf-8"));
214
+
215
+ // Component/Token Relationships (CTRs) migrated most tokenBindings out
216
+ // of the component file into relationships/<id>.json — merge them back
217
+ // in so callers relying on this tool for a component's token bindings
218
+ // still see them (see spectrum-design-data-x29.4).
219
+ const relationshipsDir = config.relationshipsDir;
220
+ const relationshipFile = relationshipsDir
221
+ ? join(relationshipsDir, `${id}.json`)
222
+ : null;
223
+ if (relationshipFile && existsSync(relationshipFile)) {
224
+ component.relationships = JSON.parse(
225
+ readFileSync(relationshipFile, "utf-8"),
226
+ );
227
+ }
228
+
229
+ return component;
214
230
  },
215
231
  },
216
232
  ];