@devframes/next 0.9.19 → 0.10.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/dist/hub-client.d.mts +2 -2
- package/dist/hub.d.mts +3 -2
- package/dist/hub.mjs +2 -2
- package/dist/single.d.mts +3 -4
- package/dist/single.mjs +2 -2
- package/package.json +7 -7
package/dist/hub-client.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DevframeClientRuntime, DevframeClientRuntime as DevframeClientRuntime$1, DevframeClientRuntimeOptions, DevframeClientRuntimeOptions as DevframeClientRuntimeOptions$1 } from "@devframes/hub/client";
|
|
2
2
|
//#region src/hub-client.d.ts
|
|
3
3
|
export interface UseDevframeHubClientOptions extends DevframeClientRuntimeOptions$1 {
|
|
4
4
|
/**
|
|
@@ -26,4 +26,4 @@ export interface UseDevframeHubClientOptions extends DevframeClientRuntimeOption
|
|
|
26
26
|
*/
|
|
27
27
|
export declare function useDevframeHubClient(options?: UseDevframeHubClientOptions): DevframeClientRuntime$1 | null;
|
|
28
28
|
//#endregion
|
|
29
|
-
export type {
|
|
29
|
+
export type { DevframeClientRuntime, DevframeClientRuntimeOptions };
|
package/dist/hub.d.mts
CHANGED
|
@@ -76,8 +76,9 @@ interface DevframeNextHost {
|
|
|
76
76
|
* Serve an MCP Streamable-HTTP endpoint at `path` **in-process**, on the
|
|
77
77
|
* Next app's own origin, through the same catch-all route as the SPAs (the
|
|
78
78
|
* `/_next/mcp` shape). Built on `createMcpFetchHandler` from
|
|
79
|
-
*
|
|
80
|
-
* the app's bundle graph
|
|
79
|
+
* `@devframes/agentic/mcp` (imported lazily through the optional peer, so
|
|
80
|
+
* neither it nor the MCP SDK enters the app's bundle graph; a missing peer
|
|
81
|
+
* throws DF0079). Advertise the path in the connection meta
|
|
81
82
|
* (`mcp: { path }`, same origin, no port) and register the instance via
|
|
82
83
|
* `registerDevframeInstance` so `devframe connect` can discover it.
|
|
83
84
|
*/
|
package/dist/hub.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { importAgenticMcp } from "devframe/internal";
|
|
2
2
|
import { DEVFRAMES_HUB_BASE, normalizeHubBase } from "@devframes/hub/constants";
|
|
3
3
|
import { initHub } from "@devframes/hub/initiate";
|
|
4
4
|
import { DEVFRAME_CONNECTION_META_FILENAME } from "devframe/constants";
|
|
@@ -61,7 +61,7 @@ function createDevframeNextHost(options) {
|
|
|
61
61
|
connectionMeta = meta;
|
|
62
62
|
},
|
|
63
63
|
async mountMcp(ctx, path, mcpOptions = {}) {
|
|
64
|
-
const { createMcpFetchHandler } = await
|
|
64
|
+
const { createMcpFetchHandler } = await importAgenticMcp();
|
|
65
65
|
const handler = createMcpFetchHandler(ctx, {
|
|
66
66
|
serverName: mcpOptions.serverName ?? "devframe (next)",
|
|
67
67
|
serverVersion: mcpOptions.serverVersion ?? "0.0.0",
|
package/dist/single.d.mts
CHANGED
|
@@ -68,10 +68,9 @@ interface CreateDevframeNextHandlerOptions {
|
|
|
68
68
|
/**
|
|
69
69
|
* Expose the route-based MCP server (Streamable-HTTP) at `<base>__mcp`,
|
|
70
70
|
* on the Next app's own origin, through the same catch-all route as the
|
|
71
|
-
* SPA, and advertise it in the handler's `__connection.json`.
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
* the route regardless.
|
|
71
|
+
* SPA, and advertise it in the handler's `__connection.json`. `undefined`
|
|
72
|
+
* falls through to the `'auto'` default (mount once the agent surface is
|
|
73
|
+
* non-empty); `false` disables the route regardless.
|
|
75
74
|
*/
|
|
76
75
|
mcp?: InitDevframeOptions['mcp'];
|
|
77
76
|
/**
|
package/dist/single.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { homedir } from "node:os";
|
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
import { initDevframe } from "devframe/initiate";
|
|
5
|
-
import { normalizeBasePath, resolveBasePath
|
|
5
|
+
import { normalizeBasePath, resolveBasePath } from "devframe/internal";
|
|
6
6
|
//#region src/config.ts
|
|
7
7
|
/**
|
|
8
8
|
* Apply the Next config settings a devframe **host** requires, preserving
|
|
@@ -69,7 +69,7 @@ function defaultGetStorageDir(scope) {
|
|
|
69
69
|
* directly with `@devframes/hub`.
|
|
70
70
|
*/
|
|
71
71
|
function createDevframeNextHandler(def, options = {}) {
|
|
72
|
-
const distDir =
|
|
72
|
+
const distDir = def.clientAssets;
|
|
73
73
|
if (!distDir) throw new Error(`[@devframes/next] createDevframeNextHandler("${def.id}") needs a built SPA to serve, but "clientAssets" is not set on the devframe definition.`);
|
|
74
74
|
const base = options.base ? normalizeBasePath(options.base) : resolveBasePath(def, "hosted");
|
|
75
75
|
const key = options.key ?? `@devframes/next:${def.id}:${base}`;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devframes/next",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.10.0",
|
|
5
5
|
"description": "Next.js host integration that serves mounted devframes from an App Router route.",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"dist"
|
|
48
48
|
],
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@devframes/hub": "0.
|
|
51
|
-
"@devframes/hub-ui": "0.
|
|
52
|
-
"devframe": "0.
|
|
50
|
+
"@devframes/hub": "0.10.0",
|
|
51
|
+
"@devframes/hub-ui": "0.10.0",
|
|
52
|
+
"devframe": "0.10.0",
|
|
53
53
|
"next": "^14.0.0 || ^15.0.0 || ^16.0.0",
|
|
54
54
|
"react": "^18.0.0 || ^19.0.0"
|
|
55
55
|
},
|
|
@@ -71,11 +71,11 @@
|
|
|
71
71
|
"h3": "^2.0.1-rc.31"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@devframes/hub": "0.
|
|
75
|
-
"@devframes/hub-ui": "0.
|
|
74
|
+
"@devframes/hub": "0.10.0",
|
|
75
|
+
"@devframes/hub-ui": "0.10.0",
|
|
76
76
|
"@types/node": "^26.5.1",
|
|
77
77
|
"@types/react": "^19.3.0",
|
|
78
|
-
"devframe": "0.
|
|
78
|
+
"devframe": "0.10.0",
|
|
79
79
|
"react": "^19.3.0",
|
|
80
80
|
"tsdown": "^0.23.0"
|
|
81
81
|
},
|