fastmcp 4.23.6 → 4.23.7
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/dist/FastMCP.cjs +3 -3
- package/dist/FastMCP.d.cts +2 -1
- package/dist/FastMCP.d.ts +2 -1
- package/dist/FastMCP.js +2 -2
- package/dist/{chunk-5QKBH7JC.js → chunk-7WNI6AGD.js} +47 -13
- package/dist/chunk-7WNI6AGD.js.map +1 -0
- package/dist/{chunk-O22SYZMC.cjs → chunk-MPFPOZ2H.cjs} +16 -2
- package/dist/chunk-MPFPOZ2H.cjs.map +1 -0
- package/dist/{chunk-2PXF6JQB.cjs → chunk-TBMRFQ6M.cjs} +46 -12
- package/dist/chunk-TBMRFQ6M.cjs.map +1 -0
- package/dist/{chunk-UMDUIBFW.js → chunk-YZ5QEHBX.js} +16 -2
- package/dist/chunk-YZ5QEHBX.js.map +1 -0
- package/dist/edge/index.cjs +4 -4
- package/dist/edge/index.cjs.map +1 -1
- package/dist/edge/index.js +4 -4
- package/dist/edge/index.js.map +1 -1
- package/dist/examples/custom-routes.cjs +3 -3
- package/dist/examples/custom-routes.js +2 -2
- package/dist/openapi/index.cjs +7 -7
- package/dist/openapi/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-2PXF6JQB.cjs.map +0 -1
- package/dist/chunk-5QKBH7JC.js.map +0 -1
- package/dist/chunk-O22SYZMC.cjs.map +0 -1
- package/dist/chunk-UMDUIBFW.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/fastmcp/fastmcp/dist/chunk-O22SYZMC.cjs","../src/strictInputSchema.ts"],"names":[],"mappings":"AAAA;ACsBO,SAAS,iBAAA,CACd,MAAA,EACA,OAAA,EAAS,KAAA,EACG;AACZ,EAAA,MAAM,EAAE,oBAAA,EAAsB,WAAW,EAAA,EAAI,MAAA;AAC7C,EAAA,MAAM,0BAAA,EACJ,MAAA,CAAO,IAAA,kBAAK,UAAA,UAAc,CAAC,GAAC,CAAA,CAAE,OAAA,IAAW,EAAA,GAAA,CACxC,OAAO,qBAAA,IAAyB,SAAA,GAC/B,qBAAA,IAAyB,KAAA,GACxB,OAAA,GAAU,qBAAA,IAAyB,KAAA,EAAA,GAAa,CAAC,UAAA,CAAA;AAEtD,EAAA,OAAO;AAAA,IACL,GAAG,MAAA;AAAA,IACH,GAAI,0BAAA,EAA4B,CAAC,EAAA,EAAI,EAAE,oBAAA,EAAsB,MAAM,CAAA;AAAA,IACnE,GAAI,WAAA,GAAc;AAAA,MAChB,UAAA,EAAY,MAAA,CAAO,WAAA;AAAA,QACjB,MAAA,CAAO,OAAA,CAAQ,UAAU,CAAA,CAAE,GAAA,CAAI,CAAC,CAAC,GAAA,EAAK,KAAK,CAAA,EAAA,GAAM;AAAA,UAC/C,GAAA;AAAA,UACA,OAAO,MAAA,IAAU,SAAA,GAAY,KAAA,CAAM,KAAA,IAAS,SAAA,EACxC,iBAAA,CAAkB,KAAA,EAAO,IAAI,EAAA,EAC7B;AAAA,QACN,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EACF,CAAA;AACF;AD9BA;AACA;AACE;AACF,8CAAC","file":"/home/runner/work/fastmcp/fastmcp/dist/chunk-O22SYZMC.cjs","sourcesContent":[null,"import type { JsonSchema } from \"xsschema\";\n\n/**\n * Closes tool input objects to undeclared keys, like xsschema's\n * `strictJsonSchema`, except for objects made only of additional properties.\n * Closing one of those advertises an object that accepts nothing but `{}`,\n * while the tool's own validation still takes any key, so it keeps whatever\n * `additionalProperties` it declared — or none:\n *\n * - a dictionary, whose `additionalProperties` is a schema (`z.record()`, an\n * OpenAPI map), keeps its value schema;\n * - a free-form object, which declares `additionalProperties: true`, or, as an\n * argument, is a bare `{ type: \"object\" }` (OpenAPI's usual spelling), stays\n * open.\n *\n * An object that declares an empty `properties`, or a bare one at the top of\n * the input, is still closed: that is how a schema says \"no keys\" —\n * `z.object({})`, or a tool without arguments.\n *\n * Shared by both runtimes, so a tool's advertised input schema does not depend\n * on whether it is served by `FastMCP` or `EdgeFastMCP`.\n */\nexport function strictInputSchema(\n schema: JsonSchema,\n nested = false,\n): JsonSchema {\n const { additionalProperties, properties } = schema;\n const keepsAdditionalProperties =\n Object.keys(properties ?? {}).length === 0 &&\n (typeof additionalProperties === \"object\" ||\n additionalProperties === true ||\n (nested && additionalProperties === undefined && !properties));\n\n return {\n ...schema,\n ...(keepsAdditionalProperties ? {} : { additionalProperties: false }),\n ...(properties && {\n properties: Object.fromEntries(\n Object.entries(properties).map(([key, value]) => [\n key,\n typeof value === \"object\" && value.type === \"object\"\n ? strictInputSchema(value, true)\n : value,\n ]),\n ),\n }),\n };\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/strictInputSchema.ts"],"sourcesContent":["import type { JsonSchema } from \"xsschema\";\n\n/**\n * Closes tool input objects to undeclared keys, like xsschema's\n * `strictJsonSchema`, except for objects made only of additional properties.\n * Closing one of those advertises an object that accepts nothing but `{}`,\n * while the tool's own validation still takes any key, so it keeps whatever\n * `additionalProperties` it declared — or none:\n *\n * - a dictionary, whose `additionalProperties` is a schema (`z.record()`, an\n * OpenAPI map), keeps its value schema;\n * - a free-form object, which declares `additionalProperties: true`, or, as an\n * argument, is a bare `{ type: \"object\" }` (OpenAPI's usual spelling), stays\n * open.\n *\n * An object that declares an empty `properties`, or a bare one at the top of\n * the input, is still closed: that is how a schema says \"no keys\" —\n * `z.object({})`, or a tool without arguments.\n *\n * Shared by both runtimes, so a tool's advertised input schema does not depend\n * on whether it is served by `FastMCP` or `EdgeFastMCP`.\n */\nexport function strictInputSchema(\n schema: JsonSchema,\n nested = false,\n): JsonSchema {\n const { additionalProperties, properties } = schema;\n const keepsAdditionalProperties =\n Object.keys(properties ?? {}).length === 0 &&\n (typeof additionalProperties === \"object\" ||\n additionalProperties === true ||\n (nested && additionalProperties === undefined && !properties));\n\n return {\n ...schema,\n ...(keepsAdditionalProperties ? {} : { additionalProperties: false }),\n ...(properties && {\n properties: Object.fromEntries(\n Object.entries(properties).map(([key, value]) => [\n key,\n typeof value === \"object\" && value.type === \"object\"\n ? strictInputSchema(value, true)\n : value,\n ]),\n ),\n }),\n };\n}\n"],"mappings":";AAsBO,SAAS,kBACd,QACA,SAAS,OACG;AACZ,QAAM,EAAE,sBAAsB,WAAW,IAAI;AAC7C,QAAM,4BACJ,OAAO,KAAK,cAAc,CAAC,CAAC,EAAE,WAAW,MACxC,OAAO,yBAAyB,YAC/B,yBAAyB,QACxB,UAAU,yBAAyB,UAAa,CAAC;AAEtD,SAAO;AAAA,IACL,GAAG;AAAA,IACH,GAAI,4BAA4B,CAAC,IAAI,EAAE,sBAAsB,MAAM;AAAA,IACnE,GAAI,cAAc;AAAA,MAChB,YAAY,OAAO;AAAA,QACjB,OAAO,QAAQ,UAAU,EAAE,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM;AAAA,UAC/C;AAAA,UACA,OAAO,UAAU,YAAY,MAAM,SAAS,WACxC,kBAAkB,OAAO,IAAI,IAC7B;AAAA,QACN,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
|