@yoqa/runner 0.3.26 → 0.3.27
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.
- package/dist/index.js +19 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -16816,7 +16816,7 @@ function getCatalogDb() {
|
|
|
16816
16816
|
// package.json
|
|
16817
16817
|
var package_default = {
|
|
16818
16818
|
name: "@yoqa/runner",
|
|
16819
|
-
version: "0.3.
|
|
16819
|
+
version: "0.3.27",
|
|
16820
16820
|
description: "Yoqa local runner \u2014 Appium + catalog HTTP API (Bun). Start with yoqa serve or the yoqa-runner bin.",
|
|
16821
16821
|
license: "UNLICENSED",
|
|
16822
16822
|
type: "module",
|
|
@@ -17596,10 +17596,13 @@ function isUnsupportedCommandError(error) {
|
|
|
17596
17596
|
const message = error instanceof Error ? error.message : String(error);
|
|
17597
17597
|
return /unknown command|unknown method|not (yet )?(been )?implemented|not (yet )?supported|does not support/i.test(message);
|
|
17598
17598
|
}
|
|
17599
|
+
var W3C_RETURN_KEY = "\uE007";
|
|
17599
17600
|
function w3cKeyActions(text2) {
|
|
17600
17601
|
const actions = [];
|
|
17601
17602
|
for (const ch of text2) {
|
|
17602
|
-
|
|
17603
|
+
const value = ch === `
|
|
17604
|
+
` || ch === "\r" ? W3C_RETURN_KEY : ch;
|
|
17605
|
+
actions.push({ type: "keyDown", value }, { type: "keyUp", value });
|
|
17603
17606
|
}
|
|
17604
17607
|
return [{ type: "key", id: "keyboard", actions }];
|
|
17605
17608
|
}
|
|
@@ -96498,7 +96501,7 @@ function prefersScreenshotTap(decision) {
|
|
|
96498
96501
|
return false;
|
|
96499
96502
|
return decision.x != null && decision.y != null;
|
|
96500
96503
|
}
|
|
96501
|
-
var SYSTEM_PROMPT = `You are a mobile QA agent controlling an app
|
|
96504
|
+
var SYSTEM_PROMPT = `You are a mobile QA agent controlling an app using BOTH visual screenshots and screen snapshots (accessibility tree).
|
|
96502
96505
|
A screenshot of the current device screen is ALWAYS attached to the user message as an image. You can see it. Never claim that no screenshot was provided, missing, blank, or unavailable.
|
|
96503
96506
|
|
|
96504
96507
|
Your entire reply MUST be a single strict JSON object (double quotes only \u2014 never single quotes) and nothing else \u2014 no markdown fences, no commentary before or after.
|
|
@@ -96533,12 +96536,21 @@ Valid shapes:
|
|
|
96533
96536
|
Coordinates use a 0\u20131000 normalized grid (0,0 top-left of the attached screenshot). The user message also includes a screen snapshot (cleaned accessibility tree) with the same grid \u2014 x,y is each element's TOP-LEFT, not centre. Centre = x + width/2, y + height/2.
|
|
96534
96537
|
|
|
96535
96538
|
Use BOTH the screenshot and the screen snapshot:
|
|
96536
|
-
-
|
|
96539
|
+
- Visual context (screenshot): Observe visual layout, colors, icons, canvas controls, modal overlays, and soft keyboard visibility.
|
|
96540
|
+
- Structural context (screen snapshot): Inspect accessibility ids ("id=..."), element boundaries, and text labels.
|
|
96541
|
+
- Decide whether to target by "id" or "x,y":
|
|
96542
|
+
* Use "id" when the snapshot provides a clean, unique, and unambiguous identifier for the element.
|
|
96543
|
+
* Use "x,y" coordinates (centre of the control on the screenshot grid) when controls lack IDs, are custom-drawn icons/canvas, or when coordinates are more direct and reliable than broad container IDs.
|
|
96537
96544
|
- System permission / notification dialogs: {"type":"tap","label":"Allow"} or {"type":"alert","alertAction":"accept"}. Never guess coordinates for these.
|
|
96538
|
-
- For other in-app controls, tap screenshot x,y of the visible control if there is no id.
|
|
96539
|
-
- If the snapshot is empty or the control is only drawn (no label/id), use the screenshot.
|
|
96540
96545
|
- If a previous action failed (see Last action error), pick a different target from the snapshot + screenshot \u2014 do not repeat the same id/label/point.
|
|
96541
96546
|
|
|
96547
|
+
Textfield input and keyboard handling:
|
|
96548
|
+
- Typing into a textfield brings up the virtual soft keyboard on the bottom of the screen (typically covering y ~ 550\u20131000), which may obscure buttons (like Submit, Login, Next) or lower inputs.
|
|
96549
|
+
- When typing inside a textfield or when the keyboard is open:
|
|
96550
|
+
1. Dismiss keyboard by tapping away: Emit a tap on an empty, neutral background area outside textfields and above the keyboard (e.g. tap neutral header space or empty background) to dismiss the keyboard.
|
|
96551
|
+
2. Nextline / Return on keyboard: Tap the Return / Done / Next / Search key on the virtual keyboard itself (using its x,y coordinates or label/id if present), or append "\\n" to your input text.
|
|
96552
|
+
3. Dismiss then use app buttons: If an app button you need is obscured or covered by the soft keyboard, dismiss the keyboard first (by tapping away or pressing Return) so the button is revealed, then tap the app button on the subsequent step.
|
|
96553
|
+
|
|
96542
96554
|
Swipe direction is the FINGER movement (same as Inspector):
|
|
96543
96555
|
- "down" (finger down, y 200\u2192800): scroll UP \u2014 reveal content above
|
|
96544
96556
|
- "up" (finger up, y 800\u2192200): scroll DOWN \u2014 reveal content below / to the bottom
|
|
@@ -96682,7 +96694,7 @@ ${formatRecentActions(input.recentActions ?? [])}`,
|
|
|
96682
96694
|
`Last action error: ${input.lastError || "(none)"}`,
|
|
96683
96695
|
"Screen snapshot (cleaned accessibility tree, 0\u20131000 grid, x,y is top-left):",
|
|
96684
96696
|
input.screenSnapshot || "(unavailable)",
|
|
96685
|
-
"Look at the attached screenshot image AND the screen snapshot and decide the next action. A screenshot is attached.",
|
|
96697
|
+
"Look at the attached screenshot image AND the screen snapshot and decide the next action. Decide whether to use x,y coordinates or an id based on both sources. A screenshot is attached.",
|
|
96686
96698
|
'Reply with ONLY the JSON action object, including non-empty "reason" and "thoughts".'
|
|
96687
96699
|
].join(`
|
|
96688
96700
|
`);
|
package/package.json
CHANGED