Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,11 +287,16 @@ kernel search contents srch_01jsearchresult --limit 3 --content-source browser
- `--telemetry-storage on|off` - Whether to persist captured telemetry to Kernel storage (default on). `off` requires `--telemetry-export-otlp <id-or-name>` in the same command, so events are only available on the live stream and through the export. Cannot be changed after the browser is created.
- `--chrome-policy <json>` - Custom Chrome enterprise policy as a JSON object. Kernel-managed policies (extensions, proxy, automation) are rejected server-side.
- `--chrome-policy-file <path>` - Read the Chrome enterprise policy from a file (use `-` for stdin). Mutually exclusive with `--chrome-policy`.
- `--start-replay` - Start replay recording when the browser is created. With `--pool-id` or `--pool-name`, overrides the pool's default for this acquisition; use `--start-replay=false` to disable it
- `--output json`, `-o json` - Output raw JSON object
- _Note: When a pool is specified, omit other session configuration flags—pool settings determine profile, proxy, viewport, etc._
- `kernel browsers delete <id-or-name>` - Delete a browser by ID or name
- `kernel browsers view <id-or-name>` - Get live view URL for a browser by ID or name
- `--output json`, `-o json` - Output JSON with liveViewUrl
- `kernel browsers live-view create <id-or-name>` - Create a live view URL with read-only or control access to a headful browser. The URL opens only the live view (not CDP, WebDriver, or other browser endpoints) and cannot be revoked before it expires, so treat it as a credential
- `--scope read|control` - `read` shows the browser without accepting input; `control` also lets the viewer drive it (default: `read`)
- `--ttl-seconds <n>` - Seconds until the URL expires (1-31536000). Omit to keep it valid until the browser is deleted or, for a pooled browser, released
- `--output json`, `-o json` - Output raw JSON object
- `kernel browsers get <id-or-name>` - Get detailed browser session info by ID or name
- `--output json`, `-o json` - Output raw JSON object
- `kernel browsers update <id-or-name>` - Update a running browser session by ID or name
Expand Down Expand Up @@ -984,11 +989,13 @@ exists.
- `--profile-id`, `--profile-name`, `--proxy-id`, `--region`, `--start-url`, `--extension`, `--viewport`, `--private-host`, `--proxy-route`, `--allowed-host` - Same semantics as `kernel browsers create` (proxy routes and the egress allowlist apply to every browser warmed into the pool). Leased browsers can replace or remove the allowlist with `kernel browsers update`; per-lease changes are reset to the pool's allowlist on release, or the browser is replaced
- `--chrome-policy <json>` / `--chrome-policy-file <path>` - Custom Chrome enterprise policy applied to every browser in the pool, as a JSON object or from a file (`-` for stdin). Same semantics as `kernel browsers create`.
- `--telemetry=all` / `--telemetry=off` / `--telemetry=<categories>` - Telemetry applied to browsers warmed into the pool. Same semantics as `kernel browsers create`.
- `--start-replay` - Start replay recording automatically whenever a browser is acquired from the pool
- `--output json`, `-o json` - Output raw JSON object
- `kernel browser-pools get <id-or-name>` - Get pool details
- `--output json`, `-o json` - Output raw JSON object
- `kernel browser-pools update <id-or-name>` - Update pool configuration
- Same flags as create (except `--region`, which is fixed at creation and cannot be updated) plus `--clear-profile`, `--clear-proxy`, `--clear-start-url`, `--clear-extensions`, `--clear-chrome-policy`, `--clear-private-hosts`, `--clear-proxy-routes`, and `--clear-allowed-hosts` for removing durable configuration. `--clear-private-hosts` removes the whole network configuration (restoring the default private IP ranges and dropping proxy routes and the allowlist). `--private-host`, `--proxy-route`, `--allowed-host`, `--clear-proxy-routes`, and `--clear-allowed-hosts` replace the pool's whole network configuration, so pass the other network flags to keep them; any network update without `--allowed-host` removes the pool's allowlist. Any change to the pool's allowlist, including removing it, automatically replaces idle browsers; leased browsers keep their allowlist until release, when it is reset to the new list or the browser is replaced. `--fill-rate 0` pauses automatic filling. `--discard-all-idle` discards all idle browsers and refills the pool. `--telemetry`, `--memory`, and other network updates only apply to browsers warmed after the update.
- `--start-replay` - Set whether replay recording starts automatically for browsers acquired after the update; use `--start-replay=false` to disable
- `--output json`, `-o json` - Output raw JSON object
- `kernel browser-pools delete <id-or-name>` - Delete a pool
- `--force` - Force delete even if browsers are leased
Expand All @@ -997,6 +1004,7 @@ exists.
- `--name <name>` - Optional name for the acquired session (applies to this lease; cleared on release)
- `--tag <KEY=VALUE>` - Set a tag on the acquired session, repeatable; applies to this lease
- `--telemetry=all` / `--telemetry=off` / `--telemetry=<categories>` - Telemetry override for this lease only, merged onto the pool's config
- `--start-replay` - Start replay recording for this lease. Omit to use the pool's default; use `--start-replay=false` to disable it for this lease
- `--output json`, `-o json` - Output raw JSON object
- `kernel browser-pools release <id-or-name>` - Release a browser back to the pool
- `--session-id <id>` - Browser session ID to release (required)
Expand Down Expand Up @@ -1375,13 +1383,16 @@ Managed auth connections (`kernel auth connections`). The commands below are new
- `--telemetry=all` / `--telemetry=off` / `--telemetry=<categories>` - Default telemetry for this connection's browser sessions. Same semantics as `kernel browsers create`
- `--telemetry-export-otlp <id-or-name>` - Export this connection's captured telemetry over OTLP to one of the org's configured destinations. Implies `--telemetry=all` when `--telemetry` is not set. Use `=off` to disable export.
- `--telemetry-storage on|off` - Whether this connection's sessions persist captured telemetry to Kernel storage (default on). `off` requires `--telemetry-export-otlp <id-or-name>` in the same command.
- `--locale <bcp47>` - Browser locale for this connection's login, reauth, and health-check browser sessions (canonical BCP 47, e.g. `sv-SE`). Omit to use the browser region's default
- `kernel auth connections update <id>` - New flags:
- `--region us-east|us-west|eu-west|ap-southeast` - Update the region for browser sessions created after this command. Active sessions don't move.
- `--proxy-id <id>` / `--proxy-name <name>` / `--proxy-mode direct|default` - Proxy configuration for future browser sessions (mutually exclusive). Use `--proxy-mode=default` to drop a selected proxy rather than passing an empty value.
- `--stealth` - Set whether future browser sessions run in stealth mode; use `--stealth=false` to disable
- `--telemetry=all` / `--telemetry=off` / `--telemetry=<categories>` - Update telemetry for future browser sessions
- `--telemetry-export-otlp <id-or-name>` - Update where future sessions export captured telemetry. Naming a destination requires passing `--telemetry` in the same command, since the API validates capture and export together and enabling capture here would replace the connection's current category selection. Use `=off` to disable export.
- `--telemetry-storage on|off` - Update whether future sessions persist captured telemetry to Kernel storage. Requires `--telemetry` in the same command; `off` also requires an export destination.
- `--locale <bcp47>` - Set the browser locale for future browser sessions (canonical BCP 47, e.g. `sv-SE`). Mutually exclusive with `--clear-locale`
- `--clear-locale` - Clear the locale override so future sessions use the browser region's default
- `kernel auth connections login <id>` - New flags:
- `--region us-east|us-west|eu-west|ap-southeast` - Region override for this login only. Omit it to inherit the connection region.
- `--proxy-id <id>` / `--proxy-name <name>` / `--proxy-mode direct|default` - Proxy override for this login's browser session (mutually exclusive); omitted properties inherit the connection defaults
Expand Down
4 changes: 3 additions & 1 deletion cmd/browsers.go
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,9 @@ func (b BrowsersCmd) LiveViewCreate(ctx context.Context, in BrowsersLiveViewCrea
params.BrowserLiveViewRequest.TtlSeconds = kernel.Opt(in.TtlSeconds)
}

