Merge remote-tracking branch 'origin/main' into fix-openai-provider

Kujtim Hoxha created

Change summary

.github/cla-signatures.json         | 40 +++++++++++++++++++++++++++++++
.github/labeler.yml                 |  4 +++
.github/workflows/cla.yml           |  2 
.github/workflows/issue-labeler.yml |  2 
go.mod                              |  2 
go.sum                              |  4 +-
internal/llm/agent/mcp-tools.go     | 11 ++++++--
7 files changed, 57 insertions(+), 8 deletions(-)

Detailed changes

.github/cla-signatures.json 🔗

@@ -183,6 +183,46 @@
       "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
+    },
+    {
+      "name": "bold84",
+      "id": 21118257,
+      "comment_id": 3146962342,
+      "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
+    },
+    {
+      "name": "Ed4ward",
+      "id": 153800328,
+      "comment_id": 3150375016,
+      "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
     }
   ]
 }

.github/labeler.yml 🔗

@@ -1,3 +1,5 @@
+"area: ci":
+  - "/^ci: /i"
 "area: diff":
   - "/diff/i"
 "area: images":
@@ -40,3 +42,5 @@
   - "/(openai|gpt)/i"
 "provider: openrouter":
   - "/openrouter/i"
+"provider: qwen":
+  - "/qwen/i"

.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

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

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=

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...)) }