@farm.js/plugin 0.1.35 → 0.1.36

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/dist/index.d.ts CHANGED
@@ -39,5 +39,5 @@
39
39
  * })
40
40
  * ```
41
41
  */
42
- export declare const version = "0.1.35";
42
+ export declare const version = "0.1.36";
43
43
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -39,7 +39,7 @@
39
39
  * })
40
40
  * ```
41
41
  */
42
- export const version = "0.1.35";
42
+ export const version = "0.1.36";
43
43
  // Note: Import plugins from their respective subpaths:
44
44
  // - @farm.js/plugin/rsc
45
45
  // - @farm.js/plugin/middleware
@@ -1 +1 @@
1
- {"version":3,"file":"rsc.d.ts","sourceRoot":"","sources":["../../../src/rsc/entries/rsc.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAYhD;;;GAGG;AACH,wBAAgB,mCAAmC,IAAI,MAAM,CAe5D;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,CAowC1D"}
1
+ {"version":3,"file":"rsc.d.ts","sourceRoot":"","sources":["../../../src/rsc/entries/rsc.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAYhD;;;GAGG;AACH,wBAAgB,mCAAmC,IAAI,MAAM,CAe5D;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,CAuwC1D"}
@@ -386,8 +386,11 @@ if (farmNativeMCPPlugin) {
386
386
  methods: [...route.methods],
387
387
  endpoints: { ...route.handlers },
388
388
  }));
389
- // Rejects a plugin route that would replace an app endpoint.
390
- for (const route of mergePluginAPIRoutes(mountedRoutes, [farmNativeMCPPlugin])) {
389
+ // Rejects a plugin route that would replace an app endpoint. An MCP tool calls its
390
+ // endpoint through handler(), so the middleware guarding that path runs for it.
391
+ for (const route of mergePluginAPIRoutes(mountedRoutes, [farmNativeMCPPlugin], undefined, {
392
+ dispatch: (request) => handler(request),
393
+ })) {
391
394
  for (const method of route.pluginMethods ?? []) {
392
395
  let target = apiRouteMap.get(route.path);
393
396
  if (!target) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farm.js/plugin",
3
- "version": "0.1.35",
3
+ "version": "0.1.36",
4
4
  "description": "Official plugins for Farm.js framework",
5
5
  "license": "MIT",
6
6
  "author": "Farm.js Team",
@@ -62,7 +62,7 @@
62
62
  "nitro": "3.0.260903-beta",
63
63
  "picocolors": "^1.0.0",
64
64
  "rsc-html-stream": "^0.0.4",
65
- "@farm.js/core": "0.1.35"
65
+ "@farm.js/core": "0.1.36"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@types/node": "^22.20.5",
@@ -83,7 +83,7 @@
83
83
  "react-dom": "19.2.8",
84
84
  "react-server-dom-webpack": "19.2.8",
85
85
  "vite": ">=6.0.0",
86
- "@farm.js/core": "0.1.35"
86
+ "@farm.js/core": "0.1.36"
87
87
  },
88
88
  "peerDependenciesMeta": {
89
89
  "@vitejs/plugin-rsc": {