Skip to content

Add browsers live-view create command - #318

Closed
masnwilliams wants to merge 3 commits into
mainfrom
hypeship/browsers-live-view-create
Closed

masnwilliams wants to merge 3 commits into
mainfrom
hypeship/browsers-live-view-create

Conversation

@masnwilliams

@masnwilliams masnwilliams commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds kernel browsers live-view create <id-or-name>, which calls POST /browsers/{id_or_name}/live_view to mint a live view URL scoped to read or control.

kernel browsers live-view create my-browser --scope read --ttl 3600
kernel browsers live-view create my-browser --scope control -o json
  • --scope read|control: omitted means the API default (read). Other values are rejected before any request.
  • --ttl <seconds>: omitted means the URL stays valid until the browser is deleted. Negative values are rejected.
  • -o json: prints the raw API response (url, scope, and expires_at when set).
  • Table output shows URL, scope, and expiry ("When the browser is deleted" when there is no TTL).

The URL authorizes only the live view (not CDP, WebDriver, etc.) and cannot be revoked before it expires, so the help text says to treat it as a credential. For the same reason the request is sent with retries disabled: a retry after a lost response would mint a second URL that can't be revoked.

Bumps the Go SDK to v0.148.0, the first release with client.Browsers.LiveView.New.

Testing

  • Unit tests for the request body (scope + TTL, and an empty body when both are unset), table and JSON output, invalid --scope / --ttl / -o values, and a test that a 500 response is not retried.
  • go vet ./... and go test ./... pass on v0.148.0.
  • Smoke-tested against production: a headful browser returns read (no expiry) and control with --ttl 600 (expires_at set); a headless browser returns live_view_unavailable; --scope write is rejected locally.

@masnwilliams
masnwilliams marked this pull request as ready for review November 12, 2026 20:03
@socket-security

socket-security Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgolang/​github.com/​kernel/​kernel-go-sdk@​v0.145.0 ⏵ v0.148.073 +1100100100100

View full report

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8576205. Configure here.

Comment thread cmd/browsers.go Resolved
@masnwilliams

Copy link
Copy Markdown
Contributor Author

Superseded by #317, the coverage bot's v0.148.0 update, which adds kernel browsers live-view create.

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.

1 participant