|
| 1 | +==================================================== |
| 2 | +New Features (2026-06-19) — Authoring & Debugging |
| 3 | +==================================================== |
| 4 | + |
| 5 | +Two authoring-time tools, pure standard library and wired through the |
| 6 | +full stack (facade, ``AC_*`` executor commands, MCP tools, Script |
| 7 | +Builder): a native-UI **element repository** (object repository) and a |
| 8 | +**step debugger / tracer** for action lists. |
| 9 | + |
| 10 | +.. contents:: |
| 11 | + :local: |
| 12 | + :depth: 2 |
| 13 | + |
| 14 | + |
| 15 | +Element repository |
| 16 | +================= |
| 17 | + |
| 18 | +Save native-UI locators under friendly names once, reuse them everywhere |
| 19 | +— the classic RPA *object repository*. A flow references |
| 20 | +``"login.submit"`` instead of repeating ``name="Submit", role="button"`` |
| 21 | +at every call site, and a UI change is fixed in one place:: |
| 22 | + |
| 23 | + from je_auto_control import ElementRepository |
| 24 | + |
| 25 | + repo = ElementRepository("app.objects.json") |
| 26 | + repo.save("login.submit", name="Submit", role="button") |
| 27 | + repo.save("login.user", role="edit", app_name="MyApp") |
| 28 | + |
| 29 | + repo.click("login.submit") # resolve + click the live element |
| 30 | + info = repo.find_info("login.user") # {found, name, role, center} |
| 31 | + |
| 32 | +A locator is a small set of accessibility filters (``name`` / ``role`` / |
| 33 | +``app_name``); resolving finds the live element through the accessibility |
| 34 | +backend. Storage is a JSON file and works on any platform; resolution |
| 35 | +needs a platform accessibility backend. |
| 36 | + |
| 37 | +Executor / MCP commands: ``AC_element_save`` / ``AC_element_find`` / |
| 38 | +``AC_element_click`` / ``AC_element_remove`` / ``AC_element_list`` (and |
| 39 | +the matching ``ac_element_*`` MCP tools). |
| 40 | + |
| 41 | + |
| 42 | +Step debugger and tracer |
| 43 | +======================= |
| 44 | + |
| 45 | +Run an action list one command at a time with breakpoints, single-step, |
| 46 | +and live variable inspection. Stepping reuses one executor instance, so |
| 47 | +script variables (``${name}`` interpolation, ``AC_set_var`` …) persist |
| 48 | +across steps exactly as in a normal run:: |
| 49 | + |
| 50 | + from je_auto_control import FlowDebugger |
| 51 | + |
| 52 | + dbg = FlowDebugger(actions, breakpoints=[3]) |
| 53 | + dbg.continue_() # run until the breakpoint |
| 54 | + dbg.variables() # inspect live variables |
| 55 | + dbg.step() # one command at a time |
| 56 | + dbg.run_to_end() |
| 57 | + |
| 58 | +The stateless one-shot form, :func:`trace_actions`, runs a list (or |
| 59 | +``dry_run`` to only plan it) and returns a per-step trace of |
| 60 | +``{index, command, result}`` — exposed as ``AC_debug_trace`` / |
| 61 | +``ac_debug_trace``:: |
| 62 | + |
| 63 | + from je_auto_control import trace_actions |
| 64 | + |
| 65 | + plan = trace_actions(actions, dry_run=True) # plan without running |
| 66 | + trace = trace_actions(actions) # run and trace |
0 commit comments