@pyreon/mcp 0.6.0 → 0.7.1

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.6.0",
3
+ "version": "0.7.1",
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.6.0",
45
+ "@pyreon/compiler": "0.7.1",
46
46
  "@modelcontextprotocol/sdk": "^1.27.1",
47
47
  "zod": "^3.25.76"
48
48
  },
@@ -63,14 +63,21 @@ const dispose = effect(() => {
63
63
  console.log("Count is:", count())
64
64
  })
65
65
 
66
- // With cleanup:
66
+ // With onCleanup:
67
+ effect(() => {
68
+ const handler = () => console.log(count())
69
+ window.addEventListener("resize", handler)
70
+ onCleanup(() => window.removeEventListener("resize", handler))
71
+ })
72
+
73
+ // Or return cleanup (also works):
67
74
  effect(() => {
68
75
  const handler = () => console.log(count())
69
76
  window.addEventListener("resize", handler)
70
77
  return () => window.removeEventListener("resize", handler)
71
78
  })`,
72
79
  notes:
73
- "Returns a dispose function. Dependencies auto-tracked on each run. For DOM-specific effects, use renderEffect().",
80
+ "Returns a dispose function. Dependencies auto-tracked on each run. Use onCleanup() inside to register cleanup that runs before re-execution. For DOM-specific effects, use renderEffect().",
74
81
  mistakes: `- Don't pass a dependency array — Pyreon auto-tracks
75
82
  - \`effect(() => { count })\` → Must call: \`effect(() => { count() })\``,
76
83
  },