@digipair/skill-mcp 0.113.1 → 0.114.2

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 ADDED
@@ -0,0 +1,11 @@
1
+ # skill-mcp
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Building
6
+
7
+ Run `nx build skill-mcp` to build the library.
8
+
9
+ ## Running unit tests
10
+
11
+ Run `nx test skill-mcp` to execute the unit tests via [Jest](https://jestjs.io).
@@ -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
- var _schema_required;
39
- return zod.z.object(zodProps).required(((_schema_required = schema.required) != null ? _schema_required : []).reduce((acc, reqProp)=>_extends({}, acc, {
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, _extends({}, context, {
67
+ return await engine.executePinsList(tool.execute, {
68
+ ...context,
81
69
  params
82
- }), `${context.__PATH__}.tools[${i}].execute`);
70
+ }, `${context.__PATH__}.tools[${i}].execute`);
83
71
  });
84
72
  }
85
73
  const transport = new streamableHttp_js.StreamableHTTPServerTransport({