@nextclaw/ncp-mcp 0.1.89 → 0.1.90
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/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/mcp-ncp-tool.ts","../src/mcp-ncp-tool-registry-adapter.ts"],"mappings":";;;;cAGa,UAAA,YAAsB,OAAA;EAAA,iBAMd,KAAA;EAAA,iBACA,WAAA;EAAA,SANV,IAAA;EAAA,SACA,WAAA;EAAA,SACA,UAAA,GAAa,MAAA;cAGH,KAAA,EAAO,mBAAA,EACP,WAAA,GAAc,KAAA,EAAO,mBAAA,EAAqB,IAAA,EAAM,MAAA,sBAA4B,OAAA;EAOzF,OAAA,CAAQ,IAAA,YAAgB,OAAA;AAAA;;;cCdnB,yBAAA;EAAA,iBACkB,eAAA;cAAA,eAAA,EAAiB,kBAAA;EAE9C,eAAA,CAAgB,OAAA;IAAW,OAAA;EAAA,IAAoB,UAAA;AAAA"}
|
package/dist/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/mcp-ncp-tool.ts","../src/mcp-ncp-tool-registry-adapter.ts"],"sourcesContent":["import type { NcpTool } from \"@nextclaw/ncp\";\nimport type { McpToolCatalogEntry } from \"@nextclaw/mcp\";\n\nexport class McpNcpTool implements NcpTool {\n readonly name: string;\n readonly description?: string;\n readonly parameters?: Record<string, unknown>;\n\n constructor(\n private readonly entry: McpToolCatalogEntry,\n private readonly executeImpl: (entry: McpToolCatalogEntry, args: Record<string, unknown>) => Promise<unknown>\n ) {\n this.name = entry.qualifiedName;\n this.description = entry.description;\n this.parameters = entry.parameters;\n }\n\n async execute(args: unknown): Promise<unknown> {\n return this.executeImpl(this.entry, isRecord(args) ? args : {});\n }\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return Boolean(value) && typeof value === \"object\" && !Array.isArray(value);\n}\n","import type { McpRegistryService } from \"@nextclaw/mcp\";\nimport { McpNcpTool } from \"./mcp-ncp-tool.js\";\n\nexport class McpNcpToolRegistryAdapter {\n constructor(private readonly registryService: McpRegistryService) {}\n\n listToolsForRun(context: { agentId: string }): McpNcpTool[] {\n return this.registryService.listAccessibleTools({\n agentId: context.agentId\n }).map((entry) =>\n new McpNcpTool(entry, async (toolEntry, args) =>\n this.registryService.callTool({\n serverName: toolEntry.serverName,\n toolName: toolEntry.toolName,\n args\n })\n )\n );\n }\n}\n"],"mappings":";AAGA,IAAa,aAAb,MAA2C;CACzC;CACA;CACA;CAEA,YACE,OACA,aACA;AAFiB,OAAA,QAAA;AACA,OAAA,cAAA;AAEjB,OAAK,OAAO,MAAM;AAClB,OAAK,cAAc,MAAM;AACzB,OAAK,aAAa,MAAM;;CAG1B,MAAM,QAAQ,MAAiC;AAC7C,SAAO,KAAK,YAAY,KAAK,OAAO,SAAS,KAAK,GAAG,OAAO,EAAE,CAAC;;;AAInE,SAAS,SAAS,OAAkD;AAClE,QAAO,QAAQ,MAAM,IAAI,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,MAAM;;;;ACpB7E,IAAa,4BAAb,MAAuC;CACrC,YAAY,iBAAsD;AAArC,OAAA,kBAAA;;CAE7B,gBAAgB,SAA4C;AAC1D,SAAO,KAAK,gBAAgB,oBAAoB,EAC9C,SAAS,QAAQ,SAClB,CAAC,CAAC,KAAK,UACN,IAAI,WAAW,OAAO,OAAO,WAAW,SACtC,KAAK,gBAAgB,SAAS;GAC5B,YAAY,UAAU;GACtB,UAAU,UAAU;GACpB;GACD,CAAC,CACH,CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextclaw/ncp-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.90",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Thin NCP adapter for exposing platform MCP tools inside NextClaw NCP runtimes.",
|
|
6
6
|
"type": "module",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"dist"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@nextclaw/
|
|
19
|
-
"@nextclaw/
|
|
18
|
+
"@nextclaw/ncp": "0.5.16",
|
|
19
|
+
"@nextclaw/mcp": "0.1.88"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/node": "^20.17.6",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"vitest": "^4.1.2"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
|
-
"build": "tsdown src/index.ts --dts --clean --target es2022 --no-fixedExtension",
|
|
28
|
+
"build": "tsdown src/index.ts --dts.sourcemap --clean --target es2022 --no-fixedExtension",
|
|
29
29
|
"lint": "cd ../../.. && pnpm exec eslint packages/ncp-packages/nextclaw-ncp-mcp --config packages/ncp-packages/nextclaw-ncp-mcp/eslint.config.mjs",
|
|
30
30
|
"tsc": "tsc -p tsconfig.json",
|
|
31
31
|
"test": "vitest run"
|