@appport/mcp 1.2.0 → 1.3.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/README.md +9 -0
- package/dist/index.d.ts +1 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/projection.d.ts +15 -0
- package/dist/projection.d.ts.map +1 -0
- package/dist/projection.js +12 -0
- package/dist/projection.js.map +1 -0
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -164,3 +164,12 @@ AppPort idempotency key, timeout and trace ID (previously dropped), and its
|
|
|
164
164
|
results now carry `structuredContent` and `_meta`. Prefer `createMcpHandler` /
|
|
165
165
|
`createMcpServer`, which speak MCP; `fromToolName` is lossy for capability names
|
|
166
166
|
containing `_` and is not used internally.
|
|
167
|
+
|
|
168
|
+
## `@appport/mcp/bridge` (1.3.0)
|
|
169
|
+
|
|
170
|
+
`@appport/mcp/bridge` exports the projection only: `createMcpBridge`, `toMcpTools`, `toToolName`, `fromToolName`, `MCP_META`,
|
|
171
|
+
`MCP_ERROR_META`, `mcpErrorCategory` and their types. It never imports `@modelcontextprotocol/sdk`, at runtime or in its declarations.
|
|
172
|
+
The root `@appport/mcp` exports the same names plus the MCP server (`createMcpServer`, `createMcpHandler`), which does. The MCP SDK's own
|
|
173
|
+
declarations reference the DOM-only `HeadersInit`, so a Node-only TypeScript project (no `DOM` lib, `skipLibCheck: false`) can import
|
|
174
|
+
`@appport/mcp/bridge` but must either add the DOM lib or enable `skipLibCheck` to import the `@appport/mcp` root.
|
|
175
|
+
`@appport/sdk` takes its MCP bridge exports from this subpath.
|
package/dist/index.d.ts
CHANGED
|
@@ -10,12 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
export { createMcpServer, createMcpHandler } from "./server.js";
|
|
12
12
|
export type { McpAuthInfo, McpCallerContext, McpCallerRequest, McpHandler, McpServerOptions } from "./server.js";
|
|
13
|
-
export
|
|
14
|
-
export type { McpBridgeOptions, McpTool } from "./project.js";
|
|
15
|
-
export { MCP_ERROR_META, MCP_META, mcpErrorCategory } from "./translate.js";
|
|
16
|
-
export type { McpCallMetadata, McpErrorCategory, McpToolResult } from "./translate.js";
|
|
17
|
-
export { createMcpBridge } from "./bridge.js";
|
|
18
|
-
export type { McpBridge } from "./bridge.js";
|
|
13
|
+
export * from "./projection.js";
|
|
19
14
|
/** Turns an AppPort error into the text an agent should see. */
|
|
20
15
|
export declare function describeError(error: unknown): string;
|
|
21
16
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAChE,YAAY,EACV,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAErB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAChE,YAAY,EACV,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAErB,cAAc,iBAAiB,CAAC;AAIhC,gEAAgE;AAChE,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEpD"}
|
package/dist/index.js
CHANGED
|
@@ -9,9 +9,7 @@
|
|
|
9
9
|
* `@modelcontextprotocol/sdk`.
|
|
10
10
|
*/
|
|
11
11
|
export { createMcpServer, createMcpHandler } from "./server.js";
|
|
12
|
-
export
|
|
13
|
-
export { MCP_ERROR_META, MCP_META, mcpErrorCategory } from "./translate.js";
|
|
14
|
-
export { createMcpBridge } from "./bridge.js";
|
|
12
|
+
export * from "./projection.js";
|
|
15
13
|
import { AppPortError } from "@appport/protocol";
|
|
16
14
|
/** Turns an AppPort error into the text an agent should see. */
|
|
17
15
|
export function describeError(error) {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAShE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAShE,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,gEAAgE;AAChE,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,OAAO,YAAY,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,uCAAuC,CAAC;AAC9G,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The MCP projection of an AppPort application: tool derivation, call translation and the bridge.
|
|
3
|
+
*
|
|
4
|
+
* Nothing here touches `@modelcontextprotocol/sdk`, at runtime or in its declarations. That matters to a consumer: the MCP SDK's own
|
|
5
|
+
* declarations reference the DOM-only `HeadersInit`, so any module graph that reaches them cannot compile in a Node-only TypeScript
|
|
6
|
+
* project. `@appport/mcp/bridge` is therefore safe to import from code that must stay Node-only (the SDK root does exactly that);
|
|
7
|
+
* `@appport/mcp` (the root) additionally exports the MCP server, which does use the MCP SDK.
|
|
8
|
+
*/
|
|
9
|
+
export { toMcpTools, toToolName, fromToolName } from "./project.js";
|
|
10
|
+
export type { McpBridgeOptions, McpTool } from "./project.js";
|
|
11
|
+
export { MCP_ERROR_META, MCP_META, mcpErrorCategory } from "./translate.js";
|
|
12
|
+
export type { McpCallMetadata, McpErrorCategory, McpToolResult } from "./translate.js";
|
|
13
|
+
export { createMcpBridge } from "./bridge.js";
|
|
14
|
+
export type { McpBridge } from "./bridge.js";
|
|
15
|
+
//# sourceMappingURL=projection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projection.d.ts","sourceRoot":"","sources":["../src/projection.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACpE,YAAY,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC5E,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEvF,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The MCP projection of an AppPort application: tool derivation, call translation and the bridge.
|
|
3
|
+
*
|
|
4
|
+
* Nothing here touches `@modelcontextprotocol/sdk`, at runtime or in its declarations. That matters to a consumer: the MCP SDK's own
|
|
5
|
+
* declarations reference the DOM-only `HeadersInit`, so any module graph that reaches them cannot compile in a Node-only TypeScript
|
|
6
|
+
* project. `@appport/mcp/bridge` is therefore safe to import from code that must stay Node-only (the SDK root does exactly that);
|
|
7
|
+
* `@appport/mcp` (the root) additionally exports the MCP server, which does use the MCP SDK.
|
|
8
|
+
*/
|
|
9
|
+
export { toMcpTools, toToolName, fromToolName } from "./project.js";
|
|
10
|
+
export { MCP_ERROR_META, MCP_META, mcpErrorCategory } from "./translate.js";
|
|
11
|
+
export { createMcpBridge } from "./bridge.js";
|
|
12
|
+
//# sourceMappingURL=projection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projection.js","sourceRoot":"","sources":["../src/projection.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAGpE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAG5E,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appport/mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Expose AppPort capabilities as MCP tools.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"engines": { "node": ">=20" },
|
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
".": {
|
|
17
17
|
"types": "./dist/index.d.ts",
|
|
18
18
|
"import": "./dist/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./bridge": {
|
|
21
|
+
"types": "./dist/projection.d.ts",
|
|
22
|
+
"import": "./dist/projection.js"
|
|
19
23
|
}
|
|
20
24
|
},
|
|
21
25
|
"files": [
|
|
@@ -27,7 +31,7 @@
|
|
|
27
31
|
"clean": "tsc -b --clean"
|
|
28
32
|
},
|
|
29
33
|
"dependencies": {
|
|
30
|
-
"@appport/core": "1.
|
|
34
|
+
"@appport/core": "1.2.0",
|
|
31
35
|
"@appport/protocol": "1.1.0",
|
|
32
36
|
"@modelcontextprotocol/sdk": "^1.31.0"
|
|
33
37
|
},
|