@devframes/agentic 1.3.1 → 1.3.3
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/connect/index.d.mts +1 -3
- package/dist/connect/index.mjs +1 -2
- package/dist/index.mjs +1 -2
- package/dist/mcp/index.d.mts +1 -7
- package/dist/mcp/index.mjs +3 -6
- package/package.json +8 -8
package/dist/connect/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DevframeInstanceRecord } from "devframe/internal";
|
|
2
|
-
//#region src/connect/index.d.ts
|
|
3
2
|
export interface ConnectServerOptions {
|
|
4
3
|
/**
|
|
5
4
|
* Explicit ports to probe besides the registry, for instances started
|
|
@@ -71,5 +70,4 @@ export declare function startConnectServer(options?: ConnectServerOptions): Prom
|
|
|
71
70
|
* advertised MCP path is relative to that base, as in the registry records
|
|
72
71
|
* the instance shell writes. Exported for focused tests.
|
|
73
72
|
*/
|
|
74
|
-
export declare function probePort(port: number, base?: string, timeoutMs?: number): Promise<DevframeInstanceRecord | null>;
|
|
75
|
-
//#endregion
|
|
73
|
+
export declare function probePort(port: number, base?: string, timeoutMs?: number): Promise<DevframeInstanceRecord | null>;
|
package/dist/connect/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { Client, StreamableHTTPClientTransport } from "@modelcontextprotocol/cli
|
|
|
5
5
|
import { StdioServerTransport } from "@modelcontextprotocol/server/stdio";
|
|
6
6
|
import { Diagnostic } from "devframe/utils/nostics";
|
|
7
7
|
import { joinURL, withLeadingSlash, withTrailingSlash } from "devframe/utils/url";
|
|
8
|
-
|
|
8
|
+
// src/connect/index.ts
|
|
9
9
|
/**
|
|
10
10
|
* Resolve the per-record bearer from the {@link ConnectServerOptions.authToken}
|
|
11
11
|
* option. Exported for focused tests of the credential resolution.
|
|
@@ -249,5 +249,4 @@ function errorResult(error) {
|
|
|
249
249
|
}]
|
|
250
250
|
};
|
|
251
251
|
}
|
|
252
|
-
//#endregion
|
|
253
252
|
export { buildInstanceRequestHeaders, probePort, resolveAuthToken, startConnectServer };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
// src/index.ts
|
|
2
2
|
throw new Error("[@devframes/agentic] is not imported directly; installing it enables devframe's agent surfaces.\n • import from \"devframe/adapters/mcp\" to serve a devframe over MCP\n • run \"devframe connect\" for the stdio discovery gateway\n");
|
|
3
|
-
//#endregion
|
|
4
3
|
export {};
|
package/dist/mcp/index.d.mts
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "@modelcontextprotocol/server";
|
|
2
2
|
import { MountMcpHttpOptions, MountMcpHttpOptions as MountMcpHttpOptions$1, MountedMcpHttp, MountedMcpHttp as MountedMcpHttp$1 } from "devframe/internal";
|
|
3
3
|
import { H3 } from "h3";
|
|
4
4
|
import { CreateMcpFetchHandlerOptions, CreateMcpFetchHandlerOptions as CreateMcpFetchHandlerOptions$1, CreateMcpServerOptions, CreateMcpServerOptions as CreateMcpServerOptions$1, DevframeDefinition, DevframeNodeContext, McpConnectionInfo, McpFetchHandler, McpFetchHandler as McpFetchHandler$1, McpServerHandle, McpServerHandle as McpServerHandle$1 } from "devframe/types";
|
|
5
|
-
//#region src/mcp/build-server.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* Build an MCP server over the agent surface of a devframe definition.
|
|
8
7
|
* Currently supports `stdio` transport only.
|
|
9
8
|
*/
|
|
10
9
|
export declare function createMcpServer(definition: DevframeDefinition, options?: CreateMcpServerOptions$1): Promise<McpServerHandle$1>;
|
|
11
|
-
//#endregion
|
|
12
|
-
//#region src/mcp/fetch.d.ts
|
|
13
10
|
/**
|
|
14
11
|
* Build a framework-agnostic MCP endpoint over a devframe context: a
|
|
15
12
|
* web-standard `Request → Response` handler any host can mount: h3 (see
|
|
@@ -41,8 +38,6 @@ export declare function createMcpServer(definition: DevframeDefinition, options?
|
|
|
41
38
|
* callers.
|
|
42
39
|
*/
|
|
43
40
|
export declare function createMcpFetchHandler(ctx: DevframeNodeContext, options: CreateMcpFetchHandlerOptions$1): McpFetchHandler$1;
|
|
44
|
-
//#endregion
|
|
45
|
-
//#region src/mcp/http.d.ts
|
|
46
41
|
/**
|
|
47
42
|
* Mount a stateless MCP endpoint on an h3 app at `path`: the h3 binding over
|
|
48
43
|
* {@link createMcpFetchHandler}, which owns the per-request serving, the
|
|
@@ -57,5 +52,4 @@ export declare function createMcpFetchHandler(ctx: DevframeNodeContext, options:
|
|
|
57
52
|
* request to the SPA static catch-all).
|
|
58
53
|
*/
|
|
59
54
|
export declare function mountMcpHttp(app: H3, ctx: DevframeNodeContext, path: string, options: MountMcpHttpOptions$1): MountedMcpHttp$1;
|
|
60
|
-
//#endregion
|
|
61
55
|
export type { CreateMcpFetchHandlerOptions, CreateMcpServerOptions, McpConnectionInfo, McpFetchHandler, McpServerHandle, MountMcpHttpOptions, MountedMcpHttp };
|
package/dist/mcp/index.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { join } from "pathe";
|
|
|
9
9
|
import { timingSafeEqual } from "devframe/utils/crypto-token";
|
|
10
10
|
import { isAllowedOrigin, isLoopbackAddress } from "devframe/utils/origin";
|
|
11
11
|
import { defineHandler, getRequestIP } from "h3";
|
|
12
|
-
|
|
12
|
+
// src/mcp/build-server.ts
|
|
13
13
|
/**
|
|
14
14
|
* Build a fresh MCP {@link Server} over a devframe context, registering its
|
|
15
15
|
* tool and resource handlers. This is a pure factory: it sets up no
|
|
@@ -529,8 +529,7 @@ function parseResourceUri(uri) {
|
|
|
529
529
|
key: decoded
|
|
530
530
|
};
|
|
531
531
|
}
|
|
532
|
-
|
|
533
|
-
//#region src/mcp/fetch.ts
|
|
532
|
+
// src/mcp/fetch.ts
|
|
534
533
|
/**
|
|
535
534
|
* Parse exactly one `Authorization: Bearer <token>` credential, returning the
|
|
536
535
|
* token or `undefined` for a missing, malformed, empty, or multi-credential
|
|
@@ -625,8 +624,7 @@ function createMcpFetchHandler(ctx, options) {
|
|
|
625
624
|
}
|
|
626
625
|
};
|
|
627
626
|
}
|
|
628
|
-
|
|
629
|
-
//#region src/mcp/http.ts
|
|
627
|
+
// src/mcp/http.ts
|
|
630
628
|
/**
|
|
631
629
|
* Mount a stateless MCP endpoint on an h3 app at `path`: the h3 binding over
|
|
632
630
|
* {@link createMcpFetchHandler}, which owns the per-request serving, the
|
|
@@ -658,5 +656,4 @@ function respond(event, response) {
|
|
|
658
656
|
});
|
|
659
657
|
return response.body ?? "";
|
|
660
658
|
}
|
|
661
|
-
//#endregion
|
|
662
659
|
export { createMcpFetchHandler, createMcpServer, mountMcpHttp };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devframes/agentic",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.3",
|
|
5
5
|
"description": "Agent-surface implementation for devframe: installing it next to devframe enables the MCP adapter (devframe/adapters/mcp) and the devframe connect gateway.",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -30,19 +30,19 @@
|
|
|
30
30
|
"dist"
|
|
31
31
|
],
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"devframe": "1.3.
|
|
33
|
+
"devframe": "1.3.3"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@modelcontextprotocol/client": "^2.
|
|
37
|
-
"@modelcontextprotocol/server": "^2.
|
|
38
|
-
"h3": "^2.0.
|
|
36
|
+
"@modelcontextprotocol/client": "^2.4.0",
|
|
37
|
+
"@modelcontextprotocol/server": "^2.4.0",
|
|
38
|
+
"h3": "^2.0.8",
|
|
39
39
|
"pathe": "^2.0.3"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@standard-schema/spec": "^1.1.0",
|
|
43
|
-
"@types/node": "^26.6.
|
|
44
|
-
"devframe": "1.3.
|
|
45
|
-
"tsdown": "0.23.
|
|
43
|
+
"@types/node": "^26.6.6",
|
|
44
|
+
"devframe": "1.3.3",
|
|
45
|
+
"tsdown": "^0.23.7",
|
|
46
46
|
"valibot": "^1.5.0"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|