@synergy-design-system/mcp 1.41.1 → 2.0.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/CHANGELOG.md +37 -0
- package/README.md +43 -8
- package/dist/bin/create-checksum.js +2 -1
- package/dist/build/assets.js +1 -1
- package/dist/build/components.js +1 -0
- package/dist/build/static.js +15 -7
- package/dist/build/styles.js +1 -1
- package/dist/build/tokens.js +1 -1
- package/dist/tools/asset-info.js +8 -6
- package/dist/tools/component-info.js +0 -1
- package/dist/tools/framework-info.js +0 -1
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.js +1 -0
- package/dist/tools/migration-info.d.ts +10 -1
- package/dist/tools/migration-info.js +74 -12
- package/dist/tools/migration-list.d.ts +10 -0
- package/dist/tools/migration-list.js +122 -0
- package/dist/tools/template-info.js +0 -1
- package/dist/tools/version.js +3 -1
- package/dist/utilities/checksum.js +2 -1
- package/dist/utilities/migration.d.ts +3 -1
- package/dist/utilities/migration.js +25 -2
- package/dist/utilities/storybook/build-docs.js +2 -1
- package/dist/utilities/storybook/configs.js +3 -3
- package/dist/utilities/storybook/docs-scraper.js +0 -1
- package/dist/utilities/storybook/scraper.js +2 -2
- package/dist/utilities/storybook/storybook-manager.js +1 -2
- package/dist/utilities/version.d.ts +20 -2
- package/metadata/checksum.txt +1 -1
- package/metadata/packages/angular/README.md +1 -1
- package/metadata/packages/assets/BREAKING_CHANGES.md +305 -0
- package/metadata/packages/assets/CHANGELOG.md +26 -0
- package/metadata/packages/assets/README.md +39 -18
- package/metadata/packages/components/components/syn-alert/component.custom.styles.ts +20 -20
- package/metadata/packages/components/components/syn-badge/component.custom.styles.ts +11 -10
- package/metadata/packages/components/components/syn-breadcrumb-item/component.custom.styles.ts +1 -1
- package/metadata/packages/components/components/syn-button/component.custom.styles.ts +24 -24
- package/metadata/packages/components/components/syn-checkbox/component.custom.styles.ts +7 -7
- package/metadata/packages/components/components/syn-combobox/component.angular.ts +0 -17
- package/metadata/packages/components/components/syn-combobox/component.ts +0 -9
- package/metadata/packages/components/components/syn-combobox/component.vue +0 -9
- package/metadata/packages/components/components/syn-details/component.custom.styles.ts +1 -1
- package/metadata/packages/components/components/syn-dialog/component.custom.styles.ts +1 -1
- package/metadata/packages/components/components/syn-dropdown/component.angular.ts +0 -17
- package/metadata/packages/components/components/syn-dropdown/component.ts +0 -8
- package/metadata/packages/components/components/syn-dropdown/component.vue +0 -9
- package/metadata/packages/components/components/syn-file/component.styles.ts +6 -6
- package/metadata/packages/components/components/syn-header/component.styles.ts +7 -7
- package/metadata/packages/components/components/syn-icon-button/component.custom.styles.ts +8 -8
- package/metadata/packages/components/components/syn-input/component.custom.styles.ts +3 -3
- package/metadata/packages/components/components/syn-input/component.ts +2 -3
- package/metadata/packages/components/components/syn-menu-item/component.custom.styles.ts +11 -11
- package/metadata/packages/components/components/syn-nav-item/component.styles.ts +3 -3
- package/metadata/packages/components/components/syn-optgroup/component.styles.ts +1 -1
- package/metadata/packages/components/components/syn-option/component.custom.styles.ts +13 -13
- package/metadata/packages/components/components/syn-popup/component.angular.ts +0 -16
- package/metadata/packages/components/components/syn-popup/component.ts +3 -10
- package/metadata/packages/components/components/syn-popup/component.vue +0 -10
- package/metadata/packages/components/components/syn-progress-bar/component.custom.styles.ts +2 -2
- package/metadata/packages/components/components/syn-progress-ring/component.custom.styles.ts +2 -2
- package/metadata/packages/components/components/syn-radio/component.custom.styles.ts +7 -7
- package/metadata/packages/components/components/syn-range/component.styles.ts +10 -9
- package/metadata/packages/components/components/syn-range/component.ts +0 -1
- package/metadata/packages/components/components/syn-range-tick/component.styles.ts +1 -1
- package/metadata/packages/components/components/syn-select/component.angular.ts +0 -17
- package/metadata/packages/components/components/syn-select/component.ts +0 -8
- package/metadata/packages/components/components/syn-select/component.vue +0 -9
- package/metadata/packages/components/components/syn-side-nav/component.angular.ts +0 -21
- package/metadata/packages/components/components/syn-side-nav/component.ts +2 -36
- package/metadata/packages/components/components/syn-side-nav/component.vue +0 -13
- package/metadata/packages/components/components/syn-spinner/component.custom.styles.ts +2 -2
- package/metadata/packages/components/components/syn-switch/component.custom.styles.ts +16 -16
- package/metadata/packages/components/components/syn-tab/component.custom.styles.ts +3 -3
- package/metadata/packages/components/components/syn-tab-group/component.custom.styles.ts +2 -2
- package/metadata/packages/components/components/syn-tag/component.custom.styles.ts +1 -1
- package/metadata/packages/components/components/syn-tooltip/component.angular.ts +0 -18
- package/metadata/packages/components/components/syn-tooltip/component.ts +1 -10
- package/metadata/packages/components/components/syn-tooltip/component.vue +0 -10
- package/metadata/packages/components/components/syn-validate/component.ts +1 -0
- package/metadata/packages/components/migration/BREAKING_CHANGES.md +433 -14
- package/metadata/packages/components/static/CHANGELOG.md +55 -0
- package/metadata/packages/components/static/LIMITATIONS.md +141 -35
- package/metadata/packages/components/static/README.md +1 -1
- package/metadata/packages/fonts/CHANGELOG.md +8 -0
- package/metadata/packages/fonts/package.json +4 -4
- package/metadata/packages/styles/BREAKING_CHANGES.md +105 -0
- package/metadata/packages/styles/CHANGELOG.md +37 -0
- package/metadata/packages/styles/index.css +9 -9
- package/metadata/packages/styles/link-list.css +1 -1
- package/metadata/packages/styles/link.css +2 -2
- package/metadata/packages/styles/tables.css +8 -8
- package/metadata/packages/styles/typography.css +1 -1
- package/metadata/packages/tokens/BREAKING_CHANGES.md +180 -0
- package/metadata/packages/tokens/CHANGELOG.md +26 -0
- package/metadata/packages/tokens/README.md +2 -0
- package/metadata/packages/tokens/dark.css +237 -236
- package/metadata/packages/tokens/index.js +6 -1
- package/metadata/packages/tokens/light.css +221 -220
- package/metadata/packages/tokens/sick2018_dark.css +4 -3
- package/metadata/packages/tokens/sick2018_light.css +4 -3
- package/metadata/packages/tokens/sick2025_dark.css +4 -3
- package/metadata/packages/tokens/sick2025_light.css +4 -3
- package/metadata/static/components/syn-badge/docs.md +2 -14
- package/metadata/static/components/syn-popup/docs.md +10 -29
- package/metadata/static/components/syn-range/docs.md +1 -1
- package/metadata/static/migration/index.md +51 -11
- package/metadata/{packages/components/migration/migration-synergy-v3.md → static/migration/v2-2018-to-v2-2025.md} +1 -1
- package/metadata/static/migration/v2-2018-to-v3-2018.md +147 -0
- package/metadata/static/migration/v2-2018-to-v3-2025.md +150 -0
- package/metadata/static/migration/v2-2025-to-v3-2025.md +133 -0
- package/metadata/static/templates/appshell.md +8 -8
- package/metadata/static/templates/footer.md +1 -1
- package/package.json +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#1160](https://github.com/synergy-design-system/synergy-design-system/pull/1160) [`669cbcb`](https://github.com/synergy-design-system/synergy-design-system/commit/669cbcb9cccce72134beac99ac12a2591f3e3c74) Thanks [@schilchSICKAG](https://github.com/schilchSICKAG)! - Released on: 2026-02-02
|
|
8
|
+
|
|
9
|
+
feat: 💥 Enhanced migration support and SICK 2025 defaults
|
|
10
|
+
|
|
11
|
+
This release enhances the MCP server with improved migration guidance and updates default iconset to SICK 2025.
|
|
12
|
+
|
|
13
|
+
**Key Changes:**
|
|
14
|
+
- **Breaking:** Migration endpoint now requires package specification - the migration endpoint has been updated to accept a package parameter (e.g., components, styles, assets, tokens) to provide package-specific breaking changes documentation
|
|
15
|
+
- **Breaking:** Default iconset changed to SICK 2025 - asset info endpoint now returns SICK 2025 iconset information by default instead of SICK 2018
|
|
16
|
+
|
|
17
|
+
**Migration Steps:**
|
|
18
|
+
- Update any calls to the migration endpoint to specify the target package
|
|
19
|
+
- Review asset integrations as the default iconset has changed to SICK 2025
|
|
20
|
+
|
|
21
|
+
\*\*New tool `migration-list`
|
|
22
|
+
- Provides a new tool that gives information about available migrations for packages (e.g. for components how to migrate from v2 sick2018 to v3 sick2025)
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- Updated dependencies [[`669cbcb`](https://github.com/synergy-design-system/synergy-design-system/commit/669cbcb9cccce72134beac99ac12a2591f3e3c74)]:
|
|
27
|
+
- @synergy-design-system/assets@2.0.0
|
|
28
|
+
|
|
29
|
+
## 1.41.2
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- [#1148](https://github.com/synergy-design-system/synergy-design-system/pull/1148) [`73b7011`](https://github.com/synergy-design-system/synergy-design-system/commit/73b70118ae21bc58c83cbfeb9e2e8447873803a6) Thanks [@schilchSICKAG](https://github.com/schilchSICKAG)! - Released on: 2026-01-08
|
|
34
|
+
|
|
35
|
+
fix: 🐛 Minor dependency updates (#258)
|
|
36
|
+
|
|
37
|
+
- Updated dependencies [[`73b7011`](https://github.com/synergy-design-system/synergy-design-system/commit/73b70118ae21bc58c83cbfeb9e2e8447873803a6)]:
|
|
38
|
+
- @synergy-design-system/assets@1.25.1
|
|
39
|
+
|
|
3
40
|
## 1.41.1
|
|
4
41
|
|
|
5
42
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -238,20 +238,52 @@ The MCP server provides the following tools that can be invoked by AI assistants
|
|
|
238
238
|
- "What's needed to use Synergy with Vue?"
|
|
239
239
|
- "How do I install Synergy for vanilla JavaScript?"
|
|
240
240
|
|
|
241
|
-
### 13. `migration-
|
|
241
|
+
### 13. `migration-list`
|
|
242
242
|
|
|
243
|
-
**Description:**
|
|
243
|
+
**Description:** List available migration documents for a specific Synergy package in a compact, token‑efficient format.
|
|
244
244
|
|
|
245
|
-
**Parameters:**
|
|
245
|
+
**Parameters:**
|
|
246
|
+
|
|
247
|
+
- `synergyPackage` (string, optional): The package to list migration documents for (`assets`, `components`, `styles`, `tokens`). Defaults to `components`.
|
|
248
|
+
|
|
249
|
+
**Notes:**
|
|
250
|
+
|
|
251
|
+
- For the `components` package this returns an index of:
|
|
252
|
+
- High‑level overview docs (e.g. migration overview)
|
|
253
|
+
- Path‑specific guides (e.g. v2‑2018 → v3‑2018)
|
|
254
|
+
- Package‑level docs (e.g. `BREAKING_CHANGES.md`, `CHANGELOG.md`)
|
|
255
|
+
- Each entry contains at least the filename and package name. For component paths, additional metadata such as `from`, `to`, `fromTheme`, `toTheme`, and a short `summary` is included where possible.
|
|
256
|
+
|
|
257
|
+
**Example prompts:**
|
|
258
|
+
|
|
259
|
+
- "List all Synergy component migration guides"
|
|
260
|
+
- "Show me available migration docs for tokens"
|
|
261
|
+
- "What migration paths exist from Synergy 2 to Synergy 3?"
|
|
262
|
+
|
|
263
|
+
### 14. `migration-info`
|
|
264
|
+
|
|
265
|
+
**Description:** Get detailed migration documentation for a Synergy package. Use this together with `migration-list` to fetch only the documents you need.
|
|
266
|
+
|
|
267
|
+
**Parameters:**
|
|
268
|
+
|
|
269
|
+
- `filename` (string, optional): Specific migration document filename to return. Strongly recommended for the `components` package to avoid fetching all path guides at once.
|
|
270
|
+
- `synergyPackage` (string, optional): The package to get migration information about (`assets`, `components`, `styles`, `tokens`). Defaults to `components`.
|
|
271
|
+
|
|
272
|
+
**Behavior:**
|
|
273
|
+
|
|
274
|
+
- For `components`:
|
|
275
|
+
- With `filename`: returns exactly that migration document (e.g. a specific v2‑to‑v3 path guide).
|
|
276
|
+
- Without `filename`: returns only the migration overview and high‑level package docs (such as `BREAKING_CHANGES` and `CHANGELOG`), **not** every path‑specific guide.
|
|
277
|
+
- For other packages (`assets`, `styles`, `tokens`):
|
|
278
|
+
- Returns all migration‑related documents for the selected package (typically `BREAKING_CHANGES` and `CHANGELOG`).
|
|
246
279
|
|
|
247
280
|
**Example prompts:**
|
|
248
281
|
|
|
249
|
-
- "
|
|
250
|
-
- "
|
|
251
|
-
- "
|
|
252
|
-
- "What changed in the latest Synergy version?"
|
|
282
|
+
- "List the available Synergy component migrations" (first call `migration-list`)
|
|
283
|
+
- "Show me the migration guide from Synergy 2 (SICK 2018) to Synergy 3 (SICK 2018)"
|
|
284
|
+
- "Give me the breaking changes for the tokens package between major versions"
|
|
253
285
|
|
|
254
|
-
###
|
|
286
|
+
### 15. `version`
|
|
255
287
|
|
|
256
288
|
**Description:** Get version and basic information about the Synergy Design System MCP Server.
|
|
257
289
|
|
|
@@ -288,7 +320,10 @@ src/
|
|
|
288
320
|
│ ├── component-info.ts # Individual component details
|
|
289
321
|
│ ├── component-list.ts # List all components
|
|
290
322
|
│ ├── davinci-migration.ts # Migration guides
|
|
323
|
+
│ ├── font-info.ts # Font and prerequisites information
|
|
291
324
|
│ ├── framework-info.ts # Framework-specific information
|
|
325
|
+
│ ├── migration-info.ts # Package migration documentation
|
|
326
|
+
│ ├── migration-list.ts # Package migration index (filenames + metadata)
|
|
292
327
|
│ ├── styles-info.ts # CSS utilities information
|
|
293
328
|
│ ├── styles-list.ts # List all styles
|
|
294
329
|
│ ├── template-info.ts # Template details
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
3
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
4
3
|
import ora from 'ora';
|
|
5
4
|
import { createFolderChecksum, metaDataPath, } from '../utilities/index.js';
|
|
6
5
|
async function run() {
|
|
@@ -16,8 +15,10 @@ async function run() {
|
|
|
16
15
|
spinner.succeed(`Written to: ${metaDataPath}/checksum.txt`);
|
|
17
16
|
}
|
|
18
17
|
catch (error) {
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
19
19
|
spinner.fail(`Failed to generate checksum: ${error}`);
|
|
20
20
|
process.exit(1);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
23
24
|
run();
|
package/dist/build/assets.js
CHANGED
|
@@ -11,6 +11,7 @@ import { assetsPath, createPath, } from '../utilities/index.js';
|
|
|
11
11
|
const filesToCopy = [
|
|
12
12
|
'README.md',
|
|
13
13
|
'CHANGELOG.md',
|
|
14
|
+
'BREAKING_CHANGES.md',
|
|
14
15
|
];
|
|
15
16
|
/**
|
|
16
17
|
* Sets up all wanted data from the assets package and adds it to the static metadata.
|
|
@@ -36,7 +37,6 @@ export const buildAssets = async () => {
|
|
|
36
37
|
const modulePath = fileURLToPath(moduleUrl);
|
|
37
38
|
const moduleDir = path.join(path.dirname(modulePath), '../');
|
|
38
39
|
// Process the files (placeholder for actual logic)
|
|
39
|
-
// eslint-disable-next-line no-console
|
|
40
40
|
const contents = await globby(filesToCopy, {
|
|
41
41
|
cwd: moduleDir,
|
|
42
42
|
onlyFiles: true,
|
package/dist/build/components.js
CHANGED
|
@@ -103,6 +103,7 @@ export const buildComponents = async () => {
|
|
|
103
103
|
return copyFile(source, targetFileName);
|
|
104
104
|
});
|
|
105
105
|
});
|
|
106
|
+
// eslint-disable-next-line @typescript-eslint/await-thenable
|
|
106
107
|
await Promise.all(componentMetadata);
|
|
107
108
|
spinner.succeed('Components metadata generated successfully.');
|
|
108
109
|
spinner.text = 'Generating static metadata...';
|
package/dist/build/static.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
|
-
import { copyFile } from 'node:fs/promises';
|
|
2
|
+
import { copyFile, readdir } from 'node:fs/promises';
|
|
3
3
|
import { basename, join } from 'node:path';
|
|
4
4
|
import ora from 'ora';
|
|
5
|
-
import { componentMigrationPath, createPath, getAbsolutePath, setupPath, } from '../utilities/index.js';
|
|
5
|
+
import { componentMigrationPath, createPath, getAbsolutePath, setupPath, staticMigrationPath, } from '../utilities/index.js';
|
|
6
6
|
/**
|
|
7
7
|
* List of static files that should be copied to the static metadata directory.
|
|
8
8
|
*/
|
|
@@ -22,11 +22,6 @@ const staticFilesToCopy = [
|
|
|
22
22
|
getAbsolutePath('../../../../packages/components/BREAKING_CHANGES.md'),
|
|
23
23
|
componentMigrationPath,
|
|
24
24
|
],
|
|
25
|
-
// Copy the v3 migration guide
|
|
26
|
-
[
|
|
27
|
-
getAbsolutePath('../../../../packages/docs/src/static/migration-synergy-v3.md'),
|
|
28
|
-
componentMigrationPath,
|
|
29
|
-
],
|
|
30
25
|
];
|
|
31
26
|
/**
|
|
32
27
|
* Sets up all data from the components and framework packages and adds them to the static metadata.
|
|
@@ -47,6 +42,19 @@ export const buildStaticFiles = async () => {
|
|
|
47
42
|
return copyFile(staticFile, targetFileName);
|
|
48
43
|
});
|
|
49
44
|
await Promise.all(staticFiles);
|
|
45
|
+
// Copy all migration guides from the docs package into the static
|
|
46
|
+
// migration metadata directory so they can be consumed by the MCP server.
|
|
47
|
+
const migrationSourceDir = getAbsolutePath('../../../../packages/docs/src/static/migration');
|
|
48
|
+
if (existsSync(migrationSourceDir)) {
|
|
49
|
+
await createPath(staticMigrationPath);
|
|
50
|
+
const migrationFiles = await readdir(migrationSourceDir);
|
|
51
|
+
const migrationCopies = migrationFiles.map((file) => {
|
|
52
|
+
const source = join(migrationSourceDir, file);
|
|
53
|
+
const target = join(staticMigrationPath, file);
|
|
54
|
+
return copyFile(source, target);
|
|
55
|
+
});
|
|
56
|
+
await Promise.all(migrationCopies);
|
|
57
|
+
}
|
|
50
58
|
spinner.succeed('Static metadata generated successfully.');
|
|
51
59
|
spinner.succeed('Generation of metadata generated successfully.');
|
|
52
60
|
}
|
package/dist/build/styles.js
CHANGED
|
@@ -11,6 +11,7 @@ import { createPath, stylesPath, } from '../utilities/index.js';
|
|
|
11
11
|
const filesToCopy = [
|
|
12
12
|
'README.md',
|
|
13
13
|
'CHANGELOG.md',
|
|
14
|
+
'BREAKING_CHANGES.md',
|
|
14
15
|
'dist/*.css',
|
|
15
16
|
];
|
|
16
17
|
/**
|
|
@@ -37,7 +38,6 @@ export const buildStyles = async () => {
|
|
|
37
38
|
const modulePath = fileURLToPath(moduleUrl);
|
|
38
39
|
const moduleDir = path.join(path.dirname(modulePath), '../');
|
|
39
40
|
// Process the files (placeholder for actual logic)
|
|
40
|
-
// eslint-disable-next-line no-console
|
|
41
41
|
const contents = await globby(filesToCopy, {
|
|
42
42
|
cwd: moduleDir,
|
|
43
43
|
onlyFiles: true,
|
package/dist/build/tokens.js
CHANGED
|
@@ -11,6 +11,7 @@ import { createPath, tokensPath, } from '../utilities/index.js';
|
|
|
11
11
|
const filesToCopy = [
|
|
12
12
|
'README.md',
|
|
13
13
|
'CHANGELOG.md',
|
|
14
|
+
'BREAKING_CHANGES.md',
|
|
14
15
|
'dist/js/*.js',
|
|
15
16
|
'dist/themes/*.css',
|
|
16
17
|
];
|
|
@@ -38,7 +39,6 @@ export const buildTokens = async () => {
|
|
|
38
39
|
const modulePath = fileURLToPath(moduleUrl);
|
|
39
40
|
const moduleDir = path.join(path.dirname(modulePath), '../../');
|
|
40
41
|
// Process the files (placeholder for actual logic)
|
|
41
|
-
// eslint-disable-next-line no-console
|
|
42
42
|
const contents = await globby(filesToCopy, {
|
|
43
43
|
cwd: moduleDir,
|
|
44
44
|
onlyFiles: true,
|
package/dist/tools/asset-info.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
/* eslint-disable complexity */
|
|
2
1
|
import { z } from 'zod';
|
|
3
2
|
import * as availableIconsets from '@synergy-design-system/assets';
|
|
4
3
|
import { getAssetsMetaData, getStructuredMetaData, } from '../utilities/index.js';
|
|
5
4
|
const iconsetListAliases = {
|
|
6
5
|
sick2018Icons: [
|
|
7
|
-
'current',
|
|
8
|
-
'default',
|
|
9
6
|
'legacy',
|
|
10
7
|
'v2',
|
|
11
8
|
'synergy2018',
|
|
@@ -13,7 +10,9 @@ const iconsetListAliases = {
|
|
|
13
10
|
'sick2018',
|
|
14
11
|
],
|
|
15
12
|
sick2025Icons: [
|
|
13
|
+
'current',
|
|
16
14
|
'synergy2025',
|
|
15
|
+
'default',
|
|
17
16
|
'new',
|
|
18
17
|
'next',
|
|
19
18
|
'brand2025',
|
|
@@ -62,13 +61,16 @@ export const assetInfoTool = (server) => {
|
|
|
62
61
|
.describe(`The maximum number of icons to return. Defaults to ${DEFAULT_LIMIT}. When using multiple filters (pipe-separated), this limit applies per filter term.`),
|
|
63
62
|
},
|
|
64
63
|
title: 'Available Icons',
|
|
65
|
-
}, async ({ filter, iconset, limit,
|
|
64
|
+
}, async ({ filter, iconset, limit,
|
|
65
|
+
// eslint-disable-next-line complexity
|
|
66
|
+
}) => {
|
|
66
67
|
// Get the iconset that should be used by key/value of iconsetListAliases
|
|
67
68
|
const setToUse = iconset
|
|
68
69
|
? Object
|
|
69
70
|
.entries(iconsetListAliases)
|
|
70
|
-
.find(([, aliases]) => aliases.includes(iconset))?.[0] || '
|
|
71
|
-
: '
|
|
71
|
+
.find(([, aliases]) => aliases.includes(iconset))?.[0] || 'sick2025Icons'
|
|
72
|
+
: 'sick2025Icons';
|
|
73
|
+
// eslint-disable-next-line no-constant-binary-expression, valid-typeof
|
|
72
74
|
const foundIconSet = typeof availableIconsets[setToUse] !== undefined
|
|
73
75
|
? availableIconsets[setToUse]
|
|
74
76
|
: availableIconsets.sick2018Icons;
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from './davinci-migration.js';
|
|
|
6
6
|
export * from './font-info.js';
|
|
7
7
|
export * from './framework-info.js';
|
|
8
8
|
export * from './migration-info.js';
|
|
9
|
+
export * from './migration-list.js';
|
|
9
10
|
export * from './styles-info.js';
|
|
10
11
|
export * from './styles-list.js';
|
|
11
12
|
export * from './template-list.js';
|
package/dist/tools/index.js
CHANGED
|
@@ -6,6 +6,7 @@ export * from './davinci-migration.js';
|
|
|
6
6
|
export * from './font-info.js';
|
|
7
7
|
export * from './framework-info.js';
|
|
8
8
|
export * from './migration-info.js';
|
|
9
|
+
export * from './migration-list.js';
|
|
9
10
|
export * from './styles-info.js';
|
|
10
11
|
export * from './styles-list.js';
|
|
11
12
|
export * from './template-list.js';
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Tool to retrieve concrete migration documentation for a given package.
|
|
4
|
+
*
|
|
5
|
+
* For Synergy components this tool is designed to be used together with
|
|
6
|
+
* `migration-list`:
|
|
7
|
+
* 1. Call `migration-list` to discover available documents (filenames).
|
|
8
|
+
* 2. Call `migration-info` with a specific filename to fetch only that
|
|
9
|
+
* document instead of all migration guides at once.
|
|
10
|
+
*
|
|
11
|
+
* For other packages (assets/styles/tokens) you can continue to omit the
|
|
12
|
+
* filename to receive all available migration‑related documents.
|
|
4
13
|
* @param server - The MCP server instance to register the tool on.
|
|
5
14
|
*/
|
|
6
15
|
export declare const migrationInfoTool: (server: McpServer) => void;
|
|
@@ -1,26 +1,88 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getMigrationMetaData } from '../utilities/index.js';
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
+
* Tool to retrieve concrete migration documentation for a given package.
|
|
5
|
+
*
|
|
6
|
+
* For Synergy components this tool is designed to be used together with
|
|
7
|
+
* `migration-list`:
|
|
8
|
+
* 1. Call `migration-list` to discover available documents (filenames).
|
|
9
|
+
* 2. Call `migration-info` with a specific filename to fetch only that
|
|
10
|
+
* document instead of all migration guides at once.
|
|
11
|
+
*
|
|
12
|
+
* For other packages (assets/styles/tokens) you can continue to omit the
|
|
13
|
+
* filename to receive all available migration‑related documents.
|
|
4
14
|
* @param server - The MCP server instance to register the tool on.
|
|
5
15
|
*/
|
|
6
16
|
export const migrationInfoTool = (server) => {
|
|
7
17
|
server.registerTool('migration-info', {
|
|
8
|
-
description: 'Get
|
|
9
|
-
inputSchema: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
18
|
+
description: 'Get detailed migration documentation for a Synergy package. Use together with `migration-list` to fetch only the documents you need.',
|
|
19
|
+
inputSchema: {
|
|
20
|
+
filename: z.string().optional().describe('Optional filename of the migration document to return. Especially recommended for the components package to avoid fetching all guides at once.'),
|
|
21
|
+
synergyPackage: z.enum([
|
|
22
|
+
'assets',
|
|
23
|
+
'components',
|
|
24
|
+
'styles',
|
|
25
|
+
'tokens',
|
|
26
|
+
]).default('components').optional().describe('The package to get migration information about.'),
|
|
27
|
+
},
|
|
28
|
+
title: 'Package Migration Information',
|
|
29
|
+
}, async ({ filename, synergyPackage, }) => {
|
|
30
|
+
const selectedPackage = (synergyPackage ?? 'components');
|
|
31
|
+
const metadata = await getMigrationMetaData(selectedPackage);
|
|
32
|
+
// For components, strongly prefer a specific filename so we do not
|
|
33
|
+
// send all path guides at once.
|
|
34
|
+
if (selectedPackage === 'components' && filename) {
|
|
35
|
+
const match = metadata.find(file => file && file.filename === filename);
|
|
36
|
+
if (!match) {
|
|
37
|
+
return {
|
|
38
|
+
content: [
|
|
39
|
+
{
|
|
40
|
+
text: `No migration document named "${filename}" found for package "${selectedPackage}". Call the 'migration-list' tool first to see the available filenames.",`,
|
|
41
|
+
type: 'text',
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
content: [
|
|
48
|
+
{
|
|
49
|
+
text: JSON.stringify(match, null, 2),
|
|
50
|
+
type: 'text',
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
// If no filename is given for components, return only the overview
|
|
56
|
+
// index and the high‑level package docs (BREAKING_CHANGES / CHANGELOG)
|
|
57
|
+
// instead of all path‑specific guides.
|
|
58
|
+
if (selectedPackage === 'components' && !filename) {
|
|
59
|
+
const filtered = metadata.filter((file) => {
|
|
60
|
+
if (!file)
|
|
61
|
+
return false;
|
|
62
|
+
const { filename: name } = file;
|
|
63
|
+
const isOverview = name === 'index.md';
|
|
64
|
+
const isPathGuide = name.startsWith('v2-') && name.endsWith('.md');
|
|
65
|
+
// Keep overview and any non path‑guide docs
|
|
66
|
+
return isOverview || !isPathGuide;
|
|
67
|
+
});
|
|
68
|
+
return {
|
|
69
|
+
content: [
|
|
70
|
+
{
|
|
71
|
+
text: JSON.stringify(filtered, null, 2),
|
|
72
|
+
type: 'text',
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
// For non‑components packages, or when a filename is not used,
|
|
78
|
+
// fall back to returning all documents. These sets are small
|
|
79
|
+
// (typically CHANGELOG + BREAKING_CHANGES).
|
|
14
80
|
return {
|
|
15
81
|
content: [
|
|
16
82
|
{
|
|
17
83
|
text: JSON.stringify(metadata, null, 2),
|
|
18
84
|
type: 'text',
|
|
19
85
|
},
|
|
20
|
-
{
|
|
21
|
-
text: JSON.stringify(changelog, null, 2),
|
|
22
|
-
type: 'text',
|
|
23
|
-
},
|
|
24
86
|
],
|
|
25
87
|
};
|
|
26
88
|
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
/**
|
|
3
|
+
* Tool to list available migration documents for a given package in a
|
|
4
|
+
* token‑efficient way. It returns only a compact index (filenames and
|
|
5
|
+
* simple kinds), not the full markdown content.
|
|
6
|
+
*
|
|
7
|
+
* Use this together with `migration-info` to first discover what documents
|
|
8
|
+
* exist and then fetch the relevant one.
|
|
9
|
+
*/
|
|
10
|
+
export declare const migrationListTool: (server: McpServer) => void;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getMigrationMetaData } from '../utilities/index.js';
|
|
3
|
+
const extractHeadingMetadata = (content) => {
|
|
4
|
+
const result = {};
|
|
5
|
+
// Try to find the first level‑1 heading.
|
|
6
|
+
const headingMatch = content.match(/^#\s+(.+)$/m);
|
|
7
|
+
const headingText = headingMatch?.[1]?.trim();
|
|
8
|
+
if (!headingText) {
|
|
9
|
+
return result;
|
|
10
|
+
}
|
|
11
|
+
result.title = headingText;
|
|
12
|
+
// Heuristic: headings follow the pattern
|
|
13
|
+
// "Migrating from <FROM> → <TO>" for path guides.
|
|
14
|
+
const pathMatch = headingText.match(/^Migrating from\s+(.+?)\s*→\s*(.+)$/);
|
|
15
|
+
if (!pathMatch) {
|
|
16
|
+
return result;
|
|
17
|
+
}
|
|
18
|
+
const fromLabel = pathMatch[1].trim();
|
|
19
|
+
const toLabel = pathMatch[2].trim();
|
|
20
|
+
result.from = fromLabel;
|
|
21
|
+
result.to = toLabel;
|
|
22
|
+
const fromThemeMatch = fromLabel.match(/\(([^)]+)\)/);
|
|
23
|
+
const toThemeMatch = toLabel.match(/\(([^)]+)\)/);
|
|
24
|
+
if (fromThemeMatch) {
|
|
25
|
+
result.fromTheme = fromThemeMatch[1].trim();
|
|
26
|
+
}
|
|
27
|
+
if (toThemeMatch) {
|
|
28
|
+
result.toTheme = toThemeMatch[1].trim();
|
|
29
|
+
}
|
|
30
|
+
return result;
|
|
31
|
+
};
|
|
32
|
+
const extractSummaryMetadata = (content) => {
|
|
33
|
+
const result = {};
|
|
34
|
+
const headingMatch = content.match(/^#\s+(.+)$/m);
|
|
35
|
+
if (!headingMatch) {
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
const startIndex = content.indexOf(headingMatch[0]) + headingMatch[0].length;
|
|
39
|
+
const rest = content.slice(startIndex);
|
|
40
|
+
const lines = rest.split('\n');
|
|
41
|
+
const buffer = lines.reduce((acc, rawLine) => {
|
|
42
|
+
if (acc.length >= 3) {
|
|
43
|
+
return acc;
|
|
44
|
+
}
|
|
45
|
+
const line = rawLine.trim();
|
|
46
|
+
if (!line) {
|
|
47
|
+
return acc.length > 0 ? acc : acc;
|
|
48
|
+
}
|
|
49
|
+
if (line.startsWith('#')) {
|
|
50
|
+
return acc;
|
|
51
|
+
}
|
|
52
|
+
if (line === '---') {
|
|
53
|
+
return acc;
|
|
54
|
+
}
|
|
55
|
+
return [...acc, line];
|
|
56
|
+
}, []);
|
|
57
|
+
if (buffer.length > 0) {
|
|
58
|
+
result.summary = buffer.join(' ');
|
|
59
|
+
}
|
|
60
|
+
return result;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Tool to list available migration documents for a given package in a
|
|
64
|
+
* token‑efficient way. It returns only a compact index (filenames and
|
|
65
|
+
* simple kinds), not the full markdown content.
|
|
66
|
+
*
|
|
67
|
+
* Use this together with `migration-info` to first discover what documents
|
|
68
|
+
* exist and then fetch the relevant one.
|
|
69
|
+
*/
|
|
70
|
+
export const migrationListTool = (server) => {
|
|
71
|
+
server.registerTool('migration-list', {
|
|
72
|
+
description: 'List available migration documents for a Synergy package in a compact, token-efficient format.',
|
|
73
|
+
inputSchema: {
|
|
74
|
+
synergyPackage: z.enum([
|
|
75
|
+
'assets',
|
|
76
|
+
'components',
|
|
77
|
+
'styles',
|
|
78
|
+
'tokens',
|
|
79
|
+
]).default('components').optional().describe('The package to list migration documents for.'),
|
|
80
|
+
},
|
|
81
|
+
title: 'Package Migration Document Index',
|
|
82
|
+
}, async ({ synergyPackage }) => {
|
|
83
|
+
const selectedPackage = (synergyPackage ?? 'components');
|
|
84
|
+
const metadata = await getMigrationMetaData(selectedPackage);
|
|
85
|
+
const index = metadata
|
|
86
|
+
.filter(Boolean)
|
|
87
|
+
.map((file) => {
|
|
88
|
+
const { content, filename } = file;
|
|
89
|
+
// Derive a simple kind for components to distinguish
|
|
90
|
+
// between migration paths, overview, and package-level docs.
|
|
91
|
+
let kind = 'package-doc';
|
|
92
|
+
if (selectedPackage === 'components') {
|
|
93
|
+
if (filename === 'index.md') {
|
|
94
|
+
kind = 'overview';
|
|
95
|
+
}
|
|
96
|
+
else if (filename.startsWith('v2-') && filename.endsWith('.md')) {
|
|
97
|
+
kind = 'path';
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
const extra = selectedPackage === 'components'
|
|
101
|
+
? {
|
|
102
|
+
...extractHeadingMetadata(content),
|
|
103
|
+
...extractSummaryMetadata(content),
|
|
104
|
+
}
|
|
105
|
+
: {};
|
|
106
|
+
return {
|
|
107
|
+
filename,
|
|
108
|
+
kind,
|
|
109
|
+
package: selectedPackage,
|
|
110
|
+
...extra,
|
|
111
|
+
};
|
|
112
|
+
});
|
|
113
|
+
return {
|
|
114
|
+
content: [
|
|
115
|
+
{
|
|
116
|
+
text: JSON.stringify(index, null, 2),
|
|
117
|
+
type: 'text',
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
};
|
|
121
|
+
});
|
|
122
|
+
};
|
package/dist/tools/version.js
CHANGED
|
@@ -9,7 +9,9 @@ export const versionTool = (server) => {
|
|
|
9
9
|
description: 'Get version and basic information about the Synergy Design System MCP Server',
|
|
10
10
|
inputSchema: {},
|
|
11
11
|
title: 'Synergy MCP Version Information',
|
|
12
|
-
},
|
|
12
|
+
},
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/require-await
|
|
14
|
+
async () => {
|
|
13
15
|
const packageJson = getPackageInfo();
|
|
14
16
|
const versionInfo = {
|
|
15
17
|
author: packageJson.author,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable no-restricted-syntax */
|
|
1
2
|
import { createHash } from 'node:crypto';
|
|
2
3
|
import { readFile, writeFile } from 'node:fs/promises';
|
|
3
4
|
import { join, relative } from 'node:path';
|
|
@@ -34,7 +35,6 @@ export async function createFolderChecksum(folderPath, options = {}) {
|
|
|
34
35
|
const hash = createHash(algorithm);
|
|
35
36
|
// Read and concatenate all file contents (equivalent to xargs -0 cat)
|
|
36
37
|
// Note: Sequential reading to maintain order consistency with shell script
|
|
37
|
-
// eslint-disable-next-line no-await-in-loop
|
|
38
38
|
for (const filePath of sortedFiles) {
|
|
39
39
|
// eslint-disable-next-line no-await-in-loop
|
|
40
40
|
const content = await readFile(filePath);
|
|
@@ -72,6 +72,7 @@ export async function verifyFolderChecksum(folderPath, options = {}) {
|
|
|
72
72
|
outputFile: undefined, // Don't write to file during verification
|
|
73
73
|
});
|
|
74
74
|
return storedChecksum === currentChecksum;
|
|
75
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
75
76
|
}
|
|
76
77
|
catch (error) {
|
|
77
78
|
// If we can't read the checksum file, consider it invalid
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
type AvailablePackages = 'assets' | 'components' | 'tokens' | 'styles';
|
|
2
|
+
export declare const getMigrationMetaData: (requestedPackage?: AvailablePackages) => Promise<(import("./metadata.js").MetadataFile | null)[]>;
|
|
3
|
+
export {};
|
|
@@ -1,10 +1,33 @@
|
|
|
1
|
-
import { componentMigrationPath, staticMigrationPath, } from './config.js';
|
|
1
|
+
import { assetsPath, componentBasePath, componentMigrationPath, staticMigrationPath, stylesPath, tokensPath, } from './config.js';
|
|
2
2
|
import { getStructuredMetaData, } from './metadata.js';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Low level utility to get migration metadata for a specific package.
|
|
5
|
+
* @param path The path to retreive the information from
|
|
6
|
+
* @param fileList A list of filenames that should be included
|
|
7
|
+
*/
|
|
8
|
+
const getBaseMigrationMetaData = async (path, fileList = [
|
|
9
|
+
'CHANGELOG.md',
|
|
10
|
+
'BREAKING_CHANGES.md',
|
|
11
|
+
]) => getStructuredMetaData(path, item => fileList.includes(item));
|
|
12
|
+
const getAssetsMigrationMetaData = async () => getBaseMigrationMetaData(assetsPath);
|
|
13
|
+
const getStylesMigrationMetaData = async () => getBaseMigrationMetaData(stylesPath);
|
|
14
|
+
const getTokensMigrationMetaData = async () => getBaseMigrationMetaData(tokensPath);
|
|
15
|
+
const getComponentsMigrationMetaData = async () => {
|
|
4
16
|
const data = await getStructuredMetaData(componentMigrationPath);
|
|
5
17
|
const additionalData = await getStructuredMetaData(staticMigrationPath);
|
|
18
|
+
const changelog = await getStructuredMetaData(componentBasePath, item => ['CHANGELOG.md'].includes(item));
|
|
6
19
|
return [
|
|
7
20
|
...data,
|
|
8
21
|
...additionalData,
|
|
22
|
+
...changelog,
|
|
9
23
|
];
|
|
10
24
|
};
|
|
25
|
+
export const getMigrationMetaData = async (requestedPackage = 'components') => {
|
|
26
|
+
switch (requestedPackage) {
|
|
27
|
+
case 'assets': return getAssetsMigrationMetaData();
|
|
28
|
+
case 'tokens': return getTokensMigrationMetaData();
|
|
29
|
+
case 'styles': return getStylesMigrationMetaData();
|
|
30
|
+
case 'components':
|
|
31
|
+
default: return getComponentsMigrationMetaData();
|
|
32
|
+
}
|
|
33
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
/* eslint-disable no-
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-misused-promises */
|
|
3
3
|
import { runDocsScraper } from './docs-scraper.js';
|
|
4
4
|
import { StaticServerManager } from './storybook-manager.js';
|
|
5
5
|
// Parse command line arguments
|
|
@@ -39,4 +39,5 @@ process.on('SIGTERM', async () => {
|
|
|
39
39
|
await serverManager.stop();
|
|
40
40
|
process.exit(0);
|
|
41
41
|
});
|
|
42
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
42
43
|
main();
|