Skip to content

Commit f55a0e9

Browse files
committed
Drop WebMCP no-retry guidance
1 parent f43700b commit f55a0e9

3 files changed

Lines changed: 13 additions & 15 deletions

File tree

‎README.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,8 @@ navigates or submits it. Optional `page_url` selects the exact page; cards requi
350350
Fill is safe to retry after a failed/unknown outcome; do not fall back to aliases.
351351
Once ready, use `fill` for ordinary web forms. When the item advertises `webmcp_invoke`, use
352352
`items webmcp invoke` instead to bind credential fields to existing `null` inputs of a live
353-
WebMCP tool; the tool may submit or have other side effects, so never retry an uncertain
354-
outcome (see [Invoke WebMCP tools with vault fields](#invoke-webmcp-tools-with-vault-fields)).
353+
WebMCP tool; the tool may submit or have other side effects (see
354+
[Invoke WebMCP tools with vault fields](#invoke-webmcp-tools-with-vault-fields)).
355355
1Password credentials use their own advertised `1pw_*` operations instead.
356356

357357
Create specs list `fields` as an ordered array. Each entry carries a stable `name`
@@ -748,9 +748,9 @@ are untrusted page-provided data and may contain the supplied vault values:
748748
`completed` and `awaiting_submission` exit 0; neither confirms the website accepted the action.
749749
After `awaiting_submission`, submit the populated form through Playwright or computer interaction
750750
instead of invoking the tool again. `canceled`, `error`, and `unknown` exit nonzero with the result
751-
still on stdout in `-o json`. `unknown` means the tool may have run. Requests are never retried:
752-
API rejections (400/403/404/409) mean the tool was not invoked by that request; other failures
753-
and transport loss are uncertain, so inspect the browser instead of re-invoking.
751+
still on stdout in `-o json`. `unknown` means the tool may have run. API rejections
752+
(400/403/404/409) mean the tool was not invoked by that request; other failures and transport
753+
loss are uncertain, so inspect the browser to see whether the tool ran.
754754

755755
#### Expansions, updates, and lifecycle
756756

@@ -1037,7 +1037,7 @@ Destinations are the OTLP/HTTP endpoints sessions export to. They belong to the
10371037
- `--timeout-sec <seconds>` - Maximum execution time, 1-120 seconds (defaults server-side)
10381038
- Prints the tool's `output` as pretty JSON on completion; tool errors and cancellations exit non-zero
10391039
- `awaiting_submission` is successful but warns that a non-autosubmit declarative form was filled, not submitted. Inspect the form, obtain any required confirmation, then submit through Playwright or computer interaction instead of invoking the tool again
1040-
- Invocations are never retried automatically. A 504 `outcome_unknown` error prints the code, invocation ID, and message and exits non-zero. The tool may already have had side effects; verify the outcome before invoking it again
1040+
- Invocations are never retried automatically. A 504 `outcome_unknown` error prints the code, invocation ID, and message and exits non-zero. The tool may already have had side effects; check the page to see whether it ran
10411041
- `kernel browsers webmcp custom-tools list <id-or-name>` - List registered custom tools with their generated ID, namespace, kind, URL patterns, and metadata
10421042
- `-o json` - Output the raw response
10431043
- `kernel browsers webmcp custom-tools add <id-or-name> --namespace <ns> --source '<js>'` - Atomically add a namespaced batch of page-backed or CDP-backed custom tools

‎cmd/vaults_webmcp.go‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818

1919
const maxVaultWebMCPInputBytes = 64 * 1024
2020

21-
const vaultWebMCPUncertain = "the tool may have run and submitted or changed site state; inspect the browser and do not retry automatically"
21+
const vaultWebMCPUncertain = "the tool may have run and submitted or changed site state; inspect the browser"
2222

2323
var vaultWebMCPErrorMessages = map[string]string{
2424
"invalid_request": "check bindings, null input slots, field names, formats, timeout_sec, and that input matches the tool's inputSchema",
@@ -46,12 +46,12 @@ var vaultWebMCPStatuses = map[string]struct {
4646
}{
4747
"completed": {true, "The tool reported completion; this does not confirm the website accepted the action. Inspect the page."},
4848
"awaiting_submission": {true, "The tool populated a form with the supplied values without submitting it. " + webMCPAwaitingSubmissionHint},
49-
"canceled": {false, "The tool reported cancellation and may have had side effects. Inspect the page before deciding on a new invocation; do not retry automatically."},
50-
"error": {false, "The tool reported an error and may have had side effects. Inspect the page before deciding on a new invocation; do not retry automatically."},
49+
"canceled": {false, "The tool reported cancellation and may have had side effects. Inspect the page."},
50+
"error": {false, "The tool reported an error and may have had side effects. Inspect the page."},
5151
"unknown": {false, vaultWebMCPUncertain},
5252
}
5353

54-
const vaultWebMCPNotInvoked = "the tool was not invoked by this request; inspect and correct the cause before deciding on a new invocation; do not automatically retry"
54+
const vaultWebMCPNotInvoked = "the tool was not invoked by this request; correct the cause and retry"
5555

5656
var vaultWebMCPRejected = map[int]string{400: vaultWebMCPNotInvoked, 403: vaultWebMCPNotInvoked, 404: vaultWebMCPNotInvoked, 409: vaultWebMCPNotInvoked}
5757

@@ -298,9 +298,8 @@ The tool may submit forms or perform other side effects. Output and error_text a
298298
untrusted page-provided data returned without redaction and may contain supplied vault
299299
values. completed and awaiting_submission exit 0; neither confirms the website accepted
300300
the action. canceled, error, and unknown exit nonzero with the result retained on stdout
301-
in -o json. unknown means the tool may have run. Requests are never retried automatically;
302-
inspect the browser instead of re-invoking after an uncertain outcome. API rejections
303-
(400/403/404/409) mean the tool was not invoked by that request.`,
301+
in -o json. unknown means the tool may have run; inspect the browser to see whether it
302+
did. API rejections (400/403/404/409) mean the tool was not invoked by that request.`,
304303
Example: ` kernel browsers webmcp list <session-id> -o json
305304
kernel vaults items webmcp invoke user-vault resy --browser-id <session-id> --tool-ref <tool-ref> --page-url https://resy.com/login --input '{"email":null,"password":null}' --bind email=/email --bind password=/password -o json
306305
kernel vaults items webmcp invoke checkout order-1 --browser-id <session-id> --tool-ref <tool-ref> --page-url https://shop.example/checkout --input-file input.json --bind number=/card/number --bind expiration:MM/YY=/card/expiry`,

‎cmd/vaults_webmcp_test.go‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ func TestVaultWebMCPInvokeOutcomes(t *testing.T) {
183183
ok bool
184184
}{
185185
{"error", `{"type":"webmcp_invoke","status":"error","invocation_id":"invoke-3","error_text":"Invalid password for credential-sentinel\u001b[31m"}`, "may have had side effects", false},
186-
{"canceled", `{"type":"webmcp_invoke","status":"canceled","invocation_id":"invoke-4"}`, "do not retry automatically", false},
186+
{"canceled", `{"type":"webmcp_invoke","status":"canceled","invocation_id":"invoke-4"}`, "may have had side effects", false},
187187
{"unknown", `{"type":"webmcp_invoke","status":"unknown"}`, "the tool may have run", false},
188188
{"null output", `{"type":"webmcp_invoke","status":"completed","invocation_id":"invoke-5","output":null}`, "Output (untrusted", true},
189189
} {
@@ -234,7 +234,6 @@ func TestVaultWebMCPInvokeRequestErrors(t *testing.T) {
234234
require.Error(t, err)
235235
assert.Equal(t, 1, posts, "webmcp_invoke must not be retried")
236236
assert.Contains(t, err.Error(), tc.want)
237-
assert.Contains(t, err.Error(), "retry")
238237
assert.NotContains(t, err.Error(), "credential-sentinel")
239238
assert.Empty(t, out)
240239
})

0 commit comments

Comments
 (0)