You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a62cf9b
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: auth/fill-from-managed-auth.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,7 +73,7 @@ These examples continue in order, using GitHub as the login destination. Set `KE
73
73
74
74
<FillManagedAuthCredential />
75
75
76
-
`completed` means the selected fields were filled, not that login succeeded. If `fill` fails, returns an uncertain outcome, or loses its response, stop and [inspect the outcome](/vaults/fill#handle-the-outcome)rather than retrying automatically.
76
+
`completed` means the selected fields were filled, not that login succeeded. If `fill` fails, returns an uncertain outcome, or loses its response, [check the outcome](/vaults/fill#handle-the-outcome)and retry it; `fill` never submits the form.
77
77
</Step>
78
78
<Steptitle="Submit and handle the response">
79
79
After `fill` completes, your application or agent submits the login form once and verifies the site's response.
Copy file name to clipboardExpand all lines: auth/fill-from-vault.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,7 @@ these examples continue in order, using hacker news as the login destination. se
57
57
58
58
<FillBrowserCredentials />
59
59
60
-
`completed` means the selected fields were filled, not that login succeeded. if `fill` fails, returns an uncertain outcome, or loses its response, stop and [inspect the outcome](/vaults/fill#handle-the-outcome)rather than automatically retrying.
60
+
`completed` means the selected fields were filled, not that login succeeded. if `fill` fails, returns an uncertain outcome, or loses its response, [check the outcome](/vaults/fill#handle-the-outcome)and retry it; `fill` never submits the form.
61
61
</Step>
62
62
<Steptitle="Submit and Handle the Response">
63
63
after `fill` completes, your application or agent submits the login form once and verifies the site's response. `fill` doesn't perform either step. handle any additional authentication prompts before continuing the task.
Copy file name to clipboardExpand all lines: browsers/enable-payments-in-browser-agent.mdx
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ and authorization state. neither item is the user's underlying wallet or card.
35
35
<Warning>
36
36
- keep wallet enrollment and provider approval outside the agent and its browser. never put action urls, oauth codes, provider responses, api keys, or browser connection urls in model context.
37
37
- independently verify purchase details in your controller before creating, updating, or authorizing a card item. user confirmation alone doesn't validate an agent's proposal.
38
-
- submit checkout once through the merchant's normal form. don't retry submission, automatically retry `fill`, or fall back from `fill` to aliases after failure or uncertainty.
38
+
- submit checkout once through the merchant's normal form. don't retry submissionor fall back from `fill` to aliases after failure or uncertainty. `fill` never submits checkout, so it's safe to retry.
39
39
- report success only after the merchant's trusted order record confirms the matching paid order. a timeout, missing event, or browser deletion doesn't cancel a payment.
40
40
</Warning>
41
41
@@ -291,7 +291,7 @@ const result = await kernel.vaults.items.performOperation(linkCard.key, {
291
291
if (result.type!=="fill") thrownewError("unexpected operation response");
292
292
console.log(result.status, result.fields);
293
293
if (result.status!=="completed") {
294
-
thrownewError("stop and reconcile per-field outcomes; do not retry");
294
+
thrownewError("fill did not complete; inspect per-field outcomes and retry");
raiseRuntimeError("stop and reconcile per-field outcomes; do not retry")
323
+
raiseRuntimeError("fill did not complete; inspect per-field outcomes and retry")
324
324
```
325
325
326
326
</CodeGroup>
327
327
328
328
retain each result's zero-based `index`, `status`, and optional `error_code`.
329
329
`failed` may leave earlier writes in place; `unknown` or a transport error means
330
-
the outcome is uncertain. stop without retrying or switching to aliases. see the
330
+
the outcome is uncertain. `fill` never submits checkout, so retry it rather than
331
+
switching to aliases. see the
331
332
[`fill` outcome contract](/vaults/fill#handle-the-outcome) for details and [link checkout](/integrations/wallets/stripe-link#fill-the-checkout)
332
333
for the cli equivalent.
333
334
@@ -617,7 +618,7 @@ is unavailable or the sources disagree, keep the result indeterminate and don't
617
618
|`payment_requires_action`| continue the existing merchant flow without resubmitting payment |
618
619
|`payment_processing`| wait for the existing payment and inspect the merchant's status |
619
620
|`fill``completed` or `credential_fill_attempted`| inspect per-field outcomes and merchant state; filling alone does not prove submission or payment success |
620
-
|`fill``failed`, `unknown`, or a lost response |preserve partial or uncertain outcomes; stop without automatic retries or alias fallback|
621
+
|`fill``failed`, `unknown`, or a lost response |retry `fill`; it never submits checkout. don't fall back to aliases|
621
622
| agentcard `ready` or authorization `approved`| inspect charge, replay, and merchant state; reusable item state does not prove purchase success |
622
623
| decline, expiry, rejection, failure, abandonment, or `payment_unknown`| stop and reconcile the existing attempt before deciding whether a new purchase is appropriate |
623
624
|`recovery_required`| stop; reconcile the unresolved provider outcome. do not retry or delete the item or its parent wallet/vault |
@@ -735,8 +736,8 @@ card.
735
736
card and billing fields. fill writes actual values into the browser; do not
736
737
read them back, expose them in model context, or assume recordings omit them.
737
738
10. preserve the value-free fill result and every per-field outcome. continue
738
-
only on `completed`; failed or unknown outcomes, transport errors, or missing
739
-
required fields mean stop and reconcile. never automatically retry fill or
739
+
only on `completed`. fill never submits checkout, so retry it after failed or
740
+
unknown outcomes or transport errors; missing required fields mean stop. never
740
741
fall back to aliases. supply other customer fields only from approved user
741
742
data, complete any agent disclosure truthfully, then submit checkout once.
742
743
11. inspect the checkout result, fill outcomes, and item events. report success
Copy file name to clipboardExpand all lines: browsers/use-vault-credentials-in-browser-agent.mdx
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,10 +51,11 @@ verify access with `kernel vaults list --limit 1 -o json` and check
51
51
don't open it in your browser. i will enter my credentials and tell you when
52
52
i'm done. never ask me to paste my password into the conversation.
53
53
4. after i confirm, retrieve the item and require ready plus an advertised fill
54
-
operation. invoke fill once with the browser session ID, exact login URL,
54
+
operation. invoke fill with the browser session ID, exact login URL,
55
55
and selectors that uniquely identify the login inputs. don't read, print,
56
-
screenshot, or return the filled values. if fill fails, returns unknown, or
57
-
loses its response, stop rather than retrying or using another fill path.
56
+
screenshot, or return the filled values. fill never submits the form, so if
57
+
it fails, returns unknown, or loses its response, retry it. don't use another
58
+
fill path.
58
59
5. if fill completed, submit login once, verify the site's response, and tell me
59
60
my karma. if login fails or needs more interaction, ask me what to do next.
60
61
when we're finished, delete the test browser and only the vault created for
@@ -97,6 +98,6 @@ retrieve the item after the user confirms collection. `ready` means required val
97
98
98
99
<FillBrowserCredentials />
99
100
100
-
if the result is `completed`, the agent can submit login once and inspect the site's response. filling doesn't submit the form or confirm authentication. if the operation fails, returns `unknown`, or loses its response, stop instead of retrying. the [fill guide](/vaults/fill#handle-the-outcome) explains partial outcomes.
101
+
if the result is `completed`, the agent can submit login once and inspect the site's response. filling doesn't submit the form or confirm authentication. if the operation fails, returns `unknown`, or loses its response, retry it. the [fill guide](/vaults/fill#handle-the-outcome) explains partial outcomes.
101
102
102
103
when the temporary demo is finished, delete its browser and vault. retain per-user vaults in your application according to your retention policy. for passwords on other sites, repeat the same flow with the fields and selectors you observe there; don't reuse a credential on a different destination without the user's authorization.
the cli exits nonzero for `failed` or `unknown`, but retains the value-free result on stdout with `-o json`. preserve that output and its per-field statuses; don't discard it or retry just because the exit code is nonzero. a transport error can leave the outcome uncertain even without a result body.
581
+
the cli exits nonzero for `failed` or `unknown`, but retains the value-free result on stdout with `-o json`. use the per-field statuses to decide what to fix before retrying. a transport error can leave the outcome uncertain even without a result body.
582
582
583
583
see the [shared fill outcome contract](/vaults/fill#handle-the-outcome) for per-field statuses and reconciliation.
584
584
585
-
`fill` returns value-free per-field outcomes. `completed` means the fields were filled, not that payment succeeded. a `failed` result can leave earlier writes in place; `unknown` or a lost response requires reconciliation. don't automatically retry fill or fall back to aliases. decide whether to submit separately, and never retry checkout automatically.
585
+
`fill` returns value-free per-field outcomes. `completed` means the fields were filled, not that payment succeeded. a `failed` result can leave earlier writes in place, and `unknown` or a lost response means the outcome is uncertain. `fill` never submits checkout, so retry it in either case; don't fall back to aliases. decide whether to submit separately, and never retry checkout automatically.
586
586
587
587
single-use describes the provider-issued card, not one-use alias consumption. `fill` does not consume the item or clear its encrypted material on the first field write. expiry, deletion, and item lifecycle restrictions still apply; a ready item is not evidence that a purchase can safely be repeated.
Copy file name to clipboardExpand all lines: vaults/fill.mdx
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ the item must be ready and contain a stored value for each requested field. addi
21
21
22
22
attach the vault when creating the browser. the browser and vault must belong to the same project, and the attachment can't change later. attaching a vault grants access to all its items, including items added later; use separate vaults for tasks that must not share items. use the browser's session id in `browser_id`, not its name. KERNEL rechecks the attachment and item lifecycle before writing.
23
23
24
-
configure your sdk client with `maxRetries: 0` (typescript) or `max_retries=0` (python) for fill, and don't wrap it in a retry loop. the cli does not automatically retry fill requests.
24
+
`fill` is safe to retry. it only writes field values and never submits the form, so default sdk retries and your own retry loops are fine.
25
25
26
26
<aid="map-credential-fields-to-inputs" />
27
27
@@ -61,7 +61,7 @@ const result = await kernel.vaults.items.performOperation(item.key, {
61
61
if (result.type!=="fill") thrownewError("unexpected operation response");
62
62
console.log(result.status, result.fields);
63
63
if (result.status!=="completed") {
64
-
thrownewError("stop and reconcile the fill outcome before continuing");
64
+
thrownewError("fill did not complete; inspect per-field outcomes and retry");
raiseRuntimeError("stop and reconcile the fill outcome before continuing")
87
+
raiseRuntimeError("fill did not complete; inspect per-field outcomes and retry")
88
88
```
89
89
90
90
</CodeGroup>
@@ -103,20 +103,20 @@ KERNEL validates bindings before writing, then fills in request order. if naviga
103
103
104
104
## Handle the outcome
105
105
106
-
the cli exits nonzero for `failed` or `unknown`, but retains the value-free result on stdout with `-o json`. preserve that output and its per-field statuses; don't discard it or retry just because the exit code is nonzero. a transport error can leave the outcome uncertain even without a result body.
106
+
the cli exits nonzero for `failed` or `unknown`, but retains the value-free result on stdout with `-o json`. use the per-field statuses to decide what to fix before retrying. a transport error can leave the outcome uncertain even without a result body.
107
107
108
108
| result | next action |
109
109
| --- | --- |
110
110
|`completed`| all fields were filled; inspect the page and decide whether to submit |
111
-
|`failed`| inspect the per-field outcomes; earlier writes aren't rolled back |
112
-
|`unknown`|stop and reconcile; at least one field's outcome can't be determined |
113
-
| transport error |treat the outcome as uncertain because writes may already have happened |
111
+
|`failed`| inspect the per-field outcomes, fix the cause, and retry; earlier writes aren't rolled back |
112
+
|`unknown`|retry; at least one field's outcome can't be determined |
113
+
| transport error |retry; writes may already have happened |
114
114
115
115
known execution failures can return http `200` with a `failed` or `unknown` status. inspect the response body, not only the http status. each entry in `fields` identifies its request binding by zero-based `index` and reports `filled`, `failed`, `unknown`, or `not_attempted`. bindings after the first failed or unknown field are `not_attempted`.
116
116
117
117
`fill` doesn't click buttons or submit forms, but input/change handlers can trigger site behavior. `completed` doesn't mean login succeeded, a form was submitted, or payment succeeded.
118
118
119
-
**don't automatically retry `fill` after a failure or uncertain outcome.**a lost response can follow successful writes; another request can repeat events, overwrite edits, or generate a different totpcode. deliberate recovery starts with inspecting the existing attempt, not replaying it. preserve per-field `index`, `status`, and any `error_code` for reconciliation.
119
+
**`fill`is safe to retry after a failure, an `unknown` outcome, or a lost response.** it never submits the form, so a retry only rewrites the same fields, and a `totp` field gets a fresh code. a retry right after an `unknown` result can wait up to 15 seconds for the earlier attempt's browser lock to expire. when a field `failed`, fix its cause, such as a selector that matched nothing, before retrying.
Copy file name to clipboardExpand all lines: vaults/overview.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,7 @@ availability.
88
88
89
89
retrieve the item and require `fill` in `available_operations`. your controller authorizes the destination and supplies field names and selectors, not the stored values. KERNEL checks the browser attachment and item lifecycle, validates the target inputs, and writes values into the attached browser.
90
90
91
-
`fill` returns value-free per-field outcomes. it doesn't submit a form or establish the site's acceptance. inspect failed or unknown outcomes before taking another action; don't automatically retry. see [fill browser fields](/vaults/fill) for the request and outcome contract.
91
+
`fill` returns value-free per-field outcomes. it doesn't submit a form or establish the site's acceptance. because it never submits, `fill` is safe to retry after a failed or unknown outcome. see [fill browser fields](/vaults/fill) for the request and outcome contract.
92
92
93
93
some integrations use a different operation or handoff. [agentcard](/integrations/wallets/agentcard) uses aliases and provider-executed checkout instead of `fill`; this is not a requirement for other vault items.
0 commit comments