@qawolf/cli 1.26.0 → 1.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,7 @@ export declare function createRunnerSdk(options: RunnerSdkOptions): {
10
10
  list(): Promise<SdkResult<ListedRunner[]>>;
11
11
  evaluateSnippet({ runnerId, scope, source, }: import("./types.js").EvaluateSnippetRequest): Promise<SdkResult<import("./types.js").EvaluatedSnippet>>;
12
12
  importPackage({ name, runnerId, version, }: import("./types.js").ImportPackageRequest): Promise<SdkResult<import("./types.js").ImportedPackage>>;
13
- act({ action, runnerId, }: import("./types.js").ActRequest): Promise<SdkResult<import("./types.js").PerformedAction>>;
13
+ act({ action, runnerId, withScreenshot, }: import("./types.js").ActRequest): Promise<SdkResult<import("./types.js").PerformedAction>>;
14
14
  highlightSelector({ highlight, runnerId, }: import("./types.js").HighlightSelectorRequest): Promise<SdkResult<import("./types.js").HighlightedSelector>>;
15
15
  inspect({ request, runnerId, }: import("./types.js").InspectRequest): Promise<SdkResult<import("./types.js").Inspected>>;
16
16
  promoteSnapshot({ baselinePath, runnerId, screenshotPath, }: import("./types.js").PromoteSnapshotRequest): Promise<SdkResult<import("./types.js").PromotedSnapshot>>;
@@ -66,6 +66,13 @@ export type EventsRequest = RunnerRequest & {
66
66
  };
67
67
  export type ActRequest = RunnerRequest & {
68
68
  action: BrowserAction;
69
+ /**
70
+ * Ask the runner to answer with a screenshot taken after the action, on
71
+ * `imageJpegBase64`. One call instead of an act and a screenshot, with no
72
+ * fixed wait between them. An action that did not take effect answers with
73
+ * one too, and the screen can be absent even when asked for.
74
+ */
75
+ withScreenshot?: boolean;
69
76
  };
70
77
  export type EvaluateSnippetRequest = RunnerRequest & {
71
78
  scope: SnippetScope;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qawolf/cli",
3
- "version": "1.26.0",
3
+ "version": "1.28.0",
4
4
  "description": "Run and manage QA Wolf flows from the terminal, CI, or an AI agent",
5
5
  "keywords": [
6
6
  "automation",
@@ -71,7 +71,7 @@
71
71
  "@clack/prompts": "1.5.1",
72
72
  "@napi-rs/keyring": "1.3.0",
73
73
  "@oxc-node/core": "0.1.0",
74
- "@qawolf/api-contracts": "0.52.0",
74
+ "@qawolf/api-contracts": "0.53.0",
75
75
  "@qawolf/emails": "1.1.1",
76
76
  "@qawolf/flow-targets": "1.0.0",
77
77
  "@qawolf/flows": "0.1.4",
@@ -125,7 +125,7 @@ that `url`; never guess a route and never send a repository link in its place.
125
125
  <!-- prettier-ignore -->
126
126
  | Command | Kind | What it does |
127
127
  | --- | --- | --- |
128
- | `qawolf agent get` | read | Monitor a QA Wolf AI session by reading its status and replies. After agent.send, share the returned session URL before monitoring. Wait 30 to 60 seconds between checks; do not call this in a tight loop. Replies accumulate, so compare them with what you have already seen. Continue monitoring silently when the status and replies are unchanged; do not narrate waiting, announce the next check, or ask whether to keep monitoring. Report only substantive new progress, questions, blockers, or the final outcome. A status of "waiting-for-you" means the last reply is a question the work is blocked on, and answering it with agent.send is what unblocks it. Surface an explicit request for user input even if the status still says "working". Include the session URL when reporting a blocker or final outcome. On "completed", stop status checks and verify the requested result before claiming success. For new flows, validation, publication in the target environment, and readiness are separate checks; a Git push or final reply does not prove the flow is active. If every requested result is verified but status remains "working", report the mismatch and stop monitoring. Stop on "failed" or "cancelled" and report any confirmed partial result. |
128
+ | `qawolf agent get` | read | Monitor a QA Wolf AI session by reading its status and replies. After agent.send, share the returned session URL before monitoring. Wait 30 to 60 seconds between checks; do not call this in a tight loop. Pass the nextCursor from one response as the cursor on the next check; it then reads only what is new, and only for the session that minted it. Continue monitoring silently when the status is unchanged and no replies come back; do not narrate waiting, announce the next check, or ask whether to keep monitoring. Report only substantive new progress, questions, blockers, or the final outcome. A status of "waiting-for-you" means the last reply is a question the work is blocked on, and answering it with agent.send is what unblocks it. Surface an explicit request for user input even if the status still says "working". Include the session URL when reporting a blocker or final outcome. On "completed", stop status checks and verify the requested result before claiming success. For new flows, validation, publication in the target environment, and readiness are separate checks; a Git push or final reply does not prove the flow is active. If every requested result is verified but status remains "working", report the mismatch and stop monitoring. Stop on "failed" or "cancelled" and report any confirmed partial result. |
129
129
  | `qawolf agent send` | write | Start or continue work with the QA Wolf AI and return a live session URL to share with the user. Use it to cover a user journey, investigate a failing run, or fix a broken flow. This is the one verb that starts work from nothing: every other write acts on a flow, run or issue that already exists. Returns sessionId, status, and url as soon as the request is accepted; work can take minutes to tens of minutes. After each send, make the next action a normal user-visible assistant message containing the exact returned url, before any tool call or wait. Tool output and internal reasoning do not count as sharing the link. Do not run a timer or monitoring call alongside this send. Acceptance does not mean the work is complete. Then monitor the session with agent.get, reporting new progress, blockers, and the final outcome rather than unchanged status. Send here again to answer a question or add context to the same session. |
130
130
  | `qawolf auth login` | local | Authenticate with QA Wolf in a browser or with an API key |
131
131
  | `qawolf auth logout` | local | Remove stored credentials |
@@ -139,7 +139,7 @@ that `url`; never guess a route and never send a repository link in its place.
139
139
  | `qawolf email listAddresses` | read | List the workspace's inbox addresses, alphabetical. A flow can sign up with a plus-suffixed form of any of them, and email.find reads what arrives. |
140
140
  | `qawolf email registerAddress` | write | Register an inbox address for the workspace. Registering an address the workspace already has changes nothing. A refusal names the domains the workspace can use. |
141
141
  | `qawolf email send` | write | Send an email from one of the workspace's inbox addresses, for example to exercise a flow that reacts to incoming mail. Returns the sent email; read it back with email.get. |
142
- | `qawolf environment create` | write | Create an environment on the caller's team and return it in the environment.get shape. |
142
+ | `qawolf environment create` | write | Create an environment on the caller's team and return it in the environment.get shape. This can also create a branch on the team's connected Git provider. |
143
143
  | `qawolf environment deleteVariable` | write | Remove one environment variable by name. Succeeds whether or not the variable existed. |
144
144
  | `qawolf environment find` | read | List the team's environments, newest first. |
145
145
  | `qawolf environment get` | read | Read a single environment's name, kind, standing run health, flow-code branch and reconciliation state, run concurrency limit, and termination state. If flowCodeBranch exists, use its syncStatus for Git reconciliation and read lastSyncedCommitHash only when syncStatus is reconciled. |
@@ -147,6 +147,8 @@ that `url`; never guess a route and never send a repository link in its place.
147
147
  | `qawolf environment listVariableNames` | read | Use this to answer which QA Wolf environment variables are available to test code. Returns names only; values never leave the server. |
148
148
  | `qawolf environment setVariable` | write | Create or replace an environment variable. If the user asks to create one for "my email" without naming it, use DEFAULT_EMAIL. The value is never returned. |
149
149
  | `qawolf environment update` | write | Update an environment owned by the caller's team and return it in the environment.get shape. Omitted fields remain unchanged. |
150
+ | `qawolf file requestDownload` | read | Get a URL for reading a file out of the caller's team storage. Answers 404 when nothing is stored at that path. |
151
+ | `qawolf file requestUpload` | write | Get a URL to put a file into team storage: a spreadsheet of journeys, anything too large to paste. PUT with the returned contentType, then name the path in filePaths. |
150
152
  | `qawolf flow addTag` | write | Assign an existing tag to the selected flows. Create tags with tag.create. Flows that already carry the tag are reported in skippedFlows. |
151
153
  | `qawolf flow removeTag` | write | Remove a tag from the selected flows. Succeeds whether or not each flow carried the tag; the flows that did not are reported in skippedFlows. |
152
154
  | `qawolf flow update` | write | Move a flow between draft and active readiness. The other statuses shown in the app are derived and cannot be set. |
@@ -169,7 +171,7 @@ that `url`; never guess a route and never send a repository link in its place.
169
171
  | `qawolf run find` | read | List an environment's recent runs, newest first. |
170
172
  | `qawolf run get` | read | Get a run's status, per-flow results, and links. |
171
173
  | `qawolf run reattempt` | write | Request new attempts for a run's flows, in the same run. A flow is eligible once its result is failed or canceled and QA Wolf's automatic retries have finished. A fully investigated run no longer accepts reattempts. Attempts run with the latest flow code. Poll run.get for results. |
172
- | `qawolf run stop` | write | Stop a run, including its queued flows and automatic retries. Stopping is asynchronous. Repeated requests are safe, and finished runs keep their results. A run that is still being created returns not found; retry once run.get returns the run. If run.get returns a different runId, use that ID. Poll run.get for results. |
174
+ | `qawolf run stop` | write | Stop a run, including its queued flows and automatic retries. Stopping is asynchronous and can update run-status messages and commit statuses in connected integrations. Repeated requests are safe, and finished runs keep their results. A run that is still being created returns not found; retry once run.get returns the run. If run.get returns a different runId, use that ID. Poll run.get for results. |
173
175
  | `qawolf runner act` | write | Perform one raw action on a runner's screen: click, double_click, scroll, move, drag, keypress, navigate or type. Use - to read a whole action as JSON from stdin. On a mobile runner only click (button left), drag and type have a touchscreen equivalent; the rest answer action-not-supported-on-mobile |
174
176
  | `qawolf runner events` | read | Print a runner's journal, one entry per line. QA Wolf writes console, recorder, run-events, run-logs, run-status |
175
177
  | `qawolf runner exec` | write | Evaluate a snippet against a runner's live page. Use - to read the snippet from stdin |
@@ -187,11 +189,18 @@ that `url`; never guess a route and never send a repository link in its place.
187
189
  | `qawolf runner list` | read | List the runners running on your team |
188
190
  | `qawolf runner promote-snapshot` | write | Accept a run's screenshot as the new baseline for an image diff, on the runner that produced it |
189
191
  | `qawolf runner run` | write | Run a flow on an interactive runner, shipping the flow and what it imports |
190
- | `qawolf runner screenshot` | read | Save a JPEG of an interactive runner's screen to a file |
192
+ | `qawolf runner screenshot` | read | Save a JPEG of an interactive runner's screen to a file, or write it to stdout with --out - |
191
193
  | `qawolf runner stop-run` | write | Stop what a runner is currently executing, leaving the runner up |
192
194
  | `qawolf runner terminate` | write | End an interactive runner, and the pod it runs on with it |
193
195
  | `qawolf tag create` | write | Create a tag on the caller's team. Tags select flows in run.create. |
194
196
  | `qawolf tag list` | read | List the team's tags, alphabetical by name. Tag names select flows in run.create. |
197
+ | `qawolf trigger create` | write | Create a trigger. A schedule trigger runs a named set of flows on a cadence; a deployment trigger runs when a matching deployment is reported. |
198
+ | `qawolf trigger delete` | write | Delete a trigger permanently. The runs it already created are kept. To stop a trigger without losing it, use trigger.pause. |
199
+ | `qawolf trigger find` | read | List the team's triggers, newest first. |
200
+ | `qawolf trigger get` | read | Get one trigger by id. |
201
+ | `qawolf trigger pause` | write | Pause a trigger so it stops firing. Pausing is idempotent. A team whose triggers are all paused reports no trigger activity at all. |
202
+ | `qawolf trigger resume` | write | Resume a paused trigger. A schedule trigger restarts from the next upcoming slot: the slots it missed while paused do not run. |
203
+ | `qawolf trigger update` | write | Replace a trigger's configuration. Every field is written, so read the trigger first and send its configuration back with your changes applied. Pausing is separate: use trigger.pause and trigger.resume. |
195
204
 
196
205
  <!-- commands-table:end -->
197
206
 
@@ -210,6 +219,12 @@ your actions into Playwright locators), `keepalive` to hold it open, and
210
219
  when done. Everything is a plain request to one host, so a shell with an API key
211
220
  and its own vision model can close the see-and-act loop with no other tooling.
212
221
 
222
+ When an action is followed by a look at the result, which in a see-and-act loop
223
+ is every action, pass `--screenshot <path>` to `act` (or `-` for stdout) instead
224
+ of calling `act` and then `screenshot`. One call performs the action and writes
225
+ the screen the runner answers with: half the calls per step, and no delay to
226
+ guess at between them.
227
+
213
228
  The full workflow is its own guide: how a runner is billed, why the first call
214
229
  must be a run, the order the commands go in, the see-and-act loop, `exec`, the
215
230
  recorder, reading history, staying alive, and an end-to-end example. **Read
@@ -127,7 +127,10 @@ vision loop on this surface.
127
127
 
128
128
  `qawolf runner screenshot --out page.jpg` writes a real JPEG to disk, decoded,
129
129
  because every coding harness can open an image file. Read it with whatever
130
- vision you have.
130
+ vision you have. `--out -` writes the JPEG bytes to stdout instead, on their own,
131
+ for a caller that is a process rather than an agent: the confirmation, and the
132
+ JSON line under `--json`, goes to stderr so nothing follows the image on stdout.
133
+ A terminal on stdout is refused: redirect or pipe it.
131
134
 
132
135
  `qawolf runner act <action>` performs exactly one action per call, in the
133
136
  computer-use tool vocabulary a vision model already emits: `click`,
@@ -139,6 +142,19 @@ can forward a tool call rather than translate it:
139
142
  echo '{"type":"click","button":"left","x":480,"y":260}' | qawolf runner act -
140
143
  ```
141
144
 
145
+ Every action in a see-and-act loop is followed by a look at the result, so ask
146
+ for it in the same call: `act ... --screenshot step-1.jpg` (or `--screenshot -`
147
+ for stdout) performs the action and writes the screen the runner answers with.
148
+ Prefer it over `act` and then `screenshot`: each step is one call instead of
149
+ two, with no delay to guess at between them. The screen the runner answers with
150
+ is taken once it has changed from just before the action or half a second has
151
+ passed, whichever comes first. An action that reached the screen and did not
152
+ take effect answers with one too, so a `1` from `act --screenshot` still leaves
153
+ you a picture of why the click missed. A `4` whose message starts with
154
+ "Performed" means the action happened and only the picture is missing: take a
155
+ `screenshot`, never send the action again to get it. As with
156
+ `screenshot --out -`, a terminal on stdout is refused.
157
+
142
158
  Coordinates are pixels on the same screenshot you just read. The runner serves
143
159
  one see-or-act request at a time, so decide what to do next from each answer
144
160
  rather than firing several. Bounds are checked before anything is sent, so an
@@ -565,10 +581,9 @@ export QAWOLF_RUNNER_ID=agent-1 # so no command below needs --runner
565
581
  qawolf runner launch --id agent-1 --json # --id, not the variable; read .alreadyRunning
566
582
  qawolf runner run flows/smoke.flow.ts --follow # starts the screen; exit 1 if it failed
567
583
 
568
- qawolf runner act navigate --url https://example.com/login
569
- qawolf runner screenshot --out page.jpg # then read page.jpg yourself
570
- qawolf runner act click --button left --x 480 --y 260
571
- qawolf runner act type --text "someone@example.com"
584
+ qawolf runner act navigate --url https://example.com/login --screenshot step-1.jpg # then read step-1.jpg yourself
585
+ qawolf runner act click --button left --x 480 --y 260 --screenshot step-2.jpg
586
+ qawolf runner act type --text "someone@example.com" --screenshot step-3.jpg
572
587
 
573
588
  qawolf runner inspect element-html --selector "#email"
574
589
  qawolf runner inspect variable --name cart | jq .total