@santi020k/lumen-mcp 4.2.0 → 4.3.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.
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,8BAA8B,CAAA;AAwL1E,eAAO,MAAM,iBAAiB,QAAO,SAwXpC,CAAA"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,8BAA8B,CAAA;AA0L1E,eAAO,MAAM,iBAAiB,QAAO,SAwXpC,CAAA"}
package/dist/server.js CHANGED
@@ -11,6 +11,7 @@ const readOnlyAnnotations = {
11
11
  openWorldHint: false,
12
12
  readOnlyHint: true
13
13
  };
14
+ const hasCanonicalRecordKey = (key) => key === key.trim();
14
15
  const componentSummarySchema = z.strictObject({
15
16
  category: z.string().trim(),
16
17
  collections: z.array(z.string().trim()),
@@ -61,12 +62,12 @@ const tokensOutputSchema = z.strictObject({
61
62
  schemeAttribute: z.string().trim(),
62
63
  materialPolicy: z.literal('explicit-surfaces')
63
64
  }),
64
- chart: z.record(z.string().trim(), z.string().trim()),
65
- colors: z.record(z.string().trim(), z.string().trim()),
66
- glass: z.record(z.string().trim(), z.string().trim()),
65
+ chart: z.record(z.string().refine(hasCanonicalRecordKey, 'Record keys must not contain surrounding whitespace'), z.string().trim()),
66
+ colors: z.record(z.string().refine(hasCanonicalRecordKey, 'Record keys must not contain surrounding whitespace'), z.string().trim()),
67
+ glass: z.record(z.string().refine(hasCanonicalRecordKey, 'Record keys must not contain surrounding whitespace'), z.string().trim()),
67
68
  semantic: z.array(z.string().trim()),
68
- spacing: z.record(z.string().trim(), z.number().nonnegative()),
69
- spacingRoles: z.record(z.string().trim(), z.string().trim()),
69
+ spacing: z.record(z.string().refine(hasCanonicalRecordKey, 'Record keys must not contain surrounding whitespace'), z.number().nonnegative()),
70
+ spacingRoles: z.record(z.string().refine(hasCanonicalRecordKey, 'Record keys must not contain surrounding whitespace'), z.string().trim()),
70
71
  themeAttribute: z.string().trim()
71
72
  })
72
73
  });
@@ -79,7 +80,7 @@ const metaOutputSchema = z.strictObject({
79
80
  componentCount: z.int().min(0),
80
81
  nativeComponentCount: z.int().min(0),
81
82
  packages: z.array(z.string().trim()),
82
- packageVersions: z.record(z.string().trim(), z.string().trim()),
83
+ packageVersions: z.record(z.string().refine(hasCanonicalRecordKey, 'Record keys must not contain surrounding whitespace'), z.string().trim()),
83
84
  registryName: z.string().trim(),
84
85
  registryVersion: z.int().min(1),
85
86
  schemaVersion: z.int().min(1),
@@ -87,10 +88,10 @@ const metaOutputSchema = z.strictObject({
87
88
  })
88
89
  });
89
90
  const catalogManifestSchema = z.strictObject({
90
- components: z.record(z.string().trim(), z.string().trim().regex(/^[a-f0-9]{64}$/)),
91
- nativeComponents: z.record(z.string().trim(), z.string().trim().regex(/^[a-f0-9]{64}$/))
91
+ components: z.record(z.string().refine(hasCanonicalRecordKey, 'Record keys must not contain surrounding whitespace'), z.string().trim().regex(/^[a-f0-9]{64}$/)),
92
+ nativeComponents: z.record(z.string().refine(hasCanonicalRecordKey, 'Record keys must not contain surrounding whitespace'), z.string().trim().regex(/^[a-f0-9]{64}$/))
92
93
  .optional(),
93
- recipes: z.record(z.string().trim(), z.string().trim().regex(/^[a-f0-9]{64}$/))
94
+ recipes: z.record(z.string().refine(hasCanonicalRecordKey, 'Record keys must not contain surrounding whitespace'), z.string().trim().regex(/^[a-f0-9]{64}$/))
94
95
  });
95
96
  const catalogChangesSchema = z.strictObject({
96
97
  added: z.array(z.string().trim()),
@@ -244,7 +245,7 @@ export const createLumenServer = () => {
244
245
  annotations: readOnlyAnnotations,
245
246
  description: 'Compare resolved installed Lumen package versions with this snapshot before generating or migrating code. Does not read repositories or change dependencies.',
246
247
  inputSchema: z.strictObject({
247
- packageVersions: z.record(z.string().trim().min(1).max(160), z.string().trim().min(1).max(100))
248
+ packageVersions: z.record(z.string().refine(hasCanonicalRecordKey, 'Record keys must not contain surrounding whitespace').min(1).max(160), z.string().trim().min(1).max(100))
248
249
  .meta({ description: 'Resolved versions from installed package metadata or native lock files, not manifest ranges. Include only Lumen packages.' })
249
250
  }),
250
251
  outputSchema: compatibilityOutputSchema
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@santi020k/lumen-mcp",
3
- "version": "4.2.0",
3
+ "version": "4.3.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -33,14 +33,14 @@
33
33
  "lumen-mcp-http": "./bin/lumen-mcp-http.mjs"
34
34
  },
35
35
  "dependencies": {
36
- "@modelcontextprotocol/express": "^2.0.1",
37
- "@modelcontextprotocol/server": "^2.2.0",
36
+ "@modelcontextprotocol/express": "^2.0.2",
37
+ "@modelcontextprotocol/server": "^2.3.1",
38
38
  "express": "^5.2.1",
39
- "zod": "^4.6.5"
39
+ "zod": "^4.6.7"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@astrojs/compiler": "^4.0.0",
43
- "@modelcontextprotocol/client": "^2.2.0",
43
+ "@modelcontextprotocol/client": "^2.3.1",
44
44
  "@types/express": "^5.0.6",
45
45
  "@types/node": "^26.6.4",
46
46
  "@vitest/coverage-v8": "^5.0.3",