fusiontest 0.2.43__tar.gz → 0.2.44__tar.gz
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.
- {fusiontest-0.2.43 → fusiontest-0.2.44}/PKG-INFO +1 -1
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/core/action_model.py +21 -18
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest.egg-info/PKG-INFO +1 -1
- {fusiontest-0.2.43 → fusiontest-0.2.44}/pyproject.toml +1 -1
- {fusiontest-0.2.43 → fusiontest-0.2.44}/README.md +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/__init__.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/bench/__init__.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/bench/sites/shop/bugs.js +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/bench/sites/shop/help.html +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/bench/sites/shop/index.html +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/bench/suites/shop-bugs.yaml +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/bench/suites/shop.yaml +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/bench/suites/todomvc.yaml +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/cli.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/core/__init__.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/core/app_errors.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/core/bugs.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/core/goal_verifier.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/core/netguard.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/core/promise_checker.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/core/replay.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/core/reproduce.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/core/runner.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/core/screen_parser.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/core/secrets.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/core/shared_traces.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/core/tokens.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/demos/__init__.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/demos/fusiontest_dashboard.yaml +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/demos/github.yaml +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/demos/hacker_news.yaml +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/demos/httpbin.yaml +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/demos/todomvc.yaml +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/demos/wikipedia.yaml +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/desktop/__init__.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/desktop/macos_adapter.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/desktop/playwright_adapter.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/desktop/windows_adapter.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/discovery/__init__.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/discovery/goal_generator.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/guardrails/__init__.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/guardrails/engine.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/mobile/__init__.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/mobile/android_adapter.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/mobile/ios_adapter.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/reporting/__init__.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/reporting/reporter.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/training/__init__.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/training/data_collector.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/training/dataset_builder.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/training/trainer.py +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest.egg-info/SOURCES.txt +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest.egg-info/dependency_links.txt +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest.egg-info/entry_points.txt +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest.egg-info/not-zip-safe +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest.egg-info/requires.txt +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest.egg-info/top_level.txt +0 -0
- {fusiontest-0.2.43 → fusiontest-0.2.44}/setup.cfg +0 -0
|
@@ -298,6 +298,12 @@ _ACTION_ELEMENT_TAIL_CHARS = 40
|
|
|
298
298
|
PROMPT_HISTORY_ACTIONS = 15
|
|
299
299
|
_CONTENT_LINE_RE = re.compile(r'^\s*(\w+): "(.*)"$')
|
|
300
300
|
_ELEMENT_LINE_RE = re.compile(r'^\s*\[\d+\] ')
|
|
301
|
+
# A bare list item ("[31] list_item") has no text to match a goal against and
|
|
302
|
+
# isn't a control: ~5% of the element list on fusionleap.io pages.
|
|
303
|
+
_BARE_LIST_ITEM_RE = re.compile(r'^\s*\[\d+\] list_item\s*$')
|
|
304
|
+
# Rules that only apply when the screen has such elements.
|
|
305
|
+
_HAS_TEXT_FIELD_RE = re.compile(r'^\s*\[\d+\] (text_field|text_area|search_field|textbox|searchbox|spinbutton)\b', re.M)
|
|
306
|
+
_HAS_PICKER_RE = re.compile(r'^\s*\[\d+\] picker\b| options: ', re.M)
|
|
301
307
|
|
|
302
308
|
|
|
303
309
|
def compact_screen_for_action(screen_text: str) -> str:
|
|
@@ -317,6 +323,8 @@ def compact_screen_for_action(screen_text: str) -> str:
|
|
|
317
323
|
lines.append(line)
|
|
318
324
|
continue
|
|
319
325
|
if not in_content:
|
|
326
|
+
if _BARE_LIST_ITEM_RE.match(line):
|
|
327
|
+
continue
|
|
320
328
|
if (len(line) > _ACTION_ELEMENT_CHARS and _ELEMENT_LINE_RE.match(line)
|
|
321
329
|
and " options: " not in line): # a picker's choices must stay visible
|
|
322
330
|
head = _ACTION_ELEMENT_CHARS - _ACTION_ELEMENT_TAIL_CHARS
|
|
@@ -1064,25 +1072,20 @@ class ActionModel(LLMCaller):
|
|
|
1064
1072
|
"",
|
|
1065
1073
|
trimmed_screen,
|
|
1066
1074
|
"",
|
|
1067
|
-
"
|
|
1068
|
-
"- If the
|
|
1069
|
-
"-
|
|
1070
|
-
"-
|
|
1071
|
-
"-
|
|
1072
|
-
"-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
"- For a picker
|
|
1076
|
-
|
|
1077
|
-
"- NEVER scroll more than twice for the same goal. If the element isn't visible after scrolling, tap the closest matching element.",
|
|
1078
|
-
"",
|
|
1079
|
-
"Respond with a JSON array of up to 3 ranked action objects. Each must have:",
|
|
1080
|
-
' { "action_type": "tap|type|press|select|swipe|scroll|back|wait|done|fail", "element_index": <int or null>, "element_label": "<string>", "value": "<string or empty>", "confidence": <0-1>, "reasoning": "<one sentence>" }',
|
|
1081
|
-
"",
|
|
1082
|
-
"action_type 'done' means the goal is already achieved based on what's visible — no further action needed.",
|
|
1083
|
-
"action_type 'fail' means the goal cannot be completed from this screen state — no further action will help.",
|
|
1075
|
+
"RULES:",
|
|
1076
|
+
"- If the screen, or the notes on your earlier actions (→ …), already show what the goal asks for, use 'done' and say what you saw. Don't repeat actions to check again.",
|
|
1077
|
+
"- On the wrong page? Get to the right one first (links, menus, 'back'). Use 'fail' only when the goal can't be achieved at all (control missing, blocked) — never 'done' for that.",
|
|
1078
|
+
"- Match elements by meaning, not exact wording, and use the one that's listed.",
|
|
1079
|
+
"- Use 'back' to go back. Scroll only if nothing listed matches, and at most twice per goal.",
|
|
1080
|
+
*(["- 'type' replaces a field's content (value \"\" clears it). To submit a field without a "
|
|
1081
|
+
"button, then 'press' Enter on it ('press' also takes Escape, Tab, ArrowDown, ArrowUp)."]
|
|
1082
|
+
if _HAS_TEXT_FIELD_RE.search(trimmed_screen) else []),
|
|
1083
|
+
*(["- For a picker, 'select' it with value = the option's text exactly as listed; never tap an option."]
|
|
1084
|
+
if _HAS_PICKER_RE.search(trimmed_screen) else []),
|
|
1084
1085
|
"",
|
|
1085
|
-
"
|
|
1086
|
+
"Answer with ONLY a JSON array of up to 3 ranked actions, each:",
|
|
1087
|
+
' {"action_type": "tap|type|press|select|swipe|scroll|back|wait|done|fail", "element_index": <int or null>, '
|
|
1088
|
+
'"element_label": "<string>", "value": "<string or empty>", "confidence": <0-1>, "reasoning": "<one sentence>"}',
|
|
1086
1089
|
]
|
|
1087
1090
|
|
|
1088
1091
|
return "\n".join(sections)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|