ai-capability-framework 1.1.0 → 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 CHANGED
@@ -4,6 +4,32 @@ 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
+
21
+ ## 1.1.1 - 2026-10-26
22
+
23
+ - Updated locked `fast-uri` to 3.1.9 and Zod to 4.6.7. The optional Zod peer now
24
+ requires 4.6.6 or newer, addressing URI normalization advisories and oversized
25
+ collection validation resource consumption. Lexical/native users do not need Zod.
26
+ - Added weekly Dependabot npm update PRs for both packages, with manual review and CI
27
+ required. No automatic merge or publication is configured.
28
+ - Added bounded dependency regressions and installed-consumer security checks. See
29
+ [consumer update instructions](SECURITY.md#dependency-security-updates): existing
30
+ application lockfiles require their own dependency refresh. Host input limits remain
31
+ necessary. Framework APIs, retrieval and authorization behavior are unchanged.
32
+
7
33
  ## 1.1.0 - 2026-10-17
8
34
 
9
35
  - Fixed the installed CLI's POSIX symlink entrypoint so `npx aicf` runs commands instead
package/SECURITY.md CHANGED
@@ -41,6 +41,67 @@ redacted or removed to protect users.
41
41
  - MCP server integrations and caller-provided identity context.
42
42
  - Host policy, auth, storage, and provider adapter hooks.
43
43
 
44
+ ## Dependency Security Updates
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
+
51
+ Version 1.1.1 raises the optional Zod minimum to 4.6.6 and updates the repository's
52
+ locked Zod to 4.6.7 and `fast-uri` to 3.1.9. Zod's collection-validation issue can
53
+ consume excessive memory; the `fast-uri` advisories concern URI normalization and
54
+ reference handling. See the
55
+ [Zod advisory](https://github.com/advisories/GHSA-mrhx-c7xc-m3w5) and
56
+ [URI advisory](https://github.com/advisories/GHSA-w74x-v6f9-j3xg).
57
+
58
+ Publishing a framework patch does not rewrite an application's existing lockfile. Update
59
+ and verify your application dependencies:
60
+
61
+ ```sh
62
+ npm install ai-capability-framework@1.1.2
63
+ npm update fast-uri
64
+ npm ls fast-uri zod
65
+ npm audit
66
+ ```
67
+
68
+ If your application already uses Zod, also update it:
69
+
70
+ ```sh
71
+ npm install zod@^4.6.6
72
+ ```
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
+
90
+ Then repeat the dependency listing, audit and application tests. `npm update fast-uri`
91
+ selects a compatible patched release within the installed dependency ranges; for the
92
+ framework's current Ajv resolution this is 3.1.9. Do not use a forced major upgrade or
93
+ assume a clean new installation repairs a different application's pinned dependency
94
+ tree. Lexical/native discovery needs neither Zod nor an optional provider SDK.
95
+
96
+ Maintain host request-size and collection limits. A patched validator does not turn an
97
+ unbounded application schema into a bounded one.
98
+
99
+ Dependabot monitors npm dependencies in both packages and proposes weekly version
100
+ updates on Monday at 05:00 Europe/London. Security alerts and security-update PRs
101
+ operate separately from that weekly schedule. Dependency PRs require review and passing
102
+ CI; they do not merge or publish automatically. The existing weekly audit remains
103
+ enabled.
104
+
44
105
  ## Public Safety
45
106
 
46
107
  Security fixes should preserve the repository boundary:
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/mcp-server/sdk.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,2BAA2B,EAC3B,0BAA0B,EAC3B,MAAM,YAAY,CAAC;AAEpB,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,0BAA0B,CAAC,CA8BrC"}
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"}
@@ -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, toolConfig(tool), handler);
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
- outputSchema: tool.outputSchema,
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/docs/release.md CHANGED
@@ -15,9 +15,9 @@ live trials.
15
15
  Use a reviewed pull request, passing hosted Linux Node 20/22/24 checks, merge, and an
16
16
  exact-commit manual release dry-run before pushing the matching version tag. Local
17
17
  checks do not replace hosted checks. Prereleases publish both packages to `next`,
18
- preserving `latest` for prereleases. Stable 1.1.0 publishes to `latest` while preserving
19
- the existing `next` tag and prerelease versions. Verify normal installation as well as
20
- exact-version registry installs.
18
+ preserving `latest` for prereleases. Stable releases publish to `latest` while
19
+ preserving the existing `next` tag and prerelease versions. Verify normal installation
20
+ as well as exact-version registry installs.
21
21
 
22
22
  The publication and dry-run workflows run `npm run check` plus certification with
23
23
  `VITEST_MAX_WORKERS=2`. Publication is serialized; registry failures fail closed unless
@@ -25,6 +25,13 @@ npm explicitly reports E404 for an absent version. Local npm login is not the OI
25
25
  publishing mechanism. Verify package ownership and the trusted publisher for both
26
26
  packages before tagging; never substitute a stored npm token.
27
27
 
28
+ For dependency security patches, include the
29
+ [consumer lockfile update instructions](../SECURITY.md#dependency-security-updates) and
30
+ verify both an SDK-free consumer and the minimum supported optional peer version.
31
+ Repository lockfile changes alone do not update existing applications. Retain the frozen
32
+ discovery qualification evidence; dependency maintenance does not establish new
33
+ model-quality results.
34
+
28
35
  ## Preflight
29
36
 
30
37
  - Confirm the release branch contains only public framework material.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-capability-framework",
3
- "version": "1.1.0",
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,13 +330,13 @@
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.29.0",
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",
337
337
  "langchain": ">=1.4.0 <2",
338
338
  "openai": ">=4.0.0",
339
- "zod": ">=4.4.3"
339
+ "zod": ">=4.6.6"
340
340
  },
341
341
  "peerDependenciesMeta": {
342
342
  "@aws-sdk/client-cloudwatch": {
@@ -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.29.0",
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.8",
413
- "zod": "^4.4.3"
412
+ "vitest": "^4.1.12",
413
+ "zod": "^4.6.6"
414
414
  }
415
415
  }