@aleph-alpha/lib-mcp 1.4.0 → 1.5.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/components-meta.json +2 -1
- package/dist/cli.js +47 -13
- package/dist/server.js +47 -13
- package/package.json +2 -2
package/components-meta.json
CHANGED
package/dist/cli.js
CHANGED
|
@@ -3222,8 +3222,8 @@ var require_utils = __commonJS({
|
|
|
3222
3222
|
}
|
|
3223
3223
|
return ind;
|
|
3224
3224
|
}
|
|
3225
|
-
function removeDotSegments(
|
|
3226
|
-
let input =
|
|
3225
|
+
function removeDotSegments(path9) {
|
|
3226
|
+
let input = path9;
|
|
3227
3227
|
const output = [];
|
|
3228
3228
|
let nextSlash = -1;
|
|
3229
3229
|
let len = 0;
|
|
@@ -3422,8 +3422,8 @@ var require_schemes = __commonJS({
|
|
|
3422
3422
|
wsComponent.secure = void 0;
|
|
3423
3423
|
}
|
|
3424
3424
|
if (wsComponent.resourceName) {
|
|
3425
|
-
const [
|
|
3426
|
-
wsComponent.path =
|
|
3425
|
+
const [path9, query] = wsComponent.resourceName.split("?");
|
|
3426
|
+
wsComponent.path = path9 && path9 !== "/" ? path9 : void 0;
|
|
3427
3427
|
wsComponent.query = query;
|
|
3428
3428
|
wsComponent.resourceName = void 0;
|
|
3429
3429
|
}
|
|
@@ -7404,8 +7404,8 @@ function getErrorMap() {
|
|
|
7404
7404
|
|
|
7405
7405
|
// ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
|
|
7406
7406
|
var makeIssue = (params) => {
|
|
7407
|
-
const { data, path:
|
|
7408
|
-
const fullPath = [...
|
|
7407
|
+
const { data, path: path9, errorMaps, issueData } = params;
|
|
7408
|
+
const fullPath = [...path9, ...issueData.path || []];
|
|
7409
7409
|
const fullIssue = {
|
|
7410
7410
|
...issueData,
|
|
7411
7411
|
path: fullPath
|
|
@@ -7521,11 +7521,11 @@ var errorUtil;
|
|
|
7521
7521
|
|
|
7522
7522
|
// ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js
|
|
7523
7523
|
var ParseInputLazyPath = class {
|
|
7524
|
-
constructor(parent, value,
|
|
7524
|
+
constructor(parent, value, path9, key) {
|
|
7525
7525
|
this._cachedPath = [];
|
|
7526
7526
|
this.parent = parent;
|
|
7527
7527
|
this.data = value;
|
|
7528
|
-
this._path =
|
|
7528
|
+
this._path = path9;
|
|
7529
7529
|
this._key = key;
|
|
7530
7530
|
}
|
|
7531
7531
|
get path() {
|
|
@@ -11163,10 +11163,10 @@ function assignProp(target, prop, value) {
|
|
|
11163
11163
|
configurable: true
|
|
11164
11164
|
});
|
|
11165
11165
|
}
|
|
11166
|
-
function getElementAtPath(obj,
|
|
11167
|
-
if (!
|
|
11166
|
+
function getElementAtPath(obj, path9) {
|
|
11167
|
+
if (!path9)
|
|
11168
11168
|
return obj;
|
|
11169
|
-
return
|
|
11169
|
+
return path9.reduce((acc, key) => acc?.[key], obj);
|
|
11170
11170
|
}
|
|
11171
11171
|
function promiseAllObject(promisesObj) {
|
|
11172
11172
|
const keys = Object.keys(promisesObj);
|
|
@@ -11486,11 +11486,11 @@ function aborted(x, startIndex = 0) {
|
|
|
11486
11486
|
}
|
|
11487
11487
|
return false;
|
|
11488
11488
|
}
|
|
11489
|
-
function prefixIssues(
|
|
11489
|
+
function prefixIssues(path9, issues) {
|
|
11490
11490
|
return issues.map((iss) => {
|
|
11491
11491
|
var _a;
|
|
11492
11492
|
(_a = iss).path ?? (_a.path = []);
|
|
11493
|
-
iss.path.unshift(
|
|
11493
|
+
iss.path.unshift(path9);
|
|
11494
11494
|
return iss;
|
|
11495
11495
|
});
|
|
11496
11496
|
}
|
|
@@ -21114,6 +21114,9 @@ function findUiLibraryRoot() {
|
|
|
21114
21114
|
}
|
|
21115
21115
|
throw new Error("Could not find @aleph-alpha/ui-library. Is it installed?");
|
|
21116
21116
|
}
|
|
21117
|
+
function getLibraryRootPath() {
|
|
21118
|
+
return findUiLibraryRoot();
|
|
21119
|
+
}
|
|
21117
21120
|
function getLibrarySourcePath() {
|
|
21118
21121
|
const uiLibraryRoot = findUiLibraryRoot();
|
|
21119
21122
|
const srcPath = path3.join(uiLibraryRoot, "src");
|
|
@@ -21458,6 +21461,23 @@ function getComponentDocs(componentName) {
|
|
|
21458
21461
|
};
|
|
21459
21462
|
}
|
|
21460
21463
|
|
|
21464
|
+
// src/tools/get-setup.ts
|
|
21465
|
+
import * as path8 from "node:path";
|
|
21466
|
+
function getSetupGuide() {
|
|
21467
|
+
const libraryRoot = getLibraryRootPath();
|
|
21468
|
+
const quickStartPath = path8.join(libraryRoot, "docs", "public-docs", "quick-start.md");
|
|
21469
|
+
const quickStart = readTextFile(quickStartPath);
|
|
21470
|
+
if (quickStart) {
|
|
21471
|
+
return quickStart;
|
|
21472
|
+
}
|
|
21473
|
+
const readmePath = path8.join(libraryRoot, "README.md");
|
|
21474
|
+
const readme = readTextFile(readmePath);
|
|
21475
|
+
if (readme) {
|
|
21476
|
+
return readme;
|
|
21477
|
+
}
|
|
21478
|
+
return null;
|
|
21479
|
+
}
|
|
21480
|
+
|
|
21461
21481
|
// src/server.ts
|
|
21462
21482
|
var text = (t) => ({ content: [{ type: "text", text: t }] });
|
|
21463
21483
|
var error2 = (msg) => ({ ...text(msg), isError: true });
|
|
@@ -21554,6 +21574,20 @@ async function startServer() {
|
|
|
21554
21574
|
}
|
|
21555
21575
|
}
|
|
21556
21576
|
);
|
|
21577
|
+
server.tool(
|
|
21578
|
+
"get_setup_guide",
|
|
21579
|
+
"Get the setup and installation guide for integrating the UI library into a project. Returns UnoCSS config, Vite config, required dependencies, and MCP setup instructions.",
|
|
21580
|
+
{},
|
|
21581
|
+
async () => {
|
|
21582
|
+
try {
|
|
21583
|
+
const guide = getSetupGuide();
|
|
21584
|
+
if (!guide) return error2("Setup guide not found. Is @aleph-alpha/ui-library installed?");
|
|
21585
|
+
return text(guide);
|
|
21586
|
+
} catch (e) {
|
|
21587
|
+
return handleError(e);
|
|
21588
|
+
}
|
|
21589
|
+
}
|
|
21590
|
+
);
|
|
21557
21591
|
const transport = new StdioServerTransport();
|
|
21558
21592
|
await server.connect(transport);
|
|
21559
21593
|
console.error("UI Library MCP Server running");
|
package/dist/server.js
CHANGED
|
@@ -3221,8 +3221,8 @@ var require_utils = __commonJS({
|
|
|
3221
3221
|
}
|
|
3222
3222
|
return ind;
|
|
3223
3223
|
}
|
|
3224
|
-
function removeDotSegments(
|
|
3225
|
-
let input =
|
|
3224
|
+
function removeDotSegments(path8) {
|
|
3225
|
+
let input = path8;
|
|
3226
3226
|
const output = [];
|
|
3227
3227
|
let nextSlash = -1;
|
|
3228
3228
|
let len = 0;
|
|
@@ -3421,8 +3421,8 @@ var require_schemes = __commonJS({
|
|
|
3421
3421
|
wsComponent.secure = void 0;
|
|
3422
3422
|
}
|
|
3423
3423
|
if (wsComponent.resourceName) {
|
|
3424
|
-
const [
|
|
3425
|
-
wsComponent.path =
|
|
3424
|
+
const [path8, query] = wsComponent.resourceName.split("?");
|
|
3425
|
+
wsComponent.path = path8 && path8 !== "/" ? path8 : void 0;
|
|
3426
3426
|
wsComponent.query = query;
|
|
3427
3427
|
wsComponent.resourceName = void 0;
|
|
3428
3428
|
}
|
|
@@ -7266,8 +7266,8 @@ function getErrorMap() {
|
|
|
7266
7266
|
|
|
7267
7267
|
// ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
|
|
7268
7268
|
var makeIssue = (params) => {
|
|
7269
|
-
const { data, path:
|
|
7270
|
-
const fullPath = [...
|
|
7269
|
+
const { data, path: path8, errorMaps, issueData } = params;
|
|
7270
|
+
const fullPath = [...path8, ...issueData.path || []];
|
|
7271
7271
|
const fullIssue = {
|
|
7272
7272
|
...issueData,
|
|
7273
7273
|
path: fullPath
|
|
@@ -7383,11 +7383,11 @@ var errorUtil;
|
|
|
7383
7383
|
|
|
7384
7384
|
// ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js
|
|
7385
7385
|
var ParseInputLazyPath = class {
|
|
7386
|
-
constructor(parent, value,
|
|
7386
|
+
constructor(parent, value, path8, key) {
|
|
7387
7387
|
this._cachedPath = [];
|
|
7388
7388
|
this.parent = parent;
|
|
7389
7389
|
this.data = value;
|
|
7390
|
-
this._path =
|
|
7390
|
+
this._path = path8;
|
|
7391
7391
|
this._key = key;
|
|
7392
7392
|
}
|
|
7393
7393
|
get path() {
|
|
@@ -11025,10 +11025,10 @@ function assignProp(target, prop, value) {
|
|
|
11025
11025
|
configurable: true
|
|
11026
11026
|
});
|
|
11027
11027
|
}
|
|
11028
|
-
function getElementAtPath(obj,
|
|
11029
|
-
if (!
|
|
11028
|
+
function getElementAtPath(obj, path8) {
|
|
11029
|
+
if (!path8)
|
|
11030
11030
|
return obj;
|
|
11031
|
-
return
|
|
11031
|
+
return path8.reduce((acc, key) => acc?.[key], obj);
|
|
11032
11032
|
}
|
|
11033
11033
|
function promiseAllObject(promisesObj) {
|
|
11034
11034
|
const keys = Object.keys(promisesObj);
|
|
@@ -11348,11 +11348,11 @@ function aborted(x, startIndex = 0) {
|
|
|
11348
11348
|
}
|
|
11349
11349
|
return false;
|
|
11350
11350
|
}
|
|
11351
|
-
function prefixIssues(
|
|
11351
|
+
function prefixIssues(path8, issues) {
|
|
11352
11352
|
return issues.map((iss) => {
|
|
11353
11353
|
var _a;
|
|
11354
11354
|
(_a = iss).path ?? (_a.path = []);
|
|
11355
|
-
iss.path.unshift(
|
|
11355
|
+
iss.path.unshift(path8);
|
|
11356
11356
|
return iss;
|
|
11357
11357
|
});
|
|
11358
11358
|
}
|
|
@@ -21018,6 +21018,9 @@ function findUiLibraryRoot() {
|
|
|
21018
21018
|
}
|
|
21019
21019
|
throw new Error("Could not find @aleph-alpha/ui-library. Is it installed?");
|
|
21020
21020
|
}
|
|
21021
|
+
function getLibraryRootPath() {
|
|
21022
|
+
return findUiLibraryRoot();
|
|
21023
|
+
}
|
|
21021
21024
|
function getLibrarySourcePath() {
|
|
21022
21025
|
const uiLibraryRoot = findUiLibraryRoot();
|
|
21023
21026
|
const srcPath = path2.join(uiLibraryRoot, "src");
|
|
@@ -21362,6 +21365,23 @@ function getComponentDocs(componentName) {
|
|
|
21362
21365
|
};
|
|
21363
21366
|
}
|
|
21364
21367
|
|
|
21368
|
+
// src/tools/get-setup.ts
|
|
21369
|
+
import * as path7 from "node:path";
|
|
21370
|
+
function getSetupGuide() {
|
|
21371
|
+
const libraryRoot = getLibraryRootPath();
|
|
21372
|
+
const quickStartPath = path7.join(libraryRoot, "docs", "public-docs", "quick-start.md");
|
|
21373
|
+
const quickStart = readTextFile(quickStartPath);
|
|
21374
|
+
if (quickStart) {
|
|
21375
|
+
return quickStart;
|
|
21376
|
+
}
|
|
21377
|
+
const readmePath = path7.join(libraryRoot, "README.md");
|
|
21378
|
+
const readme = readTextFile(readmePath);
|
|
21379
|
+
if (readme) {
|
|
21380
|
+
return readme;
|
|
21381
|
+
}
|
|
21382
|
+
return null;
|
|
21383
|
+
}
|
|
21384
|
+
|
|
21365
21385
|
// src/server.ts
|
|
21366
21386
|
var text = (t) => ({ content: [{ type: "text", text: t }] });
|
|
21367
21387
|
var error2 = (msg) => ({ ...text(msg), isError: true });
|
|
@@ -21458,6 +21478,20 @@ async function startServer() {
|
|
|
21458
21478
|
}
|
|
21459
21479
|
}
|
|
21460
21480
|
);
|
|
21481
|
+
server.tool(
|
|
21482
|
+
"get_setup_guide",
|
|
21483
|
+
"Get the setup and installation guide for integrating the UI library into a project. Returns UnoCSS config, Vite config, required dependencies, and MCP setup instructions.",
|
|
21484
|
+
{},
|
|
21485
|
+
async () => {
|
|
21486
|
+
try {
|
|
21487
|
+
const guide = getSetupGuide();
|
|
21488
|
+
if (!guide) return error2("Setup guide not found. Is @aleph-alpha/ui-library installed?");
|
|
21489
|
+
return text(guide);
|
|
21490
|
+
} catch (e) {
|
|
21491
|
+
return handleError(e);
|
|
21492
|
+
}
|
|
21493
|
+
}
|
|
21494
|
+
);
|
|
21461
21495
|
const transport = new StdioServerTransport();
|
|
21462
21496
|
await server.connect(transport);
|
|
21463
21497
|
console.error("UI Library MCP Server running");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aleph-alpha/lib-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/server.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@aleph-alpha/tsconfig-frontend": "0.5.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@aleph-alpha/ui-library": "1.
|
|
31
|
+
"@aleph-alpha/ui-library": "1.15.0"
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://docs.aleph-alpha.com",
|
|
34
34
|
"scripts": {
|