@loadmill/mcp 0.0.2-rc.1 → 0.0.2-rc.3
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/http-request.js +5 -3
- package/dist/http-request.js.map +1 -1
- package/dist/index.js +4 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -4
package/dist/http-request.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.HttpMethods = exports.sendHttpRequest = void 0;
|
|
4
|
-
const
|
|
5
|
-
const superagent = tslib_1.__importStar(require("superagent"));
|
|
7
|
+
const superagent_1 = __importDefault(require("superagent"));
|
|
6
8
|
const DEFAULT_TIMEOUT_MS = process.env.LOADMILL_TIMEOUT || 30000; // 30 seconds
|
|
7
9
|
const RETRY_DELAY_MS = 1000; // 1 second
|
|
8
10
|
const LOADMILL_API_TOKEN = process.env.LOADMILL_API_TOKEN;
|
|
@@ -25,7 +27,7 @@ const sendHttpRequest = async (options) => {
|
|
|
25
27
|
exports.sendHttpRequest = sendHttpRequest;
|
|
26
28
|
const _executeRequest = async (options) => {
|
|
27
29
|
const { method = HttpMethods.GET, url, query, body } = options;
|
|
28
|
-
let request =
|
|
30
|
+
let request = superagent_1.default[method](url)
|
|
29
31
|
.auth(LOADMILL_API_TOKEN)
|
|
30
32
|
.timeout(DEFAULT_TIMEOUT_MS);
|
|
31
33
|
if (query) {
|
package/dist/http-request.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-request.js","sourceRoot":"","sources":["../src/http-request.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"http-request.js","sourceRoot":"","sources":["../src/http-request.ts"],"names":[],"mappings":";;;;;;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AI,KAAK,EAAE;QACT,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;KAChC;IAED,IAAI,IAAI,EAAE;QACR,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAC9B;IAED,OAAO,MAAM,OAAO,CAAC;AACvB,CAAC,CAAC;AAEF,0BAA0B;AAC1B,MAAM,YAAY,GAAG,CAAC,GAAG,EAAW,EAAE;IACpC,OAAO,GAAG,CAAC,OAAO;QAChB,GAAG,CAAC,IAAI,KAAK,cAAc;QAC3B,GAAG,CAAC,IAAI,KAAK,cAAc;QAC3B,GAAG,CAAC,IAAI,KAAK,WAAW;QACxB,GAAG,CAAC,IAAI,KAAK,YAAY,CAAC;AAC9B,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAS/E,IAAY,WAMX;AAND,WAAY,WAAW;IACrB,0BAAW,CAAA;IACX,4BAAa,CAAA;IACb,0BAAW,CAAA;IACX,gCAAiB,CAAA;IACjB,8BAAe,CAAA;AACjB,CAAC,EANW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAMtB"}
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const node_util_1 = tslib_1.__importDefault(require("node:util"));
|
|
5
3
|
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
6
4
|
const mcp_server_1 = require("./mcp-server");
|
|
7
5
|
const transport = new stdio_js_1.StdioServerTransport();
|
|
8
6
|
transport.onmessage = async (message) => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
process.stderr.write(output + '\n'); // one write, one `[warning]` block
|
|
7
|
+
// eslint-disable-next-line no-console
|
|
8
|
+
console.error('Loadmill MCP:\n' + JSON.stringify(message, null, 2));
|
|
12
9
|
};
|
|
13
10
|
transport.onerror = async (error) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
process.stderr.write(output + '\n'); // one write, one `[warning]` block
|
|
11
|
+
// eslint-disable-next-line no-console
|
|
12
|
+
console.error('Loadmill MCP Error:\n' + JSON.stringify(error, null, 2));
|
|
17
13
|
};
|
|
18
14
|
exports.default = async () => {
|
|
19
15
|
await mcp_server_1.mcpServer.connect(transport);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AACA,wEAAiF;AACjF,6CAAyC;AAEzC,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;AAE7C,SAAS,CAAC,SAAS,GAAG,KAAK,EAAE,OAAO,EAAE,EAAE;IACtC,sCAAsC;IACtC,OAAO,CAAC,KAAK,CAAC,iBAAiB,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AACtE,CAAC,CAAC;AAEF,SAAS,CAAC,OAAO,GAAG,KAAK,EAAE,KAAK,EAAE,EAAE;IAClC,sCAAsC;IACtC,OAAO,CAAC,KAAK,CAAC,uBAAuB,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAC1E,CAAC,CAAC;AAGF,kBAAe,KAAK,IAAI,EAAE;IACxB,MAAM,sBAAS,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AACrC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loadmill/mcp",
|
|
3
|
-
"version": "0.0.2-rc.
|
|
3
|
+
"version": "0.0.2-rc.3",
|
|
4
4
|
"description": "Loadmill mcp library",
|
|
5
5
|
"main": "dist/",
|
|
6
6
|
"module": "src/",
|
|
@@ -17,9 +17,6 @@
|
|
|
17
17
|
"node": ">=18.0.0"
|
|
18
18
|
},
|
|
19
19
|
"license": "Apache-2.0",
|
|
20
|
-
"devDependencies": {
|
|
21
|
-
"@types/node": "18.11.9"
|
|
22
|
-
},
|
|
23
20
|
"dependencies": {
|
|
24
21
|
"@modelcontextprotocol/sdk": "^1.17.2",
|
|
25
22
|
"superagent": "^10.0.1"
|