@punica/form-mcp 0.4.0-next.1 → 0.4.0
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/bundled/form/package.json +1 -1
- package/bundled/form-json/package.json +1 -1
- package/bundled/form-kit/package.json +1 -1
- package/bundled/form-react/package.json +1 -1
- package/bundled/form-schema/package.json +1 -1
- package/bundled/form-service/package.json +1 -1
- package/package.json +7 -7
- package/src/knowledge.mjs +17 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"2.2.0
|
|
1
|
+
{"version":"2.2.0"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.1.0
|
|
1
|
+
{"version":"0.1.0"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.3.0
|
|
1
|
+
{"version":"0.3.0"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.2.0
|
|
1
|
+
{"version":"0.2.0"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.1.0
|
|
1
|
+
{"version":"0.1.0"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"2.2.0
|
|
1
|
+
{"version":"2.2.0"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@punica/form-mcp",
|
|
3
|
-
"version": "0.4.0
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "MCP server for Punica Form: look up the exact API of its packages, read the rules and check code that uses them.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
39
|
-
"@punica/form-json": "^0.1.0
|
|
39
|
+
"@punica/form-json": "^0.1.0",
|
|
40
40
|
"zod": "^4.6.7"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@punica/form": "^2.2.0
|
|
44
|
-
"@punica/form-service": "^2.2.0
|
|
45
|
-
"@punica/form-react": "^0.2.0
|
|
46
|
-
"@punica/form-kit": "^0.3.0
|
|
47
|
-
"@punica/form-schema": "^0.1.0
|
|
43
|
+
"@punica/form": "^2.2.0",
|
|
44
|
+
"@punica/form-service": "^2.2.0",
|
|
45
|
+
"@punica/form-react": "^0.2.0",
|
|
46
|
+
"@punica/form-kit": "^0.3.0",
|
|
47
|
+
"@punica/form-schema": "^0.1.0"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "node build.mjs",
|
package/src/knowledge.mjs
CHANGED
|
@@ -40,7 +40,23 @@ function declarationAt(source, index) {
|
|
|
40
40
|
|
|
41
41
|
function entry(source, index, kind, name) {
|
|
42
42
|
const comment = commentBefore(source, index);
|
|
43
|
-
|
|
43
|
+
// The first paragraph of the comment, without its stars, up to the end of
|
|
44
|
+
// its first sentence
|
|
45
|
+
const lines = comment
|
|
46
|
+
.replace(/^\s*\/\*+/, '')
|
|
47
|
+
.replace(/\*+\/\s*$/, '')
|
|
48
|
+
.split('\n')
|
|
49
|
+
.map((line) => line.replace(/^\s*\*+\s?/, '').trim());
|
|
50
|
+
const start = lines.findIndex((line) => line && !line.startsWith('@'));
|
|
51
|
+
const paragraph = [];
|
|
52
|
+
|
|
53
|
+
for (let i = start; i >= 0 && i < lines.length; i++) {
|
|
54
|
+
if (!lines[i] || lines[i].startsWith('@') || lines[i].startsWith('```')) break;
|
|
55
|
+
paragraph.push(lines[i]);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const text = paragraph.join(' ');
|
|
59
|
+
const summary = (/^.*?[.:](?=\s|$)/.exec(text)?.[0] ?? text).replace(/:$/, '.');
|
|
44
60
|
|
|
45
61
|
return {
|
|
46
62
|
name,
|