Skip to content

Commit 59fdf00

Browse files
authored
docs(fill): state that typed-input privacy stops at agent-device surfaces (#3719)
Refs #3261
1 parent 40b1602 commit 59fdf00

4 files changed

Lines changed: 13 additions & 0 deletions

File tree

‎src/commands/schema/cli-help-topics.test.ts‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,15 @@ test('usageForCommand resolves scripting help topic', async () => {
293293
assert.match(help, /agent-device fill 'id="password"' "\$AD_VAR_PASSWORD" --record-as PASSWORD/);
294294
assert.match(help, /published script contain only \$\{PASSWORD\}/);
295295
assert.match(help, /Do not record passwords\/tokens without --record-as/);
296+
// #3261: the fill privacy controls stop at agent-device's own surfaces; XCTest's iOS
297+
// diagnostics are outside that boundary on a simulator and on a physical device.
298+
assert.match(
299+
help,
300+
/keep the literal out of agent-device's own responses, diagnostics, and recorded scripts/,
301+
);
302+
assert.match(help, /on iOS, XCTest writes its own diagnostic logs and its \.xcresult bundle/);
303+
assert.match(help, /typed text can appear in both, on a simulator or a physical device/);
304+
assert.match(help, /use test-only credentials when they may be kept or shared/);
296305
assert.match(help, /test --json marks a failed test with infrastructure: true/);
297306
assert.match(help, /It remains a failed test/);
298307
assert.match(help, /REPLAY_DIVERGENCE with a bounded report/);

‎src/commands/schema/cli-help.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ Reusable open-to-destination scripts:
168168
To keep the value out of the CLI's argv as well, pipe it in with --text-stdin instead of a text argument:
169169
printf %s "$AD_VAR_PASSWORD" | agent-device fill 'id="password"' --text-stdin --record-as PASSWORD
170170
--text-stdin reads at most 64 KiB, removes exactly one trailing newline, and refuses a terminal, empty input, invalid UTF-8, or an extra text argument. While recording is armed, --record-as publishes \${VAR} and --no-record leaves the step out; passing neither is an error. Without an armed recording the step is not recorded. It is not available inside batch steps.
171+
The privacy controls for typed input (--text-stdin and --record-as) keep the literal out of agent-device's own responses, diagnostics, and recorded scripts. They do not rewrite what the platform records: on iOS, XCTest writes its own diagnostic logs and its .xcresult bundle, and typed text can appear in both, on a simulator or a physical device. Treat those as sensitive, and use test-only credentials when they may be kept or shared.
171172
172173
Replay divergence and repair:
173174
A failing replay/test step returns REPLAY_DIVERGENCE with a bounded report (screen digest, ranked selector suggestions, resume). Fix app state, then resume with replay --from <n> --plan-digest <sha256> (both from the report's resume field) to continue without re-running earlier steps; resume never re-executes skipped steps, so app state there is the caller's responsibility. --from is replay-only; test rejects it. The digest binds the script, includes, effective --platform/--target, and per-action runtime/identity; native .ad interpolation is late-bound so changing only its values keeps the digest, while Maestro environment substitution can change it.

‎website/docs/docs/commands.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,7 @@ A `click` or `press` whose target the daemon resolves to a point (`@ref` or sele
432432
- `fill` clears then types. `type` appends to the focused field and accepts text only: use `fill @ref "text"` to target a field, or `press @ref` then `type "text"`.
433433
- Use plain `fill` or `type` first. Add `--delay-ms` only when a debounced or search-as-you-type field misses characters, or the app must receive each incremental update; delayed typing enters characters one at a time instead of using a clipboard-style fallback.
434434
- `fill --text-stdin` reads the text from stdin so a secret never appears in process arguments. Pipe it with `printf %s`. It reads at most 64 KiB, removes one trailing newline, and refuses a terminal, empty input, invalid UTF-8, or an extra text argument. Output shows the value as `${VAR}` with `--record-as <VAR>` and as `[REDACTED]` otherwise, including in error messages and details. While script recording is armed, pass `--record-as <VAR>` or `--no-record`; passing neither is an error. Batch steps don't accept it.
435+
- The privacy controls for typed input (`--text-stdin` and `--record-as`) keep the literal out of agent-device's own responses, diagnostics, and recorded scripts. They do not rewrite what the platform records: on iOS, XCTest writes its own diagnostic logs and its `.xcresult` bundle, and typed text can appear in both, on a simulator or a physical device. Treat those as sensitive, and use test-only credentials when they may be kept or shared. See [Security & Trust](/docs/security-trust).
435436
- Android text entry is owned by `agent-device`. Don't fall back to raw `adb`, clipboard, or paste; if non-ASCII is unsupported on the current backend, report the gap. Android `fill` verifies the text and fails instead of retrying when the IME captures input.
436437
437438
Text-entry errors and what to do:

‎website/docs/docs/security-trust.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ Screenshots, recordings, traces, logs, network dumps, audio probes, replay files
4848

4949
Cloud provider artifact URLs returned by `artifacts`, `close --json`, or `disconnect --json` may be provider dashboard URLs, public share links, or pre-signed download URLs. Treat the URLs themselves as credentials until you know the provider's sharing and expiry policy.
5050

51+
The privacy controls for typed input (`fill --text-stdin` and `--record-as`) keep the literal out of agent-device's own responses, diagnostics, and recorded scripts. They do not rewrite what the platform records: on iOS, XCTest writes its own diagnostic logs and its `.xcresult` bundle under the Apple runner's derived directory, and typed text can appear in both, on a simulator or a physical device. Treat those as sensitive, and use test-only credentials when they may be kept or shared.
52+
5153
## Permissions
5254

5355
Some targets require local permissions or developer setup:

0 commit comments

Comments
 (0)