ai-capability-framework 1.1.1 → 1.1.2
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/CHANGELOG.md +14 -0
- package/SECURITY.md +23 -2
- package/dist/mcp-server/sdk.d.ts.map +1 -1
- package/dist/mcp-server/sdk.js +38 -5
- package/docs/mcp-server-runtime.md +8 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,20 @@ All notable public changes to AI Capability Framework are documented here.
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 1.1.2 - 2026-10-26
|
|
8
|
+
|
|
9
|
+
- Cleared the full development and optional-SDK dependency advisory backlog with
|
|
10
|
+
targeted compatible updates, including MCP/HTTP, test, documentation, source-map and
|
|
11
|
+
compression dependencies. Full-tree audits now accompany production audits.
|
|
12
|
+
- Raised the optional MCP SDK minimum to 1.32.0 and tested 1.32.0 and 1.32.2 through
|
|
13
|
+
actual in-memory SDK clients. Corrected the private SDK bridge to convert JSON schemas
|
|
14
|
+
into SDK-supported schemas and describe the returned runtime envelope. Authorization,
|
|
15
|
+
approval requirements and commit exclusion are unchanged.
|
|
16
|
+
- Preserved the 1.1.1 Zod and URI fixes. Existing consumer lockfiles need their own
|
|
17
|
+
targeted update and audit; see
|
|
18
|
+
[security update instructions](SECURITY.md#dependency-security-updates).
|
|
19
|
+
Lexical/native discovery still requires no optional SDK or model for retrieval.
|
|
20
|
+
|
|
7
21
|
## 1.1.1 - 2026-10-26
|
|
8
22
|
|
|
9
23
|
- Updated locked `fast-uri` to 3.1.9 and Zod to 4.6.7. The optional Zod peer now
|
package/SECURITY.md
CHANGED
|
@@ -43,6 +43,11 @@ redacted or removed to protect users.
|
|
|
43
43
|
|
|
44
44
|
## Dependency Security Updates
|
|
45
45
|
|
|
46
|
+
Version 1.1.2 updates the full repository dependency tree, including development tools
|
|
47
|
+
and optional MCP/HTTP integrations. The optional MCP SDK now requires 1.32.0 or newer;
|
|
48
|
+
the repository tests 1.32.0 and locks 1.32.2. Full and production audits run for both
|
|
49
|
+
packages. The dependency updates preserve the existing runtime and discovery contracts.
|
|
50
|
+
|
|
46
51
|
Version 1.1.1 raises the optional Zod minimum to 4.6.6 and updates the repository's
|
|
47
52
|
locked Zod to 4.6.7 and `fast-uri` to 3.1.9. Zod's collection-validation issue can
|
|
48
53
|
consume excessive memory; the `fast-uri` advisories concern URI normalization and
|
|
@@ -54,10 +59,10 @@ Publishing a framework patch does not rewrite an application's existing lockfile
|
|
|
54
59
|
and verify your application dependencies:
|
|
55
60
|
|
|
56
61
|
```sh
|
|
57
|
-
npm install ai-capability-framework@1.1.
|
|
62
|
+
npm install ai-capability-framework@1.1.2
|
|
58
63
|
npm update fast-uri
|
|
59
64
|
npm ls fast-uri zod
|
|
60
|
-
npm audit
|
|
65
|
+
npm audit
|
|
61
66
|
```
|
|
62
67
|
|
|
63
68
|
If your application already uses Zod, also update it:
|
|
@@ -66,6 +71,22 @@ If your application already uses Zod, also update it:
|
|
|
66
71
|
npm install zod@^4.6.6
|
|
67
72
|
```
|
|
68
73
|
|
|
74
|
+
If your application uses MCP, update its existing SDK and compatible HTTP dependency
|
|
75
|
+
resolutions, then inspect every nested resolution:
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
npm install @modelcontextprotocol/sdk@^1.32.2
|
|
79
|
+
npm update proxy-addr hono @hono/node-server ip-address body-parser qs
|
|
80
|
+
npm ls @modelcontextprotocol/sdk proxy-addr hono @hono/node-server ip-address body-parser qs
|
|
81
|
+
npm audit
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Verify that no old nested resolutions remain. Relevant security floors are `proxy-addr`
|
|
85
|
+
2.0.8, Hono 4.13.11, Hono Node adapter 1.19.15, `ip-address` 10.7.4, `body-parser` 2.4.0
|
|
86
|
+
and `qs` 6.16.1. A newer compatible parent may be required when a parent pins an
|
|
87
|
+
affected version exactly. Keep host authentication, trusted-proxy configuration and
|
|
88
|
+
request limits explicit; these updates do not configure them.
|
|
89
|
+
|
|
69
90
|
Then repeat the dependency listing, audit and application tests. `npm update fast-uri`
|
|
70
91
|
selects a compatible patched release within the installed dependency ranges; for the
|
|
71
92
|
framework's current Ajv resolution this is 3.1.9. Do not use a forced major upgrade or
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/mcp-server/sdk.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/mcp-server/sdk.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,2BAA2B,EAC3B,0BAA0B,EAC3B,MAAM,YAAY,CAAC;AAEpB,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,0BAA0B,CAAC,CAuCrC"}
|
package/dist/mcp-server/sdk.js
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
|
+
import { loadOptionalProviderDependency } from "../providers/shared/optional-dependency.js";
|
|
1
2
|
export async function registerAicfMcpTools(options) {
|
|
2
3
|
const server = asMcpSdkServer(options.mcpServer);
|
|
3
4
|
const list = await options.aicfServer.listTools(options.request ?? {});
|
|
5
|
+
const convertSchema = isProtocolBackedServer(options.mcpServer)
|
|
6
|
+
? (await loadOptionalProviderDependency({
|
|
7
|
+
dependencyName: "zod",
|
|
8
|
+
provider: "mcp"
|
|
9
|
+
})).fromJSONSchema
|
|
10
|
+
: undefined;
|
|
11
|
+
// Convert the complete list before registration so unsupported schemas cannot
|
|
12
|
+
// leave a partially registered SDK server. Structural host adapters keep JSON Schema.
|
|
13
|
+
const configs = list.tools.map((tool) => toolConfig(tool, convertSchema));
|
|
4
14
|
const toolNames = [];
|
|
5
|
-
for (const tool of list.tools) {
|
|
15
|
+
for (const [index, tool] of list.tools.entries()) {
|
|
6
16
|
const handler = async (args, extra) => {
|
|
7
17
|
return options.aicfServer.callTool({
|
|
8
18
|
...(isRecord(options.request) ? options.request : {}),
|
|
@@ -15,7 +25,7 @@ export async function registerAicfMcpTools(options) {
|
|
|
15
25
|
});
|
|
16
26
|
};
|
|
17
27
|
if (server.registerTool) {
|
|
18
|
-
server.registerTool(tool.name,
|
|
28
|
+
server.registerTool(tool.name, configs[index], handler);
|
|
19
29
|
}
|
|
20
30
|
else if (server.tool) {
|
|
21
31
|
server.tool(tool.name, tool.description, tool.inputSchema, handler);
|
|
@@ -27,16 +37,39 @@ export async function registerAicfMcpTools(options) {
|
|
|
27
37
|
toolNames
|
|
28
38
|
};
|
|
29
39
|
}
|
|
30
|
-
function toolConfig(tool) {
|
|
40
|
+
function toolConfig(tool, convertSchema) {
|
|
31
41
|
return {
|
|
32
42
|
_meta: tool._meta,
|
|
33
43
|
annotations: tool.annotations,
|
|
34
44
|
description: tool.description,
|
|
35
|
-
inputSchema: tool.inputSchema,
|
|
36
|
-
|
|
45
|
+
inputSchema: convertSchema ? convertSchema(tool.inputSchema) : tool.inputSchema,
|
|
46
|
+
// MCP structuredContent contains the runtime envelope, whose data is the
|
|
47
|
+
// manifest output. Validate that wire shape rather than the unwrapped data.
|
|
48
|
+
outputSchema: convertSchema && tool.outputSchema ? convertSchema({
|
|
49
|
+
type: "object",
|
|
50
|
+
properties: {
|
|
51
|
+
schemaVersion: { const: "1.0" },
|
|
52
|
+
capabilityId: { type: "string" },
|
|
53
|
+
capabilityVersion: { type: "string" },
|
|
54
|
+
operation: { enum: ["read", "prepare"] },
|
|
55
|
+
requestId: { type: "string" },
|
|
56
|
+
runId: { type: "string" },
|
|
57
|
+
status: { enum: ["success", "prepared", "approval_required", "denied", "failed", "unavailable", "validation_error"] },
|
|
58
|
+
data: tool.outputSchema
|
|
59
|
+
},
|
|
60
|
+
// Protocol errors use a minimal envelope without capability data or identity.
|
|
61
|
+
// The executor still validates successful data against the manifest schema.
|
|
62
|
+
required: ["schemaVersion", "status"],
|
|
63
|
+
additionalProperties: true
|
|
64
|
+
}) : tool.outputSchema,
|
|
37
65
|
title: tool.title
|
|
38
66
|
};
|
|
39
67
|
}
|
|
68
|
+
function isProtocolBackedServer(server) {
|
|
69
|
+
return isRecord(server) && isRecord(server.server)
|
|
70
|
+
&& typeof server.server.setRequestHandler === "function"
|
|
71
|
+
&& typeof server.connect === "function";
|
|
72
|
+
}
|
|
40
73
|
function asMcpSdkServer(server) {
|
|
41
74
|
if (!isRecord(server)) {
|
|
42
75
|
throw new Error("MCP SDK server must be an object.");
|
|
@@ -66,6 +66,14 @@ remain authoritative.
|
|
|
66
66
|
caller-provided MCP SDK server object that exposes `registerTool()` or `tool()`. It does
|
|
67
67
|
not import MCP transports or create a long-running process.
|
|
68
68
|
|
|
69
|
+
Use MCP SDK 1.32.0 or newer; 1.32.0 and 1.32.2 are tested with actual in-memory SDK
|
|
70
|
+
clients. The helper converts JSON schemas for SDK registration and returns the runtime
|
|
71
|
+
envelope as structured content. Registration captures a tool-list snapshot; refresh
|
|
72
|
+
registration when the host changes scopes. Every call still rechecks current
|
|
73
|
+
authorization, so an old registration cannot bypass a revoked permission. Refresh
|
|
74
|
+
existing consumer lockfiles as described in the
|
|
75
|
+
[security policy](../SECURITY.md#dependency-security-updates).
|
|
76
|
+
|
|
69
77
|
```ts
|
|
70
78
|
await registerAicfMcpTools({
|
|
71
79
|
aicfServer,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-capability-framework",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Provider-agnostic AI capability contracts, runtime controls, evals, and model/provider adapters.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -330,7 +330,7 @@
|
|
|
330
330
|
"@google/genai": ">=2.8.0",
|
|
331
331
|
"@langchain/core": ">=1.1.0 <2",
|
|
332
332
|
"@langfuse/client": ">=5.4.1",
|
|
333
|
-
"@modelcontextprotocol/sdk": ">=1.
|
|
333
|
+
"@modelcontextprotocol/sdk": ">=1.32.0",
|
|
334
334
|
"@openai/agents": ">=0.11.6",
|
|
335
335
|
"@opentelemetry/api": ">=1.9.1",
|
|
336
336
|
"ai": ">=6.0.0",
|
|
@@ -402,14 +402,14 @@
|
|
|
402
402
|
"@aws-sdk/client-kms": "^3.1061.0",
|
|
403
403
|
"@aws-sdk/client-sfn": "^3.1061.0",
|
|
404
404
|
"@aws-sdk/lib-dynamodb": "^3.1061.0",
|
|
405
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
405
|
+
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
406
406
|
"@openai/agents": "^0.11.6",
|
|
407
407
|
"@types/node": "^24.12.4",
|
|
408
408
|
"json-schema-to-typescript": "^15.0.4",
|
|
409
409
|
"prettier": "^3.8.3",
|
|
410
410
|
"typedoc": "^0.28.19",
|
|
411
411
|
"typescript": "^6.0.3",
|
|
412
|
-
"vitest": "^4.1.
|
|
412
|
+
"vitest": "^4.1.12",
|
|
413
413
|
"zod": "^4.6.6"
|
|
414
414
|
}
|
|
415
415
|
}
|