Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
| 1 | # @composio/json-schema-to-zod |
| 2 | |
| 3 | ## 0.4.1 |
| 4 | |
| 5 | ### Patch Changes |
| 6 | |
| 7 | - d5c1861: Update runtime dependencies, require patched Zod 4 releases where used directly, support Anthropic SDK 1.6, and update the AutoGen provider's FLAML dependency. Preserve Zod 3 compatibility fixtures and existing framework version boundaries. |
| 8 | |
| 9 | ## 0.4.0 |
| 10 | |
| 11 | ### Minor Changes |
| 12 | |
| 13 | - f119f05: Add a `@composio/json-schema-to-zod/v4` entry that builds classic Zod v4 schemas with the same `jsonSchemaToZod` and `jsonSchemaToZodShape` functions as the root entry, which keeps building Zod v3 schemas. The v4 builder forwards `format`, `contentEncoding`, `contentMediaType`, and `type: "integer"` into the schema's metadata so `z.toJSONSchema()` and the frameworks built on it render them again; `withoutAnnotations: true` turns that off. `/v4` requires zod `>= 4.1.13`, the first release whose `zod/v4` shares its metadata registry across copies, and throws at load time below it. |
| 14 | |
| 15 | The root builder now reports an issue inside a nested object once, at its own path. Issues raised by `patternProperties`, `additionalProperties`, unrecognized keys, and `oneOf` under a property previously carried that property's name twice (`['x', 'x', 'key']`). |
| 16 | |
| 17 | ### Patch Changes |
| 18 | |
| 19 | - 04fdb41: Check a string tool parameter as base64 only when its `contentEncoding` is `base64`. `format: "binary"` (raw octets in OpenAPI) and other encodings such as `base16` were validated as base64, so the Vercel, LangChain, LlamaIndex, and Claude Agent SDK providers rejected tool calls with plain text or hex in those fields, and the schema sent to the model described them as `contentEncoding: "base64"`. Those fields are now plain strings. `contentEncoding: "base64"` keeps its check, and `format: "byte"` stays unchecked. |
| 20 | |
| 21 | ## 0.3.4 |
| 22 | |
| 23 | ### Patch Changes |
| 24 | |
| 25 | - 077ceb3: Fix tool schemas rejected by OpenAI and Anthropic when a parameter uses `anyOf`, `oneOf`, `allOf`, `$ref`, or similar keywords. The converted schema is a `ZodObject` again, so the LangChain, Vercel, LlamaIndex, and Claude Agent SDK providers send tool parameters with a top-level `type: "object"`. Patterns with escapes such as `\_` or `\:` no longer fail every call to the tool. |
| 26 | - d9f6291: Tool schema `pattern` and `patternProperties` regexes now run on a linear-time engine (RE2, via `re2js`), so a hostile pattern such as `^(a+)+$` can no longer hang argument validation. A `pattern` that needs lookaround still runs on the native engine when a static check shows it cannot backtrack catastrophically, on input up to 1000 characters; otherwise it is left unenforced. A `patternProperties` key that needs lookaround or a backreference now fails conversion with an `InvalidPatternError` (reason `unsupported`). Patterns now match astral characters (emoji) as single characters, as JSON Schema's Unicode regex dialect does. |
| 27 | |
| 28 | ## 0.3.3 |
| 29 | |
| 30 | ### Patch Changes |
| 31 | |
| 32 | - b4b9fc4: Guard schema `pattern` and `patternProperties` compilation. A pattern that does not compile or exceeds 1024 characters now fails conversion with an `InvalidPatternError` that names the offending property path instead of a raw `SyntaxError`. `@composio/core` surfaces that path in the `JsonSchemaToZodError` message. No backtracking heuristic is applied: a hostile `pattern` that backtracks catastrophically remains a known limitation. |
| 33 | |
| 34 | ## 0.3.2 |
| 35 | |
| 36 | ### Patch Changes |
| 37 | |
| 38 | - ab289d6: Preserve Draft 7 acceptance across primitive, composed, referenced, conditional, and typeless schemas. Enforce sibling and object/array assertions, retain positional tuple and `additionalItems` behavior, and prevent native Zod materialization from rejecting values already accepted by the source schema. |
| 39 | |
| 40 | ## 0.3.1 |
| 41 | |
| 42 | ### Patch Changes |
| 43 | |
| 44 | - db7b576: Declare Node.js 22.22.3 as the minimum supported runtime for every published TypeScript package so package managers surface incompatible runtimes before users encounter ESM loading failures. |
| 45 | |
| 46 | ## 0.3.0 |
| 47 | |
| 48 | ### Minor Changes |
| 49 | |
| 50 | - 5e57815: Keep the content of free-form object arguments, and apply dynamic key rules only where they belong. |
| 51 | |
| 52 | An object schema with no named properties, written as `{ "type": "object" }` or `{ "properties": {} }`, used to become a strict empty object. The only value that passed was `{}`. Any real payload was rejected. Such an object is now open, so arbitrary content is accepted and preserved. This works at the root, nested inside another object, and inside array items. |
| 53 | |
| 54 | Dynamic keys are now routed to the schemas that actually claim them. Every matching `patternProperties` entry validates its key. A schema-valued `additionalProperties` applies only to keys that no declared property and no pattern matches. Before this change a key could pass by satisfying an unrelated pattern instead of its own. |
| 55 | |
| 56 | **What no longer works** |
| 57 | |
| 58 | Converting a property-less object no longer gives you a schema that rejects everything. |
| 59 | |
| 60 | ```ts |
| 61 | const schema = jsonSchemaToZod({ type: 'object' }); |
| 62 | |
| 63 | schema.parse({ anything: 1 }); |
| 64 | // before: threw, because the result was z.object({}).strict() |
| 65 | // now: returns { anything: 1 } |
| 66 | ``` |
| 67 | |
| 68 | **What to do instead** |
| 69 | |
| 70 | If you want a property-less object to stay closed, say so in the JSON Schema: |
| 71 | |
| 72 | ```ts |
| 73 | const schema = jsonSchemaToZod({ type: 'object', additionalProperties: false }); |
| 74 | |
| 75 | schema.parse({ anything: 1 }); // throws, as before |
| 76 | ``` |
| 77 | |
| 78 | Objects that name at least one property are unchanged. They still reject unknown keys when `additionalProperties` is omitted. |
| 79 | |
| 80 | ## 0.2.2 |
| 81 | |
| 82 | ### Patch Changes |
| 83 | |
| 84 | - 1503786: Model the parser-supported `min`, `max`, and `example` JSON Schema extensions in the exported recursive schema type. |
| 85 | |
| 86 | ## 0.2.1 |
| 87 | |
| 88 | ### Patch Changes |
| 89 | |
| 90 | - 58bc93b: Refresh dependency ranges and lockfiles across the workspace. |
| 91 | - fa933a6: Fix the `homepage` links in these packages' `package.json`. They pointed at `github.com/ComposioHQ/composio/tree/main/...`, but the default branch is `next` and no `main` branch exists, so every link 404'd on npm and in editor tooltips. They now point at `tree/next/...`. |
| 92 | |
| 93 | ## 0.2.0 |
| 94 | |
| 95 | ### Minor Changes |
| 96 | |
| 97 | - 025a657: Drop CommonJS entrypoints and publish the TypeScript SDK packages as ESM-only packages. This is a breaking change within the existing 0.x release line: consumers must use Node.js 22.22.3 or newer. CommonJS callers can only rely on Node's native `require(esm)` interop, and the SDK no longer ships custom CommonJS compatibility machinery or `.cjs` artifacts. |
| 98 | |
| 99 | ## 0.1.20 |
| 100 | |
| 101 | ### Patch Changes |
| 102 | |
| 103 | - eec8fd9: Bump SDK version for latest changes |
| 104 | |
| 105 | ## 0.1.19 |
| 106 | |
| 107 | ### Patch Changes |
| 108 | |
| 109 | - b5cc23f: Fix dangerously skip version check in non agentic providers, Throw error instead of process.exit when api key doesn't exist, bump zod-to-json-schema to 3.25.0, which supports "zod/3" |
| 110 | |
| 111 | ## 0.1.18 |
| 112 | |
| 113 | ### Patch Changes |
| 114 | |
| 115 | - cfc2c50: Update zod version to 4 |
| 116 | |
| 117 | ## 0.1.17 |
| 118 | |
| 119 | ### Patch Changes |
| 120 | |
| 121 | - 157bf7b: Fix array parsing |
| 122 | |
| 123 | ## 0.1.16 |
| 124 | |
| 125 | ### Patch Changes |
| 126 | |
| 127 | - 8741165: Add zod 4 support via zod/v3 and fix zod schema parsing |
| 128 | |
| 129 | ## 0.1.15 |
| 130 | |
| 131 | ### Patch Changes |
| 132 | |
| 133 | - 51033d8: Fix additional properties in nested structures |
| 134 | |
| 135 | ## 0.1.14 |
| 136 | |
| 137 | ### Patch Changes |
| 138 | |
| 139 | - 5027e18: Fix openai responses schema parsing |
| 140 | |
| 141 | ## 0.1.13 |
| 142 | |
| 143 | ### Patch Changes |
| 144 | |
| 145 | - Fix parsing of additional properties |
| 146 | |
| 147 | ## 0.1.12 |
| 148 | |
| 149 | ### Patch Changes |
| 150 | |
| 151 | - Fix additionalProperties to be always present |
| 152 | |
| 153 | ## 0.1.11 |
| 154 | |
| 155 | ### Patch Changes |
| 156 | |
| 157 | - Fix jsonSchema to zod parsing which used to eliminate min/max and examples proeperties |
| 158 | |
| 159 | ## 0.1.10 |
| 160 | |
| 161 | ### Patch Changes |
| 162 | |
| 163 | - 7276d1e: Fix issues with json schema to zod parsing causing nested objects to be marked as required |
| 164 | - 7276d1e: Fix issues with objects with default values being marked as required |
| 165 | - 06612f5: Downgrade chalk to v4 to allow CJS as well |
| 166 | - 77e96e4: Fix JSON Schema to Zod Parsing |
| 167 | - cb1b401: Bump packages for authconfig fixes |
| 168 | - Create stable release |
| 169 | |
| 170 | ## 0.1.10-next.5 |
| 171 | |
| 172 | ### Patch Changes |
| 173 | |
| 174 | - 77e96e4: Fix JSON Schema to Zod Parsing |
| 175 | |
| 176 | ## 0.1.10-next.4 |
| 177 | |
| 178 | ### Patch Changes |
| 179 | |
| 180 | - Bump packages for authconfig fixes |
| 181 | |
| 182 | ## 0.1.10-next.3 |
| 183 | |
| 184 | ### Patch Changes |
| 185 | |
| 186 | - 06612f5: Downgrade chalk to v4 to allow CJS as well |
| 187 | |
| 188 | ## 0.1.10-next.2 |
| 189 | |
| 190 | ### Patch Changes |
| 191 | |
| 192 | - Downgrade chalk to v4 to allow CJS as well |
| 193 | |
| 194 | ## 0.1.10-next.1 |
| 195 | |
| 196 | ### Patch Changes |
| 197 | |
| 198 | - Fix issues with objects with default values being marked as required |
| 199 | |
| 200 | ## 0.1.10-next.0 |
| 201 | |
| 202 | ### Patch Changes |
| 203 | |
| 204 | - Fix issues with json schema to zod parsing causing nested objects to be marked as required |
| 205 | |
| 206 | ## 0.1.9 |
| 207 | |
| 208 | ### Patch Changes |
| 209 | |
| 210 | - Add host name support in SDK |
| 211 | |
| 212 | ## 0.1.8 |
| 213 | |
| 214 | ### Patch Changes |
| 215 | |
| 216 | - 1ab34ef: Fix json schema support in tools |
| 217 | |
| 218 | ## 0.1.7 |
| 219 | |
| 220 | ### Patch Changes |
| 221 | |
| 222 | - c8e89d5: Fix telemetry transport |
| 223 | |
| 224 | ## 0.1.6 |
| 225 | |
| 226 | ### Patch Changes |
| 227 | |
| 228 | - 37a1f01: Feat better connected account creation flow |
| 229 | |
| 230 | ## 0.1.5 |
| 231 | |
| 232 | ### Patch Changes |
| 233 | |
| 234 | - df31cc2: Fix json schema parsing |
| 235 | |
| 236 | ## 0.1.2 |
| 237 | |
| 238 | ### Patch Changes |
| 239 | |
| 240 | - f943ba4: Export all the types from the core SDK |
| 241 | |
| 242 | ## 0.1.2 |
| 243 | |
| 244 | ### Patch Changes |
| 245 | |
| 246 | - 208e320: Update json schema transformations issues related to strict mode |
| 247 | |
| 248 | ## 0.1.1 |
| 249 | |
| 250 | ### Patch Changes |
| 251 | |
| 252 | - 4ddfafc: Add json schema to zod schema |