liveView, err := b.liveView.New(ctx, in.Identifier, params)
// Each call mints a URL that cannot be revoked, so never retry a request
// whose response may have been lost.
liveView, err := b.liveView.New(ctx, in.Identifier, params, option.WithMaxRetries(0))
if err != nil {
return util.CleanedUpSdkError{Err: err}
}
Expand Down
15 changes: 15 additions & 0 deletions cmd/browsers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"os"
"path/filepath"
"strings"
"sync/atomic"
"testing"
"time"

Expand Down Expand Up @@ -226,6 +227,20 @@ func TestBrowsersLiveViewCreateCommand(t *testing.T) {
assert.Contains(t, outBuf.String(), util.FormatLocal(expiresAt))
}

func TestBrowsersLiveViewCreateDoesNotRetry(t *testing.T) {
var requests atomic.Int32
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
requests.Add(1)
w.WriteHeader(http.StatusInternalServerError)
}))
t.Cleanup(server.Close)

client := kernel.NewClient(option.WithBaseURL(server.URL), option.WithAPIKey("test"))
b := BrowsersCmd{liveView: &client.Browsers.LiveView}
require.Error(t, b.LiveViewCreate(context.Background(), BrowsersLiveViewCreateInput{Identifier: "browser-one"}))
assert.Equal(t, int32(1), requests.Load())
}

func TestBrowsersLiveViewCreateDefaultsAndValidation(t *testing.T) {
setupStdoutCapture(t)
var captured kernel.BrowserLiveViewNewParams
Expand Down
2 changes: 1 addition & 1 deletion cmd/vaults_commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ and never retry automatically. 400/403/404/409 rejections mean the tool was not
or later may append &return_url=<URL-encoded URL>. invoke it once per advertised
request and never request another link automatically.
1pw_access_request_status: no browser needed; optional timeout_seconds 0-120 (default 10)
controls how long to keep checking. Kernel checks immediately, then every 2 seconds,
controls how long to keep checking. KERNEL checks immediately, then every 2 seconds,
slowing to 10- and 20-second intervals. each call reads fresh status and may wait up
to 20 seconds for its first scheduled check even when timeout_seconds is shorter.
honor a 429 Retry-After. after 3 minutes the approval prompt closes: ask whether the
Expand Down
2 changes: 1 addition & 1 deletion cmd/vaults_credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const vaultOnePasswordCredentialHelp = `1Password flow:
present the returned onepassword:// approval link and instructions to the account
owner unchanged. native iOS, Android, and desktop apps running 1Password 8.12.46
or later may append &return_url=<URL-encoded URL>.
4. invoke 1pw_access_request_status with timeout_seconds 0-120 (default 10). Kernel
4. invoke 1pw_access_request_status with timeout_seconds 0-120 (default 10). KERNEL
checks immediately, then every 2 seconds, slowing to 10- and 20-second intervals.
each call reads fresh status and may wait up to 20 seconds for its first scheduled
check even when timeout_seconds is shorter; honor a 429 Retry-After. after 3 minutes
Expand Down
Loading