@o3r/mcp 12.5.0-prerelease.44 → 12.5.0-prerelease.46
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 +5 -0
- package/cli/index.js +2 -2
- package/cli/index.js.map +1 -1
- package/{resources → instructions}/best-practices.d.ts +1 -1
- package/instructions/best-practices.d.ts.map +1 -0
- package/{resources → instructions}/best-practices.js +1 -1
- package/instructions/best-practices.js.map +1 -0
- package/mcp-server.js +1 -1
- package/mcp-server.js.map +1 -1
- package/package.json +6 -6
- package/tools/best-practices.js +1 -1
- package/tools/best-practices.js.map +1 -1
- package/resources/best-practices.d.ts.map +0 -1
- package/resources/best-practices.js.map +0 -1
package/README.md
CHANGED
package/cli/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
const
|
|
4
|
+
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
5
5
|
const mcp_server_1 = require("../mcp-server");
|
|
6
6
|
async function startMcpServer() {
|
|
7
7
|
const server = await (0, mcp_server_1.createMcpServer)();
|
|
8
|
-
const transport = new
|
|
8
|
+
const transport = new stdio_js_1.StdioServerTransport();
|
|
9
9
|
await server.connect(transport);
|
|
10
10
|
// Logging as error as recommended by modelcontextprotocol.io (https://modelcontextprotocol.io/quickstart/server#quick-examples-2)
|
|
11
11
|
console.error('Server connected...');
|
package/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;;AACA,wEAEmD;AACnD,8CAEuB;AAEvB,KAAK,UAAU,cAAc;IAC3B,MAAM,MAAM,GAAG,MAAM,IAAA,4BAAe,GAAE,CAAC;IACvC,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,kIAAkI;IAClI,OAAO,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;AACvC,CAAC;AAED,KAAK,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"best-practices.d.ts","sourceRoot":"","sources":["../../src/instructions/best-practices.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,SAAS,EACV,MAAM,yCAAyC,CAAC;AAEjD;;;;GAIG;AACH,wBAAsB,8BAA8B,CAAC,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAwB5G"}
|
|
@@ -14,7 +14,7 @@ async function registerBestPracticesResources(server, resourcesPath) {
|
|
|
14
14
|
const uri = `${name}://best-practices`;
|
|
15
15
|
server.registerResource(name, uri, {
|
|
16
16
|
title: 'Otter Best Practices and Code Generation Guide',
|
|
17
|
-
description: await (0, promises_1.readFile)((0, node_path_1.join)(bestPracticesResourcesPath, 'description'), { encoding: 'utf8' }),
|
|
17
|
+
description: await (0, promises_1.readFile)((0, node_path_1.join)(bestPracticesResourcesPath, 'description.md'), { encoding: 'utf8' }),
|
|
18
18
|
mimeType: 'text/markdown'
|
|
19
19
|
}, async () => {
|
|
20
20
|
const text = await (0, promises_1.readFile)((0, node_path_1.join)(bestPracticesResourcesPath, 'output.md'), { encoding: 'utf8' });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"best-practices.js","sourceRoot":"","sources":["../../src/instructions/best-practices.ts"],"names":[],"mappings":";;AAeA,wEAwBC;AAvCD,+CAE0B;AAC1B,yCAEmB;AAKnB;;;;GAIG;AACI,KAAK,UAAU,8BAA8B,CAAC,MAAiB,EAAE,aAAqB;IAC3F,MAAM,0BAA0B,GAAG,IAAA,gBAAI,EAAC,aAAa,EAAE,gBAAgB,CAAC,CAAC;IACzE,MAAM,IAAI,GAAG,cAAc,CAAC;IAC5B,MAAM,GAAG,GAAG,GAAG,IAAI,mBAAmB,CAAC;IACvC,MAAM,CAAC,gBAAgB,CACrB,IAAI,EACJ,GAAG,EACH;QACE,KAAK,EAAE,gDAAgD;QACvD,WAAW,EAAE,MAAM,IAAA,mBAAQ,EACzB,IAAA,gBAAI,EAAC,0BAA0B,EAAE,gBAAgB,CAAC,EAClD,EAAE,QAAQ,EAAE,MAAM,EAAE,CACrB;QACD,QAAQ,EAAE,eAAe;KAC1B,EACD,KAAK,IAAI,EAAE;QACT,MAAM,IAAI,GAAG,MAAM,IAAA,mBAAQ,EACzB,IAAA,gBAAI,EAAC,0BAA0B,EAAE,WAAW,CAAC,EAC7C,EAAE,QAAQ,EAAE,MAAM,EAAE,CACrB,CAAC;QAEF,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IACvC,CAAC,CACF,CAAC;AACJ,CAAC"}
|
package/mcp-server.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.createMcpServer = createMcpServer;
|
|
|
4
4
|
const promises_1 = require("node:fs/promises");
|
|
5
5
|
const node_path_1 = require("node:path");
|
|
6
6
|
const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
7
|
-
const best_practices_1 = require("./
|
|
7
|
+
const best_practices_1 = require("./instructions/best-practices");
|
|
8
8
|
const best_practices_2 = require("./tools/best-practices");
|
|
9
9
|
const create_monorepo_with_app_1 = require("./tools/create-monorepo-with-app");
|
|
10
10
|
/**
|
package/mcp-server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":";;AAsBA,0CAiBC;AAvCD,+CAE0B;AAC1B,yCAEmB;AACnB,oEAEiD;AACjD
|
|
1
|
+
{"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":";;AAsBA,0CAiBC;AAvCD,+CAE0B;AAC1B,yCAEmB;AACnB,oEAEiD;AACjD,kEAEuC;AACvC,2DAEgC;AAChC,+EAE0C;AAE1C;;GAEG;AACI,KAAK,UAAU,eAAe;IACnC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,IAAA,mBAAQ,EAAC,IAAA,gBAAI,EAAC,SAAS,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,MAAM,CAAC,CAAsC,CAAC;IACzI,MAAM,MAAM,GAAG,IAAI,kBAAS,CAAC;QAC3B,IAAI;QACJ,OAAO;QACP,YAAY,EAAE;YACZ,SAAS,EAAE,EAAE;YACb,KAAK,EAAE,EAAE;SACV;KACF,CAAC,CAAC;IACH,MAAM,aAAa,GAAG,IAAA,gBAAI,EAAC,SAAS,EAAE,WAAW,CAAC,CAAC;IAEnD,MAAM,IAAA,+CAA8B,EAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAC5D,MAAM,IAAA,0CAAyB,EAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACvD,MAAM,IAAA,4DAAiC,EAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAE/D,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@o3r/mcp",
|
|
3
|
-
"version": "12.5.0-prerelease.
|
|
3
|
+
"version": "12.5.0-prerelease.46",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"nx": "nx",
|
|
19
19
|
"ng": "yarn nx",
|
|
20
20
|
"build": "yarn nx build mcp",
|
|
21
|
-
"copy:resources": "yarn cpy '../../../assets/gen-ai/**/*.md'
|
|
21
|
+
"copy:resources": "yarn cpy '../../../assets/gen-ai/**/*.md' dist/resources",
|
|
22
22
|
"compile": "tsc -b ./tsconfig.build.json && yarn copy:resources && yarn cpy package.json dist && patch-package-json-main"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"@nx/eslint-plugin": "~20.8.0",
|
|
39
39
|
"@nx/jest": "~20.8.0",
|
|
40
40
|
"@nx/js": "~20.8.0",
|
|
41
|
-
"@o3r/build-helpers": "^12.5.0-prerelease.
|
|
42
|
-
"@o3r/eslint-config": "^12.5.0-prerelease.
|
|
43
|
-
"@o3r/eslint-plugin": "^12.5.0-prerelease.
|
|
44
|
-
"@o3r/test-helpers": "^12.5.0-prerelease.
|
|
41
|
+
"@o3r/build-helpers": "^12.5.0-prerelease.46",
|
|
42
|
+
"@o3r/eslint-config": "^12.5.0-prerelease.46",
|
|
43
|
+
"@o3r/eslint-plugin": "^12.5.0-prerelease.46",
|
|
44
|
+
"@o3r/test-helpers": "^12.5.0-prerelease.46",
|
|
45
45
|
"@stylistic/eslint-plugin": "~3.1.0",
|
|
46
46
|
"@types/jest": "~29.5.2",
|
|
47
47
|
"@types/node": "^20.0.0",
|
package/tools/best-practices.js
CHANGED
|
@@ -12,7 +12,7 @@ async function registerBestPracticesTool(server, resourcesPath) {
|
|
|
12
12
|
const bestPracticesResourcesPath = (0, node_path_1.join)(resourcesPath, 'best-practices');
|
|
13
13
|
server.registerTool('get_best_practices', {
|
|
14
14
|
title: 'Get Otter Coding Best Practices Guide',
|
|
15
|
-
description: await (0, promises_1.readFile)((0, node_path_1.join)(bestPracticesResourcesPath, 'description'), { encoding: 'utf8' }),
|
|
15
|
+
description: await (0, promises_1.readFile)((0, node_path_1.join)(bestPracticesResourcesPath, 'description.md'), { encoding: 'utf8' }),
|
|
16
16
|
annotations: {
|
|
17
17
|
readOnlyHint: true,
|
|
18
18
|
openWorldHint: false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"best-practices.js","sourceRoot":"","sources":["../../src/tools/best-practices.ts"],"names":[],"mappings":";;AAeA,8DA+BC;AA9CD,+CAE0B;AAC1B,yCAEmB;AAKnB;;;;GAIG;AACI,KAAK,UAAU,yBAAyB,CAAC,MAAiB,EAAE,aAAqB;IACtF,MAAM,0BAA0B,GAAG,IAAA,gBAAI,EAAC,aAAa,EAAE,gBAAgB,CAAC,CAAC;IAEzE,MAAM,CAAC,YAAY,CACjB,oBAAoB,EACpB;QACE,KAAK,EAAE,uCAAuC;QAC9C,WAAW,EAAE,MAAM,IAAA,mBAAQ,EACzB,IAAA,gBAAI,EAAC,0BAA0B,EAAE,
|
|
1
|
+
{"version":3,"file":"best-practices.js","sourceRoot":"","sources":["../../src/tools/best-practices.ts"],"names":[],"mappings":";;AAeA,8DA+BC;AA9CD,+CAE0B;AAC1B,yCAEmB;AAKnB;;;;GAIG;AACI,KAAK,UAAU,yBAAyB,CAAC,MAAiB,EAAE,aAAqB;IACtF,MAAM,0BAA0B,GAAG,IAAA,gBAAI,EAAC,aAAa,EAAE,gBAAgB,CAAC,CAAC;IAEzE,MAAM,CAAC,YAAY,CACjB,oBAAoB,EACpB;QACE,KAAK,EAAE,uCAAuC;QAC9C,WAAW,EAAE,MAAM,IAAA,mBAAQ,EACzB,IAAA,gBAAI,EAAC,0BAA0B,EAAE,gBAAgB,CAAC,EAClD,EAAE,QAAQ,EAAE,MAAM,EAAE,CACrB;QACD,WAAW,EAAE;YACX,YAAY,EAAE,IAAI;YAClB,aAAa,EAAE,KAAK;SACrB;KACF,EACD,KAAK,IAAI,EAAE;QACT,MAAM,aAAa,GAAG,MAAM,IAAA,mBAAQ,EAClC,IAAA,gBAAI,EAAC,0BAA0B,EAAE,WAAW,CAAC,EAC7C,EAAE,QAAQ,EAAE,MAAM,EAAE,CACrB,CAAC;QACF,MAAM,SAAS,GAAG,MAAM,IAAA,mBAAQ,EAC9B,IAAA,gBAAI,EAAC,aAAa,EAAE,cAAc,CAAC,EACnC,EAAE,QAAQ,EAAE,MAAM,EAAE,CACrB,CAAC;QAEF,MAAM,IAAI,GAAG,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAErD,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAC/C,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"best-practices.d.ts","sourceRoot":"","sources":["../../src/resources/best-practices.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,SAAS,EACV,MAAM,sCAAsC,CAAC;AAE9C;;;;GAIG;AACH,wBAAsB,8BAA8B,CAAC,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAwB5G"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"best-practices.js","sourceRoot":"","sources":["../../src/resources/best-practices.ts"],"names":[],"mappings":";;AAeA,wEAwBC;AAvCD,+CAE0B;AAC1B,yCAEmB;AAKnB;;;;GAIG;AACI,KAAK,UAAU,8BAA8B,CAAC,MAAiB,EAAE,aAAqB;IAC3F,MAAM,0BAA0B,GAAG,IAAA,gBAAI,EAAC,aAAa,EAAE,gBAAgB,CAAC,CAAC;IACzE,MAAM,IAAI,GAAG,cAAc,CAAC;IAC5B,MAAM,GAAG,GAAG,GAAG,IAAI,mBAAmB,CAAC;IACvC,MAAM,CAAC,gBAAgB,CACrB,IAAI,EACJ,GAAG,EACH;QACE,KAAK,EAAE,gDAAgD;QACvD,WAAW,EAAE,MAAM,IAAA,mBAAQ,EACzB,IAAA,gBAAI,EAAC,0BAA0B,EAAE,aAAa,CAAC,EAC/C,EAAE,QAAQ,EAAE,MAAM,EAAE,CACrB;QACD,QAAQ,EAAE,eAAe;KAC1B,EACD,KAAK,IAAI,EAAE;QACT,MAAM,IAAI,GAAG,MAAM,IAAA,mBAAQ,EACzB,IAAA,gBAAI,EAAC,0BAA0B,EAAE,WAAW,CAAC,EAC7C,EAAE,QAAQ,EAAE,MAAM,EAAE,CACrB,CAAC;QAEF,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IACvC,CAAC,CACF,CAAC;AACJ,CAAC"}
|