Reference
cdp_repair_action
Repair a learned action using a fresh snapshot from the exact authority-bound device and capability-bound native runner.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
actionId | string | Yes | Owned action id; resolves one .yaml or .yml file. | ||
failedSelector | string | Yes | The testID that the prior maestro_run reported as missing. Parse it from stderr like “Element with id ‘X’ not found” → X. | ||
projectRoot | string | No | Override project root (default: process.cwd()). | ||
threshold | number | No | min: 0, max: 1 | Fuzzy-match similarity threshold (0..1). Default 0.6. Lower if the screen has many similar testIDs and Levenshtein on the original is too strict. | |
dryRun | boolean | No | Don’t write changes — return the diff that WOULD be applied. Useful for previewing repairs before committing. | ||
agentReasoning | string | No | Free-form one-liner the agent records in the RepairRecord. Helps audit “why did this repair happen”. Max ~200 chars recommended. | ||
platform | enum: ios | android | No | Authority-bound platform; conflicting values are refused | ||
deviceId | string | No | Authority-bound exact device identifier; normally injected by the session | ||
appId | string | No | Authority-bound app identifier; normally injected by the session |
cdp_repair_action(actionId: <string>, failedSelector: <string>)