@pyreon/mcp 0.5.4 → 0.5.6
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/lib/analysis/index.js.html +1 -1
- package/lib/index.js +10 -7
- package/lib/index.js.map +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/api-reference.ts +3 -4
- package/src/index.ts +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pyreon/mcp",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.6",
|
|
4
4
|
"description": "MCP server for Pyreon — AI-powered framework assistance",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"prepublishOnly": "bun run build"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@pyreon/compiler": "0.5.
|
|
45
|
+
"@pyreon/compiler": "0.5.6",
|
|
46
46
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
47
47
|
"zod": "^3.25.76"
|
|
48
48
|
},
|
package/src/api-reference.ts
CHANGED
|
@@ -145,7 +145,7 @@ h(Fragment, null, h("h1", null, "Title"), h("p", null, "Content"))`,
|
|
|
145
145
|
},
|
|
146
146
|
|
|
147
147
|
"core/onMount": {
|
|
148
|
-
signature: "onMount(fn: () => CleanupFn |
|
|
148
|
+
signature: "onMount(fn: () => CleanupFn | void): void",
|
|
149
149
|
example: `const Timer = () => {
|
|
150
150
|
const count = signal(0)
|
|
151
151
|
|
|
@@ -156,9 +156,8 @@ h(Fragment, null, h("h1", null, "Title"), h("p", null, "Content"))`,
|
|
|
156
156
|
|
|
157
157
|
return <div>{count()}</div>
|
|
158
158
|
}`,
|
|
159
|
-
notes: "
|
|
160
|
-
mistakes: `- \`onMount(() => {
|
|
161
|
-
- Or return cleanup: \`onMount(() => { const id = setInterval(...); return () => clearInterval(id) })\``,
|
|
159
|
+
notes: "Optionally return a cleanup function that runs on unmount.",
|
|
160
|
+
mistakes: `- Forgetting cleanup: \`onMount(() => { const id = setInterval(...) })\` → Return cleanup: \`onMount(() => { const id = setInterval(...); return () => clearInterval(id) })\``,
|
|
162
161
|
},
|
|
163
162
|
|
|
164
163
|
"core/onUnmount": {
|
package/src/index.ts
CHANGED
|
@@ -21,6 +21,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"
|
|
|
21
21
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
|
|
22
22
|
import { detectReactPatterns, diagnoseError, migrateReactCode } from "@pyreon/compiler"
|
|
23
23
|
import { z } from "zod"
|
|
24
|
+
import packageJson from "../package.json" with { type: "json" }
|
|
24
25
|
import { API_REFERENCE } from "./api-reference"
|
|
25
26
|
import { generateContext, type ProjectContext } from "./project-scanner"
|
|
26
27
|
|
|
@@ -30,7 +31,7 @@ import { generateContext, type ProjectContext } from "./project-scanner"
|
|
|
30
31
|
|
|
31
32
|
const server = new McpServer({
|
|
32
33
|
name: "pyreon",
|
|
33
|
-
version:
|
|
34
|
+
version: packageJson.version,
|
|
34
35
|
})
|
|
35
36
|
|
|
36
37
|
// Cache project context (regenerated on demand)
|