diff --git a/internal/protocol/protocol.go b/internal/protocol/protocol.go index 126816c..800ed88 100644 --- a/internal/protocol/protocol.go +++ b/internal/protocol/protocol.go @@ -9,7 +9,7 @@ package protocol import ( "encoding/json" - "github.com/modelcontextprotocol/go-sdk/internal/jsonschema" + "github.com/modelcontextprotocol/go-sdk/jsonschema" ) // Optional annotations for the client. The client can use annotations to inform diff --git a/internal/jsonschema/annotations.go b/jsonschema/annotations.go similarity index 100% rename from internal/jsonschema/annotations.go rename to jsonschema/annotations.go diff --git a/internal/jsonschema/infer.go b/jsonschema/infer.go similarity index 100% rename from internal/jsonschema/infer.go rename to jsonschema/infer.go diff --git a/internal/jsonschema/infer_test.go b/jsonschema/infer_test.go similarity index 97% rename from internal/jsonschema/infer_test.go rename to jsonschema/infer_test.go index f60f16b..e99a273 100644 --- a/internal/jsonschema/infer_test.go +++ b/jsonschema/infer_test.go @@ -9,7 +9,7 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" - "github.com/modelcontextprotocol/go-sdk/internal/jsonschema" + "github.com/modelcontextprotocol/go-sdk/jsonschema" ) func forType[T any]() *jsonschema.Schema { diff --git a/internal/jsonschema/resolve.go b/jsonschema/resolve.go similarity index 100% rename from internal/jsonschema/resolve.go rename to jsonschema/resolve.go diff --git a/internal/jsonschema/resolve_test.go b/jsonschema/resolve_test.go similarity index 100% rename from internal/jsonschema/resolve_test.go rename to jsonschema/resolve_test.go diff --git a/internal/jsonschema/schema.go b/jsonschema/schema.go similarity index 100% rename from internal/jsonschema/schema.go rename to jsonschema/schema.go diff --git a/internal/jsonschema/schema_test.go b/jsonschema/schema_test.go similarity index 100% rename from internal/jsonschema/schema_test.go rename to jsonschema/schema_test.go diff --git a/internal/jsonschema/testdata/draft2020-12/README.md b/jsonschema/testdata/draft2020-12/README.md similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/README.md rename to jsonschema/testdata/draft2020-12/README.md diff --git a/internal/jsonschema/testdata/draft2020-12/additionalProperties.json b/jsonschema/testdata/draft2020-12/additionalProperties.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/additionalProperties.json rename to jsonschema/testdata/draft2020-12/additionalProperties.json diff --git a/internal/jsonschema/testdata/draft2020-12/allOf.json b/jsonschema/testdata/draft2020-12/allOf.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/allOf.json rename to jsonschema/testdata/draft2020-12/allOf.json diff --git a/internal/jsonschema/testdata/draft2020-12/anyOf.json b/jsonschema/testdata/draft2020-12/anyOf.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/anyOf.json rename to jsonschema/testdata/draft2020-12/anyOf.json diff --git a/internal/jsonschema/testdata/draft2020-12/boolean_schema.json b/jsonschema/testdata/draft2020-12/boolean_schema.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/boolean_schema.json rename to jsonschema/testdata/draft2020-12/boolean_schema.json diff --git a/internal/jsonschema/testdata/draft2020-12/const.json b/jsonschema/testdata/draft2020-12/const.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/const.json rename to jsonschema/testdata/draft2020-12/const.json diff --git a/internal/jsonschema/testdata/draft2020-12/contains.json b/jsonschema/testdata/draft2020-12/contains.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/contains.json rename to jsonschema/testdata/draft2020-12/contains.json diff --git a/internal/jsonschema/testdata/draft2020-12/dependentRequired.json b/jsonschema/testdata/draft2020-12/dependentRequired.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/dependentRequired.json rename to jsonschema/testdata/draft2020-12/dependentRequired.json diff --git a/internal/jsonschema/testdata/draft2020-12/dependentSchemas.json b/jsonschema/testdata/draft2020-12/dependentSchemas.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/dependentSchemas.json rename to jsonschema/testdata/draft2020-12/dependentSchemas.json diff --git a/internal/jsonschema/testdata/draft2020-12/enum.json b/jsonschema/testdata/draft2020-12/enum.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/enum.json rename to jsonschema/testdata/draft2020-12/enum.json diff --git a/internal/jsonschema/testdata/draft2020-12/exclusiveMaximum.json b/jsonschema/testdata/draft2020-12/exclusiveMaximum.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/exclusiveMaximum.json rename to jsonschema/testdata/draft2020-12/exclusiveMaximum.json diff --git a/internal/jsonschema/testdata/draft2020-12/exclusiveMinimum.json b/jsonschema/testdata/draft2020-12/exclusiveMinimum.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/exclusiveMinimum.json rename to jsonschema/testdata/draft2020-12/exclusiveMinimum.json diff --git a/internal/jsonschema/testdata/draft2020-12/if-then-else.json b/jsonschema/testdata/draft2020-12/if-then-else.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/if-then-else.json rename to jsonschema/testdata/draft2020-12/if-then-else.json diff --git a/internal/jsonschema/testdata/draft2020-12/infinite-loop-detection.json b/jsonschema/testdata/draft2020-12/infinite-loop-detection.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/infinite-loop-detection.json rename to jsonschema/testdata/draft2020-12/infinite-loop-detection.json diff --git a/internal/jsonschema/testdata/draft2020-12/items.json b/jsonschema/testdata/draft2020-12/items.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/items.json rename to jsonschema/testdata/draft2020-12/items.json diff --git a/internal/jsonschema/testdata/draft2020-12/maxContains.json b/jsonschema/testdata/draft2020-12/maxContains.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/maxContains.json rename to jsonschema/testdata/draft2020-12/maxContains.json diff --git a/internal/jsonschema/testdata/draft2020-12/maxItems.json b/jsonschema/testdata/draft2020-12/maxItems.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/maxItems.json rename to jsonschema/testdata/draft2020-12/maxItems.json diff --git a/internal/jsonschema/testdata/draft2020-12/maxLength.json b/jsonschema/testdata/draft2020-12/maxLength.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/maxLength.json rename to jsonschema/testdata/draft2020-12/maxLength.json diff --git a/internal/jsonschema/testdata/draft2020-12/maxProperties.json b/jsonschema/testdata/draft2020-12/maxProperties.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/maxProperties.json rename to jsonschema/testdata/draft2020-12/maxProperties.json diff --git a/internal/jsonschema/testdata/draft2020-12/maximum.json b/jsonschema/testdata/draft2020-12/maximum.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/maximum.json rename to jsonschema/testdata/draft2020-12/maximum.json diff --git a/internal/jsonschema/testdata/draft2020-12/minContains.json b/jsonschema/testdata/draft2020-12/minContains.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/minContains.json rename to jsonschema/testdata/draft2020-12/minContains.json diff --git a/internal/jsonschema/testdata/draft2020-12/minItems.json b/jsonschema/testdata/draft2020-12/minItems.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/minItems.json rename to jsonschema/testdata/draft2020-12/minItems.json diff --git a/internal/jsonschema/testdata/draft2020-12/minLength.json b/jsonschema/testdata/draft2020-12/minLength.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/minLength.json rename to jsonschema/testdata/draft2020-12/minLength.json diff --git a/internal/jsonschema/testdata/draft2020-12/minProperties.json b/jsonschema/testdata/draft2020-12/minProperties.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/minProperties.json rename to jsonschema/testdata/draft2020-12/minProperties.json diff --git a/internal/jsonschema/testdata/draft2020-12/minimum.json b/jsonschema/testdata/draft2020-12/minimum.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/minimum.json rename to jsonschema/testdata/draft2020-12/minimum.json diff --git a/internal/jsonschema/testdata/draft2020-12/multipleOf.json b/jsonschema/testdata/draft2020-12/multipleOf.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/multipleOf.json rename to jsonschema/testdata/draft2020-12/multipleOf.json diff --git a/internal/jsonschema/testdata/draft2020-12/not.json b/jsonschema/testdata/draft2020-12/not.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/not.json rename to jsonschema/testdata/draft2020-12/not.json diff --git a/internal/jsonschema/testdata/draft2020-12/oneOf.json b/jsonschema/testdata/draft2020-12/oneOf.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/oneOf.json rename to jsonschema/testdata/draft2020-12/oneOf.json diff --git a/internal/jsonschema/testdata/draft2020-12/pattern.json b/jsonschema/testdata/draft2020-12/pattern.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/pattern.json rename to jsonschema/testdata/draft2020-12/pattern.json diff --git a/internal/jsonschema/testdata/draft2020-12/patternProperties.json b/jsonschema/testdata/draft2020-12/patternProperties.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/patternProperties.json rename to jsonschema/testdata/draft2020-12/patternProperties.json diff --git a/internal/jsonschema/testdata/draft2020-12/prefixItems.json b/jsonschema/testdata/draft2020-12/prefixItems.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/prefixItems.json rename to jsonschema/testdata/draft2020-12/prefixItems.json diff --git a/internal/jsonschema/testdata/draft2020-12/properties.json b/jsonschema/testdata/draft2020-12/properties.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/properties.json rename to jsonschema/testdata/draft2020-12/properties.json diff --git a/internal/jsonschema/testdata/draft2020-12/propertyNames.json b/jsonschema/testdata/draft2020-12/propertyNames.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/propertyNames.json rename to jsonschema/testdata/draft2020-12/propertyNames.json diff --git a/internal/jsonschema/testdata/draft2020-12/required.json b/jsonschema/testdata/draft2020-12/required.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/required.json rename to jsonschema/testdata/draft2020-12/required.json diff --git a/internal/jsonschema/testdata/draft2020-12/type.json b/jsonschema/testdata/draft2020-12/type.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/type.json rename to jsonschema/testdata/draft2020-12/type.json diff --git a/internal/jsonschema/testdata/draft2020-12/unevaluatedItems.json b/jsonschema/testdata/draft2020-12/unevaluatedItems.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/unevaluatedItems.json rename to jsonschema/testdata/draft2020-12/unevaluatedItems.json diff --git a/internal/jsonschema/testdata/draft2020-12/unevaluatedProperties.json b/jsonschema/testdata/draft2020-12/unevaluatedProperties.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/unevaluatedProperties.json rename to jsonschema/testdata/draft2020-12/unevaluatedProperties.json diff --git a/internal/jsonschema/testdata/draft2020-12/uniqueItems.json b/jsonschema/testdata/draft2020-12/uniqueItems.json similarity index 100% rename from internal/jsonschema/testdata/draft2020-12/uniqueItems.json rename to jsonschema/testdata/draft2020-12/uniqueItems.json diff --git a/internal/jsonschema/util.go b/jsonschema/util.go similarity index 100% rename from internal/jsonschema/util.go rename to jsonschema/util.go diff --git a/internal/jsonschema/util_test.go b/jsonschema/util_test.go similarity index 100% rename from internal/jsonschema/util_test.go rename to jsonschema/util_test.go diff --git a/internal/jsonschema/validate.go b/jsonschema/validate.go similarity index 100% rename from internal/jsonschema/validate.go rename to jsonschema/validate.go diff --git a/internal/jsonschema/validate_test.go b/jsonschema/validate_test.go similarity index 100% rename from internal/jsonschema/validate_test.go rename to jsonschema/validate_test.go diff --git a/mcp/mcp_test.go b/mcp/mcp_test.go index 9c2b765..0452fac 100644 --- a/mcp/mcp_test.go +++ b/mcp/mcp_test.go @@ -16,8 +16,8 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" - "github.com/modelcontextprotocol/go-sdk/internal/jsonschema" "github.com/modelcontextprotocol/go-sdk/internal/protocol" + "github.com/modelcontextprotocol/go-sdk/jsonschema" ) type hiParams struct { diff --git a/mcp/prompt.go b/mcp/prompt.go index 7ccf646..62d0a45 100644 --- a/mcp/prompt.go +++ b/mcp/prompt.go @@ -11,9 +11,9 @@ import ( "reflect" "slices" - "github.com/modelcontextprotocol/go-sdk/internal/jsonschema" "github.com/modelcontextprotocol/go-sdk/internal/protocol" "github.com/modelcontextprotocol/go-sdk/internal/util" + "github.com/modelcontextprotocol/go-sdk/jsonschema" ) // A PromptHandler handles a call to prompts/get. diff --git a/mcp/tool.go b/mcp/tool.go index 02748bb..e225952 100644 --- a/mcp/tool.go +++ b/mcp/tool.go @@ -9,9 +9,9 @@ import ( "encoding/json" "slices" - "github.com/modelcontextprotocol/go-sdk/internal/jsonschema" "github.com/modelcontextprotocol/go-sdk/internal/protocol" "github.com/modelcontextprotocol/go-sdk/internal/util" + "github.com/modelcontextprotocol/go-sdk/jsonschema" ) // A ToolHandler handles a call to tools/call. diff --git a/mcp/tool_test.go b/mcp/tool_test.go index ed7a44e..bb8cb48 100644 --- a/mcp/tool_test.go +++ b/mcp/tool_test.go @@ -11,7 +11,7 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/modelcontextprotocol/go-sdk/mcp" - "github.com/modelcontextprotocol/go-sdk/internal/jsonschema" + "github.com/modelcontextprotocol/go-sdk/jsonschema" ) // testToolHandler is used for type inference in TestMakeTool.