toolcraft 0.0.115 → 0.0.116
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/composition.json +2 -27
- package/dist/composition.json +2 -27
- package/node_modules/tiny-stdio-mcp-server/dist/composition.json +15 -0
- package/node_modules/tiny-stdio-mcp-server/dist/server.js +21 -16
- package/node_modules/tiny-stdio-mcp-server/package.json +3 -1
- package/node_modules/toolcraft-schema/dist/index.d.ts +2 -0
- package/node_modules/toolcraft-schema/dist/index.js +1 -0
- package/node_modules/toolcraft-schema/dist/json-schema/compiler.d.ts +11 -0
- package/node_modules/toolcraft-schema/dist/json-schema/compiler.js +390 -0
- package/node_modules/toolcraft-schema/dist/json-schema/evaluate.d.ts +3 -0
- package/node_modules/toolcraft-schema/dist/json-schema/evaluate.js +442 -0
- package/node_modules/toolcraft-schema/dist/json-schema/index.d.ts +5 -0
- package/node_modules/toolcraft-schema/dist/json-schema/index.js +19 -0
- package/node_modules/toolcraft-schema/dist/json-schema/types.d.ts +33 -0
- package/node_modules/toolcraft-schema/dist/json-schema/types.js +1 -0
- package/node_modules/toolcraft-schema/dist/json-schema/utils.d.ts +19 -0
- package/node_modules/toolcraft-schema/dist/json-schema/utils.js +171 -0
- package/node_modules/toolcraft-schema/dist/validate.d.ts +1 -0
- package/node_modules/toolcraft-schema/package.json +3 -3
- package/package.json +4 -6
- package/node_modules/ajv/.runkit_example.js +0 -23
- package/node_modules/ajv/LICENSE +0 -22
- package/node_modules/ajv/README.md +0 -207
- package/node_modules/ajv/dist/2019.d.ts +0 -19
- package/node_modules/ajv/dist/2019.js +0 -61
- package/node_modules/ajv/dist/2019.js.map +0 -1
- package/node_modules/ajv/dist/2020.d.ts +0 -19
- package/node_modules/ajv/dist/2020.js +0 -55
- package/node_modules/ajv/dist/2020.js.map +0 -1
- package/node_modules/ajv/dist/ajv.d.ts +0 -18
- package/node_modules/ajv/dist/ajv.js +0 -50
- package/node_modules/ajv/dist/ajv.js.map +0 -1
- package/node_modules/ajv/dist/compile/codegen/code.d.ts +0 -40
- package/node_modules/ajv/dist/compile/codegen/code.js +0 -156
- package/node_modules/ajv/dist/compile/codegen/code.js.map +0 -1
- package/node_modules/ajv/dist/compile/codegen/index.d.ts +0 -79
- package/node_modules/ajv/dist/compile/codegen/index.js +0 -697
- package/node_modules/ajv/dist/compile/codegen/index.js.map +0 -1
- package/node_modules/ajv/dist/compile/codegen/scope.d.ts +0 -79
- package/node_modules/ajv/dist/compile/codegen/scope.js +0 -143
- package/node_modules/ajv/dist/compile/codegen/scope.js.map +0 -1
- package/node_modules/ajv/dist/compile/errors.d.ts +0 -13
- package/node_modules/ajv/dist/compile/errors.js +0 -123
- package/node_modules/ajv/dist/compile/errors.js.map +0 -1
- package/node_modules/ajv/dist/compile/index.d.ts +0 -80
- package/node_modules/ajv/dist/compile/index.js +0 -242
- package/node_modules/ajv/dist/compile/index.js.map +0 -1
- package/node_modules/ajv/dist/compile/jtd/parse.d.ts +0 -4
- package/node_modules/ajv/dist/compile/jtd/parse.js +0 -350
- package/node_modules/ajv/dist/compile/jtd/parse.js.map +0 -1
- package/node_modules/ajv/dist/compile/jtd/serialize.d.ts +0 -4
- package/node_modules/ajv/dist/compile/jtd/serialize.js +0 -236
- package/node_modules/ajv/dist/compile/jtd/serialize.js.map +0 -1
- package/node_modules/ajv/dist/compile/jtd/types.d.ts +0 -6
- package/node_modules/ajv/dist/compile/jtd/types.js +0 -14
- package/node_modules/ajv/dist/compile/jtd/types.js.map +0 -1
- package/node_modules/ajv/dist/compile/names.d.ts +0 -20
- package/node_modules/ajv/dist/compile/names.js +0 -28
- package/node_modules/ajv/dist/compile/names.js.map +0 -1
- package/node_modules/ajv/dist/compile/ref_error.d.ts +0 -6
- package/node_modules/ajv/dist/compile/ref_error.js +0 -12
- package/node_modules/ajv/dist/compile/ref_error.js.map +0 -1
- package/node_modules/ajv/dist/compile/resolve.d.ts +0 -12
- package/node_modules/ajv/dist/compile/resolve.js +0 -155
- package/node_modules/ajv/dist/compile/resolve.js.map +0 -1
- package/node_modules/ajv/dist/compile/rules.d.ts +0 -28
- package/node_modules/ajv/dist/compile/rules.js +0 -26
- package/node_modules/ajv/dist/compile/rules.js.map +0 -1
- package/node_modules/ajv/dist/compile/util.d.ts +0 -40
- package/node_modules/ajv/dist/compile/util.js +0 -178
- package/node_modules/ajv/dist/compile/util.js.map +0 -1
- package/node_modules/ajv/dist/compile/validate/applicability.d.ts +0 -6
- package/node_modules/ajv/dist/compile/validate/applicability.js +0 -19
- package/node_modules/ajv/dist/compile/validate/applicability.js.map +0 -1
- package/node_modules/ajv/dist/compile/validate/boolSchema.d.ts +0 -4
- package/node_modules/ajv/dist/compile/validate/boolSchema.js +0 -50
- package/node_modules/ajv/dist/compile/validate/boolSchema.js.map +0 -1
- package/node_modules/ajv/dist/compile/validate/dataType.d.ts +0 -17
- package/node_modules/ajv/dist/compile/validate/dataType.js +0 -203
- package/node_modules/ajv/dist/compile/validate/dataType.js.map +0 -1
- package/node_modules/ajv/dist/compile/validate/defaults.d.ts +0 -2
- package/node_modules/ajv/dist/compile/validate/defaults.js +0 -35
- package/node_modules/ajv/dist/compile/validate/defaults.js.map +0 -1
- package/node_modules/ajv/dist/compile/validate/index.d.ts +0 -42
- package/node_modules/ajv/dist/compile/validate/index.js +0 -520
- package/node_modules/ajv/dist/compile/validate/index.js.map +0 -1
- package/node_modules/ajv/dist/compile/validate/keyword.d.ts +0 -8
- package/node_modules/ajv/dist/compile/validate/keyword.js +0 -124
- package/node_modules/ajv/dist/compile/validate/keyword.js.map +0 -1
- package/node_modules/ajv/dist/compile/validate/subschema.d.ts +0 -47
- package/node_modules/ajv/dist/compile/validate/subschema.js +0 -81
- package/node_modules/ajv/dist/compile/validate/subschema.js.map +0 -1
- package/node_modules/ajv/dist/core.d.ts +0 -174
- package/node_modules/ajv/dist/core.js +0 -618
- package/node_modules/ajv/dist/core.js.map +0 -1
- package/node_modules/ajv/dist/jtd.d.ts +0 -47
- package/node_modules/ajv/dist/jtd.js +0 -72
- package/node_modules/ajv/dist/jtd.js.map +0 -1
- package/node_modules/ajv/dist/refs/data.json +0 -13
- package/node_modules/ajv/dist/refs/json-schema-2019-09/index.d.ts +0 -2
- package/node_modules/ajv/dist/refs/json-schema-2019-09/index.js +0 -28
- package/node_modules/ajv/dist/refs/json-schema-2019-09/index.js.map +0 -1
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/applicator.json +0 -53
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/content.json +0 -17
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/core.json +0 -57
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/format.json +0 -14
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/meta-data.json +0 -37
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json +0 -90
- package/node_modules/ajv/dist/refs/json-schema-2019-09/schema.json +0 -39
- package/node_modules/ajv/dist/refs/json-schema-2020-12/index.d.ts +0 -2
- package/node_modules/ajv/dist/refs/json-schema-2020-12/index.js +0 -30
- package/node_modules/ajv/dist/refs/json-schema-2020-12/index.js.map +0 -1
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json +0 -48
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json +0 -17
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json +0 -51
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json +0 -14
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json +0 -37
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json +0 -15
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json +0 -90
- package/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json +0 -55
- package/node_modules/ajv/dist/refs/json-schema-draft-06.json +0 -137
- package/node_modules/ajv/dist/refs/json-schema-draft-07.json +0 -151
- package/node_modules/ajv/dist/refs/json-schema-secure.json +0 -88
- package/node_modules/ajv/dist/refs/jtd-schema.d.ts +0 -3
- package/node_modules/ajv/dist/refs/jtd-schema.js +0 -118
- package/node_modules/ajv/dist/refs/jtd-schema.js.map +0 -1
- package/node_modules/ajv/dist/runtime/equal.d.ts +0 -6
- package/node_modules/ajv/dist/runtime/equal.js +0 -7
- package/node_modules/ajv/dist/runtime/equal.js.map +0 -1
- package/node_modules/ajv/dist/runtime/parseJson.d.ts +0 -18
- package/node_modules/ajv/dist/runtime/parseJson.js +0 -185
- package/node_modules/ajv/dist/runtime/parseJson.js.map +0 -1
- package/node_modules/ajv/dist/runtime/quote.d.ts +0 -5
- package/node_modules/ajv/dist/runtime/quote.js +0 -30
- package/node_modules/ajv/dist/runtime/quote.js.map +0 -1
- package/node_modules/ajv/dist/runtime/re2.d.ts +0 -6
- package/node_modules/ajv/dist/runtime/re2.js +0 -6
- package/node_modules/ajv/dist/runtime/re2.js.map +0 -1
- package/node_modules/ajv/dist/runtime/timestamp.d.ts +0 -5
- package/node_modules/ajv/dist/runtime/timestamp.js +0 -42
- package/node_modules/ajv/dist/runtime/timestamp.js.map +0 -1
- package/node_modules/ajv/dist/runtime/ucs2length.d.ts +0 -5
- package/node_modules/ajv/dist/runtime/ucs2length.js +0 -24
- package/node_modules/ajv/dist/runtime/ucs2length.js.map +0 -1
- package/node_modules/ajv/dist/runtime/uri.d.ts +0 -6
- package/node_modules/ajv/dist/runtime/uri.js +0 -6
- package/node_modules/ajv/dist/runtime/uri.js.map +0 -1
- package/node_modules/ajv/dist/runtime/validation_error.d.ts +0 -7
- package/node_modules/ajv/dist/runtime/validation_error.js +0 -11
- package/node_modules/ajv/dist/runtime/validation_error.js.map +0 -1
- package/node_modules/ajv/dist/standalone/index.d.ts +0 -6
- package/node_modules/ajv/dist/standalone/index.js +0 -90
- package/node_modules/ajv/dist/standalone/index.js.map +0 -1
- package/node_modules/ajv/dist/standalone/instance.d.ts +0 -12
- package/node_modules/ajv/dist/standalone/instance.js +0 -35
- package/node_modules/ajv/dist/standalone/instance.js.map +0 -1
- package/node_modules/ajv/dist/types/index.d.ts +0 -183
- package/node_modules/ajv/dist/types/index.js +0 -3
- package/node_modules/ajv/dist/types/index.js.map +0 -1
- package/node_modules/ajv/dist/types/json-schema.d.ts +0 -125
- package/node_modules/ajv/dist/types/json-schema.js +0 -3
- package/node_modules/ajv/dist/types/json-schema.js.map +0 -1
- package/node_modules/ajv/dist/types/jtd-schema.d.ts +0 -174
- package/node_modules/ajv/dist/types/jtd-schema.js +0 -3
- package/node_modules/ajv/dist/types/jtd-schema.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/applicator/additionalItems.d.ts +0 -8
- package/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +0 -49
- package/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.d.ts +0 -6
- package/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +0 -106
- package/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/applicator/allOf.d.ts +0 -3
- package/node_modules/ajv/dist/vocabularies/applicator/allOf.js +0 -23
- package/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/applicator/anyOf.d.ts +0 -4
- package/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +0 -12
- package/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/applicator/contains.d.ts +0 -7
- package/node_modules/ajv/dist/vocabularies/applicator/contains.js +0 -95
- package/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts +0 -21
- package/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +0 -85
- package/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.d.ts +0 -3
- package/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js +0 -11
- package/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/applicator/if.d.ts +0 -6
- package/node_modules/ajv/dist/vocabularies/applicator/if.js +0 -66
- package/node_modules/ajv/dist/vocabularies/applicator/if.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/applicator/index.d.ts +0 -13
- package/node_modules/ajv/dist/vocabularies/applicator/index.js +0 -44
- package/node_modules/ajv/dist/vocabularies/applicator/index.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/applicator/items.d.ts +0 -5
- package/node_modules/ajv/dist/vocabularies/applicator/items.js +0 -52
- package/node_modules/ajv/dist/vocabularies/applicator/items.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts +0 -6
- package/node_modules/ajv/dist/vocabularies/applicator/items2020.js +0 -30
- package/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/applicator/not.d.ts +0 -4
- package/node_modules/ajv/dist/vocabularies/applicator/not.js +0 -26
- package/node_modules/ajv/dist/vocabularies/applicator/not.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/applicator/oneOf.d.ts +0 -6
- package/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +0 -60
- package/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/applicator/patternProperties.d.ts +0 -3
- package/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +0 -75
- package/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/applicator/prefixItems.d.ts +0 -3
- package/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +0 -12
- package/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/applicator/properties.d.ts +0 -3
- package/node_modules/ajv/dist/vocabularies/applicator/properties.js +0 -54
- package/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/applicator/propertyNames.d.ts +0 -6
- package/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +0 -38
- package/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/applicator/thenElse.d.ts +0 -3
- package/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +0 -13
- package/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/code.d.ts +0 -17
- package/node_modules/ajv/dist/vocabularies/code.js +0 -131
- package/node_modules/ajv/dist/vocabularies/code.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/core/id.d.ts +0 -3
- package/node_modules/ajv/dist/vocabularies/core/id.js +0 -10
- package/node_modules/ajv/dist/vocabularies/core/id.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/core/index.d.ts +0 -3
- package/node_modules/ajv/dist/vocabularies/core/index.js +0 -16
- package/node_modules/ajv/dist/vocabularies/core/index.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/core/ref.d.ts +0 -8
- package/node_modules/ajv/dist/vocabularies/core/ref.js +0 -122
- package/node_modules/ajv/dist/vocabularies/core/ref.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/discriminator/index.d.ts +0 -5
- package/node_modules/ajv/dist/vocabularies/discriminator/index.js +0 -104
- package/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/discriminator/types.d.ts +0 -10
- package/node_modules/ajv/dist/vocabularies/discriminator/types.js +0 -9
- package/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/draft2020.d.ts +0 -3
- package/node_modules/ajv/dist/vocabularies/draft2020.js +0 -23
- package/node_modules/ajv/dist/vocabularies/draft2020.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/draft7.d.ts +0 -3
- package/node_modules/ajv/dist/vocabularies/draft7.js +0 -17
- package/node_modules/ajv/dist/vocabularies/draft7.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.d.ts +0 -5
- package/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +0 -30
- package/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.d.ts +0 -5
- package/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js +0 -51
- package/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/dynamic/index.d.ts +0 -3
- package/node_modules/ajv/dist/vocabularies/dynamic/index.js +0 -9
- package/node_modules/ajv/dist/vocabularies/dynamic/index.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.d.ts +0 -3
- package/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +0 -16
- package/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.d.ts +0 -3
- package/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js +0 -10
- package/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/errors.d.ts +0 -9
- package/node_modules/ajv/dist/vocabularies/errors.js +0 -3
- package/node_modules/ajv/dist/vocabularies/errors.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/format/format.d.ts +0 -8
- package/node_modules/ajv/dist/vocabularies/format/format.js +0 -92
- package/node_modules/ajv/dist/vocabularies/format/format.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/format/index.d.ts +0 -3
- package/node_modules/ajv/dist/vocabularies/format/index.js +0 -6
- package/node_modules/ajv/dist/vocabularies/format/index.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/jtd/discriminator.d.ts +0 -6
- package/node_modules/ajv/dist/vocabularies/jtd/discriminator.js +0 -71
- package/node_modules/ajv/dist/vocabularies/jtd/discriminator.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/jtd/elements.d.ts +0 -5
- package/node_modules/ajv/dist/vocabularies/jtd/elements.js +0 -24
- package/node_modules/ajv/dist/vocabularies/jtd/elements.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/jtd/enum.d.ts +0 -6
- package/node_modules/ajv/dist/vocabularies/jtd/enum.js +0 -43
- package/node_modules/ajv/dist/vocabularies/jtd/enum.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/jtd/error.d.ts +0 -9
- package/node_modules/ajv/dist/vocabularies/jtd/error.js +0 -20
- package/node_modules/ajv/dist/vocabularies/jtd/error.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/jtd/index.d.ts +0 -10
- package/node_modules/ajv/dist/vocabularies/jtd/index.js +0 -29
- package/node_modules/ajv/dist/vocabularies/jtd/index.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/jtd/metadata.d.ts +0 -5
- package/node_modules/ajv/dist/vocabularies/jtd/metadata.js +0 -25
- package/node_modules/ajv/dist/vocabularies/jtd/metadata.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/jtd/nullable.d.ts +0 -4
- package/node_modules/ajv/dist/vocabularies/jtd/nullable.js +0 -22
- package/node_modules/ajv/dist/vocabularies/jtd/nullable.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.d.ts +0 -3
- package/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js +0 -15
- package/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/jtd/properties.d.ts +0 -22
- package/node_modules/ajv/dist/vocabularies/jtd/properties.js +0 -149
- package/node_modules/ajv/dist/vocabularies/jtd/properties.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/jtd/ref.d.ts +0 -4
- package/node_modules/ajv/dist/vocabularies/jtd/ref.js +0 -67
- package/node_modules/ajv/dist/vocabularies/jtd/ref.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/jtd/type.d.ts +0 -10
- package/node_modules/ajv/dist/vocabularies/jtd/type.js +0 -69
- package/node_modules/ajv/dist/vocabularies/jtd/type.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/jtd/union.d.ts +0 -3
- package/node_modules/ajv/dist/vocabularies/jtd/union.js +0 -12
- package/node_modules/ajv/dist/vocabularies/jtd/union.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/jtd/values.d.ts +0 -5
- package/node_modules/ajv/dist/vocabularies/jtd/values.js +0 -51
- package/node_modules/ajv/dist/vocabularies/jtd/values.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/metadata.d.ts +0 -3
- package/node_modules/ajv/dist/vocabularies/metadata.js +0 -18
- package/node_modules/ajv/dist/vocabularies/metadata.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/next.d.ts +0 -3
- package/node_modules/ajv/dist/vocabularies/next.js +0 -8
- package/node_modules/ajv/dist/vocabularies/next.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/unevaluated/index.d.ts +0 -3
- package/node_modules/ajv/dist/vocabularies/unevaluated/index.js +0 -7
- package/node_modules/ajv/dist/vocabularies/unevaluated/index.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.d.ts +0 -6
- package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +0 -40
- package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.d.ts +0 -6
- package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +0 -65
- package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/validation/const.d.ts +0 -6
- package/node_modules/ajv/dist/vocabularies/validation/const.js +0 -25
- package/node_modules/ajv/dist/vocabularies/validation/const.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/validation/dependentRequired.d.ts +0 -5
- package/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js +0 -12
- package/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/validation/enum.d.ts +0 -8
- package/node_modules/ajv/dist/vocabularies/validation/enum.js +0 -48
- package/node_modules/ajv/dist/vocabularies/validation/enum.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/validation/index.d.ts +0 -16
- package/node_modules/ajv/dist/vocabularies/validation/index.js +0 -33
- package/node_modules/ajv/dist/vocabularies/validation/index.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/validation/limitContains.d.ts +0 -3
- package/node_modules/ajv/dist/vocabularies/validation/limitContains.js +0 -15
- package/node_modules/ajv/dist/vocabularies/validation/limitContains.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/validation/limitItems.d.ts +0 -3
- package/node_modules/ajv/dist/vocabularies/validation/limitItems.js +0 -24
- package/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/validation/limitLength.d.ts +0 -3
- package/node_modules/ajv/dist/vocabularies/validation/limitLength.js +0 -27
- package/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/validation/limitNumber.d.ts +0 -11
- package/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +0 -27
- package/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/validation/limitProperties.d.ts +0 -3
- package/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +0 -24
- package/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/validation/multipleOf.d.ts +0 -8
- package/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +0 -26
- package/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/validation/pattern.d.ts +0 -8
- package/node_modules/ajv/dist/vocabularies/validation/pattern.js +0 -33
- package/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/validation/required.d.ts +0 -8
- package/node_modules/ajv/dist/vocabularies/validation/required.js +0 -79
- package/node_modules/ajv/dist/vocabularies/validation/required.js.map +0 -1
- package/node_modules/ajv/dist/vocabularies/validation/uniqueItems.d.ts +0 -9
- package/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +0 -64
- package/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +0 -1
- package/node_modules/ajv/lib/2019.ts +0 -81
- package/node_modules/ajv/lib/2020.ts +0 -75
- package/node_modules/ajv/lib/ajv.ts +0 -70
- package/node_modules/ajv/lib/compile/codegen/code.ts +0 -169
- package/node_modules/ajv/lib/compile/codegen/index.ts +0 -852
- package/node_modules/ajv/lib/compile/codegen/scope.ts +0 -215
- package/node_modules/ajv/lib/compile/errors.ts +0 -184
- package/node_modules/ajv/lib/compile/index.ts +0 -324
- package/node_modules/ajv/lib/compile/jtd/parse.ts +0 -411
- package/node_modules/ajv/lib/compile/jtd/serialize.ts +0 -277
- package/node_modules/ajv/lib/compile/jtd/types.ts +0 -16
- package/node_modules/ajv/lib/compile/names.ts +0 -27
- package/node_modules/ajv/lib/compile/ref_error.ts +0 -13
- package/node_modules/ajv/lib/compile/resolve.ts +0 -149
- package/node_modules/ajv/lib/compile/rules.ts +0 -50
- package/node_modules/ajv/lib/compile/util.ts +0 -213
- package/node_modules/ajv/lib/compile/validate/applicability.ts +0 -22
- package/node_modules/ajv/lib/compile/validate/boolSchema.ts +0 -47
- package/node_modules/ajv/lib/compile/validate/dataType.ts +0 -230
- package/node_modules/ajv/lib/compile/validate/defaults.ts +0 -32
- package/node_modules/ajv/lib/compile/validate/index.ts +0 -582
- package/node_modules/ajv/lib/compile/validate/keyword.ts +0 -171
- package/node_modules/ajv/lib/compile/validate/subschema.ts +0 -135
- package/node_modules/ajv/lib/core.ts +0 -892
- package/node_modules/ajv/lib/jtd.ts +0 -132
- package/node_modules/ajv/lib/refs/data.json +0 -13
- package/node_modules/ajv/lib/refs/json-schema-2019-09/index.ts +0 -28
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/applicator.json +0 -53
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/content.json +0 -17
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/core.json +0 -57
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/format.json +0 -14
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/meta-data.json +0 -37
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/validation.json +0 -90
- package/node_modules/ajv/lib/refs/json-schema-2019-09/schema.json +0 -39
- package/node_modules/ajv/lib/refs/json-schema-2020-12/index.ts +0 -30
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/applicator.json +0 -48
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/content.json +0 -17
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/core.json +0 -51
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/format-annotation.json +0 -14
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/meta-data.json +0 -37
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/unevaluated.json +0 -15
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/validation.json +0 -90
- package/node_modules/ajv/lib/refs/json-schema-2020-12/schema.json +0 -55
- package/node_modules/ajv/lib/refs/json-schema-draft-06.json +0 -137
- package/node_modules/ajv/lib/refs/json-schema-draft-07.json +0 -151
- package/node_modules/ajv/lib/refs/json-schema-secure.json +0 -88
- package/node_modules/ajv/lib/refs/jtd-schema.ts +0 -130
- package/node_modules/ajv/lib/runtime/equal.ts +0 -7
- package/node_modules/ajv/lib/runtime/parseJson.ts +0 -177
- package/node_modules/ajv/lib/runtime/quote.ts +0 -31
- package/node_modules/ajv/lib/runtime/re2.ts +0 -6
- package/node_modules/ajv/lib/runtime/timestamp.ts +0 -46
- package/node_modules/ajv/lib/runtime/ucs2length.ts +0 -20
- package/node_modules/ajv/lib/runtime/uri.ts +0 -6
- package/node_modules/ajv/lib/runtime/validation_error.ts +0 -13
- package/node_modules/ajv/lib/standalone/index.ts +0 -100
- package/node_modules/ajv/lib/standalone/instance.ts +0 -36
- package/node_modules/ajv/lib/types/index.ts +0 -244
- package/node_modules/ajv/lib/types/json-schema.ts +0 -187
- package/node_modules/ajv/lib/types/jtd-schema.ts +0 -273
- package/node_modules/ajv/lib/vocabularies/applicator/additionalItems.ts +0 -56
- package/node_modules/ajv/lib/vocabularies/applicator/additionalProperties.ts +0 -118
- package/node_modules/ajv/lib/vocabularies/applicator/allOf.ts +0 -22
- package/node_modules/ajv/lib/vocabularies/applicator/anyOf.ts +0 -14
- package/node_modules/ajv/lib/vocabularies/applicator/contains.ts +0 -109
- package/node_modules/ajv/lib/vocabularies/applicator/dependencies.ts +0 -112
- package/node_modules/ajv/lib/vocabularies/applicator/dependentSchemas.ts +0 -11
- package/node_modules/ajv/lib/vocabularies/applicator/if.ts +0 -80
- package/node_modules/ajv/lib/vocabularies/applicator/index.ts +0 -53
- package/node_modules/ajv/lib/vocabularies/applicator/items.ts +0 -59
- package/node_modules/ajv/lib/vocabularies/applicator/items2020.ts +0 -36
- package/node_modules/ajv/lib/vocabularies/applicator/not.ts +0 -38
- package/node_modules/ajv/lib/vocabularies/applicator/oneOf.ts +0 -82
- package/node_modules/ajv/lib/vocabularies/applicator/patternProperties.ts +0 -91
- package/node_modules/ajv/lib/vocabularies/applicator/prefixItems.ts +0 -12
- package/node_modules/ajv/lib/vocabularies/applicator/properties.ts +0 -57
- package/node_modules/ajv/lib/vocabularies/applicator/propertyNames.ts +0 -50
- package/node_modules/ajv/lib/vocabularies/applicator/thenElse.ts +0 -13
- package/node_modules/ajv/lib/vocabularies/code.ts +0 -168
- package/node_modules/ajv/lib/vocabularies/core/id.ts +0 -10
- package/node_modules/ajv/lib/vocabularies/core/index.ts +0 -16
- package/node_modules/ajv/lib/vocabularies/core/ref.ts +0 -129
- package/node_modules/ajv/lib/vocabularies/discriminator/index.ts +0 -113
- package/node_modules/ajv/lib/vocabularies/discriminator/types.ts +0 -12
- package/node_modules/ajv/lib/vocabularies/draft2020.ts +0 -23
- package/node_modules/ajv/lib/vocabularies/draft7.ts +0 -17
- package/node_modules/ajv/lib/vocabularies/dynamic/dynamicAnchor.ts +0 -31
- package/node_modules/ajv/lib/vocabularies/dynamic/dynamicRef.ts +0 -51
- package/node_modules/ajv/lib/vocabularies/dynamic/index.ts +0 -9
- package/node_modules/ajv/lib/vocabularies/dynamic/recursiveAnchor.ts +0 -14
- package/node_modules/ajv/lib/vocabularies/dynamic/recursiveRef.ts +0 -10
- package/node_modules/ajv/lib/vocabularies/errors.ts +0 -18
- package/node_modules/ajv/lib/vocabularies/format/format.ts +0 -120
- package/node_modules/ajv/lib/vocabularies/format/index.ts +0 -6
- package/node_modules/ajv/lib/vocabularies/jtd/discriminator.ts +0 -89
- package/node_modules/ajv/lib/vocabularies/jtd/elements.ts +0 -32
- package/node_modules/ajv/lib/vocabularies/jtd/enum.ts +0 -45
- package/node_modules/ajv/lib/vocabularies/jtd/error.ts +0 -23
- package/node_modules/ajv/lib/vocabularies/jtd/index.ts +0 -37
- package/node_modules/ajv/lib/vocabularies/jtd/metadata.ts +0 -24
- package/node_modules/ajv/lib/vocabularies/jtd/nullable.ts +0 -21
- package/node_modules/ajv/lib/vocabularies/jtd/optionalProperties.ts +0 -15
- package/node_modules/ajv/lib/vocabularies/jtd/properties.ts +0 -184
- package/node_modules/ajv/lib/vocabularies/jtd/ref.ts +0 -76
- package/node_modules/ajv/lib/vocabularies/jtd/type.ts +0 -75
- package/node_modules/ajv/lib/vocabularies/jtd/union.ts +0 -12
- package/node_modules/ajv/lib/vocabularies/jtd/values.ts +0 -58
- package/node_modules/ajv/lib/vocabularies/metadata.ts +0 -17
- package/node_modules/ajv/lib/vocabularies/next.ts +0 -8
- package/node_modules/ajv/lib/vocabularies/unevaluated/index.ts +0 -7
- package/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedItems.ts +0 -47
- package/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedProperties.ts +0 -85
- package/node_modules/ajv/lib/vocabularies/validation/const.ts +0 -28
- package/node_modules/ajv/lib/vocabularies/validation/dependentRequired.ts +0 -23
- package/node_modules/ajv/lib/vocabularies/validation/enum.ts +0 -54
- package/node_modules/ajv/lib/vocabularies/validation/index.ts +0 -49
- package/node_modules/ajv/lib/vocabularies/validation/limitContains.ts +0 -16
- package/node_modules/ajv/lib/vocabularies/validation/limitItems.ts +0 -26
- package/node_modules/ajv/lib/vocabularies/validation/limitLength.ts +0 -30
- package/node_modules/ajv/lib/vocabularies/validation/limitNumber.ts +0 -42
- package/node_modules/ajv/lib/vocabularies/validation/limitProperties.ts +0 -26
- package/node_modules/ajv/lib/vocabularies/validation/multipleOf.ts +0 -34
- package/node_modules/ajv/lib/vocabularies/validation/pattern.ts +0 -39
- package/node_modules/ajv/lib/vocabularies/validation/required.ts +0 -98
- package/node_modules/ajv/lib/vocabularies/validation/uniqueItems.ts +0 -79
- package/node_modules/ajv/package.json +0 -126
- package/node_modules/fast-deep-equal/LICENSE +0 -21
- package/node_modules/fast-deep-equal/README.md +0 -96
- package/node_modules/fast-deep-equal/es6/index.d.ts +0 -2
- package/node_modules/fast-deep-equal/es6/index.js +0 -72
- package/node_modules/fast-deep-equal/es6/react.d.ts +0 -2
- package/node_modules/fast-deep-equal/es6/react.js +0 -79
- package/node_modules/fast-deep-equal/index.d.ts +0 -4
- package/node_modules/fast-deep-equal/index.js +0 -46
- package/node_modules/fast-deep-equal/package.json +0 -61
- package/node_modules/fast-deep-equal/react.d.ts +0 -2
- package/node_modules/fast-deep-equal/react.js +0 -53
- package/node_modules/fast-uri/.gitattributes +0 -2
- package/node_modules/fast-uri/.github/dependabot.yml +0 -13
- package/node_modules/fast-uri/.github/workflows/ci.yml +0 -106
- package/node_modules/fast-uri/.github/workflows/lock-threads.yml +0 -19
- package/node_modules/fast-uri/.github/workflows/package-manager-ci.yml +0 -24
- package/node_modules/fast-uri/LICENSE +0 -30
- package/node_modules/fast-uri/README.md +0 -152
- package/node_modules/fast-uri/benchmark/benchmark.mjs +0 -159
- package/node_modules/fast-uri/benchmark/equal.mjs +0 -51
- package/node_modules/fast-uri/benchmark/non-simple-domain.mjs +0 -22
- package/node_modules/fast-uri/benchmark/package.json +0 -17
- package/node_modules/fast-uri/benchmark/string-array-to-hex-stripped.mjs +0 -24
- package/node_modules/fast-uri/benchmark/ws-is-secure.mjs +0 -65
- package/node_modules/fast-uri/eslint.config.js +0 -6
- package/node_modules/fast-uri/index.js +0 -406
- package/node_modules/fast-uri/lib/schemes.js +0 -267
- package/node_modules/fast-uri/lib/utils.js +0 -443
- package/node_modules/fast-uri/package.json +0 -68
- package/node_modules/fast-uri/test/ajv.test.js +0 -43
- package/node_modules/fast-uri/test/equal.test.js +0 -117
- package/node_modules/fast-uri/test/fixtures/uri-js-parse.json +0 -501
- package/node_modules/fast-uri/test/fixtures/uri-js-serialize.json +0 -120
- package/node_modules/fast-uri/test/parse.test.js +0 -323
- package/node_modules/fast-uri/test/resolve.test.js +0 -87
- package/node_modules/fast-uri/test/rfc-3986.test.js +0 -90
- package/node_modules/fast-uri/test/security-normalization.test.js +0 -39
- package/node_modules/fast-uri/test/security.test.js +0 -133
- package/node_modules/fast-uri/test/serialize.test.js +0 -151
- package/node_modules/fast-uri/test/uri-js-compatibility.test.js +0 -33
- package/node_modules/fast-uri/test/uri-js.test.js +0 -912
- package/node_modules/fast-uri/test/util.test.js +0 -38
- package/node_modules/fast-uri/tsconfig.json +0 -9
- package/node_modules/fast-uri/types/index.d.ts +0 -60
- package/node_modules/fast-uri/types/index.test-d.ts +0 -17
- package/node_modules/json-schema-traverse/.eslintrc.yml +0 -27
- package/node_modules/json-schema-traverse/.github/FUNDING.yml +0 -2
- package/node_modules/json-schema-traverse/.github/workflows/build.yml +0 -28
- package/node_modules/json-schema-traverse/.github/workflows/publish.yml +0 -27
- package/node_modules/json-schema-traverse/LICENSE +0 -21
- package/node_modules/json-schema-traverse/README.md +0 -95
- package/node_modules/json-schema-traverse/index.d.ts +0 -40
- package/node_modules/json-schema-traverse/index.js +0 -93
- package/node_modules/json-schema-traverse/package.json +0 -43
- package/node_modules/json-schema-traverse/spec/.eslintrc.yml +0 -6
- package/node_modules/json-schema-traverse/spec/fixtures/schema.js +0 -125
- package/node_modules/json-schema-traverse/spec/index.spec.js +0 -171
- package/node_modules/require-from-string/index.js +0 -34
- package/node_modules/require-from-string/license +0 -21
- package/node_modules/require-from-string/package.json +0 -28
- package/node_modules/require-from-string/readme.md +0 -56
package/composition.json
CHANGED
|
@@ -36,36 +36,11 @@
|
|
|
36
36
|
"version": "0.0.1",
|
|
37
37
|
"license": "MIT"
|
|
38
38
|
},
|
|
39
|
-
{
|
|
40
|
-
"name": "ajv",
|
|
41
|
-
"version": "8.20.0",
|
|
42
|
-
"license": "MIT"
|
|
43
|
-
},
|
|
44
39
|
{
|
|
45
40
|
"name": "auth-store",
|
|
46
41
|
"version": "0.0.1",
|
|
47
42
|
"license": "MIT"
|
|
48
43
|
},
|
|
49
|
-
{
|
|
50
|
-
"name": "fast-deep-equal",
|
|
51
|
-
"version": "3.1.3",
|
|
52
|
-
"license": "MIT"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"name": "fast-uri",
|
|
56
|
-
"version": "3.1.2",
|
|
57
|
-
"license": "BSD-3-Clause"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"name": "json-schema-traverse",
|
|
61
|
-
"version": "1.0.0",
|
|
62
|
-
"license": "MIT"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"name": "require-from-string",
|
|
66
|
-
"version": "2.0.2",
|
|
67
|
-
"license": "MIT"
|
|
68
|
-
},
|
|
69
44
|
{
|
|
70
45
|
"name": "tiny-mcp-client",
|
|
71
46
|
"version": "0.1.0",
|
|
@@ -78,7 +53,7 @@
|
|
|
78
53
|
},
|
|
79
54
|
{
|
|
80
55
|
"name": "toolcraft",
|
|
81
|
-
"version": "0.0.
|
|
56
|
+
"version": "0.0.116",
|
|
82
57
|
"license": "MIT"
|
|
83
58
|
},
|
|
84
59
|
{
|
|
@@ -88,7 +63,7 @@
|
|
|
88
63
|
},
|
|
89
64
|
{
|
|
90
65
|
"name": "toolcraft-schema",
|
|
91
|
-
"version": "0.0.
|
|
66
|
+
"version": "0.0.116",
|
|
92
67
|
"license": "MIT"
|
|
93
68
|
}
|
|
94
69
|
]
|
package/dist/composition.json
CHANGED
|
@@ -36,36 +36,11 @@
|
|
|
36
36
|
"version": "0.0.1",
|
|
37
37
|
"license": "MIT"
|
|
38
38
|
},
|
|
39
|
-
{
|
|
40
|
-
"name": "ajv",
|
|
41
|
-
"version": "8.20.0",
|
|
42
|
-
"license": "MIT"
|
|
43
|
-
},
|
|
44
39
|
{
|
|
45
40
|
"name": "auth-store",
|
|
46
41
|
"version": "0.0.1",
|
|
47
42
|
"license": "MIT"
|
|
48
43
|
},
|
|
49
|
-
{
|
|
50
|
-
"name": "fast-deep-equal",
|
|
51
|
-
"version": "3.1.3",
|
|
52
|
-
"license": "MIT"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"name": "fast-uri",
|
|
56
|
-
"version": "3.1.2",
|
|
57
|
-
"license": "BSD-3-Clause"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"name": "json-schema-traverse",
|
|
61
|
-
"version": "1.0.0",
|
|
62
|
-
"license": "MIT"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"name": "require-from-string",
|
|
66
|
-
"version": "2.0.2",
|
|
67
|
-
"license": "MIT"
|
|
68
|
-
},
|
|
69
44
|
{
|
|
70
45
|
"name": "tiny-mcp-client",
|
|
71
46
|
"version": "0.1.0",
|
|
@@ -78,7 +53,7 @@
|
|
|
78
53
|
},
|
|
79
54
|
{
|
|
80
55
|
"name": "toolcraft",
|
|
81
|
-
"version": "0.0.
|
|
56
|
+
"version": "0.0.116",
|
|
82
57
|
"license": "MIT"
|
|
83
58
|
},
|
|
84
59
|
{
|
|
@@ -88,7 +63,7 @@
|
|
|
88
63
|
},
|
|
89
64
|
{
|
|
90
65
|
"name": "toolcraft-schema",
|
|
91
|
-
"version": "0.0.
|
|
66
|
+
"version": "0.0.116",
|
|
92
67
|
"license": "MIT"
|
|
93
68
|
}
|
|
94
69
|
]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as readline from "readline";
|
|
2
|
-
import
|
|
2
|
+
import { compileJsonSchema, formatIssues } from "toolcraft-schema";
|
|
3
3
|
import uriTemplateParser from "uri-template";
|
|
4
4
|
import UriTemplate from "uri-template-lite";
|
|
5
5
|
import { JSON_RPC_ERROR_CODES, ToolError } from "./types.js";
|
|
@@ -7,13 +7,20 @@ import { parseMessage, formatSuccessResponse, formatErrorResponse } from "./json
|
|
|
7
7
|
import { toContentBlocks } from "./content/convert.js";
|
|
8
8
|
const PROTOCOL_VERSION = "2025-11-25";
|
|
9
9
|
const SUPPORTED_PROTOCOL_VERSIONS = new Set(["2025-03-26", "2025-06-18", PROTOCOL_VERSION]);
|
|
10
|
+
function compileToolSchema(schema) {
|
|
11
|
+
try {
|
|
12
|
+
return compileJsonSchema(schema);
|
|
13
|
+
}
|
|
14
|
+
catch (error) {
|
|
15
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
16
|
+
throw new Error(`schema is invalid: ${message}`, { cause: error });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
10
19
|
export function createServer(options) {
|
|
11
20
|
if (options.toolCallTimeoutMs !== undefined &&
|
|
12
21
|
(!Number.isInteger(options.toolCallTimeoutMs) || options.toolCallTimeoutMs <= 0)) {
|
|
13
22
|
throw new Error("toolCallTimeoutMs must be a positive integer.");
|
|
14
23
|
}
|
|
15
|
-
const Ajv = "default" in AjvModule ? AjvModule.default : AjvModule;
|
|
16
|
-
const jsonSchemaValidator = new Ajv({ strict: false });
|
|
17
24
|
const supportNotifications = options.supportNotifications !== false;
|
|
18
25
|
const supportResourceSubscriptions = options.supportResourceSubscriptions !== false;
|
|
19
26
|
const tools = new Map();
|
|
@@ -124,13 +131,13 @@ export function createServer(options) {
|
|
|
124
131
|
};
|
|
125
132
|
}
|
|
126
133
|
const toolArgs = (params?.arguments ?? {});
|
|
127
|
-
|
|
128
|
-
|
|
134
|
+
const inputValidation = tool.inputValidator.validate(toolArgs);
|
|
135
|
+
if (options.validateToolArguments !== false && !inputValidation.ok) {
|
|
129
136
|
return {
|
|
130
137
|
error: {
|
|
131
138
|
code: JSON_RPC_ERROR_CODES.INVALID_PARAMS,
|
|
132
|
-
message: `Invalid tool arguments: ${
|
|
133
|
-
data:
|
|
139
|
+
message: `Invalid tool arguments: ${formatIssues(inputValidation.issues)}`,
|
|
140
|
+
data: inputValidation.issues
|
|
134
141
|
}
|
|
135
142
|
};
|
|
136
143
|
}
|
|
@@ -156,11 +163,9 @@ export function createServer(options) {
|
|
|
156
163
|
});
|
|
157
164
|
}
|
|
158
165
|
const result = normalizeToolResult(handlerResult, tool.outputSchema);
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
const errors = tool.outputValidator.errors ?? [];
|
|
163
|
-
throw new ToolError(JSON_RPC_ERROR_CODES.INTERNAL_ERROR, `Invalid structured tool result: ${jsonSchemaValidator.errorsText(errors)}`, errors);
|
|
166
|
+
const outputValidation = tool.outputValidator?.validate(result.structuredContent);
|
|
167
|
+
if (result.isError !== true && outputValidation !== undefined && !outputValidation.ok) {
|
|
168
|
+
throw new ToolError(JSON_RPC_ERROR_CODES.INTERNAL_ERROR, `Invalid structured tool result: ${formatIssues(outputValidation.issues)}`, outputValidation.issues);
|
|
164
169
|
}
|
|
165
170
|
return { result };
|
|
166
171
|
}
|
|
@@ -391,11 +396,11 @@ export function createServer(options) {
|
|
|
391
396
|
if (tools.has(name)) {
|
|
392
397
|
throw new Error(`Tool already registered: ${name}`);
|
|
393
398
|
}
|
|
394
|
-
const inputValidator =
|
|
399
|
+
const inputValidator = compileToolSchema(inputSchema);
|
|
395
400
|
let outputValidator;
|
|
396
401
|
if (outputSchema !== undefined) {
|
|
397
402
|
assertObjectRootSchema(outputSchema, "outputSchema");
|
|
398
|
-
outputValidator =
|
|
403
|
+
outputValidator = compileToolSchema(outputSchema);
|
|
399
404
|
}
|
|
400
405
|
tools.set(name, {
|
|
401
406
|
name,
|
|
@@ -413,11 +418,11 @@ export function createServer(options) {
|
|
|
413
418
|
if (tools.has(definition.name)) {
|
|
414
419
|
throw new Error(`Tool already registered: ${definition.name}`);
|
|
415
420
|
}
|
|
416
|
-
const inputValidator =
|
|
421
|
+
const inputValidator = compileToolSchema(definition.inputSchema);
|
|
417
422
|
let outputValidator;
|
|
418
423
|
if (definition.outputSchema !== undefined) {
|
|
419
424
|
assertObjectRootSchema(definition.outputSchema, "outputSchema");
|
|
420
|
-
outputValidator =
|
|
425
|
+
outputValidator = compileToolSchema(definition.outputSchema);
|
|
421
426
|
}
|
|
422
427
|
tools.set(definition.name, {
|
|
423
428
|
...definition,
|
|
@@ -24,7 +24,9 @@
|
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "node ../../scripts/guard-package-dist.mjs && tsc",
|
|
27
|
-
"prepublishOnly": "tsc"
|
|
27
|
+
"prepublishOnly": "tsc",
|
|
28
|
+
"prepack": "node ../../scripts/manage-bundled-workspace-deps.mjs prepare . toolcraft-schema",
|
|
29
|
+
"postpack": "node ../../scripts/manage-bundled-workspace-deps.mjs cleanup . toolcraft-schema"
|
|
28
30
|
},
|
|
29
31
|
"files": [
|
|
30
32
|
"LICENSE",
|
|
@@ -178,5 +178,7 @@ export declare const S: {
|
|
|
178
178
|
export declare function toJsonSchema(schema: AnySchema): JsonSchema;
|
|
179
179
|
export declare function toJsonSchemaDocument(schema: AnySchema, options?: JsonSchemaDocumentOptions): JsonSchemaDocument;
|
|
180
180
|
export { Json, OneOf, RecordBuilder as Record, Union, validate };
|
|
181
|
+
export { compileJsonSchema, formatIssues } from "./json-schema/index.js";
|
|
182
|
+
export type { CompileJsonSchemaOptions, CompiledJsonSchema } from "./json-schema/index.js";
|
|
181
183
|
export type { JsonSchemaDocument, JsonSchemaDocumentOptions } from "./json-schema-document.js";
|
|
182
184
|
export type { JsonValue, JsonValueSchema, OneOfSchema, RecordSchema, UnionSchema, ValidationIssue, ValidationResult };
|
|
@@ -292,3 +292,4 @@ export function toJsonSchemaDocument(schema, options = {}) {
|
|
|
292
292
|
return createJsonSchemaDocument(toJsonSchema(schema), options);
|
|
293
293
|
}
|
|
294
294
|
export { Json, OneOf, RecordBuilder as Record, Union, validate };
|
|
295
|
+
export { compileJsonSchema, formatIssues } from "./json-schema/index.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CompileJsonSchemaOptions, SchemaNode } from "./types.js";
|
|
2
|
+
export interface CompiledGraph {
|
|
3
|
+
root: SchemaNode;
|
|
4
|
+
locations: Map<string, SchemaNode>;
|
|
5
|
+
resources: Map<string, SchemaNode>;
|
|
6
|
+
anchors: Map<string, SchemaNode>;
|
|
7
|
+
dynamicAnchors: Map<string, SchemaNode>;
|
|
8
|
+
resolve(node: SchemaNode, reference: string): SchemaNode;
|
|
9
|
+
dynamicAnchor(scope: SchemaNode, name: string): SchemaNode | undefined;
|
|
10
|
+
}
|
|
11
|
+
export declare function compileGraph(schema: unknown, options?: CompileJsonSchemaOptions): CompiledGraph;
|
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
import { dialectFor, escapePointer, fragmentOf, isObject, isSchema, resolveUri, withoutFragment } from "./utils.js";
|
|
2
|
+
const schemaMapKeywords = new Set([
|
|
3
|
+
"$defs",
|
|
4
|
+
"definitions",
|
|
5
|
+
"properties",
|
|
6
|
+
"patternProperties",
|
|
7
|
+
"dependentSchemas",
|
|
8
|
+
"dependencies"
|
|
9
|
+
]);
|
|
10
|
+
const schemaArrayKeywords = new Set(["allOf", "anyOf", "oneOf", "prefixItems"]);
|
|
11
|
+
const schemaKeywords = new Set([
|
|
12
|
+
"additionalItems",
|
|
13
|
+
"additionalProperties",
|
|
14
|
+
"contains",
|
|
15
|
+
"else",
|
|
16
|
+
"if",
|
|
17
|
+
"items",
|
|
18
|
+
"not",
|
|
19
|
+
"propertyNames",
|
|
20
|
+
"then",
|
|
21
|
+
"unevaluatedItems",
|
|
22
|
+
"unevaluatedProperties"
|
|
23
|
+
]);
|
|
24
|
+
const draftTypes = ["null", "boolean", "object", "array", "number", "integer", "string"];
|
|
25
|
+
const draftTypeSet = new Set(draftTypes);
|
|
26
|
+
const metaSchemaKeywordProperties = {
|
|
27
|
+
type: {
|
|
28
|
+
anyOf: [
|
|
29
|
+
{ enum: draftTypes },
|
|
30
|
+
{ type: "array", items: { enum: draftTypes }, minItems: 1, uniqueItems: true }
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
minLength: { type: "integer", minimum: 0 },
|
|
34
|
+
maxLength: { type: "integer", minimum: 0 },
|
|
35
|
+
minItems: { type: "integer", minimum: 0 },
|
|
36
|
+
maxItems: { type: "integer", minimum: 0 },
|
|
37
|
+
minProperties: { type: "integer", minimum: 0 },
|
|
38
|
+
maxProperties: { type: "integer", minimum: 0 }
|
|
39
|
+
};
|
|
40
|
+
const builtInRegistry = {
|
|
41
|
+
"https://json-schema.org/draft/2020-12/schema": {
|
|
42
|
+
$id: "https://json-schema.org/draft/2020-12/schema",
|
|
43
|
+
type: ["object", "boolean"],
|
|
44
|
+
properties: {
|
|
45
|
+
...metaSchemaKeywordProperties,
|
|
46
|
+
$defs: { type: "object", additionalProperties: { $ref: "#" } }
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"http://json-schema.org/draft-07/schema": {
|
|
50
|
+
$id: "http://json-schema.org/draft-07/schema#",
|
|
51
|
+
type: ["object", "boolean"],
|
|
52
|
+
properties: {
|
|
53
|
+
...metaSchemaKeywordProperties,
|
|
54
|
+
definitions: { type: "object", additionalProperties: { $ref: "#" } }
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
function mapKey(dialect, uri) {
|
|
59
|
+
return `${dialect}\0${uri}`;
|
|
60
|
+
}
|
|
61
|
+
function assertSchemaArray(value, keyword) {
|
|
62
|
+
if (!Array.isArray(value) || value.length === 0 || !value.every(isSchema)) {
|
|
63
|
+
throw new Error(`${keyword} must be a non-empty array of schemas.`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function assertStringArray(value, keyword) {
|
|
67
|
+
if (!Array.isArray(value) || !value.every((item) => typeof item === "string")) {
|
|
68
|
+
throw new Error(`${keyword} must be an array of strings.`);
|
|
69
|
+
}
|
|
70
|
+
if (new Set(value).size !== value.length) {
|
|
71
|
+
throw new Error(`${keyword} must contain unique strings.`);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
function assertSchemaMap(value, keyword) {
|
|
75
|
+
if (!isObject(value) || !Object.values(value).every(isSchema)) {
|
|
76
|
+
throw new Error(`${keyword} must be an object containing schemas.`);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
function assertNonNegativeInteger(value, keyword) {
|
|
80
|
+
if (!Number.isInteger(value) || value < 0) {
|
|
81
|
+
throw new Error(`${keyword} must be a non-negative integer.`);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
function validateSchemaObject(schema, dialect) {
|
|
85
|
+
if (schema.type !== undefined) {
|
|
86
|
+
const types = Array.isArray(schema.type) ? schema.type : [schema.type];
|
|
87
|
+
if (types.length === 0 ||
|
|
88
|
+
!types.every((type) => typeof type === "string" && draftTypeSet.has(type)) ||
|
|
89
|
+
new Set(types).size !== types.length) {
|
|
90
|
+
throw new Error("type must be a JSON Schema type or a unique array of JSON Schema types.");
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
for (const keyword of ["minimum", "maximum", "exclusiveMinimum", "exclusiveMaximum"]) {
|
|
94
|
+
if (schema[keyword] !== undefined && typeof schema[keyword] !== "number") {
|
|
95
|
+
throw new Error(`${keyword} must be a number.`);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
if (schema.multipleOf !== undefined &&
|
|
99
|
+
(typeof schema.multipleOf !== "number" || schema.multipleOf <= 0)) {
|
|
100
|
+
throw new Error("multipleOf must be a number greater than zero.");
|
|
101
|
+
}
|
|
102
|
+
for (const keyword of [
|
|
103
|
+
"minLength",
|
|
104
|
+
"maxLength",
|
|
105
|
+
"minItems",
|
|
106
|
+
"maxItems",
|
|
107
|
+
"minContains",
|
|
108
|
+
"maxContains",
|
|
109
|
+
"minProperties",
|
|
110
|
+
"maxProperties"
|
|
111
|
+
]) {
|
|
112
|
+
if (schema[keyword] !== undefined) {
|
|
113
|
+
assertNonNegativeInteger(schema[keyword], keyword);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
if (schema.pattern !== undefined && typeof schema.pattern !== "string") {
|
|
117
|
+
throw new Error("pattern must be a string.");
|
|
118
|
+
}
|
|
119
|
+
for (const keyword of ["uniqueItems", "$recursiveAnchor"]) {
|
|
120
|
+
if (schema[keyword] !== undefined && typeof schema[keyword] !== "boolean") {
|
|
121
|
+
throw new Error(`${keyword} must be a boolean.`);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
if (schema.required !== undefined) {
|
|
125
|
+
assertStringArray(schema.required, "required");
|
|
126
|
+
}
|
|
127
|
+
if (schema.dependentRequired !== undefined) {
|
|
128
|
+
if (!isObject(schema.dependentRequired)) {
|
|
129
|
+
throw new Error("dependentRequired must be an object containing string arrays.");
|
|
130
|
+
}
|
|
131
|
+
for (const dependencies of Object.values(schema.dependentRequired)) {
|
|
132
|
+
assertStringArray(dependencies, "dependentRequired");
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
for (const keyword of schemaMapKeywords) {
|
|
136
|
+
const value = schema[keyword];
|
|
137
|
+
if (value === undefined || keyword === "dependencies")
|
|
138
|
+
continue;
|
|
139
|
+
assertSchemaMap(value, keyword);
|
|
140
|
+
}
|
|
141
|
+
if (schema.dependencies !== undefined) {
|
|
142
|
+
if (!isObject(schema.dependencies)) {
|
|
143
|
+
throw new Error("dependencies must be an object containing schemas or string arrays.");
|
|
144
|
+
}
|
|
145
|
+
for (const dependency of Object.values(schema.dependencies)) {
|
|
146
|
+
if (!isSchema(dependency))
|
|
147
|
+
assertStringArray(dependency, "dependencies");
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
for (const keyword of ["allOf", "anyOf", "oneOf"]) {
|
|
151
|
+
if (schema[keyword] !== undefined)
|
|
152
|
+
assertSchemaArray(schema[keyword], keyword);
|
|
153
|
+
}
|
|
154
|
+
if (schema.prefixItems !== undefined) {
|
|
155
|
+
if (!Array.isArray(schema.prefixItems) || !schema.prefixItems.every(isSchema)) {
|
|
156
|
+
throw new Error("prefixItems must be an array of schemas.");
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
for (const keyword of schemaKeywords) {
|
|
160
|
+
const value = schema[keyword];
|
|
161
|
+
if (value === undefined)
|
|
162
|
+
continue;
|
|
163
|
+
if (keyword === "items" && dialect === "draft7" && Array.isArray(value)) {
|
|
164
|
+
if (!value.every(isSchema))
|
|
165
|
+
throw new Error("items must contain only schemas.");
|
|
166
|
+
}
|
|
167
|
+
else if (!isSchema(value)) {
|
|
168
|
+
throw new Error(`${keyword} must be a schema.`);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
if (schema.enum !== undefined && !Array.isArray(schema.enum)) {
|
|
172
|
+
throw new Error("enum must be an array.");
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
export function compileGraph(schema, options = {}) {
|
|
176
|
+
if (!isSchema(schema)) {
|
|
177
|
+
throw new Error("JSON Schema must be a boolean or object.");
|
|
178
|
+
}
|
|
179
|
+
const locations = new Map();
|
|
180
|
+
const resources = new Map();
|
|
181
|
+
const anchors = new Map();
|
|
182
|
+
const dynamicAnchors = new Map();
|
|
183
|
+
const nodesBySchema = new WeakMap();
|
|
184
|
+
const pendingReferences = [];
|
|
185
|
+
const registry = { ...builtInRegistry, ...options.registry };
|
|
186
|
+
const rootBase = "https://toolcraft.invalid/root";
|
|
187
|
+
function validationVocabularyFor(schemaObject) {
|
|
188
|
+
const metaSchema = schemaObject.$schema;
|
|
189
|
+
if (typeof metaSchema !== "string") {
|
|
190
|
+
return true;
|
|
191
|
+
}
|
|
192
|
+
const registered = registry[metaSchema];
|
|
193
|
+
if (!isObject(registered) || !isObject(registered.$vocabulary)) {
|
|
194
|
+
return true;
|
|
195
|
+
}
|
|
196
|
+
return Object.prototype.hasOwnProperty.call(registered.$vocabulary, "https://json-schema.org/draft/2020-12/vocab/validation");
|
|
197
|
+
}
|
|
198
|
+
function recordNode(schemaObject, node) {
|
|
199
|
+
if (schemaObject === undefined) {
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
const nodes = nodesBySchema.get(schemaObject) ?? [];
|
|
203
|
+
nodes.push(node);
|
|
204
|
+
nodesBySchema.set(schemaObject, nodes);
|
|
205
|
+
}
|
|
206
|
+
function setLocation(dialect, uri, node) {
|
|
207
|
+
locations.set(mapKey(dialect, uri), node);
|
|
208
|
+
}
|
|
209
|
+
function scan(currentSchema, inheritedDialect, inheritedBase, resourceRoot, pointer, validationVocabulary, documentId) {
|
|
210
|
+
const schemaObject = isObject(currentSchema) ? currentSchema : undefined;
|
|
211
|
+
const dialect = schemaObject === undefined ? inheritedDialect : dialectFor(schemaObject, inheritedDialect);
|
|
212
|
+
if (schemaObject !== undefined) {
|
|
213
|
+
validateSchemaObject(schemaObject, dialect);
|
|
214
|
+
}
|
|
215
|
+
const declaredId = dialect === "draft7" ? (schemaObject?.$id ?? schemaObject?.id) : schemaObject?.$id;
|
|
216
|
+
const effectiveId = dialect === "draft7" && typeof schemaObject?.$ref === "string" ? undefined : declaredId;
|
|
217
|
+
const baseUri = typeof effectiveId === "string" ? resolveUri(effectiveId, inheritedBase) : inheritedBase;
|
|
218
|
+
const node = {
|
|
219
|
+
schema: currentSchema,
|
|
220
|
+
documentId,
|
|
221
|
+
dialect,
|
|
222
|
+
baseUri,
|
|
223
|
+
resourceUri: resourceRoot?.resourceUri ?? withoutFragment(baseUri),
|
|
224
|
+
resourceRoot: undefined,
|
|
225
|
+
pointer,
|
|
226
|
+
validationVocabulary,
|
|
227
|
+
children: new Map()
|
|
228
|
+
};
|
|
229
|
+
recordNode(schemaObject, node);
|
|
230
|
+
if (resourceRoot !== undefined) {
|
|
231
|
+
setLocation(resourceRoot.dialect, resolveUri(`#${encodeURI(pointer)}`, resourceRoot.resourceUri), node);
|
|
232
|
+
}
|
|
233
|
+
const startsResource = resourceRoot === undefined || withoutFragment(baseUri) !== resourceRoot.resourceUri;
|
|
234
|
+
node.resourceRoot = startsResource ? node : resourceRoot;
|
|
235
|
+
node.resourceUri = startsResource ? withoutFragment(baseUri) : resourceRoot.resourceUri;
|
|
236
|
+
const resourcePointer = startsResource ? "" : pointer;
|
|
237
|
+
node.pointer = resourcePointer;
|
|
238
|
+
if (startsResource) {
|
|
239
|
+
resources.set(mapKey(node.dialect, node.resourceUri), node);
|
|
240
|
+
setLocation(node.dialect, node.resourceUri, node);
|
|
241
|
+
}
|
|
242
|
+
setLocation(node.dialect, resolveUri(`#${encodeURI(resourcePointer)}`, node.resourceUri), node);
|
|
243
|
+
if (schemaObject === undefined) {
|
|
244
|
+
return node;
|
|
245
|
+
}
|
|
246
|
+
if (typeof schemaObject.$anchor === "string") {
|
|
247
|
+
anchors.set(mapKey(node.dialect, `${node.resourceUri}#${schemaObject.$anchor}`), node);
|
|
248
|
+
}
|
|
249
|
+
if (typeof schemaObject.$dynamicAnchor === "string") {
|
|
250
|
+
const anchorUri = `${node.resourceUri}#${schemaObject.$dynamicAnchor}`;
|
|
251
|
+
anchors.set(mapKey(node.dialect, anchorUri), node);
|
|
252
|
+
dynamicAnchors.set(mapKey(node.dialect, anchorUri), node);
|
|
253
|
+
}
|
|
254
|
+
if (dialect === "draft7" && typeof effectiveId === "string" && fragmentOf(baseUri) !== "") {
|
|
255
|
+
anchors.set(mapKey(dialect, baseUri), node);
|
|
256
|
+
}
|
|
257
|
+
for (const keyword of ["$ref", "$dynamicRef", "$recursiveRef"]) {
|
|
258
|
+
const reference = schemaObject[keyword];
|
|
259
|
+
if (reference !== undefined) {
|
|
260
|
+
if (typeof reference !== "string") {
|
|
261
|
+
throw new Error(`${keyword} must be a string.`);
|
|
262
|
+
}
|
|
263
|
+
pendingReferences.push({ node, reference });
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
if (typeof schemaObject.pattern === "string") {
|
|
267
|
+
new RegExp(schemaObject.pattern, "u");
|
|
268
|
+
}
|
|
269
|
+
if (isObject(schemaObject.patternProperties)) {
|
|
270
|
+
for (const pattern of Object.keys(schemaObject.patternProperties)) {
|
|
271
|
+
new RegExp(pattern, "u");
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
const nextValidationVocabulary = resourceRoot === undefined ? validationVocabularyFor(schemaObject) : validationVocabulary;
|
|
275
|
+
for (const [keyword, value] of Object.entries(schemaObject)) {
|
|
276
|
+
if (schemaMapKeywords.has(keyword) && isObject(value)) {
|
|
277
|
+
for (const [key, childSchema] of Object.entries(value)) {
|
|
278
|
+
if (isSchema(childSchema)) {
|
|
279
|
+
node.children.set(`${keyword}/${key}`, scan(childSchema, dialect, baseUri, node.resourceRoot, `${resourcePointer}/${escapePointer(keyword)}/${escapePointer(key)}`, nextValidationVocabulary, documentId));
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
else if (schemaArrayKeywords.has(keyword) && Array.isArray(value)) {
|
|
284
|
+
value.forEach((childSchema, index) => {
|
|
285
|
+
if (isSchema(childSchema)) {
|
|
286
|
+
node.children.set(`${keyword}/${index}`, scan(childSchema, dialect, baseUri, node.resourceRoot, `${resourcePointer}/${escapePointer(keyword)}/${index}`, nextValidationVocabulary, documentId));
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
else if (schemaKeywords.has(keyword)) {
|
|
291
|
+
if (keyword === "items" && Array.isArray(value)) {
|
|
292
|
+
value.forEach((childSchema, index) => {
|
|
293
|
+
if (isSchema(childSchema)) {
|
|
294
|
+
node.children.set(`items/${index}`, scan(childSchema, dialect, baseUri, node.resourceRoot, `${resourcePointer}/items/${index}`, nextValidationVocabulary, documentId));
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
else if (isSchema(value)) {
|
|
299
|
+
node.children.set(keyword, scan(value, dialect, baseUri, node.resourceRoot, `${resourcePointer}/${escapePointer(keyword)}`, nextValidationVocabulary, documentId));
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
return node;
|
|
304
|
+
}
|
|
305
|
+
const root = scan(schema, "draft2020-12", rootBase, undefined, "", true, "root");
|
|
306
|
+
resources.set(mapKey(root.dialect, rootBase), root);
|
|
307
|
+
setLocation(root.dialect, rootBase, root);
|
|
308
|
+
setLocation(root.dialect, `${rootBase}#`, root);
|
|
309
|
+
for (const [uri, registeredSchema] of Object.entries(registry)) {
|
|
310
|
+
if (!isSchema(registeredSchema)) {
|
|
311
|
+
throw new Error(`Registered JSON Schema ${uri} must be a boolean or object.`);
|
|
312
|
+
}
|
|
313
|
+
for (const inheritedDialect of ["draft2020-12", "draft7"]) {
|
|
314
|
+
const remote = scan(registeredSchema, inheritedDialect, uri, undefined, "", true, `${inheritedDialect}:${uri}`);
|
|
315
|
+
resources.set(mapKey(remote.dialect, withoutFragment(uri)), remote);
|
|
316
|
+
setLocation(remote.dialect, withoutFragment(uri), remote);
|
|
317
|
+
setLocation(remote.dialect, `${withoutFragment(uri)}#`, remote);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
function findByDialect(map, dialect, uri) {
|
|
321
|
+
const alternate = dialect === "draft7" ? "draft2020-12" : "draft7";
|
|
322
|
+
return map.get(mapKey(dialect, uri)) ?? map.get(mapKey(alternate, uri));
|
|
323
|
+
}
|
|
324
|
+
function resolve(node, reference) {
|
|
325
|
+
const absolute = resolveUri(reference, node.baseUri);
|
|
326
|
+
const direct = findByDialect(locations, node.dialect, absolute) ??
|
|
327
|
+
findByDialect(resources, node.dialect, absolute) ??
|
|
328
|
+
findByDialect(anchors, node.dialect, absolute);
|
|
329
|
+
if (direct !== undefined) {
|
|
330
|
+
return direct;
|
|
331
|
+
}
|
|
332
|
+
const resource = findByDialect(resources, node.dialect, withoutFragment(absolute));
|
|
333
|
+
const fragment = fragmentOf(absolute);
|
|
334
|
+
if (resource !== undefined && fragment === "") {
|
|
335
|
+
return resource;
|
|
336
|
+
}
|
|
337
|
+
if (fragment.startsWith("/")) {
|
|
338
|
+
const pointerTarget = findByDialect(locations, node.dialect, `${withoutFragment(absolute)}#${fragment}`);
|
|
339
|
+
if (pointerTarget !== undefined) {
|
|
340
|
+
return pointerTarget;
|
|
341
|
+
}
|
|
342
|
+
if (resource !== undefined && isObject(resource.schema)) {
|
|
343
|
+
let target = resource.schema;
|
|
344
|
+
for (const segment of fragment.slice(1).split("/")) {
|
|
345
|
+
if (!isObject(target) && !Array.isArray(target)) {
|
|
346
|
+
target = undefined;
|
|
347
|
+
break;
|
|
348
|
+
}
|
|
349
|
+
const key = decodeURIComponent(segment).replaceAll("~1", "/").replaceAll("~0", "~");
|
|
350
|
+
target = Array.isArray(target) ? target[Number(key)] : target[key];
|
|
351
|
+
}
|
|
352
|
+
if (isObject(target)) {
|
|
353
|
+
const targetNode = nodesBySchema
|
|
354
|
+
.get(target)
|
|
355
|
+
?.find((candidate) => candidate.dialect === node.dialect);
|
|
356
|
+
if (targetNode !== undefined) {
|
|
357
|
+
return targetNode;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
throw new Error(`Unresolvable $ref: ${reference}`);
|
|
363
|
+
}
|
|
364
|
+
const reachableDocuments = new Set([root.documentId]);
|
|
365
|
+
let discoveredDocument = true;
|
|
366
|
+
while (discoveredDocument) {
|
|
367
|
+
discoveredDocument = false;
|
|
368
|
+
for (const pending of pendingReferences) {
|
|
369
|
+
if (!reachableDocuments.has(pending.node.documentId)) {
|
|
370
|
+
continue;
|
|
371
|
+
}
|
|
372
|
+
const target = resolve(pending.node, pending.reference);
|
|
373
|
+
if (!reachableDocuments.has(target.documentId)) {
|
|
374
|
+
reachableDocuments.add(target.documentId);
|
|
375
|
+
discoveredDocument = true;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
return {
|
|
380
|
+
root,
|
|
381
|
+
locations,
|
|
382
|
+
resources,
|
|
383
|
+
anchors,
|
|
384
|
+
dynamicAnchors,
|
|
385
|
+
resolve,
|
|
386
|
+
dynamicAnchor(scope, name) {
|
|
387
|
+
return dynamicAnchors.get(mapKey(scope.dialect, `${scope.resourceUri}#${name}`));
|
|
388
|
+
}
|
|
389
|
+
};
|
|
390
|
+
}
|