From 5e19741a8bfaed6957908dbbef0bca5f71c6f326 Mon Sep 17 00:00:00 2001 From: Charm <124303983+charmcli@users.noreply.github.com> Date: Sat, 2 Aug 2025 09:24:37 -0300 Subject: [PATCH 01/11] chore(legal): @yumosx has signed the CLA --- .github/cla-signatures.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/cla-signatures.json b/.github/cla-signatures.json index e13f3a3aebf256a58c808d7f8c1932e1b08c53b7..0cca7249b5c786d5d8e8ca295463ff5660af0f3d 100644 --- a/.github/cla-signatures.json +++ b/.github/cla-signatures.json @@ -183,6 +183,14 @@ "created_at": "2025-08-01T22:18:28Z", "repoId": 987670088, "pullRequestNo": 480 + }, + { + "name": "yumosx", + "id": 141902143, + "comment_id": 3146472558, + "created_at": "2025-08-02T12:24:29Z", + "repoId": 987670088, + "pullRequestNo": 504 } ] } \ No newline at end of file From 82feb9e38ccbc925550d2aedfc80530fb59cf024 Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Sat, 2 Aug 2025 10:27:09 -0300 Subject: [PATCH 02/11] ci(issue-labeler): `pull_request` -> `pull_request_target` --- .github/workflows/issue-labeler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/issue-labeler.yml b/.github/workflows/issue-labeler.yml index f79293c5877d41e3f9f8764b841eb32c3384a3d6..f0cb041b935dcdec6e63013972b686a66404398b 100644 --- a/.github/workflows/issue-labeler.yml +++ b/.github/workflows/issue-labeler.yml @@ -3,7 +3,7 @@ name: Issue Labeler on: issues: types: [opened] - pull_request: + pull_request_target: types: [opened] workflow_dispatch: inputs: From c5b32fc869d3e751c1fae064c96da8bb116182e9 Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Sat, 2 Aug 2025 10:33:55 -0300 Subject: [PATCH 03/11] ci(issue-labeler): add qwen --- .github/labeler.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/labeler.yml b/.github/labeler.yml index d3e045e3186f47bf19927f9b80f989e6a3b9aa92..994e8939788480e9ad1856070bfa1f20a5a15a88 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -40,3 +40,5 @@ - "/(openai|gpt)/i" "provider: openrouter": - "/openrouter/i" +"provider: qwen": + - "/qwen/i" From 2b9430f5fab2ab285535f7716d50aa70acd2ec16 Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Sat, 2 Aug 2025 10:46:40 -0300 Subject: [PATCH 04/11] ci(issue-labeler): add ci label --- .github/labeler.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/labeler.yml b/.github/labeler.yml index 994e8939788480e9ad1856070bfa1f20a5a15a88..73f970bf83e449f153a2834cc0a7120654c42f26 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,3 +1,5 @@ +"area: ci": + - "/^ci: /i" "area: diff": - "/diff/i" "area: images": From 0b477ea49470db978e9f9eb43a224def73c41101 Mon Sep 17 00:00:00 2001 From: Kujtim Hoxha Date: Sat, 2 Aug 2025 17:02:24 +0200 Subject: [PATCH 05/11] fix: http log --- internal/log/http.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/log/http.go b/internal/log/http.go index 1091e5706c09be374e6775f8906c91505e10b33f..2c74bd05201ad9cbd8d60c6e3c3db3f637fb99b3 100644 --- a/internal/log/http.go +++ b/internal/log/http.go @@ -79,6 +79,9 @@ func (h *HTTPRoundTripLogger) RoundTrip(req *http.Request) (*http.Response, erro } func bodyToString(body io.ReadCloser) string { + if body == nil { + return "" + } src, err := io.ReadAll(body) if err != nil { slog.Error("Failed to read body", "error", err) From 61065bb1a6e955934d948f1d649c37c8ea151c18 Mon Sep 17 00:00:00 2001 From: Charm <124303983+charmcli@users.noreply.github.com> Date: Sun, 3 Aug 2025 01:07:26 -0300 Subject: [PATCH 06/11] chore(legal): @bold84 has signed the CLA --- .github/cla-signatures.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/cla-signatures.json b/.github/cla-signatures.json index 0cca7249b5c786d5d8e8ca295463ff5660af0f3d..9fd0e1b175feaffd9f136d51cdca2115a5a4b86d 100644 --- a/.github/cla-signatures.json +++ b/.github/cla-signatures.json @@ -191,6 +191,14 @@ "created_at": "2025-08-02T12:24:29Z", "repoId": 987670088, "pullRequestNo": 504 + }, + { + "name": "bold84", + "id": 21118257, + "comment_id": 3146962342, + "created_at": "2025-08-03T04:07:16Z", + "repoId": 987670088, + "pullRequestNo": 519 } ] } \ No newline at end of file From 35fc31b5eb1441667ae6f5aab9bda6c99f298756 Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Sun, 3 Aug 2025 08:20:00 -0300 Subject: [PATCH 07/11] ci(cla): add bot to allowlist --- .github/workflows/cla.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index 7ad15e5687676ba4ac0377f445164afd77a132ab..5ac53b3b4f30fe22450b58aafd1aa99becea6f45 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -29,7 +29,7 @@ jobs: path-to-signatures: ".github/cla-signatures.json" path-to-document: "https://github.com/charmbracelet/crush/blob/main/CLA.md" branch: "main" - allowlist: dependabot[bot] + allowlist: charmcli,charmcrush,dependabot[bot] custom-pr-sign-comment: "I have read the Contributor License Agreement (CLA) and hereby sign the CLA." custom-notsigned-precomment: "Thank you for your submission. We really appreciate it! Like many open-source projects, we ask that you sign our [Contributor License Agreement](https://github.com/charmbracelet/crush/blob/main/CLA.md) before we can accept your contribution. You can sign the CLA by just posting a Pull Request comment same as the below format." lock-pullrequest-aftermerge: false From 1eabdb4bb87f8e793a23730896fb7c7877c18de9 Mon Sep 17 00:00:00 2001 From: Charm <124303983+charmcli@users.noreply.github.com> Date: Sun, 3 Aug 2025 18:35:23 -0300 Subject: [PATCH 08/11] chore(legal): @jooray has signed the CLA --- .github/cla-signatures.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/cla-signatures.json b/.github/cla-signatures.json index 9fd0e1b175feaffd9f136d51cdca2115a5a4b86d..f2a774e00890cc5d2059133563c44664862fcbd6 100644 --- a/.github/cla-signatures.json +++ b/.github/cla-signatures.json @@ -199,6 +199,14 @@ "created_at": "2025-08-03T04:07:16Z", "repoId": 987670088, "pullRequestNo": 519 + }, + { + "name": "jooray", + "id": 1028688, + "comment_id": 3148713433, + "created_at": "2025-08-03T21:35:15Z", + "repoId": 987670088, + "pullRequestNo": 527 } ] } \ No newline at end of file From 87a483cc24696b0c23edddbcd39c8ae244888bbd Mon Sep 17 00:00:00 2001 From: Charm <124303983+charmcli@users.noreply.github.com> Date: Mon, 4 Aug 2025 09:16:26 -0300 Subject: [PATCH 09/11] chore(legal): @Ed4ward has signed the CLA --- .github/cla-signatures.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/cla-signatures.json b/.github/cla-signatures.json index f2a774e00890cc5d2059133563c44664862fcbd6..fd1813da29531a5ed0aa5f9c2886bf7bfb303de6 100644 --- a/.github/cla-signatures.json +++ b/.github/cla-signatures.json @@ -207,6 +207,14 @@ "created_at": "2025-08-03T21:35:15Z", "repoId": 987670088, "pullRequestNo": 527 + }, + { + "name": "Ed4ward", + "id": 153800328, + "comment_id": 3150375016, + "created_at": "2025-08-04T12:16:16Z", + "repoId": 987670088, + "pullRequestNo": 539 } ] } \ No newline at end of file From 054fba302914e64a36ce58e80d615df82f92267a Mon Sep 17 00:00:00 2001 From: Charm <124303983+charmcli@users.noreply.github.com> Date: Mon, 4 Aug 2025 11:01:45 -0300 Subject: [PATCH 10/11] chore(legal): @ngnhng has signed the CLA --- .github/cla-signatures.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/cla-signatures.json b/.github/cla-signatures.json index fd1813da29531a5ed0aa5f9c2886bf7bfb303de6..0b2aa1335dadaefee2b547c3d85278006c4425f4 100644 --- a/.github/cla-signatures.json +++ b/.github/cla-signatures.json @@ -215,6 +215,14 @@ "created_at": "2025-08-04T12:16:16Z", "repoId": 987670088, "pullRequestNo": 539 + }, + { + "name": "ngnhng", + "id": 51743767, + "comment_id": 3150846779, + "created_at": "2025-08-04T14:01:30Z", + "repoId": 987670088, + "pullRequestNo": 546 } ] } \ No newline at end of file From 87ee7dfa77f871b5c31ef5e8d9940b05bd03c7bf Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Mon, 4 Aug 2025 11:54:55 -0300 Subject: [PATCH 11/11] fix(mcp): update lib, set transport logger (#510) --- go.mod | 2 +- go.sum | 4 ++-- internal/llm/agent/mcp-tools.go | 11 ++++++++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 82b89a581d7bbd35698ed5f555ad0e1b324b9ff4..7e41d27cb2c2b8c7382ebfefaeab5188c5dc1e67 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( github.com/google/uuid v1.6.0 github.com/invopop/jsonschema v0.13.0 github.com/joho/godotenv v1.5.1 - github.com/mark3labs/mcp-go v0.34.0 + github.com/mark3labs/mcp-go v0.36.0 github.com/muesli/termenv v0.16.0 github.com/ncruces/go-sqlite3 v0.25.0 github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 diff --git a/go.sum b/go.sum index c223c37700b6b9f3f3fc0fb6c537c734bab63ac7..37c3c7ed4509a19f5732262c904cf01ad329a51b 100644 --- a/go.sum +++ b/go.sum @@ -180,8 +180,8 @@ github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69 github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mark3labs/mcp-go v0.34.0 h1:eWy7WBGvhk6EyAAyVzivTCprE52iXJwNtvHV6Cv3bR0= -github.com/mark3labs/mcp-go v0.34.0/go.mod h1:rXqOudj/djTORU/ThxYx8fqEVj/5pvTuuebQ2RC7uk4= +github.com/mark3labs/mcp-go v0.36.0 h1:rIZaijrRYPeSbJG8/qNDe0hWlGrCJ7FWHNMz2SQpTis= +github.com/mark3labs/mcp-go v0.36.0/go.mod h1:T7tUa2jO6MavG+3P25Oy/jR7iCeJPHImCZHRymCn39g= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= diff --git a/internal/llm/agent/mcp-tools.go b/internal/llm/agent/mcp-tools.go index 97f00c92d156b5d50c2a6a84d1f853a0db1246aa..8df78e52452385a44a06fd07feb62d3b9892388f 100644 --- a/internal/llm/agent/mcp-tools.go +++ b/internal/llm/agent/mcp-tools.go @@ -11,10 +11,8 @@ import ( "github.com/charmbracelet/crush/internal/config" "github.com/charmbracelet/crush/internal/csync" "github.com/charmbracelet/crush/internal/llm/tools" - "github.com/charmbracelet/crush/internal/version" - "github.com/charmbracelet/crush/internal/permission" - + "github.com/charmbracelet/crush/internal/version" "github.com/mark3labs/mcp-go/client" "github.com/mark3labs/mcp-go/client/transport" "github.com/mark3labs/mcp-go/mcp" @@ -191,6 +189,7 @@ func createMcpClient(m config.MCPConfig) (*client.Client, error) { return client.NewStreamableHttpClient( m.URL, transport.WithHTTPHeaders(m.ResolvedHeaders()), + transport.WithLogger(mcpHTTPLogger{}), ) case config.MCPSse: return client.NewSSEMCPClient( @@ -201,3 +200,9 @@ func createMcpClient(m config.MCPConfig) (*client.Client, error) { return nil, fmt.Errorf("unsupported mcp type: %s", m.Type) } } + +// for MCP's HTTP client. +type mcpHTTPLogger struct{} + +func (l mcpHTTPLogger) Errorf(format string, v ...any) { slog.Error(fmt.Sprintf(format, v...)) } +func (l mcpHTTPLogger) Infof(format string, v ...any) { slog.Info(fmt.Sprintf(format, v...)) }