@sebastienrousseau/crypto-mcp 0.0.8 → 0.0.9
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 +75 -22
- package/dist/protocol.d.ts +18 -0
- package/dist/protocol.d.ts.map +1 -0
- package/dist/protocol.js +63 -0
- package/dist/server.d.ts +1 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +16 -14
- package/dist/tools/annotations.d.ts +6 -0
- package/dist/tools/annotations.d.ts.map +1 -0
- package/dist/tools/annotations.js +48 -0
- package/dist/tools/definitions.d.ts +4 -0
- package/dist/tools/definitions.d.ts.map +1 -1
- package/dist/tools/definitions.js +190 -132
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +24 -6
- package/dist/tools/kem.d.ts +4 -0
- package/dist/tools/kem.d.ts.map +1 -0
- package/dist/tools/kem.js +20 -0
- package/dist/tools/keyimport.d.ts +5 -0
- package/dist/tools/keyimport.d.ts.map +1 -0
- package/dist/tools/keyimport.js +206 -0
- package/dist/tools/keys.d.ts +9 -0
- package/dist/tools/keys.d.ts.map +1 -1
- package/dist/tools/keys.js +56 -41
- package/dist/tools/keystore.d.ts +25 -0
- package/dist/tools/keystore.d.ts.map +1 -0
- package/dist/tools/keystore.js +81 -0
- package/dist/tools/kms.d.ts +1 -0
- package/dist/tools/kms.d.ts.map +1 -1
- package/dist/tools/kms.js +27 -18
- package/dist/tools/result.d.ts +0 -1
- package/dist/tools/result.d.ts.map +1 -1
- package/dist/tools/result.js +0 -8
- package/dist/tools/signing.d.ts.map +1 -1
- package/dist/tools/signing.js +81 -34
- package/dist/tools/symmetric.d.ts +1 -0
- package/dist/tools/symmetric.d.ts.map +1 -1
- package/dist/tools/symmetric.js +18 -7
- package/dist/tools/validate.d.ts +3 -0
- package/dist/tools/validate.d.ts.map +1 -0
- package/dist/tools/validate.js +76 -0
- package/dist/types.d.ts +19 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +19 -17
package/dist/tools/signing.js
CHANGED
|
@@ -6,50 +6,97 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.hash = exports.verify = exports.sign = void 0;
|
|
7
7
|
const node_crypto_1 = __importDefault(require("node:crypto"));
|
|
8
8
|
const definitions_1 = require("./definitions");
|
|
9
|
+
const keystore_1 = require("./keystore");
|
|
9
10
|
const result_1 = require("./result");
|
|
11
|
+
const SIGNING_KINDS = [
|
|
12
|
+
"ed25519",
|
|
13
|
+
"rsa",
|
|
14
|
+
"ecc",
|
|
15
|
+
"hmac-sha256",
|
|
16
|
+
];
|
|
17
|
+
function ecdsaScheme(key) {
|
|
18
|
+
const curve = String(key.asymmetricKeyDetails?.namedCurve);
|
|
19
|
+
if (!definitions_1.EC_CURVES.includes(curve)) {
|
|
20
|
+
throw new Error(`Unsupported EC curve: ${curve}`);
|
|
21
|
+
}
|
|
22
|
+
const digest = curve === "secp384r1" ? "sha384" : "sha256";
|
|
23
|
+
return { algorithm: `ecdsa-${digest}`, digest, pss: false };
|
|
24
|
+
}
|
|
25
|
+
function schemeFor(key) {
|
|
26
|
+
switch (key.asymmetricKeyType) {
|
|
27
|
+
case "ed25519":
|
|
28
|
+
return { algorithm: "ed25519", digest: null, pss: false };
|
|
29
|
+
case "rsa":
|
|
30
|
+
return { algorithm: "rsa-pss", digest: "sha256", pss: true };
|
|
31
|
+
case "ec":
|
|
32
|
+
return ecdsaScheme(key);
|
|
33
|
+
default:
|
|
34
|
+
throw new Error(`Unsupported key type: ${key.asymmetricKeyType}`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function keyInput(key, scheme) {
|
|
38
|
+
if (!scheme.pss)
|
|
39
|
+
return key;
|
|
40
|
+
return {
|
|
41
|
+
key,
|
|
42
|
+
padding: node_crypto_1.default.constants.RSA_PKCS1_PSS_PADDING,
|
|
43
|
+
saltLength: node_crypto_1.default.constants.RSA_PSS_SALTLEN_DIGEST,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function hmac(secret, data) {
|
|
47
|
+
return node_crypto_1.default.createHmac("sha256", secret).update(data).digest();
|
|
48
|
+
}
|
|
10
49
|
const sign = async (args) => {
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const signature = node_crypto_1.default
|
|
16
|
-
.createHmac("sha256", privateKey)
|
|
17
|
-
.update(data)
|
|
18
|
-
.digest("hex");
|
|
50
|
+
const key = keystore_1.keyStore.use(String(args.keyHandle), SIGNING_KINDS);
|
|
51
|
+
const data = Buffer.from(String(args.data), "utf8");
|
|
52
|
+
if (key.kind === "hmac-sha256") {
|
|
53
|
+
const signature = hmac(key.secret, data).toString("hex");
|
|
19
54
|
return (0, result_1.jsonResult)({ algorithm: "hmac-sha256", signature });
|
|
20
55
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
const signer = node_crypto_1.default.createSign("SHA256");
|
|
28
|
-
signer.update(data);
|
|
29
|
-
signer.end();
|
|
30
|
-
return (0, result_1.jsonResult)({ algorithm, signature: signer.sign(privateKey, "hex") });
|
|
56
|
+
const privateKey = key.privateKey;
|
|
57
|
+
const scheme = schemeFor(privateKey);
|
|
58
|
+
const signature = node_crypto_1.default
|
|
59
|
+
.sign(scheme.digest, data, keyInput(privateKey, scheme))
|
|
60
|
+
.toString("hex");
|
|
61
|
+
return (0, result_1.jsonResult)({ algorithm: scheme.algorithm, signature });
|
|
31
62
|
};
|
|
32
63
|
exports.sign = sign;
|
|
33
|
-
function
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
64
|
+
function verifyAsymmetric(publicKey, data, signature) {
|
|
65
|
+
const scheme = schemeFor(publicKey);
|
|
66
|
+
const valid = node_crypto_1.default.verify(scheme.digest, data, keyInput(publicKey, scheme), signature);
|
|
67
|
+
return { algorithm: scheme.algorithm, valid };
|
|
68
|
+
}
|
|
69
|
+
function verifyHmac(secret, data, signature) {
|
|
70
|
+
const expected = hmac(secret, data);
|
|
71
|
+
const valid = signature.length === expected.length &&
|
|
72
|
+
node_crypto_1.default.timingSafeEqual(signature, expected);
|
|
73
|
+
return { algorithm: "hmac-sha256", valid };
|
|
74
|
+
}
|
|
75
|
+
function verifierFor(args) {
|
|
76
|
+
const hasPem = args.publicKey !== undefined;
|
|
77
|
+
if (hasPem === (args.keyHandle !== undefined)) {
|
|
78
|
+
throw new Error("Pass exactly one of publicKey or keyHandle");
|
|
40
79
|
}
|
|
41
|
-
if (
|
|
42
|
-
|
|
80
|
+
if (hasPem) {
|
|
81
|
+
const pem = String(args.publicKey);
|
|
82
|
+
if (pem.includes("PRIVATE KEY")) {
|
|
83
|
+
throw new Error("publicKey must be a public key, not a private key");
|
|
84
|
+
}
|
|
85
|
+
return { publicKey: node_crypto_1.default.createPublicKey(pem) };
|
|
43
86
|
}
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
87
|
+
const key = keystore_1.keyStore.use(String(args.keyHandle), SIGNING_KINDS);
|
|
88
|
+
return key.kind === "hmac-sha256"
|
|
89
|
+
? { secret: key.secret }
|
|
90
|
+
: { publicKey: key.publicKey };
|
|
48
91
|
}
|
|
49
92
|
const verify = async (args) => {
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
|
|
93
|
+
const verifier = verifierFor(args);
|
|
94
|
+
const data = Buffer.from(String(args.data), "utf8");
|
|
95
|
+
const signature = Buffer.from(String(args.signature), "hex");
|
|
96
|
+
const result = "secret" in verifier
|
|
97
|
+
? verifyHmac(verifier.secret, data, signature)
|
|
98
|
+
: verifyAsymmetric(verifier.publicKey, data, signature);
|
|
99
|
+
return (0, result_1.jsonResult)(result);
|
|
53
100
|
};
|
|
54
101
|
exports.verify = verify;
|
|
55
102
|
const hash = async (args) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symmetric.d.ts","sourceRoot":"","sources":["../../src/tools/symmetric.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"symmetric.d.ts","sourceRoot":"","sources":["../../src/tools/symmetric.ts"],"names":[],"mappings":"AAIA,OAAO,EAAY,WAAW,EAAc,MAAM,UAAU,CAAC;AA0B7D,wBAAgB,eAAe,CAAC,SAAS,EAAE,OAAO,GAAG,MAAM,CAE1D;AAaD,eAAO,MAAM,OAAO,EAAE,WAmBrB,CAAC;AAGF,eAAO,MAAM,OAAO,EAAE,WAWrB,CAAC"}
|
package/dist/tools/symmetric.js
CHANGED
|
@@ -4,7 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.decrypt = exports.encrypt = void 0;
|
|
7
|
+
exports.symmetricSecret = symmetricSecret;
|
|
7
8
|
const node_crypto_1 = __importDefault(require("node:crypto"));
|
|
9
|
+
const keystore_1 = require("./keystore");
|
|
8
10
|
const result_1 = require("./result");
|
|
9
11
|
function aeadAlgorithm(value) {
|
|
10
12
|
return value === "chacha20-poly1305" ? "chacha20-poly1305" : "aes-256-gcm";
|
|
@@ -22,31 +24,40 @@ function createDecipher(algorithm, key, iv) {
|
|
|
22
24
|
}
|
|
23
25
|
return node_crypto_1.default.createDecipheriv(algorithm, key, iv, AEAD_OPTIONS);
|
|
24
26
|
}
|
|
27
|
+
function symmetricSecret(keyHandle) {
|
|
28
|
+
return keystore_1.keyStore.use(String(keyHandle), ["symmetric-256"]).secret;
|
|
29
|
+
}
|
|
30
|
+
function encryptionKeyHandle(args) {
|
|
31
|
+
if (args.keyHandle !== undefined)
|
|
32
|
+
return String(args.keyHandle);
|
|
33
|
+
return keystore_1.keyStore.add((0, keystore_1.symmetricKey)(node_crypto_1.default.randomBytes(32), "generated"));
|
|
34
|
+
}
|
|
25
35
|
const encrypt = async (args) => {
|
|
26
36
|
const plaintext = String(args.plaintext);
|
|
27
37
|
const algorithm = aeadAlgorithm(args.algorithm);
|
|
28
|
-
const generatedKey =
|
|
29
|
-
const
|
|
38
|
+
const generatedKey = args.keyHandle === undefined;
|
|
39
|
+
const keyHandle = encryptionKeyHandle(args);
|
|
30
40
|
const iv = node_crypto_1.default.randomBytes(12);
|
|
31
|
-
const cipher = createCipher(algorithm,
|
|
41
|
+
const cipher = createCipher(algorithm, symmetricSecret(keyHandle), iv);
|
|
32
42
|
const ciphertext = Buffer.concat([
|
|
33
43
|
cipher.update(plaintext, "utf8"),
|
|
34
44
|
cipher.final(),
|
|
35
45
|
]);
|
|
36
46
|
return (0, result_1.jsonResult)({
|
|
37
47
|
algorithm,
|
|
48
|
+
keyHandle,
|
|
49
|
+
generatedKey,
|
|
38
50
|
ciphertext: ciphertext.toString("hex"),
|
|
39
51
|
iv: iv.toString("hex"),
|
|
40
52
|
authTag: cipher.getAuthTag().toString("hex"),
|
|
41
|
-
key: generatedKey ? key.toString("hex") : undefined,
|
|
42
53
|
});
|
|
43
54
|
};
|
|
44
55
|
exports.encrypt = encrypt;
|
|
45
56
|
const decrypt = async (args) => {
|
|
46
|
-
const algorithm = args.algorithm
|
|
47
|
-
const key = (
|
|
57
|
+
const algorithm = aeadAlgorithm(args.algorithm);
|
|
58
|
+
const key = symmetricSecret(args.keyHandle);
|
|
48
59
|
const iv = Buffer.from(String(args.iv), "hex");
|
|
49
|
-
const decipher = createDecipher(
|
|
60
|
+
const decipher = createDecipher(algorithm, key, iv);
|
|
50
61
|
decipher.setAuthTag(Buffer.from(String(args.authTag), "hex"));
|
|
51
62
|
const decrypted = Buffer.concat([
|
|
52
63
|
decipher.update(Buffer.from(String(args.ciphertext), "hex")),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/tools/validate.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,kBAAkB,EAGnB,MAAM,UAAU,CAAC;AAoFlB,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,kBAAkB,EAC1B,IAAI,EAAE,OAAO,GACZ,MAAM,GAAG,SAAS,CAiBpB"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateArguments = validateArguments;
|
|
4
|
+
function isPlainObject(value) {
|
|
5
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6
|
+
}
|
|
7
|
+
function hasType(type, value) {
|
|
8
|
+
switch (type) {
|
|
9
|
+
case "string":
|
|
10
|
+
return typeof value === "string";
|
|
11
|
+
case "integer":
|
|
12
|
+
return Number.isSafeInteger(value);
|
|
13
|
+
case "number":
|
|
14
|
+
return typeof value === "number" && Number.isFinite(value);
|
|
15
|
+
case "boolean":
|
|
16
|
+
return typeof value === "boolean";
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function checkString(prop, value) {
|
|
20
|
+
if (prop.minLength !== undefined && value.length < prop.minLength) {
|
|
21
|
+
return `must be at least ${prop.minLength} characters`;
|
|
22
|
+
}
|
|
23
|
+
if (prop.maxLength !== undefined && value.length > prop.maxLength) {
|
|
24
|
+
return `must be at most ${prop.maxLength} characters`;
|
|
25
|
+
}
|
|
26
|
+
if (prop.pattern !== undefined &&
|
|
27
|
+
!new RegExp(prop.pattern, "u").test(value)) {
|
|
28
|
+
return "has an invalid format";
|
|
29
|
+
}
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
function checkNumber(prop, value) {
|
|
33
|
+
if (prop.minimum !== undefined && value < prop.minimum) {
|
|
34
|
+
return `must be at least ${prop.minimum}`;
|
|
35
|
+
}
|
|
36
|
+
if (prop.maximum !== undefined && value > prop.maximum) {
|
|
37
|
+
return `must be at most ${prop.maximum}`;
|
|
38
|
+
}
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
function checkProperty(prop, value) {
|
|
42
|
+
if (!hasType(prop.type, value))
|
|
43
|
+
return `must be of type ${prop.type}`;
|
|
44
|
+
if (prop.enum && !prop.enum.includes(value)) {
|
|
45
|
+
return `must be one of: ${prop.enum.join(", ")}`;
|
|
46
|
+
}
|
|
47
|
+
if (typeof value === "string")
|
|
48
|
+
return checkString(prop, value);
|
|
49
|
+
if (typeof value === "number")
|
|
50
|
+
return checkNumber(prop, value);
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
function quoteName(name) {
|
|
54
|
+
return JSON.stringify(name.length > 64 ? `${name.slice(0, 64)}...` : name);
|
|
55
|
+
}
|
|
56
|
+
function validateArguments(schema, args) {
|
|
57
|
+
if (!isPlainObject(args))
|
|
58
|
+
return "arguments must be a JSON object";
|
|
59
|
+
for (const name of Object.keys(args)) {
|
|
60
|
+
if (!Object.hasOwn(schema.properties, name)) {
|
|
61
|
+
return `unknown property ${quoteName(name)}`;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
for (const name of schema.required ?? []) {
|
|
65
|
+
if (!Object.hasOwn(args, name)) {
|
|
66
|
+
return `missing required property "${name}"`;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
for (const [name, value] of Object.entries(args)) {
|
|
70
|
+
const problem = checkProperty(schema.properties[name], value);
|
|
71
|
+
if (problem)
|
|
72
|
+
return `"${name}" ${problem}`;
|
|
73
|
+
}
|
|
74
|
+
return undefined;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=validate.js.map
|
package/dist/types.d.ts
CHANGED
|
@@ -15,21 +15,37 @@ export interface JSONRPCError {
|
|
|
15
15
|
message: string;
|
|
16
16
|
data?: unknown;
|
|
17
17
|
}
|
|
18
|
+
export type MCPToolParameterType = "string" | "integer" | "number" | "boolean";
|
|
18
19
|
export interface MCPToolParameterProperty {
|
|
19
|
-
type:
|
|
20
|
+
type: MCPToolParameterType;
|
|
20
21
|
description: string;
|
|
21
|
-
enum?: string
|
|
22
|
+
enum?: Array<string | number>;
|
|
22
23
|
default?: unknown;
|
|
24
|
+
minLength?: number;
|
|
25
|
+
maxLength?: number;
|
|
26
|
+
pattern?: string;
|
|
27
|
+
minimum?: number;
|
|
28
|
+
maximum?: number;
|
|
23
29
|
}
|
|
24
30
|
export interface MCPToolInputSchema {
|
|
25
31
|
type: "object";
|
|
26
32
|
properties: Record<string, MCPToolParameterProperty>;
|
|
27
33
|
required?: string[];
|
|
34
|
+
additionalProperties: false;
|
|
35
|
+
}
|
|
36
|
+
export interface MCPToolAnnotations {
|
|
37
|
+
title?: string;
|
|
38
|
+
readOnlyHint?: boolean;
|
|
39
|
+
destructiveHint?: boolean;
|
|
40
|
+
idempotentHint?: boolean;
|
|
41
|
+
openWorldHint?: boolean;
|
|
28
42
|
}
|
|
29
43
|
export interface MCPTool {
|
|
30
44
|
name: string;
|
|
45
|
+
title?: string;
|
|
31
46
|
description: string;
|
|
32
47
|
inputSchema: MCPToolInputSchema;
|
|
48
|
+
annotations?: MCPToolAnnotations;
|
|
33
49
|
}
|
|
34
50
|
export interface MCPTextContent {
|
|
35
51
|
type: "text";
|
|
@@ -84,5 +100,6 @@ export interface MCPInitializeResult {
|
|
|
84
100
|
protocolVersion: string;
|
|
85
101
|
capabilities: MCPServerCapabilities;
|
|
86
102
|
serverInfo: MCPServerInfo;
|
|
103
|
+
instructions?: string;
|
|
87
104
|
}
|
|
88
105
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,KAAK,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,eAAe;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AI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC,CAAC;CACJ;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,iBAAiB,EAAE,CAAC;CACjC;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,gBAAgB,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,qBAAqB;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED,MAAM,WAAW,mBAAmB;IAClC,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,qBAAqB,CAAC;IACpC,UAAU,EAAE,aAAa,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
|
package/package.json
CHANGED
|
@@ -1,44 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sebastienrousseau/crypto-mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "Model Context Protocol (MCP) server for the Crypto Service Suite — exposing cryptographic operations, post-quantum primitives, and key management to AI assistants and agentic workflows.",
|
|
5
5
|
"author": "Sebastien Rousseau <sebastienrousseau@users.noreply.github.com>",
|
|
6
6
|
"license": "MIT OR Apache-2.0",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=22.0.0"
|
|
9
9
|
},
|
|
10
|
+
"type": "commonjs",
|
|
10
11
|
"main": "./dist/index.js",
|
|
11
12
|
"types": "./dist/index.d.ts",
|
|
12
|
-
"bin": {
|
|
13
|
-
"crypto-mcp": "./dist/cli.js"
|
|
14
|
-
},
|
|
15
|
-
"sideEffects": false,
|
|
16
13
|
"exports": {
|
|
17
14
|
".": {
|
|
18
15
|
"types": "./dist/index.d.ts",
|
|
19
16
|
"require": "./dist/index.js",
|
|
20
|
-
"
|
|
21
|
-
}
|
|
17
|
+
"default": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./package.json": "./package.json"
|
|
22
20
|
},
|
|
21
|
+
"bin": {
|
|
22
|
+
"crypto-mcp": "./dist/cli.js"
|
|
23
|
+
},
|
|
24
|
+
"sideEffects": false,
|
|
23
25
|
"files": [
|
|
24
26
|
"dist/**/*.js",
|
|
25
27
|
"dist/**/*.d.ts",
|
|
26
28
|
"dist/**/*.d.ts.map"
|
|
27
29
|
],
|
|
28
30
|
"dependencies": {
|
|
29
|
-
"@sebastienrousseau/crypto-
|
|
30
|
-
"@sebastienrousseau/crypto-
|
|
31
|
-
"@sebastienrousseau/crypto-
|
|
31
|
+
"@sebastienrousseau/crypto-lib": "0.0.9",
|
|
32
|
+
"@sebastienrousseau/crypto-kms": "0.0.9",
|
|
33
|
+
"@sebastienrousseau/crypto-wasm": "0.0.9"
|
|
32
34
|
},
|
|
33
35
|
"devDependencies": {
|
|
34
|
-
"@types/chai": "^
|
|
36
|
+
"@types/chai": "^5.2.3",
|
|
35
37
|
"@types/chai-as-promised": "^8.0.2",
|
|
36
|
-
"@types/mocha": "^10.0.
|
|
38
|
+
"@types/mocha": "^10.0.10",
|
|
37
39
|
"@types/node": "^26.6.3",
|
|
38
40
|
"c8": "^12.0.0",
|
|
39
|
-
"chai": "^
|
|
40
|
-
"chai-as-promised": "^
|
|
41
|
-
"mocha": "^
|
|
41
|
+
"chai": "^6.3.0",
|
|
42
|
+
"chai-as-promised": "^8.0.2",
|
|
43
|
+
"mocha": "^12.0.3",
|
|
42
44
|
"rimraf": "^6.1.3",
|
|
43
45
|
"ts-node": "^10.9.2",
|
|
44
46
|
"typedoc": "^0.28.20",
|
|
@@ -59,8 +61,8 @@
|
|
|
59
61
|
"clean": "rimraf ./coverage ./dist ./docs",
|
|
60
62
|
"test": "c8 --check-coverage --lines 100 --branches 100 --functions 100 --reporter=lcov --reporter=text mocha --config=.mocharc.cjs",
|
|
61
63
|
"docs": "typedoc",
|
|
62
|
-
"lint": "eslint
|
|
63
|
-
"lint:fix": "eslint --cache --fix
|
|
64
|
+
"lint": "eslint src __tests__",
|
|
65
|
+
"lint:fix": "eslint --cache --fix src __tests__",
|
|
64
66
|
"format": "prettier --write src/**/*.ts",
|
|
65
67
|
"format:check": "prettier --check \"src/**/*.ts\""
|
|
66
68
|
}
|