Skip to content

Add browser WebMCP list and invoke commands - #247

Merged
rgarcia merged 1 commit into
mainfrom
hypeship/browsers-webmcp-cli
Sep 8, 2026
Merged

Add browser WebMCP list and invoke commands#247
rgarcia merged 1 commit into
mainfrom
hypeship/browsers-webmcp-cli

Conversation

@rgarcia

@rgarcia rgarcia commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add browsers webmcp list <id-or-name> with a readable table and raw response output via --json or -o json.
  • Add browsers webmcp invoke with a required opaque tool reference, JSON-object input from a flag/file/stdin, and an optional positive timeout. Preserve JSON numbers in input and output.
  • Disable SDK retries for every invocation. Preserve the invocation ID when formatting outcome_unknown errors, and return non-zero for API errors, tool errors, and cancellations.
  • Document commands, reference lifetime, and ambiguous outcomes. The repo already pins v0.100.0, confirmed as the latest published Go SDK release, so no dependency files changed.

Validation

  • go test ./...
  • go vet ./...
  • Built the CLI and exercised a local HTTP 504 response: one request, exit status 1, empty stdout, and code/invocation ID/message on stderr.
  • Command tests cover wiring, ID/name paths, table/raw JSON output, annotations, input sources and validation, timeout serialization, output types, and no retries on 504/500/429 even with retry headers.

@rgarcia
rgarcia requested a review from sjmiller609 September 8, 2026 15:35
@rgarcia
rgarcia merged commit 74a56be into main Sep 8, 2026
7 checks passed
@rgarcia
rgarcia deleted the hypeship/browsers-webmcp-cli branch September 8, 2026 21:58
kernel-internal Bot added a commit that referenced this pull request Sep 9, 2026
Bumps kernel-go-sdk to v0.100.1-0.20260909170029-19b510c645d0 (19b510c).

Fix a broken merge on this branch. Merging main brought in cmd/browsers_webmcp.go
(PR #247, `browsers webmcp list` / `invoke`), which collided with the duplicate
webmcp surface this branch had generated earlier (`webmcp list-tools` /
`invoke-tool`). The BrowsersCmd struct ended up with two `webmcp` fields, so the
branch did not compile. Keep main's reviewed implementation and drop this
branch's duplicate: BrowserWebmcpService, WebmcpListTools/WebmcpInvokeTool, their
input structs, the second `webmcp` command group, and its run funcs. README
already documents only the `list`/`invoke` spelling.

Restore the vault entitlement and limit output that a024421 removed. The SDK
re-added those response fields in this range, so the CLI surfaces them again:

- `org limits get`: "Max Vaults" and "Vaults Used" rows (OrgLimits.MaxVaults /
  .VaultsUsed). Null max_vaults renders as "unlimited".
- `org entitlements`: the "Vaults" feature row and the "Max vaults" limit row
  (OrgEntitlementsFeatures.Vaults / OrgEntitlementsLimits.MaxVaults).
- `vaults create` help: the free-plan 3-vault cap wording, matching the SDK's
  restored Upsert doc comment, pointing at `kernel org limits get`.

The SDK also narrowed direct-to-VM browser routing back to
curl/telemetry-stream/computer/playwright/process, dropping `fs` and
`logs/stream`. The CLI does not override the routing subresource list, so it
picks this up with no code change.

Coverage analysis: full enumeration of all api.md methods against the CLI
command tree found no missing commands. The 5 config-registry methods are
x-cli-skip in openapi.yaml, which covers this range's only schema change
(Analysis.expires_at and the new "expired" status). A field-by-field sweep of
every *Params struct against every registered CLI flag found no missing flags;
BrowserCurlParams.ResponseEncoding is intentionally unused because
`browsers curl` streams raw bytes through the SDK's raw curl client.

Tested against the live API: org limits get (shows Max Vaults / Vaults Used),
org entitlements (shows Vaults / Max vaults), vaults create/list/delete
(usage count returns to its prior value), browsers create/delete,
browsers webmcp list, browsers fs list-files. Full `go build ./...`,
`go vet ./...` and `go test ./...` pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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