Skip to content

Update Go SDK to v0.112.0 and support custom WebMCP tools - #270

Merged
rgarcia merged 4 commits into
mainfrom
hypeship/webmcp-sdk-0112
Sep 24, 2026
Merged

rgarcia merged 4 commits into
mainfrom
hypeship/webmcp-sdk-0112

Conversation

@rgarcia

@rgarcia rgarcia commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Upgrade github.com/kernel/kernel-go-sdk from v0.110.0 to v0.112.0 and tidy modules.
  • Read nested WebMCP metadata and readOnlyHint; add --exclude-custom while preserving raw JSON responses.
  • Add 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.
  • Name awaiting_submission explicitly 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 build
  • make test (go vet ./... and go test ./...)
  • go test -race ./cmd -run WebMCP -count=1
  • make lint: existing repo-wide warnings remain. golangci-lint run --new-from-rev=main --max-same-issues=0 --max-issues-per-linter=0 passes with zero new issues.
  • Inspected command help output. HTTP-backed command tests cover nested metadata, JSON preservation, query flags, file/stdin source, overwrite options, 201/204 responses, API errors, retry behavior, and validation boundaries.
  • Not tested against a live browser/API; JavaScript execution and server-side matching/replacement semantics are not exercised by the local HTTP fixtures.

@masnwilliams masnwilliams left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread cmd/browsers_webmcp_custom_tools.go Outdated
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 {

@masnwilliams masnwilliams Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 masnwilliams left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@rgarcia
rgarcia merged commit cd36347 into main Sep 24, 2026
8 checks passed
@rgarcia
rgarcia deleted the hypeship/webmcp-sdk-0112 branch September 24, 2026 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants