@digipair/skill-mcp 0.113.0 → 0.114.1
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 +11 -0
- package/{index.cjs.js → dist/index.cjs.js} +5 -17
- package/{index.esm.js → dist/index.esm.js} +19076 -21320
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -0
- package/{libs/skill-mcp → dist}/src/lib/skill-mcp.d.ts +1 -0
- package/dist/src/lib/skill-mcp.d.ts.map +1 -0
- package/package.json +27 -6
- package/index.d.ts +0 -1
- package/libs/skill-mcp/src/index.d.ts +0 -1
- /package/{index.cjs.d.ts → dist/index.d.ts} +0 -0
- /package/{schema.fr.json → dist/schema.fr.json} +0 -0
- /package/{schema.json → dist/schema.json} +0 -0
package/README.md
ADDED
|
@@ -1,23 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var engine = require('@digipair/engine');
|
|
6
4
|
var mcp_js = require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
7
5
|
var streamableHttp_js = require('@modelcontextprotocol/sdk/server/streamableHttp.js');
|
|
8
6
|
var zod = require('zod');
|
|
9
7
|
|
|
10
|
-
function _extends() {
|
|
11
|
-
_extends = Object.assign || function assign(target) {
|
|
12
|
-
for(var i = 1; i < arguments.length; i++){
|
|
13
|
-
var source = arguments[i];
|
|
14
|
-
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
15
|
-
}
|
|
16
|
-
return target;
|
|
17
|
-
};
|
|
18
|
-
return _extends.apply(this, arguments);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
8
|
let MCPServerService = class MCPServerService {
|
|
22
9
|
jsonSchemaToZod(schema) {
|
|
23
10
|
const zodProps = {};
|
|
@@ -35,8 +22,8 @@ let MCPServerService = class MCPServerService {
|
|
|
35
22
|
zodProps[prop] = zodProps[prop].describe(schema.properties[prop].description);
|
|
36
23
|
}
|
|
37
24
|
}
|
|
38
|
-
|
|
39
|
-
|
|
25
|
+
return zod.z.object(zodProps).required((schema.required ?? []).reduce((acc, reqProp)=>({
|
|
26
|
+
...acc,
|
|
40
27
|
[reqProp]: true
|
|
41
28
|
}), {})).optional();
|
|
42
29
|
case 'array':
|
|
@@ -77,9 +64,10 @@ let MCPServerService = class MCPServerService {
|
|
|
77
64
|
inputSchema: inputSchema,
|
|
78
65
|
outputSchema: outputSchema
|
|
79
66
|
}, async (params)=>{
|
|
80
|
-
return await engine.executePinsList(tool.execute,
|
|
67
|
+
return await engine.executePinsList(tool.execute, {
|
|
68
|
+
...context,
|
|
81
69
|
params
|
|
82
|
-
}
|
|
70
|
+
}, `${context.__PATH__}.tools[${i}].execute`);
|
|
83
71
|
});
|
|
84
72
|
}
|
|
85
73
|
const transport = new streamableHttp_js.StreamableHTTPServerTransport({
|