From 3381fbfaeb99a8a7960c1b642ce735dcddf3aa07 Mon Sep 17 00:00:00 2001 From: Adam Holt Date: Thu, 20 Nov 2025 13:45:05 +0100 Subject: [PATCH 1/7] Migrate repo resources to Go SDK --- pkg/github/repository_resource.go | 169 ++++++++++-------- pkg/github/repository_resource_test.go | 228 +++++++++++++------------ 2 files changed, 214 insertions(+), 183 deletions(-) diff --git a/pkg/github/repository_resource.go b/pkg/github/repository_resource.go index 8fb1a52ed..a2de7dded 100644 --- a/pkg/github/repository_resource.go +++ b/pkg/github/repository_resource.go @@ -1,6 +1,7 @@ package github import ( + "bytes" "context" "encoding/base64" "errors" @@ -15,107 +16,120 @@ import ( "github.com/github/github-mcp-server/pkg/raw" "github.com/github/github-mcp-server/pkg/translations" "github.com/google/go-github/v79/github" - "github.com/mark3labs/mcp-go/mcp" - "github.com/mark3labs/mcp-go/server" + "github.com/modelcontextprotocol/go-sdk/mcp" + "github.com/yosida95/uritemplate/v3" +) + +var ( + repositoryResourceContentURITemplate = uritemplate.MustNew("repo://{owner}/{repo}/contents{/path*}") + repositoryResourceBranchContentURITemplate = uritemplate.MustNew("repo://{owner}/{repo}/refs/heads/{branch}/contents{/path*}") + repositoryResourceCommitContentURITemplate = uritemplate.MustNew("repo://{owner}/{repo}/sha/{sha}/contents{/path*}") + repositoryResourceTagContentURITemplate = uritemplate.MustNew("repo://{owner}/{repo}/refs/tags/{tag}/contents{/path*}") + repositoryResourcePrContentURITemplate = uritemplate.MustNew("repo://{owner}/{repo}/refs/pull/{prNumber}/head/contents{/path*}") ) // GetRepositoryResourceContent defines the resource template and handler for getting repository content. -func GetRepositoryResourceContent(getClient GetClientFn, getRawClient raw.GetRawClientFn, t translations.TranslationHelperFunc) (mcp.ResourceTemplate, server.ResourceTemplateHandlerFunc) { - return mcp.NewResourceTemplate( - "repo://{owner}/{repo}/contents{/path*}", // Resource template - t("RESOURCE_REPOSITORY_CONTENT_DESCRIPTION", "Repository Content"), - ), - RepositoryResourceContentsHandler(getClient, getRawClient) +func GetRepositoryResourceContent(getClient GetClientFn, getRawClient raw.GetRawClientFn, t translations.TranslationHelperFunc) (mcp.ResourceTemplate, mcp.ResourceHandler) { + return mcp.ResourceTemplate{ + Name: "repository_content", + URITemplate: repositoryResourceContentURITemplate.Raw(), // Resource template + Description: t("RESOURCE_REPOSITORY_CONTENT_DESCRIPTION", "Repository Content"), + }, + RepositoryResourceContentsHandler(getClient, getRawClient, repositoryResourceContentURITemplate) } // GetRepositoryResourceBranchContent defines the resource template and handler for getting repository content for a branch. -func GetRepositoryResourceBranchContent(getClient GetClientFn, getRawClient raw.GetRawClientFn, t translations.TranslationHelperFunc) (mcp.ResourceTemplate, server.ResourceTemplateHandlerFunc) { - return mcp.NewResourceTemplate( - "repo://{owner}/{repo}/refs/heads/{branch}/contents{/path*}", // Resource template - t("RESOURCE_REPOSITORY_CONTENT_BRANCH_DESCRIPTION", "Repository Content for specific branch"), - ), - RepositoryResourceContentsHandler(getClient, getRawClient) +func GetRepositoryResourceBranchContent(getClient GetClientFn, getRawClient raw.GetRawClientFn, t translations.TranslationHelperFunc) (mcp.ResourceTemplate, mcp.ResourceHandler) { + return mcp.ResourceTemplate{ + Name: "repository_content_branch", + URITemplate: repositoryResourceBranchContentURITemplate.Raw(), // Resource template + Description: t("RESOURCE_REPOSITORY_CONTENT_BRANCH_DESCRIPTION", "Repository Content for specific branch"), + }, + RepositoryResourceContentsHandler(getClient, getRawClient, repositoryResourceBranchContentURITemplate) } // GetRepositoryResourceCommitContent defines the resource template and handler for getting repository content for a commit. -func GetRepositoryResourceCommitContent(getClient GetClientFn, getRawClient raw.GetRawClientFn, t translations.TranslationHelperFunc) (mcp.ResourceTemplate, server.ResourceTemplateHandlerFunc) { - return mcp.NewResourceTemplate( - "repo://{owner}/{repo}/sha/{sha}/contents{/path*}", // Resource template - t("RESOURCE_REPOSITORY_CONTENT_COMMIT_DESCRIPTION", "Repository Content for specific commit"), - ), - RepositoryResourceContentsHandler(getClient, getRawClient) +func GetRepositoryResourceCommitContent(getClient GetClientFn, getRawClient raw.GetRawClientFn, t translations.TranslationHelperFunc) (mcp.ResourceTemplate, mcp.ResourceHandler) { + return mcp.ResourceTemplate{ + Name: "repository_content_commit", + URITemplate: repositoryResourceCommitContentURITemplate.Raw(), // Resource template + Description: t("RESOURCE_REPOSITORY_CONTENT_COMMIT_DESCRIPTION", "Repository Content for specific commit"), + }, + RepositoryResourceContentsHandler(getClient, getRawClient, repositoryResourceCommitContentURITemplate) } // GetRepositoryResourceTagContent defines the resource template and handler for getting repository content for a tag. -func GetRepositoryResourceTagContent(getClient GetClientFn, getRawClient raw.GetRawClientFn, t translations.TranslationHelperFunc) (mcp.ResourceTemplate, server.ResourceTemplateHandlerFunc) { - return mcp.NewResourceTemplate( - "repo://{owner}/{repo}/refs/tags/{tag}/contents{/path*}", // Resource template - t("RESOURCE_REPOSITORY_CONTENT_TAG_DESCRIPTION", "Repository Content for specific tag"), - ), - RepositoryResourceContentsHandler(getClient, getRawClient) +func GetRepositoryResourceTagContent(getClient GetClientFn, getRawClient raw.GetRawClientFn, t translations.TranslationHelperFunc) (mcp.ResourceTemplate, mcp.ResourceHandler) { + return mcp.ResourceTemplate{ + Name: "repository_content_tag", + URITemplate: repositoryResourceTagContentURITemplate.Raw(), // Resource template + Description: t("RESOURCE_REPOSITORY_CONTENT_TAG_DESCRIPTION", "Repository Content for specific tag"), + }, + RepositoryResourceContentsHandler(getClient, getRawClient, repositoryResourceTagContentURITemplate) } // GetRepositoryResourcePrContent defines the resource template and handler for getting repository content for a pull request. -func GetRepositoryResourcePrContent(getClient GetClientFn, getRawClient raw.GetRawClientFn, t translations.TranslationHelperFunc) (mcp.ResourceTemplate, server.ResourceTemplateHandlerFunc) { - return mcp.NewResourceTemplate( - "repo://{owner}/{repo}/refs/pull/{prNumber}/head/contents{/path*}", // Resource template - t("RESOURCE_REPOSITORY_CONTENT_PR_DESCRIPTION", "Repository Content for specific pull request"), - ), - RepositoryResourceContentsHandler(getClient, getRawClient) +func GetRepositoryResourcePrContent(getClient GetClientFn, getRawClient raw.GetRawClientFn, t translations.TranslationHelperFunc) (mcp.ResourceTemplate, mcp.ResourceHandler) { + return mcp.ResourceTemplate{ + Name: "repository_content_pr", + URITemplate: repositoryResourcePrContentURITemplate.Raw(), // Resource template + Description: t("RESOURCE_REPOSITORY_CONTENT_PR_DESCRIPTION", "Repository Content for specific pull request"), + }, + RepositoryResourceContentsHandler(getClient, getRawClient, repositoryResourcePrContentURITemplate) } // RepositoryResourceContentsHandler returns a handler function for repository content requests. -func RepositoryResourceContentsHandler(getClient GetClientFn, getRawClient raw.GetRawClientFn) func(ctx context.Context, request mcp.ReadResourceRequest) ([]mcp.ResourceContents, error) { - return func(ctx context.Context, request mcp.ReadResourceRequest) ([]mcp.ResourceContents, error) { - // the matcher will give []string with one element - // https://github.com/mark3labs/mcp-go/pull/54 - o, ok := request.Params.Arguments["owner"].([]string) - if !ok || len(o) == 0 { +func RepositoryResourceContentsHandler(getClient GetClientFn, getRawClient raw.GetRawClientFn, resourceUriTemplate *uritemplate.Template) mcp.ResourceHandler { + return func(ctx context.Context, request *mcp.ReadResourceRequest) (*mcp.ReadResourceResult, error) { + // Match the URI to extract parameters + uriValues := resourceUriTemplate.Match(request.Params.URI) + if uriValues == nil { + return nil, fmt.Errorf("failed to match URI: %s", request.Params.URI) + } + + // Extract required vars + owner := uriValues.Get("owner").String() + repo := uriValues.Get("repo").String() + + if owner == "" { return nil, errors.New("owner is required") } - owner := o[0] - r, ok := request.Params.Arguments["repo"].([]string) - if !ok || len(r) == 0 { + if repo == "" { return nil, errors.New("repo is required") } - repo := r[0] - // path should be a joined list of the path parts - path := "" - p, ok := request.Params.Arguments["path"].([]string) - if ok { - path = strings.Join(p, "/") - } + path := uriValues.Get("path").String() opts := &github.RepositoryContentGetOptions{} rawOpts := &raw.ContentOpts{} - sha, ok := request.Params.Arguments["sha"].([]string) - if ok && len(sha) > 0 { - opts.Ref = sha[0] - rawOpts.SHA = sha[0] + sha := uriValues.Get("sha").String() + if sha != "" { + opts.Ref = sha + rawOpts.SHA = sha } - branch, ok := request.Params.Arguments["branch"].([]string) - if ok && len(branch) > 0 { - opts.Ref = "refs/heads/" + branch[0] - rawOpts.Ref = "refs/heads/" + branch[0] + branch := uriValues.Get("branch").String() + if branch != "" { + opts.Ref = "refs/heads/" + branch + rawOpts.Ref = "refs/heads/" + branch } - tag, ok := request.Params.Arguments["tag"].([]string) - if ok && len(tag) > 0 { - opts.Ref = "refs/tags/" + tag[0] - rawOpts.Ref = "refs/tags/" + tag[0] + tag := uriValues.Get("tag").String() + if tag != "" { + opts.Ref = "refs/tags/" + tag + rawOpts.Ref = "refs/tags/" + tag } - prNumber, ok := request.Params.Arguments["prNumber"].([]string) - if ok && len(prNumber) > 0 { + + prNumber := uriValues.Get("prNumber").String() + if prNumber != "" { // fetch the PR from the API to get the latest commit and use SHA githubClient, err := getClient(ctx) if err != nil { return nil, fmt.Errorf("failed to get GitHub client: %w", err) } - prNum, err := strconv.Atoi(prNumber[0]) + prNum, err := strconv.Atoi(prNumber) if err != nil { return nil, fmt.Errorf("invalid pull request number: %w", err) } @@ -161,19 +175,28 @@ func RepositoryResourceContentsHandler(getClient GetClientFn, getRawClient raw.G switch { case strings.HasPrefix(mimeType, "text"), strings.HasPrefix(mimeType, "application"): - return []mcp.ResourceContents{ - mcp.TextResourceContents{ - URI: request.Params.URI, - MIMEType: mimeType, - Text: string(content), + return &mcp.ReadResourceResult{ + Contents: []*mcp.ResourceContents{ + { + URI: request.Params.URI, + MIMEType: mimeType, + Text: string(content), + }, }, }, nil default: - return []mcp.ResourceContents{ - mcp.BlobResourceContents{ - URI: request.Params.URI, - MIMEType: mimeType, - Blob: base64.StdEncoding.EncodeToString(content), + var buf bytes.Buffer + base64Encoder := base64.NewEncoder(base64.RawStdEncoding, &buf) + base64Encoder.Write(content) + defer base64Encoder.Close() + + return &mcp.ReadResourceResult{ + Contents: []*mcp.ResourceContents{ + { + URI: request.Params.URI, + MIMEType: mimeType, + Blob: buf.Bytes(), + }, }, }, nil } diff --git a/pkg/github/repository_resource_test.go b/pkg/github/repository_resource_test.go index 96bf33b72..84bf23e72 100644 --- a/pkg/github/repository_resource_test.go +++ b/pkg/github/repository_resource_test.go @@ -9,19 +9,29 @@ import ( "github.com/github/github-mcp-server/pkg/raw" "github.com/github/github-mcp-server/pkg/translations" "github.com/google/go-github/v79/github" - "github.com/mark3labs/mcp-go/mcp" "github.com/migueleliasweb/go-github-mock/src/mock" + "github.com/modelcontextprotocol/go-sdk/mcp" "github.com/stretchr/testify/require" ) -func Test_repositoryResourceContentsHandler(t *testing.T) { +type resourceResponseType int + +const ( + resourceResponseTypeUnknown resourceResponseType = iota + resourceResponseTypeBlob + resourceResponseTypeText +) + +func Test_repositoryResourceContents(t *testing.T) { base, _ := url.Parse("https://raw.example.com/") tests := []struct { - name string - mockedClient *http.Client - requestArgs map[string]any - expectError string - expectedResult any + name string + mockedClient *http.Client + uri string + handlerFn func(getClient GetClientFn, getRawClient raw.GetRawClientFn, t translations.TranslationHelperFunc) mcp.ResourceHandler + expectedResponseType resourceResponseType + expectError string + expectedResult *mcp.ReadResourceResult }{ { name: "missing owner", @@ -29,15 +39,19 @@ func Test_repositoryResourceContentsHandler(t *testing.T) { mock.WithRequestMatchHandler( raw.GetRawReposContentsByOwnerByRepoByPath, http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { - w.Header().Set("Content-Type", "image/png") - // as this is given as a png, it will return the content as a blob + w.Header().Set("Content-Type", "text/markdown") _, err := w.Write([]byte("# Test Repository\n\nThis is a test repository.")) require.NoError(t, err) }), ), ), - requestArgs: map[string]any{}, - expectError: "owner is required", + uri: "repo:///repo/contents/README.md", + handlerFn: func(getClient GetClientFn, getRawClient raw.GetRawClientFn, t translations.TranslationHelperFunc) mcp.ResourceHandler { + _, handler := GetRepositoryResourceContent(getClient, getRawClient, t) + return handler + }, + expectedResponseType: resourceResponseTypeText, // Ignored as error is expected + expectError: "owner is required", }, { name: "missing repo", @@ -45,17 +59,20 @@ func Test_repositoryResourceContentsHandler(t *testing.T) { mock.WithRequestMatchHandler( raw.GetRawReposContentsByOwnerByRepoByBranchByPath, http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { - w.Header().Set("Content-Type", "image/png") + w.Header().Set("Content-Type", "text/markdown") // as this is given as a png, it will return the content as a blob _, err := w.Write([]byte("# Test Repository\n\nThis is a test repository.")) require.NoError(t, err) }), ), ), - requestArgs: map[string]any{ - "owner": []string{"owner"}, + uri: "repo://owner//refs/heads/main/contents/README.md", + handlerFn: func(getClient GetClientFn, getRawClient raw.GetRawClientFn, t translations.TranslationHelperFunc) mcp.ResourceHandler { + _, handler := GetRepositoryResourceBranchContent(getClient, getRawClient, t) + return handler }, - expectError: "repo is required", + expectedResponseType: resourceResponseTypeText, // Ignored as error is expected + expectError: "repo is required", }, { name: "successful blob content fetch", @@ -69,16 +86,18 @@ func Test_repositoryResourceContentsHandler(t *testing.T) { }), ), ), - requestArgs: map[string]any{ - "owner": []string{"owner"}, - "repo": []string{"repo"}, - "path": []string{"data.png"}, + uri: "repo://owner/repo/contents/data.png", + handlerFn: func(getClient GetClientFn, getRawClient raw.GetRawClientFn, t translations.TranslationHelperFunc) mcp.ResourceHandler { + _, handler := GetRepositoryResourceContent(getClient, getRawClient, t) + return handler }, - expectedResult: []mcp.BlobResourceContents{{ - Blob: "IyBUZXN0IFJlcG9zaXRvcnkKClRoaXMgaXMgYSB0ZXN0IHJlcG9zaXRvcnku", - MIMEType: "image/png", - URI: "", - }}, + expectedResponseType: resourceResponseTypeBlob, + expectedResult: &mcp.ReadResourceResult{ + Contents: []*mcp.ResourceContents{{ + Blob: []byte("IyBUZXN0IFJlcG9zaXRvcnkKClRoaXMgaXMgYSB0ZXN0IHJlcG9zaXRvcnku"), + MIMEType: "image/png", + URI: "", + }}}, }, { name: "successful text content fetch (HEAD)", @@ -92,16 +111,18 @@ func Test_repositoryResourceContentsHandler(t *testing.T) { }), ), ), - requestArgs: map[string]any{ - "owner": []string{"owner"}, - "repo": []string{"repo"}, - "path": []string{"README.md"}, + uri: "repo://owner/repo/contents/README.md", + handlerFn: func(getClient GetClientFn, getRawClient raw.GetRawClientFn, t translations.TranslationHelperFunc) mcp.ResourceHandler { + _, handler := GetRepositoryResourceContent(getClient, getRawClient, t) + return handler }, - expectedResult: []mcp.TextResourceContents{{ - Text: "# Test Repository\n\nThis is a test repository.", - MIMEType: "text/markdown", - URI: "", - }}, + expectedResponseType: resourceResponseTypeText, + expectedResult: &mcp.ReadResourceResult{ + Contents: []*mcp.ResourceContents{{ + Text: "# Test Repository\n\nThis is a test repository.", + MIMEType: "text/markdown", + URI: "", + }}}, }, { name: "successful text content fetch (branch)", @@ -115,17 +136,18 @@ func Test_repositoryResourceContentsHandler(t *testing.T) { }), ), ), - requestArgs: map[string]any{ - "owner": []string{"owner"}, - "repo": []string{"repo"}, - "path": []string{"README.md"}, - "branch": []string{"main"}, + uri: "repo://owner/repo/refs/heads/main/contents/README.md", + handlerFn: func(getClient GetClientFn, getRawClient raw.GetRawClientFn, t translations.TranslationHelperFunc) mcp.ResourceHandler { + _, handler := GetRepositoryResourceBranchContent(getClient, getRawClient, t) + return handler }, - expectedResult: []mcp.TextResourceContents{{ - Text: "# Test Repository\n\nThis is a test repository.", - MIMEType: "text/markdown", - URI: "", - }}, + expectedResponseType: resourceResponseTypeText, + expectedResult: &mcp.ReadResourceResult{ + Contents: []*mcp.ResourceContents{{ + Text: "# Test Repository\n\nThis is a test repository.", + MIMEType: "text/markdown", + URI: "", + }}}, }, { name: "successful text content fetch (tag)", @@ -139,17 +161,18 @@ func Test_repositoryResourceContentsHandler(t *testing.T) { }), ), ), - requestArgs: map[string]any{ - "owner": []string{"owner"}, - "repo": []string{"repo"}, - "path": []string{"README.md"}, - "tag": []string{"v1.0.0"}, + uri: "repo://owner/repo/refs/tags/v1.0.0/contents/README.md", + handlerFn: func(getClient GetClientFn, getRawClient raw.GetRawClientFn, t translations.TranslationHelperFunc) mcp.ResourceHandler { + _, handler := GetRepositoryResourceTagContent(getClient, getRawClient, t) + return handler }, - expectedResult: []mcp.TextResourceContents{{ - Text: "# Test Repository\n\nThis is a test repository.", - MIMEType: "text/markdown", - URI: "", - }}, + expectedResponseType: resourceResponseTypeText, + expectedResult: &mcp.ReadResourceResult{ + Contents: []*mcp.ResourceContents{{ + Text: "# Test Repository\n\nThis is a test repository.", + MIMEType: "text/markdown", + URI: "", + }}}, }, { name: "successful text content fetch (sha)", @@ -163,17 +186,18 @@ func Test_repositoryResourceContentsHandler(t *testing.T) { }), ), ), - requestArgs: map[string]any{ - "owner": []string{"owner"}, - "repo": []string{"repo"}, - "path": []string{"README.md"}, - "sha": []string{"abc123"}, + uri: "repo://owner/repo/sha/abc123/contents/README.md", + handlerFn: func(getClient GetClientFn, getRawClient raw.GetRawClientFn, t translations.TranslationHelperFunc) mcp.ResourceHandler { + _, handler := GetRepositoryResourceCommitContent(getClient, getRawClient, t) + return handler }, - expectedResult: []mcp.TextResourceContents{{ - Text: "# Test Repository\n\nThis is a test repository.", - MIMEType: "text/markdown", - URI: "", - }}, + expectedResponseType: resourceResponseTypeText, + expectedResult: &mcp.ReadResourceResult{ + Contents: []*mcp.ResourceContents{{ + Text: "# Test Repository\n\nThis is a test repository.", + MIMEType: "text/markdown", + URI: "", + }}}, }, { name: "successful text content fetch (pr)", @@ -195,17 +219,18 @@ func Test_repositoryResourceContentsHandler(t *testing.T) { }), ), ), - requestArgs: map[string]any{ - "owner": []string{"owner"}, - "repo": []string{"repo"}, - "path": []string{"README.md"}, - "prNumber": []string{"42"}, + uri: "repo://owner/repo/refs/pull/42/head/contents/README.md", + handlerFn: func(getClient GetClientFn, getRawClient raw.GetRawClientFn, t translations.TranslationHelperFunc) mcp.ResourceHandler { + _, handler := GetRepositoryResourcePrContent(getClient, getRawClient, t) + return handler }, - expectedResult: []mcp.TextResourceContents{{ - Text: "# Test Repository\n\nThis is a test repository.", - MIMEType: "text/markdown", - URI: "", - }}, + expectedResponseType: resourceResponseTypeText, + expectedResult: &mcp.ReadResourceResult{ + Contents: []*mcp.ResourceContents{{ + Text: "# Test Repository\n\nThis is a test repository.", + MIMEType: "text/markdown", + URI: "", + }}}, }, { name: "content fetch fails", @@ -218,13 +243,13 @@ func Test_repositoryResourceContentsHandler(t *testing.T) { }), ), ), - requestArgs: map[string]any{ - "owner": []string{"owner"}, - "repo": []string{"repo"}, - "path": []string{"nonexistent.md"}, - "branch": []string{"main"}, + uri: "repo://owner/repo/contents/nonexistent.md", + handlerFn: func(getClient GetClientFn, getRawClient raw.GetRawClientFn, t translations.TranslationHelperFunc) mcp.ResourceHandler { + _, handler := GetRepositoryResourceContent(getClient, getRawClient, t) + return handler }, - expectError: "404 Not Found", + expectedResponseType: resourceResponseTypeText, // Ignored as error is expected + expectError: "404 Not Found", }, } @@ -232,14 +257,11 @@ func Test_repositoryResourceContentsHandler(t *testing.T) { t.Run(tc.name, func(t *testing.T) { client := github.NewClient(tc.mockedClient) mockRawClient := raw.NewClient(client, base) - handler := RepositoryResourceContentsHandler((stubGetClientFn(client)), stubGetRawClientFn(mockRawClient)) + handler := tc.handlerFn(stubGetClientFn(client), stubGetRawClientFn(mockRawClient), translations.NullTranslationHelper) - request := mcp.ReadResourceRequest{ - Params: struct { - URI string `json:"uri"` - Arguments map[string]any `json:"arguments,omitempty"` - }{ - Arguments: tc.requestArgs, + request := &mcp.ReadResourceRequest{ + Params: &mcp.ReadResourceParams{ + URI: tc.uri, }, } @@ -251,30 +273,16 @@ func Test_repositoryResourceContentsHandler(t *testing.T) { } require.NoError(t, err) - require.ElementsMatch(t, resp, tc.expectedResult) + + content := resp.Contents[0] + switch tc.expectedResponseType { + case resourceResponseTypeBlob: + require.Equal(t, tc.expectedResult.Contents[0].Blob, content.Blob) + case resourceResponseTypeText: + require.Equal(t, tc.expectedResult.Contents[0].Text, content.Text) + default: + t.Fatalf("unknown expectedResponseType %v", tc.expectedResponseType) + } }) } } - -func Test_GetRepositoryResourceContent(t *testing.T) { - mockRawClient := raw.NewClient(github.NewClient(nil), &url.URL{}) - tmpl, _ := GetRepositoryResourceContent(nil, stubGetRawClientFn(mockRawClient), translations.NullTranslationHelper) - require.Equal(t, "repo://{owner}/{repo}/contents{/path*}", tmpl.URITemplate.Raw()) -} - -func Test_GetRepositoryResourceBranchContent(t *testing.T) { - mockRawClient := raw.NewClient(github.NewClient(nil), &url.URL{}) - tmpl, _ := GetRepositoryResourceBranchContent(nil, stubGetRawClientFn(mockRawClient), translations.NullTranslationHelper) - require.Equal(t, "repo://{owner}/{repo}/refs/heads/{branch}/contents{/path*}", tmpl.URITemplate.Raw()) -} -func Test_GetRepositoryResourceCommitContent(t *testing.T) { - mockRawClient := raw.NewClient(github.NewClient(nil), &url.URL{}) - tmpl, _ := GetRepositoryResourceCommitContent(nil, stubGetRawClientFn(mockRawClient), translations.NullTranslationHelper) - require.Equal(t, "repo://{owner}/{repo}/sha/{sha}/contents{/path*}", tmpl.URITemplate.Raw()) -} - -func Test_GetRepositoryResourceTagContent(t *testing.T) { - mockRawClient := raw.NewClient(github.NewClient(nil), &url.URL{}) - tmpl, _ := GetRepositoryResourceTagContent(nil, stubGetRawClientFn(mockRawClient), translations.NullTranslationHelper) - require.Equal(t, "repo://{owner}/{repo}/refs/tags/{tag}/contents{/path*}", tmpl.URITemplate.Raw()) -} From 4659b80c5bfa0ac7d69740e7d2e501b8d6dc6e89 Mon Sep 17 00:00:00 2001 From: Adam Holt Date: Thu, 20 Nov 2025 13:51:40 +0100 Subject: [PATCH 2/7] Enable resources for repos --- pkg/github/tools.go | 60 ++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/pkg/github/tools.go b/pkg/github/tools.go index 11d148695..4f48b5046 100644 --- a/pkg/github/tools.go +++ b/pkg/github/tools.go @@ -165,35 +165,35 @@ func DefaultToolsetGroup(readOnly bool, getClient GetClientFn, getGQLClient GetG // Define all available features with their default state (disabled) // Create toolsets - // repos := toolsets.NewToolset(ToolsetMetadataRepos.ID, ToolsetMetadataRepos.Description). - // AddReadTools( - // toolsets.NewServerTool(SearchRepositories(getClient, t)), - // toolsets.NewServerTool(GetFileContents(getClient, getRawClient, t)), - // toolsets.NewServerTool(ListCommits(getClient, t)), - // toolsets.NewServerTool(SearchCode(getClient, t)), - // toolsets.NewServerTool(GetCommit(getClient, t)), - // toolsets.NewServerTool(ListBranches(getClient, t)), - // toolsets.NewServerTool(ListTags(getClient, t)), - // toolsets.NewServerTool(GetTag(getClient, t)), - // toolsets.NewServerTool(ListReleases(getClient, t)), - // toolsets.NewServerTool(GetLatestRelease(getClient, t)), - // toolsets.NewServerTool(GetReleaseByTag(getClient, t)), - // ). - // AddWriteTools( - // toolsets.NewServerTool(CreateOrUpdateFile(getClient, t)), - // toolsets.NewServerTool(CreateRepository(getClient, t)), - // toolsets.NewServerTool(ForkRepository(getClient, t)), - // toolsets.NewServerTool(CreateBranch(getClient, t)), - // toolsets.NewServerTool(PushFiles(getClient, t)), - // toolsets.NewServerTool(DeleteFile(getClient, t)), - // ). - // AddResourceTemplates( - // toolsets.NewServerResourceTemplate(GetRepositoryResourceContent(getClient, getRawClient, t)), - // toolsets.NewServerResourceTemplate(GetRepositoryResourceBranchContent(getClient, getRawClient, t)), - // toolsets.NewServerResourceTemplate(GetRepositoryResourceCommitContent(getClient, getRawClient, t)), - // toolsets.NewServerResourceTemplate(GetRepositoryResourceTagContent(getClient, getRawClient, t)), - // toolsets.NewServerResourceTemplate(GetRepositoryResourcePrContent(getClient, getRawClient, t)), - // ) + repos := toolsets.NewToolset(ToolsetMetadataRepos.ID, ToolsetMetadataRepos.Description). + // AddReadTools( + // toolsets.NewServerTool(SearchRepositories(getClient, t)), + // toolsets.NewServerTool(GetFileContents(getClient, getRawClient, t)), + // toolsets.NewServerTool(ListCommits(getClient, t)), + // toolsets.NewServerTool(SearchCode(getClient, t)), + // toolsets.NewServerTool(GetCommit(getClient, t)), + // toolsets.NewServerTool(ListBranches(getClient, t)), + // toolsets.NewServerTool(ListTags(getClient, t)), + // toolsets.NewServerTool(GetTag(getClient, t)), + // toolsets.NewServerTool(ListReleases(getClient, t)), + // toolsets.NewServerTool(GetLatestRelease(getClient, t)), + // toolsets.NewServerTool(GetReleaseByTag(getClient, t)), + // ). + // AddWriteTools( + // toolsets.NewServerTool(CreateOrUpdateFile(getClient, t)), + // toolsets.NewServerTool(CreateRepository(getClient, t)), + // toolsets.NewServerTool(ForkRepository(getClient, t)), + // toolsets.NewServerTool(CreateBranch(getClient, t)), + // toolsets.NewServerTool(PushFiles(getClient, t)), + // toolsets.NewServerTool(DeleteFile(getClient, t)), + // ). + AddResourceTemplates( + toolsets.NewServerResourceTemplate(GetRepositoryResourceContent(getClient, getRawClient, t)), + toolsets.NewServerResourceTemplate(GetRepositoryResourceBranchContent(getClient, getRawClient, t)), + toolsets.NewServerResourceTemplate(GetRepositoryResourceCommitContent(getClient, getRawClient, t)), + toolsets.NewServerResourceTemplate(GetRepositoryResourceTagContent(getClient, getRawClient, t)), + toolsets.NewServerResourceTemplate(GetRepositoryResourcePrContent(getClient, getRawClient, t)), + ) git := toolsets.NewToolset(ToolsetMetadataGit.ID, ToolsetMetadataGit.Description). AddReadTools( toolsets.NewServerTool(GetRepositoryTree(getClient, t)), @@ -360,7 +360,7 @@ func DefaultToolsetGroup(readOnly bool, getClient GetClientFn, getGQLClient GetG // Add toolsets to the group tsg.AddToolset(contextTools) - // tsg.AddToolset(repos) + tsg.AddToolset(repos) tsg.AddToolset(git) tsg.AddToolset(issues) // tsg.AddToolset(orgs) From cb6be02b3e5e1046bf27eedfd1e702e5bd148e3c Mon Sep 17 00:00:00 2001 From: Adam Holt Date: Thu, 20 Nov 2025 13:54:10 +0100 Subject: [PATCH 3/7] Properly handle encoding and closing of the buffer --- pkg/github/repository_resource.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkg/github/repository_resource.go b/pkg/github/repository_resource.go index a2de7dded..178b5d18c 100644 --- a/pkg/github/repository_resource.go +++ b/pkg/github/repository_resource.go @@ -187,8 +187,13 @@ func RepositoryResourceContentsHandler(getClient GetClientFn, getRawClient raw.G default: var buf bytes.Buffer base64Encoder := base64.NewEncoder(base64.RawStdEncoding, &buf) - base64Encoder.Write(content) - defer base64Encoder.Close() + _, err := base64Encoder.Write(content) + if err != nil { + return nil, fmt.Errorf("failed to base64 encode content: %w", err) + } + if err := base64Encoder.Close(); err != nil { + return nil, fmt.Errorf("failed to close base64 encoder: %w", err) + } return &mcp.ReadResourceResult{ Contents: []*mcp.ResourceContents{ From 14811ed5a2180135d41884e667e38b06d258f72d Mon Sep 17 00:00:00 2001 From: Adam Holt Date: Thu, 20 Nov 2025 13:54:30 +0100 Subject: [PATCH 4/7] Remove outdated comment --- pkg/github/repository_resource_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/github/repository_resource_test.go b/pkg/github/repository_resource_test.go index 84bf23e72..da86d1f6d 100644 --- a/pkg/github/repository_resource_test.go +++ b/pkg/github/repository_resource_test.go @@ -60,7 +60,6 @@ func Test_repositoryResourceContents(t *testing.T) { raw.GetRawReposContentsByOwnerByRepoByBranchByPath, http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.Header().Set("Content-Type", "text/markdown") - // as this is given as a png, it will return the content as a blob _, err := w.Write([]byte("# Test Repository\n\nThis is a test repository.")) require.NoError(t, err) }), From d1773927f9fc253e739db9a8280c6376707a4e01 Mon Sep 17 00:00:00 2001 From: Adam Holt Date: Thu, 20 Nov 2025 13:55:48 +0100 Subject: [PATCH 5/7] Switch to StdEncoding, as it was originally --- pkg/github/repository_resource.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/github/repository_resource.go b/pkg/github/repository_resource.go index 178b5d18c..5764671e0 100644 --- a/pkg/github/repository_resource.go +++ b/pkg/github/repository_resource.go @@ -186,7 +186,7 @@ func RepositoryResourceContentsHandler(getClient GetClientFn, getRawClient raw.G }, nil default: var buf bytes.Buffer - base64Encoder := base64.NewEncoder(base64.RawStdEncoding, &buf) + base64Encoder := base64.NewEncoder(base64.StdEncoding, &buf) _, err := base64Encoder.Write(content) if err != nil { return nil, fmt.Errorf("failed to base64 encode content: %w", err) From 160ef912f6d5b55800f7f340d46fe4f7bfad3614 Mon Sep 17 00:00:00 2001 From: Adam Holt Date: Thu, 20 Nov 2025 14:09:58 +0100 Subject: [PATCH 6/7] fix casing for linter --- pkg/github/repository_resource.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/github/repository_resource.go b/pkg/github/repository_resource.go index 5764671e0..8857dbae3 100644 --- a/pkg/github/repository_resource.go +++ b/pkg/github/repository_resource.go @@ -79,10 +79,10 @@ func GetRepositoryResourcePrContent(getClient GetClientFn, getRawClient raw.GetR } // RepositoryResourceContentsHandler returns a handler function for repository content requests. -func RepositoryResourceContentsHandler(getClient GetClientFn, getRawClient raw.GetRawClientFn, resourceUriTemplate *uritemplate.Template) mcp.ResourceHandler { +func RepositoryResourceContentsHandler(getClient GetClientFn, getRawClient raw.GetRawClientFn, resourceURITemplate *uritemplate.Template) mcp.ResourceHandler { return func(ctx context.Context, request *mcp.ReadResourceRequest) (*mcp.ReadResourceResult, error) { // Match the URI to extract parameters - uriValues := resourceUriTemplate.Match(request.Params.URI) + uriValues := resourceURITemplate.Match(request.Params.URI) if uriValues == nil { return nil, fmt.Errorf("failed to match URI: %s", request.Params.URI) } From af231ca72bd8509cac0a5ab35386e63198053608 Mon Sep 17 00:00:00 2001 From: Adam Holt Date: Thu, 20 Nov 2025 14:11:50 +0100 Subject: [PATCH 7/7] Update licenses --- go.mod | 2 +- third-party-licenses.darwin.md | 7 - third-party-licenses.linux.md | 7 - third-party-licenses.windows.md | 7 - .../github.com/bahlo/generic-list-go/LICENSE | 27 --- .../github.com/buger/jsonparser/LICENSE | 21 -- third-party/github.com/google/uuid/LICENSE | 27 --- .../github.com/invopop/jsonschema/COPYING | 19 -- .../github.com/mark3labs/mcp-go/LICENSE | 21 -- .../github.com/wk8/go-ordered-map/v2/LICENSE | 201 ------------------ third-party/gopkg.in/yaml.v3/LICENSE | 50 ----- third-party/gopkg.in/yaml.v3/NOTICE | 13 -- 12 files changed, 1 insertion(+), 401 deletions(-) delete mode 100644 third-party/github.com/bahlo/generic-list-go/LICENSE delete mode 100644 third-party/github.com/buger/jsonparser/LICENSE delete mode 100644 third-party/github.com/google/uuid/LICENSE delete mode 100644 third-party/github.com/invopop/jsonschema/COPYING delete mode 100644 third-party/github.com/mark3labs/mcp-go/LICENSE delete mode 100644 third-party/github.com/wk8/go-ordered-map/v2/LICENSE delete mode 100644 third-party/gopkg.in/yaml.v3/LICENSE delete mode 100644 third-party/gopkg.in/yaml.v3/NOTICE diff --git a/go.mod b/go.mod index cb0d0e89c..b79c5bb1f 100644 --- a/go.mod +++ b/go.mod @@ -53,7 +53,7 @@ require ( github.com/spf13/cast v1.10.0 // indirect github.com/spf13/pflag v1.0.10 github.com/subosito/gotenv v1.6.0 // indirect - github.com/yosida95/uritemplate/v3 v3.0.2 // indirect + github.com/yosida95/uritemplate/v3 v3.0.2 golang.org/x/oauth2 v0.30.0 // indirect golang.org/x/sys v0.31.0 // indirect golang.org/x/text v0.28.0 // indirect diff --git a/third-party-licenses.darwin.md b/third-party-licenses.darwin.md index 3823082a9..eace7c478 100644 --- a/third-party-licenses.darwin.md +++ b/third-party-licenses.darwin.md @@ -8,8 +8,6 @@ Some packages may only be included on certain architectures or operating systems - [github.com/aymerick/douceur](https://pkg.go.dev/github.com/aymerick/douceur) ([MIT](https://github.com/aymerick/douceur/blob/v0.2.0/LICENSE)) - - [github.com/bahlo/generic-list-go](https://pkg.go.dev/github.com/bahlo/generic-list-go) ([BSD-3-Clause](https://github.com/bahlo/generic-list-go/blob/v0.2.0/LICENSE)) - - [github.com/buger/jsonparser](https://pkg.go.dev/github.com/buger/jsonparser) ([MIT](https://github.com/buger/jsonparser/blob/v1.1.1/LICENSE)) - [github.com/fsnotify/fsnotify](https://pkg.go.dev/github.com/fsnotify/fsnotify) ([BSD-3-Clause](https://github.com/fsnotify/fsnotify/blob/v1.9.0/LICENSE)) - [github.com/github/github-mcp-server](https://pkg.go.dev/github.com/github/github-mcp-server) ([MIT](https://github.com/github/github-mcp-server/blob/HEAD/LICENSE)) - [github.com/go-openapi/jsonpointer](https://pkg.go.dev/github.com/go-openapi/jsonpointer) ([Apache-2.0](https://github.com/go-openapi/jsonpointer/blob/v0.19.5/LICENSE)) @@ -19,14 +17,11 @@ Some packages may only be included on certain architectures or operating systems - [github.com/google/go-github/v79/github](https://pkg.go.dev/github.com/google/go-github/v79/github) ([BSD-3-Clause](https://github.com/google/go-github/blob/v79.0.0/LICENSE)) - [github.com/google/go-querystring/query](https://pkg.go.dev/github.com/google/go-querystring/query) ([BSD-3-Clause](https://github.com/google/go-querystring/blob/v1.1.0/LICENSE)) - [github.com/google/jsonschema-go/jsonschema](https://pkg.go.dev/github.com/google/jsonschema-go/jsonschema) ([MIT](https://github.com/google/jsonschema-go/blob/v0.3.0/LICENSE)) - - [github.com/google/uuid](https://pkg.go.dev/github.com/google/uuid) ([BSD-3-Clause](https://github.com/google/uuid/blob/v1.6.0/LICENSE)) - [github.com/gorilla/css/scanner](https://pkg.go.dev/github.com/gorilla/css/scanner) ([BSD-3-Clause](https://github.com/gorilla/css/blob/v1.0.1/LICENSE)) - [github.com/gorilla/mux](https://pkg.go.dev/github.com/gorilla/mux) ([BSD-3-Clause](https://github.com/gorilla/mux/blob/v1.8.0/LICENSE)) - - [github.com/invopop/jsonschema](https://pkg.go.dev/github.com/invopop/jsonschema) ([MIT](https://github.com/invopop/jsonschema/blob/v0.13.0/COPYING)) - [github.com/josephburnett/jd/v2](https://pkg.go.dev/github.com/josephburnett/jd/v2) ([MIT](https://github.com/josephburnett/jd/blob/v1.9.2/LICENSE)) - [github.com/josharian/intern](https://pkg.go.dev/github.com/josharian/intern) ([MIT](https://github.com/josharian/intern/blob/v1.0.0/license.md)) - [github.com/mailru/easyjson](https://pkg.go.dev/github.com/mailru/easyjson) ([MIT](https://github.com/mailru/easyjson/blob/v0.7.7/LICENSE)) - - [github.com/mark3labs/mcp-go](https://pkg.go.dev/github.com/mark3labs/mcp-go) ([MIT](https://github.com/mark3labs/mcp-go/blob/v0.36.0/LICENSE)) - [github.com/microcosm-cc/bluemonday](https://pkg.go.dev/github.com/microcosm-cc/bluemonday) ([BSD-3-Clause](https://github.com/microcosm-cc/bluemonday/blob/v1.0.27/LICENSE.md)) - [github.com/migueleliasweb/go-github-mock/src/mock](https://pkg.go.dev/github.com/migueleliasweb/go-github-mock/src/mock) ([MIT](https://github.com/migueleliasweb/go-github-mock/blob/v1.3.0/LICENSE)) - [github.com/modelcontextprotocol/go-sdk](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk) ([MIT](https://github.com/modelcontextprotocol/go-sdk/blob/v1.1.0/LICENSE)) @@ -41,7 +36,6 @@ Some packages may only be included on certain architectures or operating systems - [github.com/spf13/pflag](https://pkg.go.dev/github.com/spf13/pflag) ([BSD-3-Clause](https://github.com/spf13/pflag/blob/v1.0.10/LICENSE)) - [github.com/spf13/viper](https://pkg.go.dev/github.com/spf13/viper) ([MIT](https://github.com/spf13/viper/blob/v1.21.0/LICENSE)) - [github.com/subosito/gotenv](https://pkg.go.dev/github.com/subosito/gotenv) ([MIT](https://github.com/subosito/gotenv/blob/v1.6.0/LICENSE)) - - [github.com/wk8/go-ordered-map/v2](https://pkg.go.dev/github.com/wk8/go-ordered-map/v2) ([Apache-2.0](https://github.com/wk8/go-ordered-map/blob/v2.1.8/LICENSE)) - [github.com/yosida95/uritemplate/v3](https://pkg.go.dev/github.com/yosida95/uritemplate/v3) ([BSD-3-Clause](https://github.com/yosida95/uritemplate/blob/v3.0.2/LICENSE)) - [github.com/yudai/golcs](https://pkg.go.dev/github.com/yudai/golcs) ([MIT](https://github.com/yudai/golcs/blob/ecda9a501e82/LICENSE)) - [go.yaml.in/yaml/v3](https://pkg.go.dev/go.yaml.in/yaml/v3) ([MIT](https://github.com/yaml/go-yaml/blob/v3.0.4/LICENSE)) @@ -51,6 +45,5 @@ Some packages may only be included on certain architectures or operating systems - [golang.org/x/text](https://pkg.go.dev/golang.org/x/text) ([BSD-3-Clause](https://cs.opensource.google/go/x/text/+/v0.28.0:LICENSE)) - [golang.org/x/time/rate](https://pkg.go.dev/golang.org/x/time/rate) ([BSD-3-Clause](https://cs.opensource.google/go/x/time/+/v0.5.0:LICENSE)) - [gopkg.in/yaml.v2](https://pkg.go.dev/gopkg.in/yaml.v2) ([Apache-2.0](https://github.com/go-yaml/yaml/blob/v2.4.0/LICENSE)) - - [gopkg.in/yaml.v3](https://pkg.go.dev/gopkg.in/yaml.v3) ([MIT](https://github.com/go-yaml/yaml/blob/v3.0.1/LICENSE)) [github/github-mcp-server]: https://github.com/github/github-mcp-server diff --git a/third-party-licenses.linux.md b/third-party-licenses.linux.md index 3823082a9..eace7c478 100644 --- a/third-party-licenses.linux.md +++ b/third-party-licenses.linux.md @@ -8,8 +8,6 @@ Some packages may only be included on certain architectures or operating systems - [github.com/aymerick/douceur](https://pkg.go.dev/github.com/aymerick/douceur) ([MIT](https://github.com/aymerick/douceur/blob/v0.2.0/LICENSE)) - - [github.com/bahlo/generic-list-go](https://pkg.go.dev/github.com/bahlo/generic-list-go) ([BSD-3-Clause](https://github.com/bahlo/generic-list-go/blob/v0.2.0/LICENSE)) - - [github.com/buger/jsonparser](https://pkg.go.dev/github.com/buger/jsonparser) ([MIT](https://github.com/buger/jsonparser/blob/v1.1.1/LICENSE)) - [github.com/fsnotify/fsnotify](https://pkg.go.dev/github.com/fsnotify/fsnotify) ([BSD-3-Clause](https://github.com/fsnotify/fsnotify/blob/v1.9.0/LICENSE)) - [github.com/github/github-mcp-server](https://pkg.go.dev/github.com/github/github-mcp-server) ([MIT](https://github.com/github/github-mcp-server/blob/HEAD/LICENSE)) - [github.com/go-openapi/jsonpointer](https://pkg.go.dev/github.com/go-openapi/jsonpointer) ([Apache-2.0](https://github.com/go-openapi/jsonpointer/blob/v0.19.5/LICENSE)) @@ -19,14 +17,11 @@ Some packages may only be included on certain architectures or operating systems - [github.com/google/go-github/v79/github](https://pkg.go.dev/github.com/google/go-github/v79/github) ([BSD-3-Clause](https://github.com/google/go-github/blob/v79.0.0/LICENSE)) - [github.com/google/go-querystring/query](https://pkg.go.dev/github.com/google/go-querystring/query) ([BSD-3-Clause](https://github.com/google/go-querystring/blob/v1.1.0/LICENSE)) - [github.com/google/jsonschema-go/jsonschema](https://pkg.go.dev/github.com/google/jsonschema-go/jsonschema) ([MIT](https://github.com/google/jsonschema-go/blob/v0.3.0/LICENSE)) - - [github.com/google/uuid](https://pkg.go.dev/github.com/google/uuid) ([BSD-3-Clause](https://github.com/google/uuid/blob/v1.6.0/LICENSE)) - [github.com/gorilla/css/scanner](https://pkg.go.dev/github.com/gorilla/css/scanner) ([BSD-3-Clause](https://github.com/gorilla/css/blob/v1.0.1/LICENSE)) - [github.com/gorilla/mux](https://pkg.go.dev/github.com/gorilla/mux) ([BSD-3-Clause](https://github.com/gorilla/mux/blob/v1.8.0/LICENSE)) - - [github.com/invopop/jsonschema](https://pkg.go.dev/github.com/invopop/jsonschema) ([MIT](https://github.com/invopop/jsonschema/blob/v0.13.0/COPYING)) - [github.com/josephburnett/jd/v2](https://pkg.go.dev/github.com/josephburnett/jd/v2) ([MIT](https://github.com/josephburnett/jd/blob/v1.9.2/LICENSE)) - [github.com/josharian/intern](https://pkg.go.dev/github.com/josharian/intern) ([MIT](https://github.com/josharian/intern/blob/v1.0.0/license.md)) - [github.com/mailru/easyjson](https://pkg.go.dev/github.com/mailru/easyjson) ([MIT](https://github.com/mailru/easyjson/blob/v0.7.7/LICENSE)) - - [github.com/mark3labs/mcp-go](https://pkg.go.dev/github.com/mark3labs/mcp-go) ([MIT](https://github.com/mark3labs/mcp-go/blob/v0.36.0/LICENSE)) - [github.com/microcosm-cc/bluemonday](https://pkg.go.dev/github.com/microcosm-cc/bluemonday) ([BSD-3-Clause](https://github.com/microcosm-cc/bluemonday/blob/v1.0.27/LICENSE.md)) - [github.com/migueleliasweb/go-github-mock/src/mock](https://pkg.go.dev/github.com/migueleliasweb/go-github-mock/src/mock) ([MIT](https://github.com/migueleliasweb/go-github-mock/blob/v1.3.0/LICENSE)) - [github.com/modelcontextprotocol/go-sdk](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk) ([MIT](https://github.com/modelcontextprotocol/go-sdk/blob/v1.1.0/LICENSE)) @@ -41,7 +36,6 @@ Some packages may only be included on certain architectures or operating systems - [github.com/spf13/pflag](https://pkg.go.dev/github.com/spf13/pflag) ([BSD-3-Clause](https://github.com/spf13/pflag/blob/v1.0.10/LICENSE)) - [github.com/spf13/viper](https://pkg.go.dev/github.com/spf13/viper) ([MIT](https://github.com/spf13/viper/blob/v1.21.0/LICENSE)) - [github.com/subosito/gotenv](https://pkg.go.dev/github.com/subosito/gotenv) ([MIT](https://github.com/subosito/gotenv/blob/v1.6.0/LICENSE)) - - [github.com/wk8/go-ordered-map/v2](https://pkg.go.dev/github.com/wk8/go-ordered-map/v2) ([Apache-2.0](https://github.com/wk8/go-ordered-map/blob/v2.1.8/LICENSE)) - [github.com/yosida95/uritemplate/v3](https://pkg.go.dev/github.com/yosida95/uritemplate/v3) ([BSD-3-Clause](https://github.com/yosida95/uritemplate/blob/v3.0.2/LICENSE)) - [github.com/yudai/golcs](https://pkg.go.dev/github.com/yudai/golcs) ([MIT](https://github.com/yudai/golcs/blob/ecda9a501e82/LICENSE)) - [go.yaml.in/yaml/v3](https://pkg.go.dev/go.yaml.in/yaml/v3) ([MIT](https://github.com/yaml/go-yaml/blob/v3.0.4/LICENSE)) @@ -51,6 +45,5 @@ Some packages may only be included on certain architectures or operating systems - [golang.org/x/text](https://pkg.go.dev/golang.org/x/text) ([BSD-3-Clause](https://cs.opensource.google/go/x/text/+/v0.28.0:LICENSE)) - [golang.org/x/time/rate](https://pkg.go.dev/golang.org/x/time/rate) ([BSD-3-Clause](https://cs.opensource.google/go/x/time/+/v0.5.0:LICENSE)) - [gopkg.in/yaml.v2](https://pkg.go.dev/gopkg.in/yaml.v2) ([Apache-2.0](https://github.com/go-yaml/yaml/blob/v2.4.0/LICENSE)) - - [gopkg.in/yaml.v3](https://pkg.go.dev/gopkg.in/yaml.v3) ([MIT](https://github.com/go-yaml/yaml/blob/v3.0.1/LICENSE)) [github/github-mcp-server]: https://github.com/github/github-mcp-server diff --git a/third-party-licenses.windows.md b/third-party-licenses.windows.md index fa5cba4e0..500f03c96 100644 --- a/third-party-licenses.windows.md +++ b/third-party-licenses.windows.md @@ -8,8 +8,6 @@ Some packages may only be included on certain architectures or operating systems - [github.com/aymerick/douceur](https://pkg.go.dev/github.com/aymerick/douceur) ([MIT](https://github.com/aymerick/douceur/blob/v0.2.0/LICENSE)) - - [github.com/bahlo/generic-list-go](https://pkg.go.dev/github.com/bahlo/generic-list-go) ([BSD-3-Clause](https://github.com/bahlo/generic-list-go/blob/v0.2.0/LICENSE)) - - [github.com/buger/jsonparser](https://pkg.go.dev/github.com/buger/jsonparser) ([MIT](https://github.com/buger/jsonparser/blob/v1.1.1/LICENSE)) - [github.com/fsnotify/fsnotify](https://pkg.go.dev/github.com/fsnotify/fsnotify) ([BSD-3-Clause](https://github.com/fsnotify/fsnotify/blob/v1.9.0/LICENSE)) - [github.com/github/github-mcp-server](https://pkg.go.dev/github.com/github/github-mcp-server) ([MIT](https://github.com/github/github-mcp-server/blob/HEAD/LICENSE)) - [github.com/go-openapi/jsonpointer](https://pkg.go.dev/github.com/go-openapi/jsonpointer) ([Apache-2.0](https://github.com/go-openapi/jsonpointer/blob/v0.19.5/LICENSE)) @@ -19,15 +17,12 @@ Some packages may only be included on certain architectures or operating systems - [github.com/google/go-github/v79/github](https://pkg.go.dev/github.com/google/go-github/v79/github) ([BSD-3-Clause](https://github.com/google/go-github/blob/v79.0.0/LICENSE)) - [github.com/google/go-querystring/query](https://pkg.go.dev/github.com/google/go-querystring/query) ([BSD-3-Clause](https://github.com/google/go-querystring/blob/v1.1.0/LICENSE)) - [github.com/google/jsonschema-go/jsonschema](https://pkg.go.dev/github.com/google/jsonschema-go/jsonschema) ([MIT](https://github.com/google/jsonschema-go/blob/v0.3.0/LICENSE)) - - [github.com/google/uuid](https://pkg.go.dev/github.com/google/uuid) ([BSD-3-Clause](https://github.com/google/uuid/blob/v1.6.0/LICENSE)) - [github.com/gorilla/css/scanner](https://pkg.go.dev/github.com/gorilla/css/scanner) ([BSD-3-Clause](https://github.com/gorilla/css/blob/v1.0.1/LICENSE)) - [github.com/gorilla/mux](https://pkg.go.dev/github.com/gorilla/mux) ([BSD-3-Clause](https://github.com/gorilla/mux/blob/v1.8.0/LICENSE)) - [github.com/inconshreveable/mousetrap](https://pkg.go.dev/github.com/inconshreveable/mousetrap) ([Apache-2.0](https://github.com/inconshreveable/mousetrap/blob/v1.1.0/LICENSE)) - - [github.com/invopop/jsonschema](https://pkg.go.dev/github.com/invopop/jsonschema) ([MIT](https://github.com/invopop/jsonschema/blob/v0.13.0/COPYING)) - [github.com/josephburnett/jd/v2](https://pkg.go.dev/github.com/josephburnett/jd/v2) ([MIT](https://github.com/josephburnett/jd/blob/v1.9.2/LICENSE)) - [github.com/josharian/intern](https://pkg.go.dev/github.com/josharian/intern) ([MIT](https://github.com/josharian/intern/blob/v1.0.0/license.md)) - [github.com/mailru/easyjson](https://pkg.go.dev/github.com/mailru/easyjson) ([MIT](https://github.com/mailru/easyjson/blob/v0.7.7/LICENSE)) - - [github.com/mark3labs/mcp-go](https://pkg.go.dev/github.com/mark3labs/mcp-go) ([MIT](https://github.com/mark3labs/mcp-go/blob/v0.36.0/LICENSE)) - [github.com/microcosm-cc/bluemonday](https://pkg.go.dev/github.com/microcosm-cc/bluemonday) ([BSD-3-Clause](https://github.com/microcosm-cc/bluemonday/blob/v1.0.27/LICENSE.md)) - [github.com/migueleliasweb/go-github-mock/src/mock](https://pkg.go.dev/github.com/migueleliasweb/go-github-mock/src/mock) ([MIT](https://github.com/migueleliasweb/go-github-mock/blob/v1.3.0/LICENSE)) - [github.com/modelcontextprotocol/go-sdk](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk) ([MIT](https://github.com/modelcontextprotocol/go-sdk/blob/v1.1.0/LICENSE)) @@ -42,7 +37,6 @@ Some packages may only be included on certain architectures or operating systems - [github.com/spf13/pflag](https://pkg.go.dev/github.com/spf13/pflag) ([BSD-3-Clause](https://github.com/spf13/pflag/blob/v1.0.10/LICENSE)) - [github.com/spf13/viper](https://pkg.go.dev/github.com/spf13/viper) ([MIT](https://github.com/spf13/viper/blob/v1.21.0/LICENSE)) - [github.com/subosito/gotenv](https://pkg.go.dev/github.com/subosito/gotenv) ([MIT](https://github.com/subosito/gotenv/blob/v1.6.0/LICENSE)) - - [github.com/wk8/go-ordered-map/v2](https://pkg.go.dev/github.com/wk8/go-ordered-map/v2) ([Apache-2.0](https://github.com/wk8/go-ordered-map/blob/v2.1.8/LICENSE)) - [github.com/yosida95/uritemplate/v3](https://pkg.go.dev/github.com/yosida95/uritemplate/v3) ([BSD-3-Clause](https://github.com/yosida95/uritemplate/blob/v3.0.2/LICENSE)) - [github.com/yudai/golcs](https://pkg.go.dev/github.com/yudai/golcs) ([MIT](https://github.com/yudai/golcs/blob/ecda9a501e82/LICENSE)) - [go.yaml.in/yaml/v3](https://pkg.go.dev/go.yaml.in/yaml/v3) ([MIT](https://github.com/yaml/go-yaml/blob/v3.0.4/LICENSE)) @@ -52,6 +46,5 @@ Some packages may only be included on certain architectures or operating systems - [golang.org/x/text](https://pkg.go.dev/golang.org/x/text) ([BSD-3-Clause](https://cs.opensource.google/go/x/text/+/v0.28.0:LICENSE)) - [golang.org/x/time/rate](https://pkg.go.dev/golang.org/x/time/rate) ([BSD-3-Clause](https://cs.opensource.google/go/x/time/+/v0.5.0:LICENSE)) - [gopkg.in/yaml.v2](https://pkg.go.dev/gopkg.in/yaml.v2) ([Apache-2.0](https://github.com/go-yaml/yaml/blob/v2.4.0/LICENSE)) - - [gopkg.in/yaml.v3](https://pkg.go.dev/gopkg.in/yaml.v3) ([MIT](https://github.com/go-yaml/yaml/blob/v3.0.1/LICENSE)) [github/github-mcp-server]: https://github.com/github/github-mcp-server diff --git a/third-party/github.com/bahlo/generic-list-go/LICENSE b/third-party/github.com/bahlo/generic-list-go/LICENSE deleted file mode 100644 index 6a66aea5e..000000000 --- a/third-party/github.com/bahlo/generic-list-go/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/third-party/github.com/buger/jsonparser/LICENSE b/third-party/github.com/buger/jsonparser/LICENSE deleted file mode 100644 index ac25aeb7d..000000000 --- a/third-party/github.com/buger/jsonparser/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2016 Leonid Bugaev - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/third-party/github.com/google/uuid/LICENSE b/third-party/github.com/google/uuid/LICENSE deleted file mode 100644 index 5dc68268d..000000000 --- a/third-party/github.com/google/uuid/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009,2014 Google Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/third-party/github.com/invopop/jsonschema/COPYING b/third-party/github.com/invopop/jsonschema/COPYING deleted file mode 100644 index 2993ec085..000000000 --- a/third-party/github.com/invopop/jsonschema/COPYING +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2014 Alec Thomas - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/third-party/github.com/mark3labs/mcp-go/LICENSE b/third-party/github.com/mark3labs/mcp-go/LICENSE deleted file mode 100644 index 3d4843545..000000000 --- a/third-party/github.com/mark3labs/mcp-go/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 Anthropic, PBC - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/third-party/github.com/wk8/go-ordered-map/v2/LICENSE b/third-party/github.com/wk8/go-ordered-map/v2/LICENSE deleted file mode 100644 index 8dada3eda..000000000 --- a/third-party/github.com/wk8/go-ordered-map/v2/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/third-party/gopkg.in/yaml.v3/LICENSE b/third-party/gopkg.in/yaml.v3/LICENSE deleted file mode 100644 index 2683e4bb1..000000000 --- a/third-party/gopkg.in/yaml.v3/LICENSE +++ /dev/null @@ -1,50 +0,0 @@ - -This project is covered by two different licenses: MIT and Apache. - -#### MIT License #### - -The following files were ported to Go from C files of libyaml, and thus -are still covered by their original MIT license, with the additional -copyright staring in 2011 when the project was ported over: - - apic.go emitterc.go parserc.go readerc.go scannerc.go - writerc.go yamlh.go yamlprivateh.go - -Copyright (c) 2006-2010 Kirill Simonov -Copyright (c) 2006-2011 Kirill Simonov - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -### Apache License ### - -All the remaining project files are covered by the Apache license: - -Copyright (c) 2011-2019 Canonical Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/third-party/gopkg.in/yaml.v3/NOTICE b/third-party/gopkg.in/yaml.v3/NOTICE deleted file mode 100644 index 866d74a7a..000000000 --- a/third-party/gopkg.in/yaml.v3/NOTICE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2011-2016 Canonical Ltd. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License.