Update Go SDK to v0.112.0 and support custom WebMCP tools - #270
Conversation
masnwilliams
left a comment
There was a problem hiding this comment.
The Go SDK migration, focused custom-tool command file, and HTTP-backed tests look good. One removal retry path needs to be fixed before merge.
| if !webMCPCustomIDPattern.MatchString(id) { | ||
| return fmt.Errorf("invalid custom tool ID: expected ct_ followed by a lowercase letter and 23 lowercase letters or digits") | ||
| } | ||
| if err := b.tools.Remove(ctx, id, kernel.BrowserWebmcpCustomToolRemoveParams{IDOrName: identifier}); err != nil { |
There was a problem hiding this comment.
Resolved in 64f5f3b: Remove now passes option.WithMaxRetries(0). I initially called this a blocker; the lost-response case is an uncertain outcome even without retries, so that severity was overstated. No further merge hold from this comment.
There was a problem hiding this comment.
Disabled SDK retries for Remove with option.WithMaxRetries(0), matching Add and Invoke. Existing build, tests, and new-code lint pass; no new regression test was added.
masnwilliams
left a comment
There was a problem hiding this comment.
Correction to my earlier changes-requested review: I overstated the severity of the lost-response DELETE case. The current head also disables removal retries (64f5f3b), resolving the requested code change. Approving the current head.
Summary
github.com/kernel/kernel-go-sdkfrom v0.110.0 to v0.112.0 and tidy modules.readOnlyHint; add--exclude-customwhile preserving raw JSON responses.browsers webmcp custom-tools list/add/remove, including file/stdin JavaScript source, namespace replacement, table/JSON output, bounded UTF-8 source validation, and non-retried registration.awaiting_submissionexplicitly in warnings/help, enforce invoke timeouts of 1–120 seconds, and document the commands.Why
The SDK changes the WebMCP discovery response and adds namespaced custom-tool registration. The CLI must use the new types and expose the new endpoints.
Testing
make buildmake test(go vet ./...andgo test ./...)go test -race ./cmd -run WebMCP -count=1make lint: existing repo-wide warnings remain.golangci-lint run --new-from-rev=main --max-same-issues=0 --max-issues-per-linter=0passes with zero new issues.