Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

feat(cua-driver): keep typed secrets out of recordings (#6333)

cua-agents[bot]69d42802d445
diff --git a/docs/content/docs/cua-driver/reference/mcp-tools/batch-recording-and-settings.mdx b/docs/content/docs/cua-driver/reference/mcp-tools/batch-recording-and-settings.mdx
index 5d0080bbaa..3c842be3cf 100644
--- a/docs/content/docs/cua-driver/reference/mcp-tools/batch-recording-and-settings.mdx
+++ b/docs/content/docs/cua-driver/reference/mcp-tools/batch-recording-and-settings.mdx
@@ -139,6 +139,8 @@ Each turn folder holds:
The per-turn accessibility walk is bounded like `get_window_state`: `state_timeout_ms` (default 1000) caps each before/after walk, a walk that runs out of budget records the PARTIAL tree, and `evidence.json` carries `truncated`, `truncation_reason`, `nodes_visited`, `nodes_pending` and `timeout_ms` for that phase. A provider that stops answering is abandoned after the budget plus a short grace and the phase is classified `state_capture_timeout`. Actions refused before dispatch (for example an unknown or expired `capture_id`) skip the state walk; their state is classified `not_applicable` / `action_refused_before_dispatch`. Pass `include_accessibility_tree: false` to record screenshots and actions without state.
+Pass `redact_values` with any secret the session will type (for example a password): each occurrence in a turn's text files is replaced with `[redacted]`, and such turns are not replayed.
+
Turn folders are named `turn-00001/`, `turn-00002/`, etc. Turn numbering restarts at 1 each time recording is (re-)started.
**Video is off by default.** Pass `record_video: true` to also capture the main display to `<output_dir>/recording.mp4` (H.264 / 30 fps) for the lifetime of the session. The recording is torn down automatically when the MCP client disconnects.
@@ -158,6 +160,7 @@ Effect: mutating, idempotent. Platforms: macOS, Linux, Windows.
| <span id="start_recording--include_accessibility_tree"></span>`include_accessibility_tree` | `boolean` | `true` | Default true. Set false to skip the per-turn before/after accessibility walks entirely; screenshots, click markers and action.json are still recorded and state is classified `state_capture_disabled`. |
| <span id="start_recording--output_dir"></span>`output_dir` | `string` | required | Absolute or ~-rooted directory where turn folders and (when enabled) the video file are written. |
| <span id="start_recording--record_video"></span>`record_video` | `boolean` | | Capture the main display to &lt;output_dir&gt;/recording.mp4. Default: false. Set to true to also capture the main display to recording.mp4 (otherwise only the per-turn screenshots + JSON are recorded). On macOS this uses native ScreenCaptureKit (macOS 15.0+); macOS 26 can show a one-time direct screen-capture consent on first use (see `cua-driver permissions grant`). On Windows + Linux it requires ffmpeg on PATH. |
+| <span id="start_recording--redact_values"></span>`redact_values` | `string[]` | | Secret values, such as passwords or tokens, that must never be written to the recording. Every occurrence in a turn's action.json and state files is replaced with `[redacted]`, and the turn is marked `redacted: true` so replay_trajectory skips it. The values are held in memory only, never written, and cleared when recording stops. Screenshots and video are not altered. Items: 1 to 64. |
| <span id="start_recording--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
| <span id="start_recording--state_timeout_ms"></span>`state_timeout_ms` | `integer` | `1000` | Wall-clock budget in milliseconds for EACH per-turn before/after accessibility walk (same default and bounds as get_window_state's timeout_ms). A walk that runs out records the partial tree and marks it truncated in evidence.json. Range: 100 to 120000. |
diff --git a/libs/cua-driver/rust/crates/cua-driver-core/src/recording.rs b/libs/cua-driver/rust/crates/cua-driver-core/src/recording.rs
index 72c65cff49..bd161bbf29 100644
--- a/libs/cua-driver/rust/crates/cua-driver-core/src/recording.rs
+++ b/libs/cua-driver/rust/crates/cua-driver-core/src/recording.rs
@@ -454,6 +454,107 @@ pub struct PendingTurn {
predicted_refusal: Option<&'static str>,
before: TurnCapture,
dispatch_click: Option<Arc<DispatchClickScope>>,
+ /// Caller-supplied secret values scrubbed from this turn's text files.
+ redactions: Redactions,
+}
+
+/// Secret values given to `start_recording` that must never reach the
+/// recording's files. They live only in memory for the recording's lifetime
+/// and are replaced with [`REDACTED`] in every text artifact of a turn
+/// (`action.json`, `before_state.json`, `after_state.json`, `app_state.json`).
+/// Screenshots and video are not altered.
+#[derive(Clone, Default)]
+pub struct Redactions(Arc<Vec<String>>);
+
+/// Placeholder written in place of a redacted value.
+pub const REDACTED: &str = "[redacted]";
+
+impl Redactions {
+ pub fn new(values: impl IntoIterator<Item = String>) -> Self {
+ let mut values: Vec<String> = values.into_iter().filter(|v| !v.is_empty()).collect();
+ // Longest first, so a value that contains another is replaced whole.
+ values.sort_by(|a, b| b.len().cmp(&a.len()).then_with(|| a.cmp(b)));
+ values.dedup();
+ Self(Arc::new(values))
+ }
+
+ pub fn is_empty(&self) -> bool {
+ self.0.is_empty()
+ }
+
+ fn scrub_str(&self, text: &str) -> Option<String> {
+ let mut out: Option<String> = None;
+ for value in self.0.iter() {
+ let current = out.as_deref().unwrap_or(text);
+ if current.contains(value.as_str()) {
+ out = Some(current.replace(value.as_str(), REDACTED));
+ }
+ }
+ out
+ }
+
+ /// Replace every occurrence in the string values and object keys of
+ /// `value`. Returns whether anything was replaced.
+ pub fn scrub_json(&self, value: &mut Value) -> bool {
+ if self.is_empty() {
+ return false;
+ }
+ match value {
+ Value::String(text) => match self.scrub_str(text) {
+ Some(scrubbed) => {
+ *text = scrubbed;
+ true
+ }
+ None => false,
+ },
+ Value::Array(items) => items
+ .iter_mut()
+ .fold(false, |hit, item| self.scrub_json(item) | hit),
+ Value::Object(map) => {
+ let mut hit = false;
+ let keys: Vec<String> = map.keys().cloned().collect();
+ for key in keys {
+ let mut child = map.remove(&key).unwrap_or(Value::Null);
+ hit |= self.scrub_json(&mut child);
+ let key = match self.scrub_str(&key) {
+ Some(scrubbed) => {
+ hit = true;
+ scrubbed
+ }
+ None => key,
+ };
+ map.insert(key, child);
+ }
+ hit
+ }
+ _ => false,
+ }
+ }
+
+ /// Scrub a captured state file. JSON is scrubbed structurally so escaped
+ /// characters in a value cannot hide it; anything else is scrubbed as text.
+ fn scrub_bytes(&self, bytes: &mut Vec<u8>) -> bool {
+ if self.is_empty() {
+ return false;
+ }
+ if let Ok(mut json) = serde_json::from_slice::<Value>(bytes) {
+ if self.scrub_json(&mut json) {
+ if let Ok(out) = serde_json::to_vec_pretty(&json) {
+ *bytes = out;
+ return true;
+ }
+ }
+ return false;
+ }
+ let text = String::from_utf8_lossy(bytes);
+ match self.scrub_str(&text) {
+ Some(scrubbed) => {
+ *bytes = scrubbed.into_bytes();
+ true
+ }
+ None => false,
+ }
+ }
}
/// Trusted identity of the call that may reserve a turn.
@@ -522,6 +623,8 @@ struct RecordingInner {
/// `session.json` after stop so the renderer can confirm the
/// sampler ran.
last_cursor_samples: usize,
+ /// Secret values scrubbed from every turn of the live recording.
+ redactions: Redactions,
}
/// Snapshot of the current recording state (cheap to clone).
@@ -563,6 +666,7 @@ impl RecordingSession {
last_video: None,
cursor: None,
last_cursor_samples: 0,
+ redactions: Redactions::default(),
}),
}
}
@@ -617,6 +721,26 @@ impl RecordingSession {
record_video: bool,
owner: Option<&str>,
state_budget: Option<StateCaptureBudget>,
+ ) -> anyhow::Result<()> {
+ self.start_with_redactions(
+ output_dir,
+ record_video,
+ owner,
+ state_budget,
+ Redactions::default(),
+ )
+ }
+
+ /// [`Self::start_with_state_budget`] plus secret values that are scrubbed
+ /// from every turn's text files. The values are held in memory only and
+ /// cleared when the recording stops or restarts.
+ pub fn start_with_redactions(
+ &self,
+ output_dir: &str,
+ record_video: bool,
+ owner: Option<&str>,
+ state_budget: Option<StateCaptureBudget>,
+ redactions: Redactions,
) -> anyhow::Result<()> {
let mut inner = self.inner.lock().unwrap();
// Write-boundary resurrection guard — checked INSIDE the lock so the
@@ -709,6 +833,7 @@ impl RecordingSession {
inner.enabled = true;
inner.output_dir = Some(dir);
inner.state_budget = state_budget;
+ inner.redactions = redactions;
inner.next_turn = 1;
inner.session_start_ms = started_at_ms;
inner.session_monotonic_start = Some(monotonic_start);
@@ -764,6 +889,7 @@ impl RecordingSession {
inner.enabled = false;
inner.output_dir = None;
+ inner.redactions = Redactions::default();
inner.next_turn = 1;
inner.session_start_ms = 0;
inner.session_monotonic_start = None;
@@ -878,7 +1004,7 @@ impl RecordingSession {
capture_visual_state: bool,
predicted_refusal: Option<&'static str>,
) -> Option<PendingTurn> {
- let (turn_dir, session_start_ms, generation, state_budget) = {
+ let (turn_dir, session_start_ms, generation, state_budget, redactions) = {
let mut inner = self.inner.lock().unwrap();
if !inner.enabled {
return None;
@@ -896,6 +1022,7 @@ impl RecordingSession {
inner.session_start_ms,
inner.generation,
inner.state_budget,
+ inner.redactions.clone(),
)
};
@@ -925,7 +1052,7 @@ impl RecordingSession {
pid,
self.pixel_point_fn.get(),
);
- let before = if capture_visual_state {
+ let mut before = if capture_visual_state {
capture_turn(
window_id,
pid,
@@ -943,6 +1070,9 @@ impl RecordingSession {
if !inner.enabled || inner.generation != generation {
return None;
}
+ if let Some(state) = before.state.bytes.as_mut() {
+ redactions.scrub_bytes(state);
+ }
if let Err(error) = write_phase_artifacts(&turn_dir, "before", &before) {
inner.last_error = Some(error.to_string());
}
@@ -975,6 +1105,7 @@ impl RecordingSession {
} else {
None
},
+ redactions,
})
}
@@ -1324,7 +1455,7 @@ fn write_turn(
fn write_turn_with_after(
pending: PendingTurn,
- after: TurnCapture,
+ mut after: TurnCapture,
result_text: &str,
action_record: Option<&crate::action_record::ActionExecutionRecord>,
result_is_error: bool,
@@ -1344,7 +1475,11 @@ fn write_turn_with_after(
predicted_refusal,
mut before,
dispatch_click,
+ redactions,
} = pending;
+ if let Some(state) = after.state.bytes.as_mut() {
+ redactions.scrub_bytes(state);
+ }
let supplemental = dispatch_click
.map(|scope| std::mem::take(&mut *scope.capture.lock().unwrap()))
.unwrap_or_default();
@@ -1418,6 +1553,14 @@ fn write_turn_with_after(
if let Some(action_record) = action_record {
payload["action_truth"] = action_record.debug_json();
}
+ // The result summary and action truth can echo typed text back, so the
+ // whole file is scrubbed. `redacted` marks a turn whose arguments lost a
+ // value, which replay cannot re-invoke as recorded.
+ let arguments_redacted = redactions.scrub_json(&mut payload["arguments"]);
+ redactions.scrub_json(&mut payload);
+ if arguments_redacted {
+ payload["redacted"] = Value::Bool(true);
+ }
let semantic_without_point =
supplemental.failure.is_none() && semantic_action_without_point(&payload);
let click_expected = click_family
@@ -1669,6 +1812,7 @@ mod tests {
pid: 901,
capture: Mutex::new(DispatchClickCapture::default()),
})),
+ redactions: Redactions::default(),
}
}
@@ -2047,6 +2191,7 @@ mod tests {
predicted_refusal: None,
before: TurnCapture::default(),
dispatch_click: None,
+ redactions: Redactions::default(),
};
write_turn(pending, "AT-SPI outcome", Some(&record), is_error).unwrap();
let action: Value =
@@ -2117,6 +2262,7 @@ mod tests {
..Default::default()
},
dispatch_click: None,
+ redactions: Redactions::default(),
},
"AT-SPI outcome",
Some(&record),
@@ -2579,6 +2725,7 @@ mod tests {
..Default::default()
},
dispatch_click: None,
+ redactions: Redactions::default(),
};
let manifest = |root: &Path| -> Value {
serde_json::from_slice(&std::fs::read(root.join("evidence.json")).unwrap()).unwrap()
@@ -2613,6 +2760,134 @@ mod tests {
);
}
+ fn turn_files_contain_no_secret(root: &Path, secrets: &[&str]) {
+ let mut stack = vec![root.to_path_buf()];
+ let mut files = 0;
+ while let Some(dir) = stack.pop() {
+ for entry in std::fs::read_dir(&dir).unwrap() {
+ let path = entry.unwrap().path();
+ if path.is_dir() {
+ stack.push(path);
+ continue;
+ }
+ files += 1;
+ let bytes = std::fs::read(&path).unwrap();
+ for secret in secrets {
+ let escaped = serde_json::to_string(secret).unwrap();
+ let escaped = &escaped[1..escaped.len() - 1];
+ for needle in [*secret, escaped] {
+ assert!(
+ !bytes.windows(needle.len()).any(|w| w == needle.as_bytes()),
+ "{} holds a redacted value",
+ path.display()
+ );
+ }
+ }
+ }
+ }
+ assert!(files > 0, "no turn files were written");
+ }
+
+ #[test]
+ fn redact_values_never_reach_turn_files() {
+ let secrets = ["hunter2-Secret", "pa\"ss\\word"];
+ let root = tempfile::tempdir().unwrap();
+ let redactions = Redactions::new(secrets.iter().map(|s| (*s).to_owned()));
+
+ // Arguments and result summary through the session API.
+ let session = RecordingSession::new();
+ {
+ let mut inner = session.inner.lock().unwrap();
+ inner.enabled = true;
+ inner.output_dir = Some(root.path().join("session"));
+ inner.session_start_ms = now_ms();
+ inner.redactions = redactions.clone();
+ }
+ let pending = session
+ .begin_private_turn(
+ "type_text",
+ &serde_json::json!({"pid": 1, "text": "login hunter2-Secret now"}),
+ now_ms(),
+ RecordingCaller::default(),
+ )
+ .expect("reserve turn");
+ session.finish_turn(pending, "typed 'login hunter2-Secret now'");
+ let action: Value = serde_json::from_slice(
+ &std::fs::read(root.path().join("session/turn-00001/action.json")).unwrap(),
+ )
+ .unwrap();
+ assert_eq!(action["arguments"]["text"], "login [redacted] now");
+ assert_eq!(action["result_summary"], "typed 'login [redacted] now'");
+ assert_eq!(action["redacted"], true);
+
+ // A turn without a secret in its arguments is not marked.
+ let pending = session
+ .begin_private_turn(
+ "press_key",
+ &serde_json::json!({"pid": 1, "key": "return"}),
+ now_ms(),
+ RecordingCaller::default(),
+ )
+ .unwrap();
+ session.finish_turn(pending, "pressed");
+ let action: Value = serde_json::from_slice(
+ &std::fs::read(root.path().join("session/turn-00002/action.json")).unwrap(),
+ )
+ .unwrap();
+ assert!(action.get("redacted").is_none());
+
+ // Stopping forgets the values.
+ session.stop_owner(None).unwrap();
+ assert!(session.inner.lock().unwrap().redactions.is_empty());
+
+ // Before/after accessibility state, including JSON-escaped values.
+ let state = serde_json::to_vec(&serde_json::json!({
+ "role": "AXTextField",
+ "value": "pa\"ss\\word",
+ "children": [{"title": "hunter2-Secret"}],
+ }))
+ .unwrap();
+ let turn_dir = root.path().join("state");
+ let pending = PendingTurn {
+ generation: 0,
+ turn_dir: turn_dir.clone(),
+ tool_name: "set_value".into(),
+ args: serde_json::json!({"pid": 1, "value": "pa\"ss\\word"}),
+ start_ms: 0,
+ session_start_ms: 0,
+ window_id: None,
+ pid: Some(1),
+ click_point: None,
+ capture_visual_state: true,
+ state_budget: Some(StateCaptureBudget::default()),
+ predicted_refusal: None,
+ before: TurnCapture::default(),
+ dispatch_click: None,
+ redactions: redactions.clone(),
+ };
+ let after = TurnCapture {
+ state: StateCapture::captured(state.clone()),
+ ..Default::default()
+ };
+ write_turn_with_after(pending, after, "set", None, false).unwrap();
+ let app_state: Value =
+ serde_json::from_slice(&std::fs::read(turn_dir.join("app_state.json")).unwrap())
+ .unwrap();
+ assert_eq!(app_state["value"], "[redacted]");
+ assert_eq!(app_state["children"][0]["title"], "[redacted]");
+
+ turn_files_contain_no_secret(root.path(), &secrets);
+ }
+
+ #[test]
+ fn redactions_replace_longest_value_first_and_ignore_empty() {
+ let redactions = Redactions::new(["abc".to_owned(), "abcdef".to_owned(), String::new()]);
+ let mut value = serde_json::json!({"text": "xabcdefx abc"});
+ assert!(redactions.scrub_json(&mut value));
+ assert_eq!(value["text"], "x[redacted]x [redacted]");
+ assert!(!Redactions::new([String::new()]).scrub_json(&mut value));
+ }
+
#[test]
fn private_turn_records_metadata_without_visual_or_ax_artifacts() {
let output_dir = std::env::temp_dir().join(format!(
diff --git a/libs/cua-driver/rust/crates/cua-driver-core/src/recording_tools.rs b/libs/cua-driver/rust/crates/cua-driver-core/src/recording_tools.rs
index c90b0d12f6..b8d6141507 100644
--- a/libs/cua-driver/rust/crates/cua-driver-core/src/recording_tools.rs
+++ b/libs/cua-driver/rust/crates/cua-driver-core/src/recording_tools.rs
@@ -81,6 +81,9 @@ impl Tool for StartRecordingTool {
state walk; their state is classified `not_applicable` / \
`action_refused_before_dispatch`. Pass `include_accessibility_tree: \
false` to record screenshots and actions without state.\n\n\
+ Pass `redact_values` with any secret the session will type (for \
+ example a password): each occurrence in a turn's text files is \
+ replaced with `[redacted]`, and such turns are not replayed.\n\n\
Turn folders are named `turn-00001/`, `turn-00002/`, etc. Turn \
numbering restarts at 1 each time recording is (re-)started.\n\n\
**Video is off by default.** Pass `record_video: true` to also \
@@ -152,6 +155,18 @@ impl Tool for StartRecordingTool {
click markers and action.json are still recorded and state \
is classified `state_capture_disabled`."
},
+ "redact_values": {
+ "type": "array",
+ "items": { "type": "string", "minLength": 1 },
+ "minItems": 1,
+ "maxItems": REDACT_VALUES_MAX,
+ "description": "Secret values, such as passwords or tokens, that must \
+ never be written to the recording. Every occurrence in a turn's \
+ action.json and state files is replaced with `[redacted]`, and the \
+ turn is marked `redacted: true` so replay_trajectory skips it. \
+ The values are held in memory only, never written, and cleared \
+ when recording stops. Screenshots and video are not altered."
+ },
"session": {
"type": "string",
"description": "For multi-call work, prefer a short public session label \
@@ -186,11 +201,17 @@ impl Tool for StartRecordingTool {
}
});
- match self.session.start_with_state_budget(
+ let redactions = match parse_redact_values(args.get("redact_values")) {
+ Ok(redactions) => redactions,
+ Err(message) => return ToolResult::error(message),
+ };
+
+ match self.session.start_with_redactions(
output_dir.as_deref().unwrap(),
record_video,
owner.as_deref(),
state_budget,
+ redactions,
) {
Ok(()) => {
let state = self.session.current_state();
@@ -575,6 +596,36 @@ fn recording_state_json(state: &RecordingState) -> Value {
})
}
+/// Upper bound on `start_recording`'s `redact_values` list.
+const REDACT_VALUES_MAX: usize = 64;
+
+/// Never echoes a value back: error messages name only the position.
+fn parse_redact_values(value: Option<&Value>) -> Result<crate::recording::Redactions, String> {
+ let Some(value) = value.filter(|value| !value.is_null()) else {
+ return Ok(crate::recording::Redactions::default());
+ };
+ let items = value
+ .as_array()
+ .ok_or_else(|| "`redact_values` must be an array of strings.".to_owned())?;
+ if items.len() > REDACT_VALUES_MAX {
+ return Err(format!(
+ "`redact_values` accepts at most {REDACT_VALUES_MAX} values."
+ ));
+ }
+ let mut values = Vec::with_capacity(items.len());
+ for (index, item) in items.iter().enumerate() {
+ match item.as_str() {
+ Some(text) if !text.is_empty() => values.push(text.to_owned()),
+ _ => {
+ return Err(format!(
+ "`redact_values[{index}]` must be a non-empty string."
+ ))
+ }
+ }
+ }
+ Ok(crate::recording::Redactions::new(values))
+}
+
fn parse_action_json(path: &std::path::Path) -> anyhow::Result<(String, Value)> {
if !path.exists() {
anyhow::bail!("Missing action.json");
@@ -586,6 +637,14 @@ fn parse_action_json(path: &std::path::Path) -> anyhow::Result<(String, Value)>
.and_then(|v| v.as_str())
.ok_or_else(|| anyhow::anyhow!("action.json missing 'tool' string field"))?
.to_owned();
+ // A turn whose arguments lost a secret value would replay the placeholder
+ // (for example typing "[redacted]"), so it is refused instead.
+ if obj.get("redacted").and_then(Value::as_bool) == Some(true) {
+ anyhow::bail!(
+ "turn arguments were redacted when recorded (start_recording redact_values); \
+ it cannot be replayed as recorded"
+ );
+ }
let tool_args = obj
.get("arguments")
.cloned()
@@ -721,4 +780,57 @@ mod tests {
session.stop_owner(None).unwrap();
}
}
+
+ #[test]
+ fn replay_refuses_redacted_turns() {
+ let dir = tempfile::tempdir().unwrap();
+ let path = dir.path().join("action.json");
+ std::fs::write(
+ &path,
+ r#"{"tool":"type_text","arguments":{"text":"[redacted]"},"redacted":true}"#,
+ )
+ .unwrap();
+ let error = parse_action_json(&path).unwrap_err().to_string();
+ assert!(error.contains("redacted"), "{error}");
+ }
+
+ #[tokio::test]
+ async fn start_recording_validates_redact_values_without_echoing_them() {
+ let session = Arc::new(RecordingSession::new());
+ let tool = StartRecordingTool::new(session.clone());
+ let schema = &tool.def().input_schema["properties"]["redact_values"];
+ assert_eq!(schema["type"], "array");
+ let directory = tempfile::tempdir().unwrap();
+ let dir = directory.path().to_str().unwrap();
+
+ for bad in [
+ json!("hunter2-Secret"),
+ json!(["hunter2-Secret", ""]),
+ json!([7]),
+ ] {
+ let result = tool
+ .invoke(json!({"output_dir": dir, "redact_values": bad}))
+ .await;
+ assert_eq!(result.is_error, Some(true), "{bad}");
+ let text = serde_json::to_string(&result.content).unwrap();
+ assert!(!text.contains("hunter2-Secret"), "{text}");
+ assert!(!session.current_state().enabled);
+ }
+
+ let result = tool
+ .invoke(json!({"output_dir": dir, "redact_values": ["hunter2-Secret"]}))
+ .await;
+ assert_ne!(result.is_error, Some(true));
+ let text = serde_json::to_string(&result.content).unwrap()
+ + &serde_json::to_string(&result.structured_content).unwrap_or_default();
+ assert!(!text.contains("hunter2-Secret"), "{text}");
+ session.stop_owner(None).unwrap();
+ for entry in std::fs::read_dir(directory.path()).unwrap() {
+ let path = entry.unwrap().path();
+ if path.is_file() {
+ let bytes = std::fs::read_to_string(&path).unwrap_or_default();
+ assert!(!bytes.contains("hunter2-Secret"), "{}", path.display());
+ }
+ }
+ }
}
diff --git a/scripts/docs-generators/cli-specs/cua-driver-mcp-linux.json b/scripts/docs-generators/cli-specs/cua-driver-mcp-linux.json
index 52c28a5312..5ba4ef61db 100644
--- a/scripts/docs-generators/cli-specs/cua-driver-mcp-linux.json
+++ b/scripts/docs-generators/cli-specs/cua-driver-mcp-linux.json
@@ -2994,7 +2994,7 @@
"read_only": false
},
{
- "description": "Start trajectory recording for the calling session. Each action-tool invocation (click, right_click, scroll, type_text, press_key, hotkey, set_value) from that session writes a turn folder under `output_dir`. Without `session`, every call on the same connection is recorded, including named-session calls. Other connections and session lifecycle calls (`start_session` / `end_session`) are not recorded. CLI recordings started with `cua-driver recording start` are daemon-wide.\n\nEach turn folder holds:\n\n- `before_state.json` / `after_state.json` — application AX/UIA/AT-SPI state immediately before and after the action.\n- `before.png` / `after.png` — target-window screenshots immediately before and after the action.\n- `evidence.json` — capture status and a stable classification when an expected artifact could not be captured.\n- `app_state.json` — post-action AX/UIA snapshot for the target pid.\n- `screenshot.png` — compatibility alias of `after.png`.\n- `action.json` — tool name, full input arguments, result summary, result-error flag, pid, click point (when applicable), ISO-8601 timestamp.\n- `click.png` — for dispatched click-family actions only, `before.png` with a red marker at the click point. A call refused before target resolution is explicitly not applicable instead.\n\nThe per-turn accessibility walk is bounded like `get_window_state`: `state_timeout_ms` (default 1000) caps each before/after walk, a walk that runs out of budget records the PARTIAL tree, and `evidence.json` carries `truncated`, `truncation_reason`, `nodes_visited`, `nodes_pending` and `timeout_ms` for that phase. A provider that stops answering is abandoned after the budget plus a short grace and the phase is classified `state_capture_timeout`. Actions refused before dispatch (for example an unknown or expired `capture_id`) skip the state walk; their state is classified `not_applicable` / `action_refused_before_dispatch`. Pass `include_accessibility_tree: false` to record screenshots and actions without state.\n\nTurn folders are named `turn-00001/`, `turn-00002/`, etc. Turn numbering restarts at 1 each time recording is (re-)started.\n\n**Video is off by default.** Pass `record_video: true` to also capture the main display to `<output_dir>/recording.mp4` (H.264 / 30 fps) for the lifetime of the session. The recording is torn down automatically when the MCP client disconnects.\n\n**macOS uses native ScreenCaptureKit** (daemon-owned SCStream + SCRecordingOutput) under the daemon's Screen Recording grant, with no ffmpeg subprocess. Requires macOS 15.0+. On macOS 26 (Tahoe), the first direct capture can also show a one-time consent asking to let Cua Driver bypass the system private window picker and directly access your screen and audio; choose Allow, or run `cua-driver permissions grant` beforehand to answer it up front. The recorder captures screen video only and does not enable system-audio capture.\n\n**Windows + Linux X11 use an ffmpeg subprocess** (`gdigrab` / `x11grab` + libx264). Requires ffmpeg on PATH (winget install Gyan.FFmpeg / apt install ffmpeg); when ffmpeg is missing or fails on startup the per-turn capture (screenshots + action.json) still runs and the session's `last_error` field carries the diagnostic.\n\n**Linux Wayland routes by compositor**: GNOME uses the trusted Shell helper's frames, wlroots compositors use `wf-recorder`, and compositors without wlr-screencopy (KDE/KWin) record the monitor the user grants through the xdg-desktop-portal ScreenCast (one consent dialog per install; requires a build with the `portal-capture` feature and ffmpeg on PATH). Unsupported combinations report the exact limitation in `last_error`.\n\nState persists for the life of the daemon; a restart resets to disabled with no on-disk state. Call `stop_recording` to disable + finalize the mp4.",
+ "description": "Start trajectory recording for the calling session. Each action-tool invocation (click, right_click, scroll, type_text, press_key, hotkey, set_value) from that session writes a turn folder under `output_dir`. Without `session`, every call on the same connection is recorded, including named-session calls. Other connections and session lifecycle calls (`start_session` / `end_session`) are not recorded. CLI recordings started with `cua-driver recording start` are daemon-wide.\n\nEach turn folder holds:\n\n- `before_state.json` / `after_state.json` — application AX/UIA/AT-SPI state immediately before and after the action.\n- `before.png` / `after.png` — target-window screenshots immediately before and after the action.\n- `evidence.json` — capture status and a stable classification when an expected artifact could not be captured.\n- `app_state.json` — post-action AX/UIA snapshot for the target pid.\n- `screenshot.png` — compatibility alias of `after.png`.\n- `action.json` — tool name, full input arguments, result summary, result-error flag, pid, click point (when applicable), ISO-8601 timestamp.\n- `click.png` — for dispatched click-family actions only, `before.png` with a red marker at the click point. A call refused before target resolution is explicitly not applicable instead.\n\nThe per-turn accessibility walk is bounded like `get_window_state`: `state_timeout_ms` (default 1000) caps each before/after walk, a walk that runs out of budget records the PARTIAL tree, and `evidence.json` carries `truncated`, `truncation_reason`, `nodes_visited`, `nodes_pending` and `timeout_ms` for that phase. A provider that stops answering is abandoned after the budget plus a short grace and the phase is classified `state_capture_timeout`. Actions refused before dispatch (for example an unknown or expired `capture_id`) skip the state walk; their state is classified `not_applicable` / `action_refused_before_dispatch`. Pass `include_accessibility_tree: false` to record screenshots and actions without state.\n\nPass `redact_values` with any secret the session will type (for example a password): each occurrence in a turn's text files is replaced with `[redacted]`, and such turns are not replayed.\n\nTurn folders are named `turn-00001/`, `turn-00002/`, etc. Turn numbering restarts at 1 each time recording is (re-)started.\n\n**Video is off by default.** Pass `record_video: true` to also capture the main display to `<output_dir>/recording.mp4` (H.264 / 30 fps) for the lifetime of the session. The recording is torn down automatically when the MCP client disconnects.\n\n**macOS uses native ScreenCaptureKit** (daemon-owned SCStream + SCRecordingOutput) under the daemon's Screen Recording grant, with no ffmpeg subprocess. Requires macOS 15.0+. On macOS 26 (Tahoe), the first direct capture can also show a one-time consent asking to let Cua Driver bypass the system private window picker and directly access your screen and audio; choose Allow, or run `cua-driver permissions grant` beforehand to answer it up front. The recorder captures screen video only and does not enable system-audio capture.\n\n**Windows + Linux X11 use an ffmpeg subprocess** (`gdigrab` / `x11grab` + libx264). Requires ffmpeg on PATH (winget install Gyan.FFmpeg / apt install ffmpeg); when ffmpeg is missing or fails on startup the per-turn capture (screenshots + action.json) still runs and the session's `last_error` field carries the diagnostic.\n\n**Linux Wayland routes by compositor**: GNOME uses the trusted Shell helper's frames, wlroots compositors use `wf-recorder`, and compositors without wlr-screencopy (KDE/KWin) record the monitor the user grants through the xdg-desktop-portal ScreenCast (one consent dialog per install; requires a build with the `portal-capture` feature and ffmpeg on PATH). Unsupported combinations report the exact limitation in `last_error`.\n\nState persists for the life of the daemon; a restart resets to disabled with no on-disk state. Call `stop_recording` to disable + finalize the mp4.",
"destructive": false,
"idempotent": true,
"input_schema": {
@@ -3013,6 +3013,16 @@
"description": "Capture the main display to <output_dir>/recording.mp4. Default: false. Set to true to also capture the main display to recording.mp4 (otherwise only the per-turn screenshots + JSON are recorded). On macOS this uses native ScreenCaptureKit (macOS 15.0+); macOS 26 can show a one-time direct screen-capture consent on first use (see `cua-driver permissions grant`). On Windows + Linux it requires ffmpeg on PATH.",
"type": "boolean"
},
+ "redact_values": {
+ "description": "Secret values, such as passwords or tokens, that must never be written to the recording. Every occurrence in a turn's action.json and state files is replaced with `[redacted]`, and the turn is marked `redacted: true` so replay_trajectory skips it. The values are held in memory only, never written, and cleared when recording stops. Screenshots and video are not altered.",
+ "items": {
+ "minLength": 1,
+ "type": "string"
+ },
+ "maxItems": 64,
+ "minItems": 1,
+ "type": "array"
+ },
"session": {
"description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
"type": "string"
diff --git a/scripts/docs-generators/cli-specs/cua-driver-mcp-macos.json b/scripts/docs-generators/cli-specs/cua-driver-mcp-macos.json
index af215b766e..0bad69a2be 100644
--- a/scripts/docs-generators/cli-specs/cua-driver-mcp-macos.json
+++ b/scripts/docs-generators/cli-specs/cua-driver-mcp-macos.json
@@ -2722,7 +2722,7 @@
"read_only": false
},
{
- "description": "Start trajectory recording for the calling session. Each action-tool invocation (click, right_click, scroll, type_text, press_key, hotkey, set_value) from that session writes a turn folder under `output_dir`. Without `session`, every call on the same connection is recorded, including named-session calls. Other connections and session lifecycle calls (`start_session` / `end_session`) are not recorded. CLI recordings started with `cua-driver recording start` are daemon-wide.\n\nEach turn folder holds:\n\n- `before_state.json` / `after_state.json` — application AX/UIA/AT-SPI state immediately before and after the action.\n- `before.png` / `after.png` — target-window screenshots immediately before and after the action.\n- `evidence.json` — capture status and a stable classification when an expected artifact could not be captured.\n- `app_state.json` — post-action AX/UIA snapshot for the target pid.\n- `screenshot.png` — compatibility alias of `after.png`.\n- `action.json` — tool name, full input arguments, result summary, result-error flag, pid, click point (when applicable), ISO-8601 timestamp.\n- `click.png` — for dispatched click-family actions only, `before.png` with a red marker at the click point. A call refused before target resolution is explicitly not applicable instead.\n\nThe per-turn accessibility walk is bounded like `get_window_state`: `state_timeout_ms` (default 1000) caps each before/after walk, a walk that runs out of budget records the PARTIAL tree, and `evidence.json` carries `truncated`, `truncation_reason`, `nodes_visited`, `nodes_pending` and `timeout_ms` for that phase. A provider that stops answering is abandoned after the budget plus a short grace and the phase is classified `state_capture_timeout`. Actions refused before dispatch (for example an unknown or expired `capture_id`) skip the state walk; their state is classified `not_applicable` / `action_refused_before_dispatch`. Pass `include_accessibility_tree: false` to record screenshots and actions without state.\n\nTurn folders are named `turn-00001/`, `turn-00002/`, etc. Turn numbering restarts at 1 each time recording is (re-)started.\n\n**Video is off by default.** Pass `record_video: true` to also capture the main display to `<output_dir>/recording.mp4` (H.264 / 30 fps) for the lifetime of the session. The recording is torn down automatically when the MCP client disconnects.\n\n**macOS uses native ScreenCaptureKit** (daemon-owned SCStream + SCRecordingOutput) under the daemon's Screen Recording grant, with no ffmpeg subprocess. Requires macOS 15.0+. On macOS 26 (Tahoe), the first direct capture can also show a one-time consent asking to let Cua Driver bypass the system private window picker and directly access your screen and audio; choose Allow, or run `cua-driver permissions grant` beforehand to answer it up front. The recorder captures screen video only and does not enable system-audio capture.\n\n**Windows + Linux X11 use an ffmpeg subprocess** (`gdigrab` / `x11grab` + libx264). Requires ffmpeg on PATH (winget install Gyan.FFmpeg / apt install ffmpeg); when ffmpeg is missing or fails on startup the per-turn capture (screenshots + action.json) still runs and the session's `last_error` field carries the diagnostic.\n\n**Linux Wayland routes by compositor**: GNOME uses the trusted Shell helper's frames, wlroots compositors use `wf-recorder`, and compositors without wlr-screencopy (KDE/KWin) record the monitor the user grants through the xdg-desktop-portal ScreenCast (one consent dialog per install; requires a build with the `portal-capture` feature and ffmpeg on PATH). Unsupported combinations report the exact limitation in `last_error`.\n\nState persists for the life of the daemon; a restart resets to disabled with no on-disk state. Call `stop_recording` to disable + finalize the mp4.",
+ "description": "Start trajectory recording for the calling session. Each action-tool invocation (click, right_click, scroll, type_text, press_key, hotkey, set_value) from that session writes a turn folder under `output_dir`. Without `session`, every call on the same connection is recorded, including named-session calls. Other connections and session lifecycle calls (`start_session` / `end_session`) are not recorded. CLI recordings started with `cua-driver recording start` are daemon-wide.\n\nEach turn folder holds:\n\n- `before_state.json` / `after_state.json` — application AX/UIA/AT-SPI state immediately before and after the action.\n- `before.png` / `after.png` — target-window screenshots immediately before and after the action.\n- `evidence.json` — capture status and a stable classification when an expected artifact could not be captured.\n- `app_state.json` — post-action AX/UIA snapshot for the target pid.\n- `screenshot.png` — compatibility alias of `after.png`.\n- `action.json` — tool name, full input arguments, result summary, result-error flag, pid, click point (when applicable), ISO-8601 timestamp.\n- `click.png` — for dispatched click-family actions only, `before.png` with a red marker at the click point. A call refused before target resolution is explicitly not applicable instead.\n\nThe per-turn accessibility walk is bounded like `get_window_state`: `state_timeout_ms` (default 1000) caps each before/after walk, a walk that runs out of budget records the PARTIAL tree, and `evidence.json` carries `truncated`, `truncation_reason`, `nodes_visited`, `nodes_pending` and `timeout_ms` for that phase. A provider that stops answering is abandoned after the budget plus a short grace and the phase is classified `state_capture_timeout`. Actions refused before dispatch (for example an unknown or expired `capture_id`) skip the state walk; their state is classified `not_applicable` / `action_refused_before_dispatch`. Pass `include_accessibility_tree: false` to record screenshots and actions without state.\n\nPass `redact_values` with any secret the session will type (for example a password): each occurrence in a turn's text files is replaced with `[redacted]`, and such turns are not replayed.\n\nTurn folders are named `turn-00001/`, `turn-00002/`, etc. Turn numbering restarts at 1 each time recording is (re-)started.\n\n**Video is off by default.** Pass `record_video: true` to also capture the main display to `<output_dir>/recording.mp4` (H.264 / 30 fps) for the lifetime of the session. The recording is torn down automatically when the MCP client disconnects.\n\n**macOS uses native ScreenCaptureKit** (daemon-owned SCStream + SCRecordingOutput) under the daemon's Screen Recording grant, with no ffmpeg subprocess. Requires macOS 15.0+. On macOS 26 (Tahoe), the first direct capture can also show a one-time consent asking to let Cua Driver bypass the system private window picker and directly access your screen and audio; choose Allow, or run `cua-driver permissions grant` beforehand to answer it up front. The recorder captures screen video only and does not enable system-audio capture.\n\n**Windows + Linux X11 use an ffmpeg subprocess** (`gdigrab` / `x11grab` + libx264). Requires ffmpeg on PATH (winget install Gyan.FFmpeg / apt install ffmpeg); when ffmpeg is missing or fails on startup the per-turn capture (screenshots + action.json) still runs and the session's `last_error` field carries the diagnostic.\n\n**Linux Wayland routes by compositor**: GNOME uses the trusted Shell helper's frames, wlroots compositors use `wf-recorder`, and compositors without wlr-screencopy (KDE/KWin) record the monitor the user grants through the xdg-desktop-portal ScreenCast (one consent dialog per install; requires a build with the `portal-capture` feature and ffmpeg on PATH). Unsupported combinations report the exact limitation in `last_error`.\n\nState persists for the life of the daemon; a restart resets to disabled with no on-disk state. Call `stop_recording` to disable + finalize the mp4.",
"destructive": false,
"idempotent": true,
"input_schema": {
@@ -2741,6 +2741,16 @@
"description": "Capture the main display to <output_dir>/recording.mp4. Default: false. Set to true to also capture the main display to recording.mp4 (otherwise only the per-turn screenshots + JSON are recorded). On macOS this uses native ScreenCaptureKit (macOS 15.0+); macOS 26 can show a one-time direct screen-capture consent on first use (see `cua-driver permissions grant`). On Windows + Linux it requires ffmpeg on PATH.",
"type": "boolean"
},
+ "redact_values": {
+ "description": "Secret values, such as passwords or tokens, that must never be written to the recording. Every occurrence in a turn's action.json and state files is replaced with `[redacted]`, and the turn is marked `redacted: true` so replay_trajectory skips it. The values are held in memory only, never written, and cleared when recording stops. Screenshots and video are not altered.",
+ "items": {
+ "minLength": 1,
+ "type": "string"
+ },
+ "maxItems": 64,
+ "minItems": 1,
+ "type": "array"
+ },
"session": {
"description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
"type": "string"
diff --git a/scripts/docs-generators/cli-specs/cua-driver-mcp-windows.json b/scripts/docs-generators/cli-specs/cua-driver-mcp-windows.json
index 0146c10047..375693b672 100644
--- a/scripts/docs-generators/cli-specs/cua-driver-mcp-windows.json
+++ b/scripts/docs-generators/cli-specs/cua-driver-mcp-windows.json
@@ -2688,7 +2688,7 @@
"read_only": false
},
{
- "description": "Start trajectory recording for the calling session. Each action-tool invocation (click, right_click, scroll, type_text, press_key, hotkey, set_value) from that session writes a turn folder under `output_dir`. Without `session`, every call on the same connection is recorded, including named-session calls. Other connections and session lifecycle calls (`start_session` / `end_session`) are not recorded. CLI recordings started with `cua-driver recording start` are daemon-wide.\n\nEach turn folder holds:\n\n- `before_state.json` / `after_state.json` — application AX/UIA/AT-SPI state immediately before and after the action.\n- `before.png` / `after.png` — target-window screenshots immediately before and after the action.\n- `evidence.json` — capture status and a stable classification when an expected artifact could not be captured.\n- `app_state.json` — post-action AX/UIA snapshot for the target pid.\n- `screenshot.png` — compatibility alias of `after.png`.\n- `action.json` — tool name, full input arguments, result summary, result-error flag, pid, click point (when applicable), ISO-8601 timestamp.\n- `click.png` — for dispatched click-family actions only, `before.png` with a red marker at the click point. A call refused before target resolution is explicitly not applicable instead.\n\nThe per-turn accessibility walk is bounded like `get_window_state`: `state_timeout_ms` (default 1000) caps each before/after walk, a walk that runs out of budget records the PARTIAL tree, and `evidence.json` carries `truncated`, `truncation_reason`, `nodes_visited`, `nodes_pending` and `timeout_ms` for that phase. A provider that stops answering is abandoned after the budget plus a short grace and the phase is classified `state_capture_timeout`. Actions refused before dispatch (for example an unknown or expired `capture_id`) skip the state walk; their state is classified `not_applicable` / `action_refused_before_dispatch`. Pass `include_accessibility_tree: false` to record screenshots and actions without state.\n\nTurn folders are named `turn-00001/`, `turn-00002/`, etc. Turn numbering restarts at 1 each time recording is (re-)started.\n\n**Video is off by default.** Pass `record_video: true` to also capture the main display to `<output_dir>/recording.mp4` (H.264 / 30 fps) for the lifetime of the session. The recording is torn down automatically when the MCP client disconnects.\n\n**macOS uses native ScreenCaptureKit** (daemon-owned SCStream + SCRecordingOutput) under the daemon's Screen Recording grant, with no ffmpeg subprocess. Requires macOS 15.0+. On macOS 26 (Tahoe), the first direct capture can also show a one-time consent asking to let Cua Driver bypass the system private window picker and directly access your screen and audio; choose Allow, or run `cua-driver permissions grant` beforehand to answer it up front. The recorder captures screen video only and does not enable system-audio capture.\n\n**Windows + Linux X11 use an ffmpeg subprocess** (`gdigrab` / `x11grab` + libx264). Requires ffmpeg on PATH (winget install Gyan.FFmpeg / apt install ffmpeg); when ffmpeg is missing or fails on startup the per-turn capture (screenshots + action.json) still runs and the session's `last_error` field carries the diagnostic.\n\n**Linux Wayland routes by compositor**: GNOME uses the trusted Shell helper's frames, wlroots compositors use `wf-recorder`, and compositors without wlr-screencopy (KDE/KWin) record the monitor the user grants through the xdg-desktop-portal ScreenCast (one consent dialog per install; requires a build with the `portal-capture` feature and ffmpeg on PATH). Unsupported combinations report the exact limitation in `last_error`.\n\nState persists for the life of the daemon; a restart resets to disabled with no on-disk state. Call `stop_recording` to disable + finalize the mp4.",
+ "description": "Start trajectory recording for the calling session. Each action-tool invocation (click, right_click, scroll, type_text, press_key, hotkey, set_value) from that session writes a turn folder under `output_dir`. Without `session`, every call on the same connection is recorded, including named-session calls. Other connections and session lifecycle calls (`start_session` / `end_session`) are not recorded. CLI recordings started with `cua-driver recording start` are daemon-wide.\n\nEach turn folder holds:\n\n- `before_state.json` / `after_state.json` — application AX/UIA/AT-SPI state immediately before and after the action.\n- `before.png` / `after.png` — target-window screenshots immediately before and after the action.\n- `evidence.json` — capture status and a stable classification when an expected artifact could not be captured.\n- `app_state.json` — post-action AX/UIA snapshot for the target pid.\n- `screenshot.png` — compatibility alias of `after.png`.\n- `action.json` — tool name, full input arguments, result summary, result-error flag, pid, click point (when applicable), ISO-8601 timestamp.\n- `click.png` — for dispatched click-family actions only, `before.png` with a red marker at the click point. A call refused before target resolution is explicitly not applicable instead.\n\nThe per-turn accessibility walk is bounded like `get_window_state`: `state_timeout_ms` (default 1000) caps each before/after walk, a walk that runs out of budget records the PARTIAL tree, and `evidence.json` carries `truncated`, `truncation_reason`, `nodes_visited`, `nodes_pending` and `timeout_ms` for that phase. A provider that stops answering is abandoned after the budget plus a short grace and the phase is classified `state_capture_timeout`. Actions refused before dispatch (for example an unknown or expired `capture_id`) skip the state walk; their state is classified `not_applicable` / `action_refused_before_dispatch`. Pass `include_accessibility_tree: false` to record screenshots and actions without state.\n\nPass `redact_values` with any secret the session will type (for example a password): each occurrence in a turn's text files is replaced with `[redacted]`, and such turns are not replayed.\n\nTurn folders are named `turn-00001/`, `turn-00002/`, etc. Turn numbering restarts at 1 each time recording is (re-)started.\n\n**Video is off by default.** Pass `record_video: true` to also capture the main display to `<output_dir>/recording.mp4` (H.264 / 30 fps) for the lifetime of the session. The recording is torn down automatically when the MCP client disconnects.\n\n**macOS uses native ScreenCaptureKit** (daemon-owned SCStream + SCRecordingOutput) under the daemon's Screen Recording grant, with no ffmpeg subprocess. Requires macOS 15.0+. On macOS 26 (Tahoe), the first direct capture can also show a one-time consent asking to let Cua Driver bypass the system private window picker and directly access your screen and audio; choose Allow, or run `cua-driver permissions grant` beforehand to answer it up front. The recorder captures screen video only and does not enable system-audio capture.\n\n**Windows + Linux X11 use an ffmpeg subprocess** (`gdigrab` / `x11grab` + libx264). Requires ffmpeg on PATH (winget install Gyan.FFmpeg / apt install ffmpeg); when ffmpeg is missing or fails on startup the per-turn capture (screenshots + action.json) still runs and the session's `last_error` field carries the diagnostic.\n\n**Linux Wayland routes by compositor**: GNOME uses the trusted Shell helper's frames, wlroots compositors use `wf-recorder`, and compositors without wlr-screencopy (KDE/KWin) record the monitor the user grants through the xdg-desktop-portal ScreenCast (one consent dialog per install; requires a build with the `portal-capture` feature and ffmpeg on PATH). Unsupported combinations report the exact limitation in `last_error`.\n\nState persists for the life of the daemon; a restart resets to disabled with no on-disk state. Call `stop_recording` to disable + finalize the mp4.",
"destructive": false,
"idempotent": true,
"input_schema": {
@@ -2707,6 +2707,16 @@
"description": "Capture the main display to <output_dir>/recording.mp4. Default: false. Set to true to also capture the main display to recording.mp4 (otherwise only the per-turn screenshots + JSON are recorded). On macOS this uses native ScreenCaptureKit (macOS 15.0+); macOS 26 can show a one-time direct screen-capture consent on first use (see `cua-driver permissions grant`). On Windows + Linux it requires ffmpeg on PATH.",
"type": "boolean"
},
+ "redact_values": {
+ "description": "Secret values, such as passwords or tokens, that must never be written to the recording. Every occurrence in a turn's action.json and state files is replaced with `[redacted]`, and the turn is marked `redacted: true` so replay_trajectory skips it. The values are held in memory only, never written, and cleared when recording stops. Screenshots and video are not altered.",
+ "items": {
+ "minLength": 1,
+ "type": "string"
+ },
+ "maxItems": 64,
+ "minItems": 1,
+ "type": "array"
+ },
"session": {
"description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
"type": "string"