@feniix/bridgekit 0.9.3 → 0.9.4
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 -1
- package/dist/src/adapters/mcp.js +6 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,20 @@ All notable changes to `@feniix/bridgekit` are documented here. The format
|
|
|
4
4
|
follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project
|
|
5
5
|
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
-
## [0.9.
|
|
7
|
+
## [0.9.4] - 2026-05-27
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- `isObjectSchema` now short-circuits on `$ref` before checking
|
|
12
|
+
`type === "object"`, closing a hole where a hybrid `{type: "object", $ref:
|
|
13
|
+
"..."}` schema would bypass the construction-time `$ref` rejection
|
|
14
|
+
introduced in 0.9.3. The hybrid shape is not produced by TypeBox today;
|
|
15
|
+
the fix guards against future schema producers (including hand-crafted
|
|
16
|
+
JSON Schema). Existing `Type.Object` (no `$ref`), `Type.Cyclic` (`$ref`
|
|
17
|
+
without `type`), and `Type.Intersect` (`allOf` at root, no `$ref`)
|
|
18
|
+
behavior is unchanged. Resolves [#51](https://github.com/feniix/bridgekit/issues/51).
|
|
19
|
+
|
|
20
|
+
## [0.9.3] - 2026-05-27
|
|
8
21
|
|
|
9
22
|
### Fixed
|
|
10
23
|
|
package/dist/src/adapters/mcp.js
CHANGED
|
@@ -24,6 +24,12 @@ function isObjectSchema(schema) {
|
|
|
24
24
|
if (typeof schema !== "object" || schema === null)
|
|
25
25
|
return false;
|
|
26
26
|
const candidate = schema;
|
|
27
|
+
// $ref takes structural precedence: a hybrid {type: "object", $ref: "..."}
|
|
28
|
+
// is not an inlined object schema — it's a reference, and
|
|
29
|
+
// assertObjectShapedParameters owns the rejection recipe. Return false so
|
|
30
|
+
// the $ref branch runs.
|
|
31
|
+
if (typeof candidate.$ref === "string")
|
|
32
|
+
return false;
|
|
27
33
|
if (candidate.type === "object")
|
|
28
34
|
return true;
|
|
29
35
|
if (Array.isArray(candidate.allOf) && candidate.allOf.length > 0) {
|