@greensecurity/javascript-sdk 0.10.2 → 0.11.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/README.md +67 -11
- package/bin/mcp-server.js +39384 -0
- package/bin/mcp-server.js.map +301 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +5 -5
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +3 -3
- package/lib/files.js.map +1 -1
- package/mcp-server/build.d.mts.map +1 -0
- package/mcp-server/build.mjs +14 -0
- package/mcp-server/build.mjs.map +1 -0
- package/mcp-server/cli/start/command.d.ts +2 -0
- package/mcp-server/cli/start/command.d.ts.map +1 -0
- package/mcp-server/cli/start/command.js +99 -0
- package/mcp-server/cli/start/command.js.map +1 -0
- package/mcp-server/cli/start/impl.d.ts +15 -0
- package/mcp-server/cli/start/impl.d.ts.map +1 -0
- package/mcp-server/cli/start/impl.js +97 -0
- package/mcp-server/cli/start/impl.js.map +1 -0
- package/mcp-server/cli.d.ts +6 -0
- package/mcp-server/cli.d.ts.map +1 -0
- package/mcp-server/cli.js +10 -0
- package/mcp-server/cli.js.map +1 -0
- package/mcp-server/console-logger.d.ts +7 -0
- package/mcp-server/console-logger.d.ts.map +1 -0
- package/mcp-server/console-logger.js +59 -0
- package/mcp-server/console-logger.js.map +1 -0
- package/mcp-server/mcp-server.d.ts +2 -0
- package/mcp-server/mcp-server.d.ts.map +1 -0
- package/mcp-server/mcp-server.js +29 -0
- package/mcp-server/mcp-server.js.map +1 -0
- package/mcp-server/resources.d.ts +27 -0
- package/mcp-server/resources.d.ts.map +1 -0
- package/mcp-server/resources.js +51 -0
- package/mcp-server/resources.js.map +1 -0
- package/mcp-server/scopes.d.ts +3 -0
- package/mcp-server/scopes.d.ts.map +1 -0
- package/mcp-server/scopes.js +8 -0
- package/mcp-server/scopes.js.map +1 -0
- package/mcp-server/server.d.ts +11 -0
- package/mcp-server/server.d.ts.map +1 -0
- package/mcp-server/server.js +44 -0
- package/mcp-server/server.js.map +1 -0
- package/mcp-server/shared.d.ts +7 -0
- package/mcp-server/shared.d.ts.map +1 -0
- package/mcp-server/shared.js +98 -0
- package/mcp-server/shared.js.map +1 -0
- package/mcp-server/tools/organizationsGetFacility.d.ts +8 -0
- package/mcp-server/tools/organizationsGetFacility.d.ts.map +1 -0
- package/mcp-server/tools/organizationsGetFacility.js +64 -0
- package/mcp-server/tools/organizationsGetFacility.js.map +1 -0
- package/mcp-server/tools/organizationsListOrSearchFacilities.d.ts +8 -0
- package/mcp-server/tools/organizationsListOrSearchFacilities.d.ts.map +1 -0
- package/mcp-server/tools/organizationsListOrSearchFacilities.js +77 -0
- package/mcp-server/tools/organizationsListOrSearchFacilities.js.map +1 -0
- package/mcp-server/tools/userGetCurrentUser.d.ts +3 -0
- package/mcp-server/tools/userGetCurrentUser.d.ts.map +1 -0
- package/mcp-server/tools/userGetCurrentUser.js +26 -0
- package/mcp-server/tools/userGetCurrentUser.js.map +1 -0
- package/mcp-server/tools/userGetUserById.d.ts +8 -0
- package/mcp-server/tools/userGetUserById.d.ts.map +1 -0
- package/mcp-server/tools/userGetUserById.js +64 -0
- package/mcp-server/tools/userGetUserById.js.map +1 -0
- package/mcp-server/tools/userLogsUserIntoTheSystem.d.ts +8 -0
- package/mcp-server/tools/userLogsUserIntoTheSystem.d.ts.map +1 -0
- package/mcp-server/tools/userLogsUserIntoTheSystem.js +94 -0
- package/mcp-server/tools/userLogsUserIntoTheSystem.js.map +1 -0
- package/mcp-server/tools/userMagiclink.d.ts +8 -0
- package/mcp-server/tools/userMagiclink.d.ts.map +1 -0
- package/mcp-server/tools/userMagiclink.js +64 -0
- package/mcp-server/tools/userMagiclink.js.map +1 -0
- package/mcp-server/tools/userPassword.d.ts +8 -0
- package/mcp-server/tools/userPassword.d.ts.map +1 -0
- package/mcp-server/tools/userPassword.js +65 -0
- package/mcp-server/tools/userPassword.js.map +1 -0
- package/mcp-server/tools/userPasswordResetRequest.d.ts +8 -0
- package/mcp-server/tools/userPasswordResetRequest.d.ts.map +1 -0
- package/mcp-server/tools/userPasswordResetRequest.js +64 -0
- package/mcp-server/tools/userPasswordResetRequest.js.map +1 -0
- package/mcp-server/tools/vendorsCreateVendorRegistration.d.ts +8 -0
- package/mcp-server/tools/vendorsCreateVendorRegistration.d.ts.map +1 -0
- package/mcp-server/tools/vendorsCreateVendorRegistration.js +64 -0
- package/mcp-server/tools/vendorsCreateVendorRegistration.js.map +1 -0
- package/mcp-server/tools/vendorsListVendorJobTitles.d.ts +8 -0
- package/mcp-server/tools/vendorsListVendorJobTitles.d.ts.map +1 -0
- package/mcp-server/tools/vendorsListVendorJobTitles.js +64 -0
- package/mcp-server/tools/vendorsListVendorJobTitles.js.map +1 -0
- package/mcp-server/tools.d.ts +25 -0
- package/mcp-server/tools.d.ts.map +1 -0
- package/mcp-server/tools.js +74 -0
- package/mcp-server/tools.js.map +1 -0
- package/models/operations/password.d.ts +2 -2
- package/models/operations/password.d.ts.map +1 -1
- package/models/operations/password.js +2 -2
- package/models/operations/password.js.map +1 -1
- package/package.json +14 -2
- package/src/lib/config.ts +5 -5
- package/src/lib/files.ts +1 -1
- package/src/mcp-server/cli/start/command.ts +67 -0
- package/src/mcp-server/cli/start/impl.ts +123 -0
- package/src/mcp-server/cli.ts +13 -0
- package/src/mcp-server/console-logger.ts +71 -0
- package/src/mcp-server/mcp-server.ts +26 -0
- package/src/mcp-server/resources.ts +96 -0
- package/src/mcp-server/scopes.ts +7 -0
- package/src/mcp-server/server.ts +52 -0
- package/src/mcp-server/shared.ts +75 -0
- package/src/mcp-server/tools/organizationsGetFacility.ts +37 -0
- package/src/mcp-server/tools/organizationsListOrSearchFacilities.ts +52 -0
- package/src/mcp-server/tools/userGetCurrentUser.ts +30 -0
- package/src/mcp-server/tools/userGetUserById.ts +37 -0
- package/src/mcp-server/tools/userLogsUserIntoTheSystem.ts +67 -0
- package/src/mcp-server/tools/userMagiclink.ts +37 -0
- package/src/mcp-server/tools/userPassword.ts +38 -0
- package/src/mcp-server/tools/userPasswordResetRequest.ts +37 -0
- package/src/mcp-server/tools/vendorsCreateVendorRegistration.ts +38 -0
- package/src/mcp-server/tools/vendorsListVendorJobTitles.ts +37 -0
- package/src/mcp-server/tools.ts +116 -0
- package/src/models/operations/password.ts +4 -4
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.tool$userMagiclink = void 0;
|
|
40
|
+
const userMagiclink_js_1 = require("../../funcs/userMagiclink.js");
|
|
41
|
+
const operations = __importStar(require("../../models/operations/index.js"));
|
|
42
|
+
const tools_js_1 = require("../tools.js");
|
|
43
|
+
const args = {
|
|
44
|
+
request: operations.MagiclinkRequestBody$inboundSchema,
|
|
45
|
+
};
|
|
46
|
+
exports.tool$userMagiclink = {
|
|
47
|
+
name: "user_magiclink",
|
|
48
|
+
description: `Magic link
|
|
49
|
+
|
|
50
|
+
It sends an email with a magic link to allow the user to log in.`,
|
|
51
|
+
args,
|
|
52
|
+
tool: async (client, args, ctx) => {
|
|
53
|
+
const [result, apiCall] = await (0, userMagiclink_js_1.userMagiclink)(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
54
|
+
if (!result.ok) {
|
|
55
|
+
return {
|
|
56
|
+
content: [{ type: "text", text: result.error.message }],
|
|
57
|
+
isError: true,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
const value = result.value;
|
|
61
|
+
return (0, tools_js_1.formatResult)(value, apiCall);
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=userMagiclink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userMagiclink.js","sourceRoot":"","sources":["../../src/mcp-server/tools/userMagiclink.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,mEAA6D;AAC7D,6EAA+D;AAC/D,0CAA2D;AAE3D,MAAM,IAAI,GAAG;IACX,OAAO,EAAE,UAAU,CAAC,kCAAkC;CACvD,CAAC;AAEW,QAAA,kBAAkB,GAAgC;IAC7D,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE;;iEAEkD;IAC/D,IAAI;IACJ,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,IAAA,gCAAa,EAC3C,MAAM,EACN,IAAI,CAAC,OAAO,EACZ,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,CACzC,CAAC,QAAQ,EAAE,CAAC;QAEb,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;gBACvD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAE3B,OAAO,IAAA,uBAAY,EAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as operations from "../../models/operations/index.js";
|
|
2
|
+
import { ToolDefinition } from "../tools.js";
|
|
3
|
+
declare const args: {
|
|
4
|
+
request: import("zod").ZodType<operations.PasswordRequestBody, import("zod").ZodTypeDef, unknown>;
|
|
5
|
+
};
|
|
6
|
+
export declare const tool$userPassword: ToolDefinition<typeof args>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=userPassword.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userPassword.d.ts","sourceRoot":"","sources":["../../src/mcp-server/tools/userPassword.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAC;AAE3D,QAAA,MAAM,IAAI;;CAET,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,cAAc,CAAC,OAAO,IAAI,CAyBzD,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.tool$userPassword = void 0;
|
|
40
|
+
const userPassword_js_1 = require("../../funcs/userPassword.js");
|
|
41
|
+
const operations = __importStar(require("../../models/operations/index.js"));
|
|
42
|
+
const tools_js_1 = require("../tools.js");
|
|
43
|
+
const args = {
|
|
44
|
+
request: operations.PasswordRequestBody$inboundSchema,
|
|
45
|
+
};
|
|
46
|
+
exports.tool$userPassword = {
|
|
47
|
+
name: "user_password",
|
|
48
|
+
description: `Password reset
|
|
49
|
+
|
|
50
|
+
Resets the a user's password using a password_reset_id that was sent to them via email.
|
|
51
|
+
See /users/passwordresetrequest to initiate a password reset flow.`,
|
|
52
|
+
args,
|
|
53
|
+
tool: async (client, args, ctx) => {
|
|
54
|
+
const [result, apiCall] = await (0, userPassword_js_1.userPassword)(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
55
|
+
if (!result.ok) {
|
|
56
|
+
return {
|
|
57
|
+
content: [{ type: "text", text: result.error.message }],
|
|
58
|
+
isError: true,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
const value = result.value;
|
|
62
|
+
return (0, tools_js_1.formatResult)(value, apiCall);
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=userPassword.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userPassword.js","sourceRoot":"","sources":["../../src/mcp-server/tools/userPassword.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,iEAA2D;AAC3D,6EAA+D;AAC/D,0CAA2D;AAE3D,MAAM,IAAI,GAAG;IACX,OAAO,EAAE,UAAU,CAAC,iCAAiC;CACtD,CAAC;AAEW,QAAA,iBAAiB,GAAgC;IAC5D,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE;;;mEAGoD;IACjE,IAAI;IACJ,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,IAAA,8BAAY,EAC1C,MAAM,EACN,IAAI,CAAC,OAAO,EACZ,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,CACzC,CAAC,QAAQ,EAAE,CAAC;QAEb,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;gBACvD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAE3B,OAAO,IAAA,uBAAY,EAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as operations from "../../models/operations/index.js";
|
|
2
|
+
import { ToolDefinition } from "../tools.js";
|
|
3
|
+
declare const args: {
|
|
4
|
+
request: import("zod").ZodType<operations.PasswordResetRequestRequestBody, import("zod").ZodTypeDef, unknown>;
|
|
5
|
+
};
|
|
6
|
+
export declare const tool$userPasswordResetRequest: ToolDefinition<typeof args>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=userPasswordResetRequest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userPasswordResetRequest.d.ts","sourceRoot":"","sources":["../../src/mcp-server/tools/userPasswordResetRequest.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAC;AAE3D,QAAA,MAAM,IAAI;;CAET,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,cAAc,CAAC,OAAO,IAAI,CAwBrE,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.tool$userPasswordResetRequest = void 0;
|
|
40
|
+
const userPasswordResetRequest_js_1 = require("../../funcs/userPasswordResetRequest.js");
|
|
41
|
+
const operations = __importStar(require("../../models/operations/index.js"));
|
|
42
|
+
const tools_js_1 = require("../tools.js");
|
|
43
|
+
const args = {
|
|
44
|
+
request: operations.PasswordResetRequestRequestBody$inboundSchema,
|
|
45
|
+
};
|
|
46
|
+
exports.tool$userPasswordResetRequest = {
|
|
47
|
+
name: "user_password-reset-request",
|
|
48
|
+
description: `Password reset request
|
|
49
|
+
|
|
50
|
+
It sends an email with a link for resetting a user's password.`,
|
|
51
|
+
args,
|
|
52
|
+
tool: async (client, args, ctx) => {
|
|
53
|
+
const [result, apiCall] = await (0, userPasswordResetRequest_js_1.userPasswordResetRequest)(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
54
|
+
if (!result.ok) {
|
|
55
|
+
return {
|
|
56
|
+
content: [{ type: "text", text: result.error.message }],
|
|
57
|
+
isError: true,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
const value = result.value;
|
|
61
|
+
return (0, tools_js_1.formatResult)(value, apiCall);
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=userPasswordResetRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userPasswordResetRequest.js","sourceRoot":"","sources":["../../src/mcp-server/tools/userPasswordResetRequest.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,yFAAmF;AACnF,6EAA+D;AAC/D,0CAA2D;AAE3D,MAAM,IAAI,GAAG;IACX,OAAO,EAAE,UAAU,CAAC,6CAA6C;CAClE,CAAC;AAEW,QAAA,6BAA6B,GAAgC;IACxE,IAAI,EAAE,6BAA6B;IACnC,WAAW,EAAE;;+DAEgD;IAC7D,IAAI;IACJ,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,IAAA,sDAAwB,EACtD,MAAM,EACN,IAAI,CAAC,OAAO,EACZ,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,CACzC,CAAC,QAAQ,EAAE,CAAC;QAEb,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;gBACvD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAE3B,OAAO,IAAA,uBAAY,EAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as operations from "../../models/operations/index.js";
|
|
2
|
+
import { ToolDefinition } from "../tools.js";
|
|
3
|
+
declare const args: {
|
|
4
|
+
request: import("zod").ZodType<operations.CreateVendorRegistrationRequestBody, import("zod").ZodTypeDef, unknown>;
|
|
5
|
+
};
|
|
6
|
+
export declare const tool$vendorsCreateVendorRegistration: ToolDefinition<typeof args>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=vendorsCreateVendorRegistration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vendorsCreateVendorRegistration.d.ts","sourceRoot":"","sources":["../../src/mcp-server/tools/vendorsCreateVendorRegistration.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAC;AAE3D,QAAA,MAAM,IAAI;;CAET,CAAC;AAEF,eAAO,MAAM,oCAAoC,EAAE,cAAc,CAAC,OAAO,IAAI,CAyB1E,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.tool$vendorsCreateVendorRegistration = void 0;
|
|
40
|
+
const vendorsCreateVendorRegistration_js_1 = require("../../funcs/vendorsCreateVendorRegistration.js");
|
|
41
|
+
const operations = __importStar(require("../../models/operations/index.js"));
|
|
42
|
+
const tools_js_1 = require("../tools.js");
|
|
43
|
+
const args = {
|
|
44
|
+
request: operations.CreateVendorRegistrationRequestBody$inboundSchema,
|
|
45
|
+
};
|
|
46
|
+
exports.tool$vendorsCreateVendorRegistration = {
|
|
47
|
+
name: "vendors_create-vendor-registration",
|
|
48
|
+
description: `Create vendor registration
|
|
49
|
+
|
|
50
|
+
Create an initial vendor registration. Once successful, the vendor will be able to continue to filling out the rest of their onboarding profile.`,
|
|
51
|
+
args,
|
|
52
|
+
tool: async (client, args, ctx) => {
|
|
53
|
+
const [result, apiCall] = await (0, vendorsCreateVendorRegistration_js_1.vendorsCreateVendorRegistration)(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
54
|
+
if (!result.ok) {
|
|
55
|
+
return {
|
|
56
|
+
content: [{ type: "text", text: result.error.message }],
|
|
57
|
+
isError: true,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
const value = result.value;
|
|
61
|
+
return (0, tools_js_1.formatResult)(value, apiCall);
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=vendorsCreateVendorRegistration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vendorsCreateVendorRegistration.js","sourceRoot":"","sources":["../../src/mcp-server/tools/vendorsCreateVendorRegistration.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uGAAiG;AACjG,6EAA+D;AAC/D,0CAA2D;AAE3D,MAAM,IAAI,GAAG;IACX,OAAO,EAAE,UAAU,CAAC,iDAAiD;CACtE,CAAC;AAEW,QAAA,oCAAoC,GAC/C;IACE,IAAI,EAAE,oCAAoC;IAC1C,WAAW,EAAE;;iJAEgI;IAC7I,IAAI;IACJ,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,IAAA,oEAA+B,EAC7D,MAAM,EACN,IAAI,CAAC,OAAO,EACZ,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,CACzC,CAAC,QAAQ,EAAE,CAAC;QAEb,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;gBACvD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAE3B,OAAO,IAAA,uBAAY,EAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as operations from "../../models/operations/index.js";
|
|
2
|
+
import { ToolDefinition } from "../tools.js";
|
|
3
|
+
declare const args: {
|
|
4
|
+
request: import("zod").ZodType<operations.ListVendorJobTitlesRequest, import("zod").ZodTypeDef, unknown>;
|
|
5
|
+
};
|
|
6
|
+
export declare const tool$vendorsListVendorJobTitles: ToolDefinition<typeof args>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=vendorsListVendorJobTitles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vendorsListVendorJobTitles.d.ts","sourceRoot":"","sources":["../../src/mcp-server/tools/vendorsListVendorJobTitles.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAC;AAE3D,QAAA,MAAM,IAAI;;CAET,CAAC;AAEF,eAAO,MAAM,+BAA+B,EAAE,cAAc,CAAC,OAAO,IAAI,CAwBvE,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.tool$vendorsListVendorJobTitles = void 0;
|
|
40
|
+
const vendorsListVendorJobTitles_js_1 = require("../../funcs/vendorsListVendorJobTitles.js");
|
|
41
|
+
const operations = __importStar(require("../../models/operations/index.js"));
|
|
42
|
+
const tools_js_1 = require("../tools.js");
|
|
43
|
+
const args = {
|
|
44
|
+
request: operations.ListVendorJobTitlesRequest$inboundSchema,
|
|
45
|
+
};
|
|
46
|
+
exports.tool$vendorsListVendorJobTitles = {
|
|
47
|
+
name: "vendors_list-vendor-job-titles",
|
|
48
|
+
description: `List vendor job titles
|
|
49
|
+
|
|
50
|
+
List valid job titles for Vendors. This can be used during sign up or in a filter.`,
|
|
51
|
+
args,
|
|
52
|
+
tool: async (client, args, ctx) => {
|
|
53
|
+
const [result, apiCall] = await (0, vendorsListVendorJobTitles_js_1.vendorsListVendorJobTitles)(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
54
|
+
if (!result.ok) {
|
|
55
|
+
return {
|
|
56
|
+
content: [{ type: "text", text: result.error.message }],
|
|
57
|
+
isError: true,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
const value = result.value;
|
|
61
|
+
return (0, tools_js_1.formatResult)(value, apiCall);
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=vendorsListVendorJobTitles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vendorsListVendorJobTitles.js","sourceRoot":"","sources":["../../src/mcp-server/tools/vendorsListVendorJobTitles.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6FAAuF;AACvF,6EAA+D;AAC/D,0CAA2D;AAE3D,MAAM,IAAI,GAAG;IACX,OAAO,EAAE,UAAU,CAAC,wCAAwC;CAC7D,CAAC;AAEW,QAAA,+BAA+B,GAAgC;IAC1E,IAAI,EAAE,gCAAgC;IACtC,WAAW,EAAE;;mFAEoE;IACjF,IAAI;IACJ,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,IAAA,0DAA0B,EACxD,MAAM,EACN,IAAI,CAAC,OAAO,EACZ,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,CACzC,CAAC,QAAQ,EAAE,CAAC;QAEb,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;gBACvD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAE3B,OAAO,IAAA,uBAAY,EAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js";
|
|
3
|
+
import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
|
|
4
|
+
import { objectOutputType, ZodRawShape, ZodTypeAny } from "zod";
|
|
5
|
+
import { GreenSecurityCore } from "../core.js";
|
|
6
|
+
import { ConsoleLogger } from "./console-logger.js";
|
|
7
|
+
import { MCPScope } from "./scopes.js";
|
|
8
|
+
export type ToolDefinition<Args extends undefined | ZodRawShape = undefined> = Args extends ZodRawShape ? {
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
scopes?: MCPScope[];
|
|
12
|
+
args: Args;
|
|
13
|
+
tool: (client: GreenSecurityCore, args: objectOutputType<Args, ZodTypeAny>, extra: RequestHandlerExtra) => CallToolResult | Promise<CallToolResult>;
|
|
14
|
+
} : {
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
scopes?: MCPScope[];
|
|
18
|
+
args?: undefined;
|
|
19
|
+
tool: (client: GreenSecurityCore, extra: RequestHandlerExtra) => CallToolResult | Promise<CallToolResult>;
|
|
20
|
+
};
|
|
21
|
+
export declare function formatResult(value: unknown, init: {
|
|
22
|
+
response?: Response | undefined;
|
|
23
|
+
}): Promise<CallToolResult>;
|
|
24
|
+
export declare function createRegisterTool(logger: ConsoleLogger, server: McpServer, sdk: GreenSecurityCore, allowedScopes: Set<MCPScope>): <A extends ZodRawShape | undefined>(tool: ToolDefinition<A>) => void;
|
|
25
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/mcp-server/tools.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGvC,MAAM,MAAM,cAAc,CAAC,IAAI,SAAS,SAAS,GAAG,WAAW,GAAG,SAAS,IACzE,IAAI,SAAS,WAAW,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC;IACpB,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,CACJ,MAAM,EAAE,iBAAiB,EACzB,IAAI,EAAE,gBAAgB,CAAC,IAAI,EAAE,UAAU,CAAC,EACxC,KAAK,EAAE,mBAAmB,KACvB,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;CAC/C,GACC;IACA,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,CACJ,MAAM,EAAE,iBAAiB,EACzB,KAAK,EAAE,mBAAmB,KACvB,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;CAC/C,CAAC;AAEN,wBAAsB,YAAY,CAChC,KAAK,EAAE,OAAO,EACd,IAAI,EAAE;IAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;CAAE,GACxC,OAAO,CAAC,cAAc,CAAC,CAkCzB;AAkBD,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,SAAS,EACjB,GAAG,EAAE,iBAAiB,EACtB,aAAa,EAAE,GAAG,CAAC,QAAQ,CAAC,GAC3B,CAAC,CAAC,SAAS,WAAW,GAAG,SAAS,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,IAAI,CAmBtE"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.formatResult = formatResult;
|
|
7
|
+
exports.createRegisterTool = createRegisterTool;
|
|
8
|
+
const shared_js_1 = require("./shared.js");
|
|
9
|
+
async function formatResult(value, init) {
|
|
10
|
+
if (typeof value === "undefined") {
|
|
11
|
+
return { content: [] };
|
|
12
|
+
}
|
|
13
|
+
const { response } = init;
|
|
14
|
+
const contentType = response?.headers.get("content-type") ?? "";
|
|
15
|
+
let content = [];
|
|
16
|
+
if (contentType.search(/\bjson\b/g)) {
|
|
17
|
+
content = [{ type: "text", text: JSON.stringify(value) }];
|
|
18
|
+
}
|
|
19
|
+
else if (contentType.startsWith("text/event-stream")
|
|
20
|
+
&& (0, shared_js_1.isAsyncIterable)(value)) {
|
|
21
|
+
content = await consumeSSE(value);
|
|
22
|
+
}
|
|
23
|
+
else if (contentType.startsWith("text/") && typeof value === "string") {
|
|
24
|
+
content = [{ type: "text", text: value }];
|
|
25
|
+
}
|
|
26
|
+
else if ((0, shared_js_1.isBinaryData)(value) && contentType.startsWith("image/")) {
|
|
27
|
+
const data = await (0, shared_js_1.valueToBase64)(value);
|
|
28
|
+
content = data == null
|
|
29
|
+
? []
|
|
30
|
+
: [{ type: "image", data, mimeType: contentType }];
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
return {
|
|
34
|
+
content: [{
|
|
35
|
+
type: "text",
|
|
36
|
+
text: `Unsupported content type: "${contentType}"`,
|
|
37
|
+
}],
|
|
38
|
+
isError: true,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
return { content };
|
|
42
|
+
}
|
|
43
|
+
async function consumeSSE(value) {
|
|
44
|
+
const content = [];
|
|
45
|
+
for await (const chunk of value) {
|
|
46
|
+
if (typeof chunk === "string") {
|
|
47
|
+
content.push({ type: "text", text: chunk });
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
content.push({ type: "text", text: JSON.stringify(chunk) });
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return content;
|
|
54
|
+
}
|
|
55
|
+
function createRegisterTool(logger, server, sdk, allowedScopes) {
|
|
56
|
+
return (tool) => {
|
|
57
|
+
const toolScopes = tool.scopes ?? [];
|
|
58
|
+
if (!toolScopes.every((s) => allowedScopes.has(s))) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if (tool.args) {
|
|
62
|
+
server.tool(tool.name, tool.description, tool.args, async (args, ctx) => {
|
|
63
|
+
return tool.tool(sdk, args, ctx);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
server.tool(tool.name, tool.description, async (ctx) => {
|
|
68
|
+
return tool.tool(sdk, ctx);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
logger.debug("Registered tool", { name: tool.name });
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/mcp-server/tools.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAkCH,oCAqCC;AAkBD,gDAwBC;AAxGD,2CAA2E;AAyBpE,KAAK,UAAU,YAAY,CAChC,KAAc,EACd,IAAyC;IAEzC,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE,CAAC;QACjC,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACzB,CAAC;IAED,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IAC1B,MAAM,WAAW,GAAG,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;IAChE,IAAI,OAAO,GAA8B,EAAE,CAAC;IAE5C,IAAI,WAAW,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC;QACpC,OAAO,GAAG,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC5D,CAAC;SAAM,IACL,WAAW,CAAC,UA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,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC9D,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAgB,kBAAkB,CAChC,MAAqB,EACrB,MAAiB,EACjB,GAAsB,EACtB,aAA4B;IAE5B,OAAO,CAAoC,IAAuB,EAAQ,EAAE;QAC1E,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC;QACrC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACnD,OAAO;QACT,CAAC;QAED,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;gBACtE,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;YACnC,CAAC,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;gBACrD,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YAC7B,CAAC,CAAC,CAAC;QACL,CAAC;QAED,MAAM,CAAC,KAAK,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IACvD,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -9,7 +9,7 @@ export type PasswordRequestBody = {
|
|
|
9
9
|
* The request was successful, and the server has returned the requested resource in the response body.
|
|
10
10
|
*/
|
|
11
11
|
export type PasswordResponseBody = {
|
|
12
|
-
success
|
|
12
|
+
success?: boolean | null | undefined;
|
|
13
13
|
};
|
|
14
14
|
/** @internal */
|
|
15
15
|
export declare const PasswordRequestBody$inboundSchema: z.ZodType<PasswordRequestBody, z.ZodTypeDef, unknown>;
|
|
@@ -38,7 +38,7 @@ export declare function passwordRequestBodyFromJSON(jsonString: string): SafePar
|
|
|
38
38
|
export declare const PasswordResponseBody$inboundSchema: z.ZodType<PasswordResponseBody, z.ZodTypeDef, unknown>;
|
|
39
39
|
/** @internal */
|
|
40
40
|
export type PasswordResponseBody$Outbound = {
|
|
41
|
-
success
|
|
41
|
+
success?: boolean | null | undefined;
|
|
42
42
|
};
|
|
43
43
|
/** @internal */
|
|
44
44
|
export declare const PasswordResponseBody$outboundSchema: z.ZodType<PasswordResponseBody$Outbound, z.ZodTypeDef, PasswordResponseBody>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password.d.ts","sourceRoot":"","sources":["../../src/models/operations/password.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,mBAAmB,GAAG;IAChC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"password.d.ts","sourceRoot":"","sources":["../../src/models/operations/password.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,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B,eAAO,MAAM,mCAAmC,EAAE,CAAC,CAAC,OAAO,CACzD,6BAA6B,EAC7B,CAAC,CAAC,UAAU,EACZ,oBAAoB,CAGpB,CAAC;AAEH;;;GAGG;AACH,yBAAiB,qBAAqB,CAAC;IACrC,oEAAoE;IAC7D,MAAM,aAAa,wDAAqC,CAAC;IAChE,qEAAqE;IAC9D,MAAM,cAAc,8EAAsC,CAAC;IAClE,+DAA+D;IAC/D,KAAY,QAAQ,GAAG,6BAA6B,CAAC;CACtD;AAED,wBAAgB,0BAA0B,CACxC,oBAAoB,EAAE,oBAAoB,GACzC,MAAM,CAIR;AAED,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,oBAAoB,EAAE,kBAAkB,CAAC,CAM3D"}
|
|
@@ -81,11 +81,11 @@ function passwordRequestBodyFromJSON(jsonString) {
|
|
|
81
81
|
}
|
|
82
82
|
/** @internal */
|
|
83
83
|
exports.PasswordResponseBody$inboundSchema = z.object({
|
|
84
|
-
success: z.
|
|
84
|
+
success: z.nullable(z.boolean()).optional(),
|
|
85
85
|
});
|
|
86
86
|
/** @internal */
|
|
87
87
|
exports.PasswordResponseBody$outboundSchema = z.object({
|
|
88
|
-
success: z.
|
|
88
|
+
success: z.nullable(z.boolean()).optional(),
|
|
89
89
|
});
|
|
90
90
|
/**
|
|
91
91
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password.js","sourceRoot":"","sources":["../../src/models/operations/password.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEH,8DAMC;AAED,kEAQC;AAsCD,gEAMC;AAED,oEAQC;AAvID,uCAAyB;AACzB,2DAA0D;AAC1D,qDAAiD;AAgBjD,gBAAgB;AACH,QAAA,iCAAiC,GAI1C,CAAC,CAAC,MAAM,CAAC;IACX,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC/B,QAAQ,EAAE,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": {
|
|
6
|
+
"mcp": "bin/mcp-server.js"
|
|
7
|
+
},
|
|
5
8
|
"main": "./index.js",
|
|
6
9
|
"sideEffects": false,
|
|
7
10
|
"repository": {
|
|
@@ -11,25 +14,34 @@
|
|
|
11
14
|
},
|
|
12
15
|
"scripts": {
|
|
13
16
|
"lint": "eslint --cache --max-warnings=0 src",
|
|
14
|
-
"build": "
|
|
17
|
+
"build:mcp": "bun src/mcp-server/build.mts",
|
|
18
|
+
"build": "npm run build:mcp && tsc",
|
|
15
19
|
"prepublishOnly": "npm run build"
|
|
16
20
|
},
|
|
17
21
|
"peerDependencies": {
|
|
22
|
+
"@modelcontextprotocol/sdk": "^1.5.0",
|
|
18
23
|
"@tanstack/react-query": "^5",
|
|
19
24
|
"react": "^18 || ^19",
|
|
20
25
|
"react-dom": "^18 || ^19",
|
|
21
26
|
"zod": ">= 3"
|
|
22
27
|
},
|
|
23
28
|
"peerDependenciesMeta": {
|
|
29
|
+
"@modelcontextprotocol/sdk": {"optional":true},
|
|
24
30
|
"@tanstack/react-query": {"optional":true},
|
|
25
31
|
"react": {"optional":true},
|
|
26
32
|
"react-dom": {"optional":true}
|
|
27
33
|
},
|
|
28
34
|
"devDependencies": {
|
|
29
35
|
"@eslint/js": "^9.19.0",
|
|
36
|
+
"@modelcontextprotocol/sdk": "^1.5.0",
|
|
37
|
+
"@stricli/core": "^1.1.1",
|
|
30
38
|
"@tanstack/react-query": "^5.61.4",
|
|
39
|
+
"@types/express": "^4.17.21",
|
|
31
40
|
"@types/react": "^18.3.12",
|
|
41
|
+
"bun": "^1.2.2",
|
|
42
|
+
"bun-types": "^1.2.2",
|
|
32
43
|
"eslint": "^9.19.0",
|
|
44
|
+
"express": "^4.21.2",
|
|
33
45
|
"globals": "^15.14.0",
|
|
34
46
|
"typescript": "^5.4.5",
|
|
35
47
|
"typescript-eslint": "^8.22.0",
|