Skip to content
Merged
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
5 changes: 3 additions & 2 deletions docs/agent-steps.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ unless the agents entry sets a [custom one](/executors).
For `act`, the first prompt holds the instruction, the params, the completed
steps, and a redacted text snapshot of the screen: roles, names, text, and
states. It holds no raw HTML, cookies, headers, or environment values.
Password fields are masked, and a configured secret value on screen becomes
`<secret:name>`.
Password fields are masked, unless a page script hides one from e2e
([where redaction stops](/reference/security#where-redaction-stops)).
A configured secret value on screen becomes `<secret:name>`.

After an action, the model gets the changes to the screen, or a new full
snapshot when most of it changed. Node ids stay the same while their
Expand Down
6 changes: 4 additions & 2 deletions docs/decision-models.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,10 @@ the decision model picks again. For `upload`, the text model lists the
project-relative paths the goal or params name, and the runner authorizes
each one. Model output never becomes a selector, a URL, or a key.

Password fields never reach the text model. Only `typeSecret` fills a
secret, from its declared handle.
Password fields never reach the text model, unless a page script hides one
from e2e. Then the text model sees its value, and `type` can fill it
([where redaction stops](/reference/security#where-redaction-stops)).
Only `typeSecret` fills a configured secret, from its declared handle.

The text model also answers `waitFor` and `extract`. Instead of
`textModel`, you can set `model` on the agents entry. With neither, the
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/mcp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ Left out: the built-in fixtures an engine contributes (`browser`, `device`),
| `INVALID_ARGUMENT` | Code that doesn't parse or is outside the grammar, such as another name, a call it lacks, an assignment, or a function. The message quotes it with its line and column, and no statement runs. |
| `INVALID_ARGUMENT` | A matcher that expects `<secret:name>`, since a test compares the real value. No statement runs. |
| `POLICY_DENIED` | A secret `fill` into a field that fails the `type_secret` checks. Nothing is typed. |
| `POLICY_DENIED` | A read of a password field. |
| `POLICY_DENIED` | A read of a secure field, such as a password input. |
| `POLICY_DENIED` | When the config declares a secret or credential, a locator found by part of a text: a regular expression, an `exact` other than `true`, or `hasText`. Find it by its exact text. No statement runs. |

#### `test_lines`
Expand Down
9 changes: 8 additions & 1 deletion docs/reference/security.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ larger budget. [How agent steps work](/agent-steps) explains a step in full.
| In the prompt | Form |
| --- | --- |
| Your instruction and params | Quoted inside `<instruction>` and marked as data. A `Secret` param shows only its name and purpose. |
| The screen | An accessibility tree with node ids, roles, names, text, test ids, link targets, and states, cut at a size limit. No selectors. A link's query and fragment show only as `?…` and `#…`. Secure fields show as `value=<secure>`. |
| The screen | An accessibility tree with node ids, roles, names, text, test ids, link targets, and states, cut at a size limit. No selectors. A link's query and fragment show only as `?…` and `#…`. Secure fields show as `value=<secure>`, unless [a page script hides one](#where-redaction-stops). |
| The location | The current URL, redacted, without userinfo. A judgment gets it as a path on the app's origin and as the whole URL elsewhere, cut at a size limit. On a device, the app and screen title. |
| A screenshot | When needed or requested, and only if the engine proves secure fields are masked. |
| Prior steps | `agent.act` receives bounded records from the same test or serial group. Judgments use only the current screen, its location, the instruction and its params, and the agent's context. |
Expand Down Expand Up @@ -263,6 +263,13 @@ Redaction matches strings. These pass through:
are redacted before any provider runs,
- console output of tests that run in the runner's own process, when an
embedding host passes the config or tests in memory,
- on the web engine, a password field that a page script hides from e2e, for
example by replacing `Element.prototype.matches`. e2e reads it as a plain
field: the observed screen and `inputValue` show its value, and a failed
`toHaveValue` prints it. `getAttribute` and `toHaveAttribute` do the same
when the HTML `value` attribute holds it. A configured secret's value is
still `<secret:name>`. Screenshots still mask the field, unless it is in a
closed shadow root and the page also replaces `querySelectorAll`,
- a screenshot, including one sent to the model: it masks secure fields
only, so a value the app shows elsewhere is in the image,
- video: it masks nothing and is labeled `redaction: "incomplete"`. A
Expand Down
9 changes: 5 additions & 4 deletions plugins/e2e/skills/e2e/references/agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,11 @@ of sleeping.

A redacted snapshot of the screen (roles, names, text, states), prior-step
summaries, and your context; never raw HTML, cookies, headers, environment
values, or a `Secret`'s value; password fields masked. The first
screen of a step arrives whole; later action results report what changed,
keyed by node ids stable while an element exists, or the whole screen when
most changed. Pixels arrive through `vision` on a judgment or the act loop's
values, or a `Secret`'s value; password fields masked, unless a page
script hides one from e2e. The first screen of a step arrives whole; later
action results report what changed, keyed by node ids stable while an
element exists, or the whole screen when most changed.
Pixels arrive through `vision` on a judgment or the act loop's
`screenshot` and point tools, with secure fields masked. When
the browser engine's tree capture times out, the model gets a screenshot and
a warning, a judgment needs `vision: true`, and no control may be inferred
Expand Down
4 changes: 2 additions & 2 deletions plugins/e2e/skills/e2e/references/writing-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ drops out, `<br>` is a space); `toHaveText` reads the same. `isChecked()` on a
node that cannot be checked (a button), and `inputValue()` on one that holds
no value (a heading), throw `ACTION_FAILED`. `waitFor({ state?: 'attached' | 'detached' | 'visible' | 'hidden', timeout? })` waits
within `actionTimeout`, else `LOCATOR_NOT_FOUND`. For a value that has to
settle use `expect`, not a read. Reading a password field's value or
settle use `expect`, not a read. Reading a secure field's value or
attributes is `POLICY_DENIED`, as is `toHaveAttribute` on one, negated too.

`screen.tree()` returns the whole screen as the agent reads it (one node
Expand Down Expand Up @@ -401,7 +401,7 @@ typed; prefer it when the app already has a schema for the response.

`toHaveText` compares the whole normalized text, `toContainText` a substring
or RegExp, `toHaveValue` a form control's value as is, whitespace included
(it fails on a node with none); on a password field all three are
(it fails on a node with none); on a secure field all three are
`POLICY_DENIED`, never a comparison against `''`. List forms:
`toHaveText(['Alpha', /^Beta/])` needs exactly two matches with those texts
in order; `toContainText(['Alpha', 'Beta'])` needs each entry in a distinct
Expand Down
9 changes: 5 additions & 4 deletions skills/e2e/references/agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,11 @@ of sleeping.

A redacted snapshot of the screen (roles, names, text, states), prior-step
summaries, and your context; never raw HTML, cookies, headers, environment
values, or a `Secret`'s value; password fields masked. The first
screen of a step arrives whole; later action results report what changed,
keyed by node ids stable while an element exists, or the whole screen when
most changed. Pixels arrive through `vision` on a judgment or the act loop's
values, or a `Secret`'s value; password fields masked, unless a page
script hides one from e2e. The first screen of a step arrives whole; later
action results report what changed, keyed by node ids stable while an
element exists, or the whole screen when most changed.
Pixels arrive through `vision` on a judgment or the act loop's
`screenshot` and point tools, with secure fields masked. When
the browser engine's tree capture times out, the model gets a screenshot and
a warning, a judgment needs `vision: true`, and no control may be inferred
Expand Down
4 changes: 2 additions & 2 deletions skills/e2e/references/writing-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ drops out, `<br>` is a space); `toHaveText` reads the same. `isChecked()` on a
node that cannot be checked (a button), and `inputValue()` on one that holds
no value (a heading), throw `ACTION_FAILED`. `waitFor({ state?: 'attached' | 'detached' | 'visible' | 'hidden', timeout? })` waits
within `actionTimeout`, else `LOCATOR_NOT_FOUND`. For a value that has to
settle use `expect`, not a read. Reading a password field's value or
settle use `expect`, not a read. Reading a secure field's value or
attributes is `POLICY_DENIED`, as is `toHaveAttribute` on one, negated too.

`screen.tree()` returns the whole screen as the agent reads it (one node
Expand Down Expand Up @@ -401,7 +401,7 @@ typed; prefer it when the app already has a schema for the response.

`toHaveText` compares the whole normalized text, `toContainText` a substring
or RegExp, `toHaveValue` a form control's value as is, whitespace included
(it fails on a node with none); on a password field all three are
(it fails on a node with none); on a secure field all three are
`POLICY_DENIED`, never a comparison against `''`. List forms:
`toHaveText(['Alpha', /^Beta/])` needs exactly two matches with those texts
in order; `toContainText(['Alpha', 'Beta'])` needs each entry in a distinct
Expand Down
Loading