@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pyreon/mcp",
3
- "version": "0.5.4",
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.4",
45
+ "@pyreon/compiler": "0.5.6",
46
46
  "@modelcontextprotocol/sdk": "^1.27.1",
47
47
  "zod": "^3.25.76"
48
48
  },
@@ -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 | undefined): void",
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: "Must return undefined or a cleanup function. Do NOT return void.",
160
- mistakes: `- \`onMount(() => { doStuff() })\` → Must return undefined: \`onMount(() => { doStuff(); return undefined })\`
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: "0.4.0",
34
+ version: packageJson.version,
34
35
  })
35
36
 
36
37
  // Cache project context (regenerated on demand)