@capagents/forgeqe 3.1.1 → 3.1.3
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/HOW_TO_USE.md +5152 -1869
- package/README.md +155 -434
- package/THIRD_PARTY_NOTICES.md +210 -1
- package/dist/docs-site/CREDITS.md +6 -0
- package/dist/docs-site/architecture-map/index.html +1 -1
- package/dist/docs-site/docs/app-theme.css +126 -13
- package/dist/docs-site/docs/architecture/index.html +56 -530
- package/dist/docs-site/docs/architecture-reference/index.html +1781 -0
- package/dist/docs-site/docs/area-api/index.html +491 -0
- package/dist/docs-site/docs/area-automated-tests/index.html +1777 -0
- package/dist/docs-site/docs/area-browser/index.html +472 -0
- package/dist/docs-site/docs/area-data/index.html +595 -0
- package/dist/docs-site/docs/area-desktop/index.html +802 -0
- package/dist/docs-site/docs/area-mobile/index.html +683 -0
- package/dist/docs-site/docs/area-operations/index.html +1243 -0
- package/dist/docs-site/docs/area-pull-requests/index.html +290 -0
- package/dist/docs-site/docs/area-quality/index.html +427 -0
- package/dist/docs-site/docs/area-release/index.html +435 -0
- package/dist/docs-site/docs/area-setup/index.html +1595 -0
- package/dist/docs-site/docs/area-systems/index.html +191 -0
- package/dist/docs-site/docs/area-test-cases/index.html +927 -0
- package/dist/docs-site/docs/containers/index.html +168 -189
- package/dist/docs-site/docs/cost-architecture/index.html +110 -113
- package/dist/docs-site/docs/custom-agents-first-run/index.html +121 -67
- package/dist/docs-site/docs/desktop/index.html +363 -373
- package/dist/docs-site/docs/desktop-ci/index.html +39 -36
- package/dist/docs-site/docs/docs-tabs.js +56 -0
- package/dist/docs-site/docs/evidence/index.html +297 -300
- package/dist/docs-site/docs/feature-test-prompts/index.html +79 -73
- package/dist/docs-site/docs/get-started/index.html +791 -0
- package/dist/docs-site/docs/graphify/index.html +45 -48
- package/dist/docs-site/docs/guardrails/index.html +35 -23
- package/dist/docs-site/docs/index.html +18 -6729
- package/dist/docs-site/docs/mobile/index.html +223 -210
- package/dist/docs-site/docs/model-routing/index.html +84 -65
- package/dist/docs-site/docs/overview/index.html +192 -0
- package/dist/docs-site/docs/product-graph/index.html +60 -62
- package/dist/docs-site/docs/product-knowledge/index.html +24 -17
- package/dist/docs-site/docs/product-views/index.html +57 -60
- package/dist/docs-site/docs/reference/index.html +409 -0
- package/dist/docs-site/docs/search.js +1 -1
- package/dist/docs-site/docs/using/index.html +798 -0
- package/dist/docs-site/docs/web-app/index.html +168 -111
- package/dist/docs-site/security/index.html +930 -0
- package/dist/docs-site/security/security-theme.css +161 -0
- package/dist/docs-site/security/security.js +1465 -0
- package/dist/docs-site/vendor/react-18.3.1.production.min.js +31 -0
- package/dist/docs-site/vendor/react-dom-18.3.1.production.min.js +267 -0
- package/dist/docs-site/vendor/reactflow-11.11.4.umd.js +10 -0
- package/dist/forgeqe.js +1903 -1896
- package/dist/web/THIRD_PARTY_NOTICES.md +0 -136
- package/dist/web/assets/Agent-3pV8Rwap.js +8 -0
- package/dist/web/assets/AgentWork-DAnmH0My.js +2 -0
- package/dist/web/assets/ApiTests-DW4MRFzG.js +10 -0
- package/dist/web/assets/Browse-Bd0ZZfc2.js +1 -0
- package/dist/web/assets/Chat-DnBUm_97.js +3 -0
- package/dist/web/assets/CommandPalette-B1O9aDTk.js +1 -0
- package/dist/web/assets/Compare-1v7_ca7z.js +1 -0
- package/dist/web/assets/Cost-CWrc4McH.js +1 -0
- package/dist/web/assets/Data-rWSiG4Cq.js +6 -0
- package/dist/web/assets/Desktop-3x6EQqos.js +1 -0
- package/dist/web/assets/DesktopReview-cSA10Rm3.js +1 -0
- package/dist/web/assets/Evidence-CKy3o7cw.js +1 -0
- package/dist/web/assets/Explore-CMAxWE_8.js +2 -0
- package/dist/web/assets/Features-haQchkhA.js +1 -0
- package/dist/web/assets/Flags-BaQjYi_t.js +2 -0
- package/dist/web/assets/Flaky-DUuC0qTn.js +1 -0
- package/dist/web/assets/Impact-CP0H8ygo.js +3 -0
- package/dist/web/assets/Jobs-cYxoYd3i.js +5 -0
- package/dist/web/assets/KindPage-DWW8gN5_.js +6 -0
- package/dist/web/assets/Migration-Bsm7WU1d.js +2 -0
- package/dist/web/assets/PageAgent-c95zT2PJ.js +1 -0
- package/dist/web/assets/Product-BQSiR28a.js +7 -0
- package/dist/web/assets/Production-CAv0Vtoy.js +1 -0
- package/dist/web/assets/Quality-aQPaPYQc.js +1 -0
- package/dist/web/assets/Readiness-CkknP87n.js +1 -0
- package/dist/web/assets/Record-09IsC9U-.js +1 -0
- package/dist/web/assets/Regression-BL4MfN47.js +5 -0
- package/dist/web/assets/RelationGraph-Dg4fqt7l.js +1 -0
- package/dist/web/assets/Reports-CMV1l-iS.js +2 -0
- package/dist/web/assets/Response-DTBFBeKB.js +9 -0
- package/dist/web/assets/Responsive-DBRQ9FUO.js +3 -0
- package/dist/web/assets/RunDiff-CMDrnsA3.js +1 -0
- package/dist/web/assets/Runs-Dkeu6_vZ.js +2 -0
- package/dist/web/assets/Settings-KjKm8h-_.js +21 -0
- package/dist/web/assets/Steps-HYHK9psI.js +2 -0
- package/dist/web/assets/TestCases-Cv6-OSv0.js +1 -0
- package/dist/web/assets/TestData-DbEfNlUE.js +2 -0
- package/dist/web/assets/TestDebt-DzHQIU4X.js +1 -0
- package/dist/web/assets/TestManagement-BgRTGHMT.js +1 -0
- package/dist/web/assets/Tosca-DZpHAtnH.js +3 -0
- package/dist/web/assets/WhatsNew-jp0c4WSV.js +1 -0
- package/dist/web/assets/agents-C0Jg2pN8.js +1 -0
- package/dist/web/assets/coverage-BB9BLjGz.js +5 -0
- package/dist/web/assets/dataParts-DEPK4eQE.js +3 -0
- package/dist/web/assets/diff-CcNwLCX6.js +2 -0
- package/dist/web/assets/families-gkpkloLT.js +1 -0
- package/dist/web/assets/filters-C7phIFfd.js +1 -0
- package/dist/web/assets/fold-i73P-EDV.js +1 -0
- package/dist/web/assets/head-BtTqyLlj.js +1 -0
- package/dist/web/assets/highlight-DZI39CzZ.js +4 -0
- package/dist/web/assets/index-ClFOh63x.css +2 -0
- package/dist/web/assets/index-YGWJEkAT.js +64 -0
- package/dist/web/assets/input-C2vQ9O3a.js +1 -0
- package/dist/web/assets/jsx-runtime-LKYXHABd.js +1 -0
- package/dist/web/assets/logos-BmbNTDu2.js +1 -0
- package/dist/web/assets/palette-XFlqvgZl.js +1 -0
- package/dist/web/assets/paletteCommands-DsbD2ASU.js +1 -0
- package/dist/web/assets/parts-DEVx2Sea.js +1 -0
- package/dist/web/assets/productParts-Bi-XjszL.js +1 -0
- package/dist/web/assets/qualityParts-Dbu01g7G.js +1 -0
- package/dist/web/assets/recordTest--Wr40QdN.js +1 -0
- package/dist/web/assets/rolldown-runtime-XKyaHtl9.js +1 -0
- package/dist/web/assets/route-Dg53WdFu.js +1 -0
- package/dist/web/index.html +11 -6
- package/docs/ARCHITECTURE.md +50 -563
- package/docs/ARCHITECTURE_REFERENCE.md +1484 -0
- package/docs/BASAL.md +1 -1
- package/docs/CONTAINERS.md +87 -87
- package/docs/CUSTOM_AGENTS_FIRST_RUN.md +125 -43
- package/docs/DESKTOP-CI.md +18 -3
- package/docs/DESKTOP.md +306 -286
- package/docs/EVIDENCE.md +1 -1
- package/docs/MOBILE.md +107 -75
- package/docs/MODEL_ROUTING.md +48 -15
- package/docs/PRODUCT_KNOWLEDGE.md +2 -0
- package/docs/WEB_APP.md +143 -75
- package/docs/feature-test-prompts.md +29 -16
- package/docs/user-guide.html +5402 -2269
- package/forgeqe.example.yaml +3 -3
- package/guardrails/README.md +22 -2
- package/knowledge/README.md +15 -2
- package/package.json +1 -1
- package/prompts/brain.md +1 -0
- package/prompts/page-differs.md +1 -1
- package/prompts/requests-rule.md +1 -1
- package/prompts/test-reviewer.md +1 -1
- package/prompts/test-rules.md +3 -4
- package/py/forgeqe_engine/recordsession.py +100 -24
- package/skills/web-guidance/LICENSE +202 -0
- package/skills/web-guidance/SKILL.md +76 -0
- package/skills/web-guidance/UPSTREAM +67 -0
- package/skills/web-guidance/references/accessibility/accessibility.md +585 -0
- package/skills/web-guidance/references/accessibility/accessible-error-announcement.md +302 -0
- package/skills/web-guidance/references/accessibility/accessible-generated-content.md +41 -0
- package/skills/web-guidance/references/accessibility/respect-os-text-scale.md +127 -0
- package/skills/web-guidance/references/css/responsive-design.md +16 -0
- package/skills/web-guidance/references/forms/autofill-address-form.md +86 -0
- package/skills/web-guidance/references/forms/autofill-payment-form.md +142 -0
- package/skills/web-guidance/references/forms/autofill-sign-in-form.md +145 -0
- package/skills/web-guidance/references/forms/autofill-sign-up-form.md +155 -0
- package/skills/web-guidance/references/forms/forms.md +415 -0
- package/skills/web-guidance/references/forms/ime-safe-enter-submit.md +115 -0
- package/skills/web-guidance/references/forms/required-field-feedback.md +317 -0
- package/skills/web-guidance/references/forms/select-menu-interaction.md +310 -0
- package/skills/web-guidance/references/forms/slider.md +184 -0
- package/skills/web-guidance/references/forms/sms-otp-form.md +208 -0
- package/skills/web-guidance/references/forms/switch.md +60 -0
- package/skills/web-guidance/references/forms/validate-input-after-interaction.md +406 -0
- package/skills/web-guidance/references/performance/break-up-long-tasks.md +64 -0
- package/skills/web-guidance/references/performance/identify-heavy-scripts.md +69 -0
- package/skills/web-guidance/references/performance/identify-inp-causes.md +105 -0
- package/skills/web-guidance/references/performance/interaction-paint-timing.md +200 -0
- package/skills/web-guidance/references/performance/optimize-image-priority.md +73 -0
- package/skills/web-guidance/references/performance/performance.md +384 -0
- package/skills/web-guidance/references/privacy/privacy.md +247 -0
- package/skills/web-guidance/references/security/passkey-authentication.md +218 -0
- package/skills/web-guidance/references/security/passkey-management.md +310 -0
- package/skills/web-guidance/references/security/passkey-reauthentication.md +142 -0
- package/skills/web-guidance/references/security/passkey-registration.md +186 -0
- package/skills/web-guidance/references/security/passkeys.md +39 -0
- package/skills/web-guidance/references/security/sanitize-untrusted-html.md +105 -0
- package/skills/web-guidance/references/security/secure-external-subresources.md +202 -0
- package/skills/web-guidance/references/security/security.md +390 -0
- package/skills/web-guidance/references/security/trusted-types.md +141 -0
- package/skills/web-guidance/references/security/validate-origins.md +197 -0
- package/skills/web-guidance/references/security/verify-email-ownership.md +235 -0
- package/skills/web-guidance/references/ui-atoms/position-aware-tooltips.md +173 -0
- package/skills/web-guidance/references/ui-atoms/responsive-table.md +122 -0
- package/skills/web-guidance/references/ui-atoms/viewport-aware-dropdowns.md +178 -0
- package/skills/web-guidance/references/ui-behaviors/drag-and-drop.md +108 -0
- package/skills/web-guidance/references/ui-behaviors/light-dismiss-a-dialog.md +89 -0
- package/skills/web-guidance/references/ui-behaviors/motion.md +97 -0
- package/skills/web-guidance/references/ui-behaviors/platform-controls-dismiss-dialog.md +40 -0
- package/skills/web-guidance/references/ui-behaviors/prevent-page-scroll-under-modal-dialog.md +59 -0
- package/skills/web-guidance/references/ui-behaviors/search-hidden-content.md +141 -0
- package/skills/web-guidance/references/ui-behaviors/sortable-table.md +140 -0
- package/skills/web-guidance/references/ui-components/accordion.md +343 -0
- package/skills/web-guidance/references/ui-components/breadcrumbs.md +168 -0
- package/skills/web-guidance/references/ui-components/carousel.md +206 -0
- package/skills/web-guidance/references/ui-components/checkbox.md +144 -0
- package/skills/web-guidance/references/ui-components/dialog.md +218 -0
- package/skills/web-guidance/references/ui-components/hovercard.md +391 -0
- package/skills/web-guidance/references/ui-components/menu.md +415 -0
- package/skills/web-guidance/references/ui-components/navbar.md +281 -0
- package/skills/web-guidance/references/ui-components/navigation-drawer.md +429 -0
- package/skills/web-guidance/references/ui-components/persistent-toast-notifications.md +185 -0
- package/skills/web-guidance/references/ui-components/progress.md +181 -0
- package/skills/web-guidance/references/ui-components/spinner.md +179 -0
- package/skills/web-guidance/references/ui-components/tabs.md +371 -0
- package/skills/web-guidance/references/ui-components/toolbar.md +277 -0
- package/skills/web-guidance/references/user-experience/form-factor-adaptation.md +120 -0
- package/skills/web-guidance/references/user-experience/natural-interactions.md +155 -0
- package/skills/web-guidance/references/visual-design/color.md +43 -0
- package/skills/web-guidance/references/visual-design/dark-mode.md +350 -0
- package/dist/web/assets/AgentWork-DwAI0_Of.js +0 -2
- package/dist/web/assets/ApiTests-C0vFSHmM.js +0 -10
- package/dist/web/assets/Browse-5jfdtRc5.js +0 -2
- package/dist/web/assets/Chat-B3uhI94O.js +0 -3
- package/dist/web/assets/CommandPalette-D2J4nf5y.js +0 -1
- package/dist/web/assets/Compare-CN75w1p9.js +0 -1
- package/dist/web/assets/Cost-QoxyjR95.js +0 -1
- package/dist/web/assets/Data-BAvkcBVt.js +0 -6
- package/dist/web/assets/Desktop-BXdOIalN.js +0 -1
- package/dist/web/assets/DesktopReview-Bl2SrPP0.js +0 -1
- package/dist/web/assets/Evidence-BJ_I52CD.js +0 -1
- package/dist/web/assets/Explore-D9AuyTip.js +0 -2
- package/dist/web/assets/Features-CusGMDR9.js +0 -1
- package/dist/web/assets/Flags-CycGFuUP.js +0 -2
- package/dist/web/assets/Flaky-BcSzJogN.js +0 -1
- package/dist/web/assets/Impact-CJHnyZ21.js +0 -3
- package/dist/web/assets/Jobs-4xcFzEFo.js +0 -5
- package/dist/web/assets/KindPage-BielEIej.js +0 -6
- package/dist/web/assets/Migration-NwanKpJg.js +0 -2
- package/dist/web/assets/PageAgent-CNw4NXva.js +0 -1
- package/dist/web/assets/Product-DS3LJZ4P.js +0 -7
- package/dist/web/assets/Production-D3zsyNIS.js +0 -1
- package/dist/web/assets/Quality-Ctj2YpC4.js +0 -1
- package/dist/web/assets/Readiness-DGcRr_co.js +0 -1
- package/dist/web/assets/Record-Cc-wGe_Y.js +0 -1
- package/dist/web/assets/Regression-DcsbrRa1.js +0 -5
- package/dist/web/assets/Reports-BkCn0-Sf.js +0 -2
- package/dist/web/assets/Response-BP0UwQcW.js +0 -9
- package/dist/web/assets/Responsive-C8U7dumd.js +0 -3
- package/dist/web/assets/RunDiff-BhABuhF_.js +0 -1
- package/dist/web/assets/Runs-OwdWEYBv.js +0 -2
- package/dist/web/assets/Steps-BvzbQyoD.js +0 -2
- package/dist/web/assets/TestCases-CLq_6JA5.js +0 -1
- package/dist/web/assets/TestData-B0oKAhp6.js +0 -2
- package/dist/web/assets/TestDebt-8NLQ5YV_.js +0 -1
- package/dist/web/assets/TestManagement-2LYQ7vsN.js +0 -1
- package/dist/web/assets/Tosca-DfvMpPTG.js +0 -3
- package/dist/web/assets/WhatsNew-BGFNGwqN.js +0 -1
- package/dist/web/assets/families-DYlN5v0i.js +0 -1
- package/dist/web/assets/filters-faaSnoIq.js +0 -1
- package/dist/web/assets/fold-CUjwWAK3.js +0 -1
- package/dist/web/assets/frame-BLPdAXUq.js +0 -13
- package/dist/web/assets/head-CsTxBsO0.js +0 -1
- package/dist/web/assets/index-CxiCvGZq.js +0 -78
- package/dist/web/assets/index-dOIsrzhD.css +0 -2
- package/dist/web/assets/line-icons-CwZWt93L.js +0 -1
- package/dist/web/assets/logos-dGuc1jIM.js +0 -1
- package/dist/web/assets/markdown-BI3F-SJ1.js +0 -10
- package/dist/web/assets/paletteCommands-QJiCuUEr.js +0 -1
- package/dist/web/assets/parts-CdF1f7yS.js +0 -1
- package/dist/web/assets/productParts-hNLD9fN0.js +0 -1
- package/dist/web/assets/qualityParts-CT25lBWU.js +0 -1
- package/dist/web/assets/recordTest-P792aBUt.js +0 -1
package/docs/DESKTOP.md
CHANGED
|
@@ -1,41 +1,63 @@
|
|
|
1
1
|
# ForgeQE desktop: thick-client automation
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
ForgeQE tests web apps in Chrome. It tests desktop thick clients the same way: Win32, WinForms, WPF, and the native parts
|
|
4
|
+
of Electron and WebView2 apps. Say what you want in plain language, ForgeQE's agent does it in the live app, and the run
|
|
5
|
+
is saved as a YAML workflow that replays later with no model.
|
|
6
|
+
|
|
7
|
+
| Task | Windows | macOS | Linux |
|
|
8
|
+
|---|---|---|---|
|
|
9
|
+
| Explore a goal with the agent | yes | no | no |
|
|
10
|
+
| Record your own steps | yes | no | no |
|
|
11
|
+
| Replay a workflow | yes (also headless) | yes, macOS 13+ | yes, Ubuntu 24.04+ (X11 or Wayland) |
|
|
12
|
+
| Check a workflow without running it | yes | yes | yes |
|
|
13
|
+
|
|
14
|
+
Status: the Windows runs are tested end to end (setup, replay, healing a moved control, and a whole explore with a
|
|
15
|
+
scripted model). Not yet run by the ForgeQE team: explore with a real model, and your own apps. See
|
|
7
16
|
[Before first use on Windows](#before-first-use-on-windows).
|
|
8
17
|
|
|
9
|
-
|
|
10
|
-
WPF, and the native parts of Electron and WebView2 apps): say what you want in plain language, UFO² does it on the live
|
|
11
|
-
app, and the run is saved as a YAML workflow that replays later without a model.
|
|
18
|
+
## Use
|
|
12
19
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
still need Windows.
|
|
20
|
+
**Setting up.** Once per computer, ForgeQE downloads and sets up what desktop testing needs. On Windows, include the
|
|
21
|
+
part for exploring a goal. Off Windows, setup always includes the replay part for macOS and Linux.
|
|
16
22
|
|
|
17
|
-
|
|
23
|
+
**Web app**
|
|
24
|
+
|
|
25
|
+
1. Open **Desktop apps** and the **Machine and apps** tab.
|
|
26
|
+
2. Press **Set up**.
|
|
27
|
+
3. On Windows, turn on the switch for exploring a goal if you will explore. Turn on **Set it up again from scratch** to
|
|
28
|
+
start over.
|
|
29
|
+
4. Press **Set up**.
|
|
30
|
+
|
|
31
|
+
**Terminal**
|
|
18
32
|
|
|
19
33
|
```bash
|
|
20
|
-
forgeqe desktop setup --ufo
|
|
21
|
-
forgeqe desktop
|
|
22
|
-
forgeqe desktop
|
|
23
|
-
forgeqe desktop
|
|
24
|
-
forgeqe desktop replay .forgeqe/reports/desktop-explore-…/workflow.yaml customer=Fabrikam
|
|
25
|
-
forgeqe desktop replay workflow.yaml --data customers.csv # once per row; the header names the variables
|
|
26
|
-
forgeqe desktop replay desktop-tests/ --junit results.xml # every workflow in a folder, results for CI
|
|
27
|
-
forgeqe desktop replay workflow.yaml --update-baselines # save new baselines for its expect_image steps
|
|
28
|
-
forgeqe desktop doctor # can this machine run replay unattended?
|
|
29
|
-
forgeqe desktop validate workflow.yaml # any OS
|
|
34
|
+
forgeqe desktop setup --ufo # on Windows: replay, recording, and exploring a goal
|
|
35
|
+
forgeqe desktop setup # off Windows: replay for macOS and Linux
|
|
36
|
+
forgeqe desktop setup --agent-desktop # on Windows, to also replay headless (no mouse)
|
|
37
|
+
forgeqe desktop setup --force # set it up again from scratch
|
|
30
38
|
```
|
|
31
39
|
|
|
32
|
-
|
|
33
|
-
or
|
|
34
|
-
|
|
35
|
-
|
|
40
|
+
**Adding an app.** Desktop apps come from the active environment in `env.yaml` (see HOW_TO_USE.md, "Environments and
|
|
41
|
+
apps"), or from `desktop.apps` in `forgeqe.yaml`, which works without environments. A workflow names an app only by its
|
|
42
|
+
name, never by a path or a command.
|
|
43
|
+
|
|
44
|
+
**Web app**
|
|
45
|
+
|
|
46
|
+
1. Open **Desktop apps** and the **Machine and apps** tab.
|
|
47
|
+
2. Press **Add an app**.
|
|
48
|
+
3. Fill in **Program** (type its path, or press **Browse…**), **Arguments** (optional), **Name**, and **What it is for**
|
|
49
|
+
(optional: one line the agent reads to pick the app).
|
|
50
|
+
4. Press **Add the app**.
|
|
36
51
|
|
|
37
|
-
|
|
38
|
-
|
|
52
|
+
Each app in the list has **Change** and **Remove** buttons. You can also add apps in **Settings › Environments**.
|
|
53
|
+
|
|
54
|
+
**Terminal**
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
forgeqe desktop apps # the apps and secrets of the active environment and desktop:
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Edit `forgeqe.yaml` (or `env.yaml`) to add one:
|
|
39
61
|
|
|
40
62
|
```yaml
|
|
41
63
|
desktop:
|
|
@@ -49,123 +71,177 @@ desktop:
|
|
|
49
71
|
screenshots: true # one screenshot per replayed step (default on)
|
|
50
72
|
```
|
|
51
73
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
whose steps were healed also writes `heals.json` and asks whether to write the new locators into the workflow
|
|
55
|
-
(`--accept-heals` writes them without asking; with no terminal they are never written).
|
|
74
|
+
An app is an absolute `.exe` on Windows, an `.app` bundle on macOS (`/Applications/Notes.app`), or an executable on
|
|
75
|
+
Linux (`/usr/bin/gnome-calculator`, with `kind: desktop`).
|
|
56
76
|
|
|
57
|
-
|
|
77
|
+
**Exploring a goal.** ForgeQE's agent does the goal in the app with the real mouse and keyboard, and saves the run as a
|
|
78
|
+
workflow with checks of the outcome. Windows only. Use a test machine or VM and a test account.
|
|
58
79
|
|
|
59
|
-
|
|
60
|
-
|---|---|---|
|
|
61
|
-
| Agent that explores an app | Microsoft UFO² (`microsoft/UFO`, MIT), pinned to commit `eae3c0a8d168` and never edited, behind one adapter (`ufo_runner.py`) | It already solves UI Automation (UIA) control detection, merging it with vision, and the per-app agent loop. Behind the adapter it can be swapped for our own engine without touching the CLI, the YAML or replay. |
|
|
62
|
-
| Saved scripts | ForgeQE's own YAML (`forgeqe-desktop-v1`), replayed on pywinauto (UIA backend) | UFO calls a model at every step. Replay must be fast, free, repeatable and fit for CI, so no model runs unless a step needs healing. |
|
|
63
|
-
| Models | `llms.json`, the same profiles as the browser engine. UFO never gets its own model config | One place to configure models, keys and Microsoft Entra ID. |
|
|
64
|
-
| Python environment | Its own (`~/.forgeqe/desktop/.venv`, Python 3.10), not the browser engine's | UFO pins `openai==1.66.2` and `pydantic`, which the browser engine's library does not run with, and `pandas==1.4.3`, which has Windows wheels up to Python 3.10. Replay's packages use UFO's pins, so one environment runs both. |
|
|
65
|
-
| Replay off Windows, and headless | Vercel Labs' agent-desktop (Apache-2.0), pinned to 1.2.0, as a second replay driver (`desktop.driver`) behind the same workflow, heal and memory | It reads the OS accessibility tree on macOS, Windows and Linux, acts without the mouse, and re-identifies every element before it acts, refusing a stale or ambiguous one. It has no model and no tests of its own, so ForgeQE keeps the workflow, the locator, healing and the reports. |
|
|
66
|
-
| Not chosen: `windowsagent` | Reference only | Very early (v0.1.0), replay not built, and it exposes a model-driven `/shell` endpoint. |
|
|
80
|
+
**Web app**
|
|
67
81
|
|
|
68
|
-
|
|
82
|
+
1. Open **Desktop apps** and the **Workflows** tab.
|
|
83
|
+
2. Press **Explore a goal**.
|
|
84
|
+
3. Pick the **App**, type the **Goal** (one line, as you would ask a tester) and, optionally, a **Name**.
|
|
85
|
+
4. Press **Start exploring**.
|
|
86
|
+
|
|
87
|
+
**Terminal**
|
|
69
88
|
|
|
89
|
+
```bash
|
|
90
|
+
forgeqe desktop explore "Create an invoice for Contoso, net 30" --app billing
|
|
91
|
+
forgeqe desktop explore "…" --app billing --name "Create an invoice" --yes # --yes: start without asking
|
|
70
92
|
```
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
93
|
+
|
|
94
|
+
**Recording your own steps.** When you know the steps, do them yourself: no model is used, so it costs nothing and does
|
|
95
|
+
exactly what you did. Windows only. See [Recording by hand](#recording-by-hand).
|
|
96
|
+
|
|
97
|
+
**Web app**
|
|
98
|
+
|
|
99
|
+
1. Open **Desktop apps** and the **Workflows** tab.
|
|
100
|
+
2. Pick the app (when there are several) and press **Record by hand**.
|
|
101
|
+
|
|
102
|
+
Or open **Record**, pick **Desktop app**, pick the app and press **Record**. Press **Stop** when done.
|
|
103
|
+
|
|
104
|
+
**Terminal**
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
forgeqe desktop record --app billing --name "Create an invoice"
|
|
83
108
|
```
|
|
84
109
|
|
|
85
|
-
|
|
110
|
+
**Replaying a workflow.** Replay runs the steps with no model and checks its `expect` steps. On Windows it takes over the
|
|
111
|
+
mouse and keyboard while it runs.
|
|
86
112
|
|
|
87
|
-
|
|
113
|
+
**Web app**
|
|
88
114
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
115
|
+
1. Open **Desktop apps** and the **Workflows** tab.
|
|
116
|
+
2. Press the replay button on the workflow's row.
|
|
117
|
+
3. Fill in its **Values**, or pick **Rows** under **Test data** to replay once per row of a data file or kept request.
|
|
118
|
+
4. Under **While it runs**, choose **Heal a step whose control moved** and **Take new image baselines**.
|
|
119
|
+
5. Press **Replay**.
|
|
120
|
+
|
|
121
|
+
The **Runs** tab lists each run with its **Report**. Its **Failed** filter shows failed runs, and a button on each asks
|
|
122
|
+
the agent why it failed.
|
|
123
|
+
|
|
124
|
+
**Terminal**
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
forgeqe desktop replay .forgeqe/reports/desktop-explore-…/workflow.yaml customer=Fabrikam
|
|
128
|
+
forgeqe desktop replay workflow.yaml --data customers.csv # once per row; the header names the variables
|
|
129
|
+
forgeqe desktop replay desktop-tests/ --junit results.xml # every workflow in a folder, results for CI
|
|
130
|
+
forgeqe desktop replay workflow.yaml --update-baselines # save new baselines for its expect_image steps
|
|
131
|
+
forgeqe desktop replay workflow.yaml --no-heal # do not heal a moved control
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
`--data` takes a `.csv`, `.xlsx` or `.json` file; `--each-query q.sql --each-db NAME` takes the rows from a database
|
|
135
|
+
read instead.
|
|
136
|
+
|
|
137
|
+
**Accepting heals.** When a control moved and replay found it again, the replay asks whether to write the new locator
|
|
138
|
+
into the workflow. Heals are offered only from a replay that passed.
|
|
139
|
+
|
|
140
|
+
**Web app**
|
|
141
|
+
|
|
142
|
+
1. Open **Desktop apps** and the **Runs** tab (the **Heals to accept** filter lists them).
|
|
143
|
+
2. Press **Accept** on the run.
|
|
144
|
+
|
|
145
|
+
**Terminal**
|
|
146
|
+
|
|
147
|
+
At the end of the replay, answer the question. `--accept-heals` writes them without asking. With no terminal they are
|
|
148
|
+
never written.
|
|
149
|
+
|
|
150
|
+
**Checking a workflow or a machine.** A workflow can be checked without running it, on any system. The machine check
|
|
151
|
+
says whether replay can run here unattended.
|
|
152
|
+
|
|
153
|
+
**Web app**
|
|
154
|
+
|
|
155
|
+
1. To check a workflow: on the **Workflows** tab, press the check button on its row.
|
|
156
|
+
2. To check the machine: on the **Machine and apps** tab, press **Check**.
|
|
157
|
+
|
|
158
|
+
**Terminal**
|
|
94
159
|
|
|
95
160
|
```bash
|
|
96
|
-
forgeqe desktop
|
|
97
|
-
forgeqe desktop
|
|
98
|
-
forgeqe desktop doctor # off Windows: agent-desktop's platform and permissions
|
|
99
|
-
forgeqe desktop replay workflow.yaml
|
|
161
|
+
forgeqe desktop validate workflow.yaml # any system
|
|
162
|
+
forgeqe desktop doctor # can this machine replay unattended?
|
|
100
163
|
```
|
|
101
164
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
165
|
+
**Asking the agent.** In a chat (the web app's **New chat**, `forgeqe start` or `forgeqe run`), ask: "create an invoice
|
|
166
|
+
for Contoso in Billing and save it as a test", or "I'll show you the steps in Billing, record them". The agent asks
|
|
167
|
+
before it starts the app or takes over the desktop, and before it changes a workflow. Where it cannot ask (an MCP
|
|
168
|
+
client), the call answers `needs_confirmation` until you agree.
|
|
169
|
+
|
|
170
|
+
**What a run keeps.** Each run writes a folder under the reports folder (`desktop-explore-…` or `desktop-replay-…`):
|
|
171
|
+
`run.json`, `report.html`, `steps/NNN.png`, and for an explore `workflow.yaml` and `trace.json`. A replay whose steps
|
|
172
|
+
were healed also writes `heals.json`.
|
|
173
|
+
|
|
174
|
+
## How a run flows
|
|
107
175
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
176
|
+
1. **Explore:** ForgeQE starts the app from its entry in your settings (never through a shell). The agent does the goal
|
|
177
|
+
with the app's controls only, and every action is kept with the control's properties. The result is `workflow.yaml`.
|
|
178
|
+
2. **Replay:** ForgeQE plays the workflow's steps with no model.
|
|
179
|
+
3. **Healing:** when a step's control is not found, one model call picks one of the window's real controls, by number.
|
|
180
|
+
The proposed locator goes to `heals.json` and is written into the workflow only when you accept it.
|
|
181
|
+
|
|
182
|
+
## Replay on macOS, Linux, and headless Windows
|
|
183
|
+
|
|
184
|
+
`desktop.driver` sets how a workflow replays. In the web app it is **Replay on**, in **Settings › Desktop**.
|
|
185
|
+
|
|
186
|
+
| `desktop.driver` | How it replays | Where |
|
|
187
|
+
|---|---|---|
|
|
188
|
+
| `auto` (default) | the mouse and keyboard on Windows, accessibility calls elsewhere | any |
|
|
189
|
+
| `pywinauto` | the mouse and keyboard, like a person | Windows |
|
|
190
|
+
| `agent-desktop` | accessibility calls, with no mouse and no focus | macOS 13+, Windows 10 1809+, Ubuntu 24.04+ (X11 or Wayland) |
|
|
191
|
+
|
|
192
|
+
In **Settings › Desktop** › **Replay on** the same choices read **Automatic**, **The mouse and keyboard** and
|
|
193
|
+
**Accessibility calls, no mouse**.
|
|
194
|
+
|
|
195
|
+
Set up and check the machine as in [Use](#use) (`forgeqe desktop setup`, then `forgeqe desktop doctor`, or **Set up**
|
|
196
|
+
and **Check** in the web app). Off Windows, the check also shows the platform and its permissions.
|
|
197
|
+
|
|
198
|
+
The workflow, its variables, secrets, checks, healing, app memory, reports and `--junit` are the same either way. A
|
|
199
|
+
workflow recorded on Windows replays with accessibility calls as it is: its `control_type` is matched to the roles the
|
|
200
|
+
system gives that control (a `Button` with a toggle is a `switch`), and `automation_id` to the control's developer id
|
|
201
|
+
(AutomationId, AXIdentifier, or the DOM id). A workflow written for macOS or Linux can name those roles (`textfield`,
|
|
202
|
+
`checkbox`) as its `control_type`.
|
|
203
|
+
|
|
204
|
+
How a step runs with accessibility calls: the locator finds the control in a fresh snapshot of the app's own windows,
|
|
205
|
+
and refuses when several match. The control is checked again against the live window before the action: one that
|
|
206
|
+
changed in between is refused, never guessed. An action that may have landed (a click whose result could not be
|
|
207
|
+
confirmed) is never sent again, so a replay never submits twice.
|
|
113
208
|
|
|
114
209
|
What it does not do:
|
|
115
210
|
|
|
116
|
-
- `double_click` moves the mouse: it replays only with `desktop.headed: true
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
- Refs and window ids only in their own shapes; a `select` value after `--`, so it is never read as a flag.
|
|
137
|
-
- Its state (snapshots hold the app's text) is in a private folder for the run (mode 0700), removed when the run ends.
|
|
138
|
-
- Its replies are read as untrusted: anything but its JSON envelope, or over 64 MB, is refused, and its error text is
|
|
139
|
-
cut to one plain line before it reaches a report or the heal prompt.
|
|
140
|
-
|
|
141
|
-
## One model config: `llms.json` → UFO
|
|
142
|
-
|
|
143
|
-
UFO picks its model client by `API_TYPE` through `ufo.llm.base.BaseService.get_service`, which every model call goes
|
|
144
|
-
through (`ufo/llm/llm_call.py`). The adapter adds the type `forgeqe`:
|
|
145
|
-
|
|
146
|
-
- `write_ufo_config` writes UFO's `config/ufo/agents.yaml` from its template, with `API_TYPE: forgeqe`, the model's name,
|
|
147
|
-
and no endpoint and no key, for `HOST_AGENT`, `APP_AGENT`, `BACKUP_AGENT` and `EVALUATION_AGENT`.
|
|
148
|
-
- `ufo_bridge.install` makes `get_service("forgeqe", …)` return `ForgeQEService`, which calls the profile through the
|
|
149
|
-
`openai` SDK (`models.py`): `azure` (key or `auth: entra`), `openai`, `openai_compatible` (key or Entra), and `ollama`
|
|
150
|
-
through its OpenAI-compatible `/v1`. Keys, Azure endpoints and Entra use the browser engine's own helpers
|
|
151
|
-
(`forgeqe_engine.llm`), so a profile means the same thing in both. Keys stay in environment variables.
|
|
152
|
-
- Each call's time and tokens go to ForgeQE's usage ledger as the "desktop agent" (counts only, never the prompt).
|
|
211
|
+
- `double_click` moves the mouse: it replays only with `desktop.headed: true` (**Let replay use the mouse and
|
|
212
|
+
keyboard** in **Settings › Desktop**).
|
|
213
|
+
- `keys` are real key presses sent to the app's window. A workflow recorded on Windows says `ctrl+s`; on macOS write
|
|
214
|
+
`cmd+s` instead.
|
|
215
|
+
- Identical controls (two buttons named OK in one window) cannot be told apart on Windows and Linux. Give the step a
|
|
216
|
+
control that is unique in its window.
|
|
217
|
+
- On macOS, grant Accessibility (System Settings › Privacy & Security › Accessibility) to the app that runs forgeqe
|
|
218
|
+
(Terminal, iTerm2, VS Code). `forgeqe desktop doctor` shows the state. On Linux, Chromium and Qt apps need their
|
|
219
|
+
accessibility switched on to be seen.
|
|
220
|
+
|
|
221
|
+
What ForgeQE keeps safe: typed text, secrets included, never appears on a command line other programs can see; no
|
|
222
|
+
model key or secret reaches the replay's helper; the app's text from each run is kept in a private folder that is
|
|
223
|
+
removed when the run ends.
|
|
224
|
+
|
|
225
|
+
## The model explore and healing use
|
|
226
|
+
|
|
227
|
+
Explore and healing use the same model profiles as the browser agent, from `llms.json` (Settings › Models): Azure
|
|
228
|
+
OpenAI (key or Microsoft Entra ID), OpenAI, an OpenAI-compatible server, or Ollama. There is no separate model setting
|
|
229
|
+
for desktop. Keys stay in environment variables. Each call's time and tokens are counted in ForgeQE's usage (counts
|
|
230
|
+
only, never the prompt).
|
|
153
231
|
|
|
154
232
|
Explore sends screenshots, so its profile must take images: `"vision": true` or `false` on the profile says so; without
|
|
155
233
|
it, `ollama` profiles are refused and others accepted. Healing sends a screenshot only to a profile that takes images.
|
|
156
234
|
|
|
157
|
-
|
|
158
|
-
`deployment` name, or `"reasoning": true` on the profile) gets
|
|
159
|
-
|
|
160
|
-
call is sent again without it, and later calls to that model leave it out (`py/forgeqe_engine/model_params.py`). The
|
|
161
|
-
browser agent does the same.
|
|
235
|
+
Request parameters suit the model by themselves: a reasoning model (o1, o3, o4, gpt-5, by the profile's `model` or
|
|
236
|
+
`deployment` name, or `"reasoning": true` on the profile) gets no temperature from the first call, and when the API
|
|
237
|
+
refuses a parameter the call is sent again without it, and later calls to that model leave it out.
|
|
162
238
|
|
|
163
239
|
## Workflow YAML (`forgeqe-desktop-v1`)
|
|
164
240
|
|
|
165
241
|
```yaml
|
|
166
242
|
format: forgeqe-desktop-v1
|
|
167
243
|
name: Create an invoice
|
|
168
|
-
app: billing # a name from
|
|
244
|
+
app: billing # a name from desktop.apps, never a path or a command
|
|
169
245
|
variables:
|
|
170
246
|
customer: Contoso
|
|
171
247
|
steps:
|
|
@@ -191,39 +267,36 @@ steps:
|
|
|
191
267
|
|
|
192
268
|
- **Ops:** `launch`, `click`, `double_click`, `type`, `select`, `keys`, `expect`, `expect_image`, `wait` (at most
|
|
193
269
|
60 s), `wait_for`, `close`.
|
|
194
|
-
- **Locators** use
|
|
195
|
-
`index` (when several match), and `path` (the ancestors' `control_type` and `name`). A target needs an
|
|
270
|
+
- **Locators** use the control's properties, never screen coordinates: `automation_id`, `name`, `control_type`,
|
|
271
|
+
`class_name`, `index` (when several match), and `path` (the ancestors' `control_type` and `name`). A target needs an
|
|
196
272
|
`automation_id` or a `name`. Replay looks in the launched app's own windows only.
|
|
197
273
|
- **Variables:** `{{name}}` from the workflow's `variables` or `name=value` on the command line; `{{secret:NAME}}` from
|
|
198
274
|
the environment, only for names in `desktop.secrets`. A secret ForgeQE itself uses (a model key, a tracker token) is
|
|
199
|
-
refused there. Values are
|
|
275
|
+
refused there. Values are filled in once and never expanded again. Targets take `{{name}}` too (a CSV row's
|
|
200
276
|
`{{customer}}` as the control to click), never a secret.
|
|
201
277
|
- **Keys:** `ctrl`, `shift` and `alt` with one named key or character (`ctrl+s`, `alt+f4`, `enter`, `f5`). The Windows
|
|
202
278
|
and context-menu keys are refused: Win+R followed by typing runs any command.
|
|
203
|
-
- **Typing** is literal:
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
line
|
|
207
|
-
- **Only the app gets the input.**
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
279
|
+
- **Typing** is literal: special key characters in the text are typed as they are. On Windows a `type` step clears the
|
|
280
|
+
field and types the text key by key, like a person: some controls show text set directly but act only on typed input
|
|
281
|
+
(the Windows Save and Open dialogs keep their default file name). Text with line breaks or tabs is set instead, so a
|
|
282
|
+
line break never presses Enter in a form.
|
|
283
|
+
- **Only the app gets the input.** Before a click, `type` or `keys`, the app's window is brought forward, and nothing is
|
|
284
|
+
sent while another program's window covers the point or keeps the keyboard: the step fails and says so. `keys` go to
|
|
285
|
+
the app's open dialog, not its main window behind it. A `dismiss` control that could not be clicked is named in the
|
|
286
|
+
step's error.
|
|
211
287
|
|
|
212
288
|
## Recording by hand
|
|
213
289
|
|
|
214
|
-
When you know the steps, do them yourself instead of describing a goal: no model
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
```bash
|
|
218
|
-
forgeqe desktop record --app billing --name "Create an invoice"
|
|
219
|
-
```
|
|
290
|
+
When you know the steps, do them yourself instead of describing a goal: no model is involved, so it costs nothing and
|
|
291
|
+
does exactly what you did. Start it as in [Use](#use) ("Recording your own steps").
|
|
220
292
|
|
|
221
|
-
ForgeQE starts the app and watches the mouse and keyboard
|
|
222
|
-
|
|
293
|
+
ForgeQE starts the app and watches the mouse and keyboard, asking Windows which control each click and key went to. Do
|
|
294
|
+
the steps, then:
|
|
223
295
|
|
|
224
296
|
- **Ctrl+Shift+F11** with the mouse over a control adds a check: an `expect` step with the text it shows now (a
|
|
225
297
|
status message, a saved total). Add one at the end, so the replay tests the outcome, not only the steps.
|
|
226
|
-
- **Ctrl+Shift+F12**, or closing the app, finishes. The
|
|
298
|
+
- **Ctrl+Shift+F12**, or closing the app, finishes (in the web app, **Stop** too). The terminal shows each step as it
|
|
299
|
+
is recorded.
|
|
227
300
|
|
|
228
301
|
What becomes a step:
|
|
229
302
|
|
|
@@ -238,22 +311,42 @@ What becomes a step:
|
|
|
238
311
|
- **Passwords:** a password field is never read; its step types `{{secret:NAME}}` (the one name in `desktop.secrets`,
|
|
239
312
|
or `<APP>_PASSWORD`, which the result tells you to set). Text equal to a `desktop.secrets` value is written as its
|
|
240
313
|
placeholder. The typed characters themselves are never kept, only the field's text when you move on.
|
|
241
|
-
- **Only the app:** clicks and keys outside the app
|
|
242
|
-
|
|
243
|
-
- **A click that closes a dialog** (OK after typing a password) is
|
|
244
|
-
under it and reads the field you typed in, so neither is lost when the dialog goes. Typed characters are looked up
|
|
245
|
-
once per run of typing, not once per key.
|
|
314
|
+
- **Only the app:** clicks and keys outside the app are not recorded; nor are the Windows and menu keys, or controls
|
|
315
|
+
with neither an AutomationId nor a name. The result lists what was left out.
|
|
316
|
+
- **A click that closes a dialog** (OK after typing a password) is still recorded, with the field you typed in.
|
|
246
317
|
- **A cell in a list or grid row** is recorded inside its row (`path`: the row's type and name), since every row has a
|
|
247
318
|
cell like it (a password column's `********`).
|
|
248
|
-
- The run folder has `workflow.yaml`, `run.json
|
|
249
|
-
`
|
|
319
|
+
- The run folder has `workflow.yaml`, `run.json`, `report.html`, a picture of each step with the controls it shows
|
|
320
|
+
(`steps/NNN.png` and `.json`), and `video.mp4` with `desktop.video: true`.
|
|
321
|
+
|
|
322
|
+
## Reviewing a recording (web app)
|
|
323
|
+
|
|
324
|
+
In the web app only: a recording made from **Record › Desktop app** (Windows) opens in a review when you stop. Any other
|
|
325
|
+
workflow opens in the same review from the **Workflows** tab of **Desktop apps** (the open button on its row). It has
|
|
326
|
+
three tabs:
|
|
327
|
+
|
|
328
|
+
- **Steps**: each step with its picture, as recorded or on the last replay. Click a control on a picture to add a
|
|
329
|
+
check that it shows its text (or that it is there). **Change step N** changes a step's control, text or seconds,
|
|
330
|
+
or removes it (never the first, which starts the app). **+** after a step adds: **Check a control shows a text**,
|
|
331
|
+
**Check a control is there**, **Wait for a control**, **Wait until a control is gone**, **Wait some seconds**, or
|
|
332
|
+
**Press keys**. Each change is shown first and written at the version shown.
|
|
333
|
+
- **Test data**: where each typed or chosen value comes from: **As typed**, **Test data** (a variable of the workflow),
|
|
334
|
+
or **Secret** (one of `desktop.secrets`; what was typed then leaves the workflow). Press **Save**.
|
|
335
|
+
- **Last run**: **Replay** with the values above or once for each row of a data file or kept request, with **Heal a
|
|
336
|
+
step whose control moved** and **Take new image baselines**; its result, report and heals to **Accept**.
|
|
337
|
+
|
|
338
|
+
**Improve** asks the agent what to fix or add; it changes the workflow only after showing you the change. A mobile
|
|
339
|
+
recording opens in the same review.
|
|
340
|
+
|
|
341
|
+
At a terminal, the same changes are made by editing the workflow file, or by asking the agent in a chat (see the next
|
|
342
|
+
section).
|
|
250
343
|
|
|
251
344
|
## Fixing a workflow from chat
|
|
252
345
|
|
|
253
|
-
When a replayed step fails because the app was slow or a dialog was in the way, ForgeQE's agent
|
|
254
|
-
|
|
255
|
-
it, a dialog button in `dismiss`, a healed locator, a corrected text), shows you the diff,
|
|
256
|
-
when you agree. For example, after "step 4 timed out while the invoice list loaded":
|
|
346
|
+
When a replayed step fails because the app was slow or a dialog was in the way, ask ForgeQE's agent to fix it, in a web
|
|
347
|
+
chat (or **Improve** on the workflow) or in `forgeqe start`. It proposes the change (a longer `timeout` or `retries` on
|
|
348
|
+
the step, a `wait_for` before it, a dialog button in `dismiss`, a healed locator, a corrected text), shows you the diff,
|
|
349
|
+
and writes the file only when you agree. For example, after "step 4 timed out while the invoice list loaded":
|
|
257
350
|
|
|
258
351
|
```text
|
|
259
352
|
Change invoice.yaml?
|
|
@@ -264,10 +357,10 @@ Change invoice.yaml?
|
|
|
264
357
|
+ retries: 2
|
|
265
358
|
```
|
|
266
359
|
|
|
267
|
-
- Each change has a fixed shape (
|
|
268
|
-
|
|
269
|
-
- The changed workflow is checked
|
|
270
|
-
|
|
360
|
+
- Each change has a fixed shape (set or unset a setting, change, insert or remove a step, add a dialog to `dismiss`,
|
|
361
|
+
set a variable); step numbers are the replay report's. Anything else is refused.
|
|
362
|
+
- The changed workflow is checked before it is shown; one that would not run is not offered. Comments and layout are
|
|
363
|
+
kept.
|
|
271
364
|
- The old text is kept in the reports folder (`desktop-edits/`), and a file that changed since the edit was proposed is
|
|
272
365
|
not overwritten.
|
|
273
366
|
- The workflow must be a `.yaml` inside the working folder or the reports folder.
|
|
@@ -307,7 +400,10 @@ steps:
|
|
|
307
400
|
missing variable) is not retried.
|
|
308
401
|
- **`dismiss`** lists at most 10 targets, checked like any target. When a control is not found, or something waits to
|
|
309
402
|
go away, replay clicks the `dismiss` controls that are on screen and looks again, up to 3 times per lookup. The
|
|
310
|
-
report and the
|
|
403
|
+
report and the terminal name every dialog closed, and how many tries a step took.
|
|
404
|
+
|
|
405
|
+
In the web app, the review's **+** adds the waits; `timeout`, `retries` and `dismiss` are edited in the file or through
|
|
406
|
+
the agent.
|
|
311
407
|
|
|
312
408
|
## Visual checks (`expect_image`)
|
|
313
409
|
|
|
@@ -323,7 +419,8 @@ compares pixels with a baseline image:
|
|
|
323
419
|
```
|
|
324
420
|
|
|
325
421
|
- **The first run** with no baseline saves what it captured and passes; the report says so. Commit the baselines
|
|
326
|
-
folder with the workflow.
|
|
422
|
+
folder with the workflow. After an intended change, replace them with **Take new image baselines** (web app) or
|
|
423
|
+
`--update-baselines` (terminal).
|
|
327
424
|
- **A pixel counts as different** when a colour channel differs by more than 32 of 255, so anti-aliasing and ClearType
|
|
328
425
|
do not fail a check. A different size (another screen scale or window size) fails with both sizes named.
|
|
329
426
|
- **The report** shows the baseline, what was captured, and the differences in red, with the share of pixels that
|
|
@@ -334,161 +431,84 @@ compares pixels with a baseline image:
|
|
|
334
431
|
|
|
335
432
|
## Unattended runs
|
|
336
433
|
|
|
337
|
-
Replay needs a signed-in, unlocked Windows session. Before it starts the app, it
|
|
338
|
-
with the reason if it is a Windows service (session 0), a locked screen, or a
|
|
339
|
-
|
|
340
|
-
[DESKTOP-CI.md](DESKTOP-CI.md): a
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
## Updating UFO²
|
|
344
|
-
|
|
345
|
-
UFO² is pinned to one commit. Moving it is checked before it is pinned:
|
|
346
|
-
|
|
347
|
-
1. Set up that UFO on Windows (`FORGEQE_UFO_COMMIT`, which takes a full 40-character commit id only), then run the
|
|
348
|
-
adapter tests against its real code and a scripted explore of Notepad.
|
|
349
|
-
2. When it passed: `bun scripts/ufo-bump.ts <commit>` writes the new pin into `src/desktop/setup.ts`,
|
|
350
|
-
`py/forgeqe_desktop/ufo_runner.py` and this page. Run the tests on Windows again before pushing.
|
|
351
|
-
|
|
352
|
-
When it fails, the failing step names what changed in UFO (usually the action executor or the config layout that the
|
|
353
|
-
adapter wraps). Keep the pin until the adapter is updated for it.
|
|
434
|
+
Replay on Windows with the mouse and keyboard needs a signed-in, unlocked Windows session. Before it starts the app, it
|
|
435
|
+
checks the session and fails at once with the reason if it is a Windows service (session 0), a locked screen, or a
|
|
436
|
+
disconnected Remote Desktop session. The machine check (**Check** on **Machine and apps**, or `forgeqe desktop doctor`)
|
|
437
|
+
runs the same check. To run the suite every night on a machine of your own, see [DESKTOP-CI.md](DESKTOP-CI.md): a
|
|
438
|
+
runner set up in the user's session (`ci/desktop-runner/prepare-runner.ps1`), a nightly workflow
|
|
439
|
+
(`ci/desktop-runner/desktop-nightly.example.yml`), and `--junit` results.
|
|
354
440
|
|
|
355
441
|
## Checks of the outcome
|
|
356
442
|
|
|
357
|
-
A recording of actions only proves the steps run. When
|
|
358
|
-
model the goal and the app's controls with the text each shows now, and the model picks up to three
|
|
359
|
-
the goal (a status message, a saved value),
|
|
360
|
-
that text really is in that control, so the model can choose among what is on screen but never invent it; text
|
|
361
|
-
a `desktop.secrets` value is never offered. The checks are saved as `expect` steps at the end of the workflow,
|
|
362
|
-
report says how many there are. With none, the report and the agent say so
|
|
443
|
+
A recording of actions only proves the steps run. When the agent has finished exploring, and before the app closes,
|
|
444
|
+
ForgeQE shows the model the goal and the app's controls with the text each shows now, and the model picks up to three
|
|
445
|
+
whose text proves the goal (a status message, a saved value), with the part of the text to expect. A check is kept only
|
|
446
|
+
when that text really is in that control, so the model can choose among what is on screen but never invent it; text
|
|
447
|
+
holding a `desktop.secrets` value is never offered. The checks are saved as `expect` steps at the end of the workflow,
|
|
448
|
+
and the report says how many there are. With none, the report and the agent say so, and the web app marks the workflow
|
|
449
|
+
as having no checks of the outcome: add `expect` steps (in the review, or by hand).
|
|
363
450
|
|
|
364
|
-
##
|
|
451
|
+
## What an explore records
|
|
365
452
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
looks like `{{…}}` is kept literal, so a model told to type `{{secret:X}}` cannot make replay type the secret.
|
|
453
|
+
Each action of the agent is recorded with the properties of the control it acted on, and becomes a step: a click (or
|
|
454
|
+
double-click), typing into a field, a key chord (`keys`, when it is one allowed chord, else `type`), and picking an
|
|
455
|
+
item (`select`). Clicks at screen positions, scrolls and anything else are listed as not recorded in the report. A
|
|
456
|
+
typed value equal to a `desktop.secrets` value is written as its placeholder; typed text that only looks like `{{…}}`
|
|
457
|
+
is kept literal, so a model told to type `{{secret:X}}` cannot make replay type the secret.
|
|
372
458
|
|
|
373
459
|
## Security
|
|
374
460
|
|
|
375
|
-
The YAML, the
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
- **No command in the workflow.** `app:` names
|
|
379
|
-
|
|
380
|
-
- **
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
- **
|
|
384
|
-
- **
|
|
385
|
-
|
|
386
|
-
`desktop.secrets`, nothing else (`desktopEnvNames`).
|
|
461
|
+
The YAML, the app's screen text and the model's replies can all be written by someone else. ForgeQE treats them as
|
|
462
|
+
untrusted:
|
|
463
|
+
|
|
464
|
+
- **No command in the workflow.** `app:` names an app of your settings: an absolute `.exe` (never a `.bat` or `.cmd`)
|
|
465
|
+
and an argument list, started without a shell.
|
|
466
|
+
- **The agent gets UI actions only.** While exploring it can click, type and read controls in the app. It cannot run
|
|
467
|
+
shell commands or start programs; ForgeQE starts the app.
|
|
468
|
+
- **Keys:** the Windows and menu keys are refused during explore too, and the report lists what was refused.
|
|
469
|
+
- **No one at the console:** when the agent would ask before a sensitive action, explore answers no.
|
|
470
|
+
- **Environment:** the desktop process gets system settings, the model profile's key and `desktop.secrets`, nothing
|
|
471
|
+
else.
|
|
387
472
|
- **Explore controls the real mouse and keyboard.** It asks before starting (`--yes` to skip; required with no
|
|
388
473
|
terminal). Use a test machine or VM and a test account.
|
|
389
|
-
- **Agent tools:** a workflow path the agent gives must be a `.yaml` inside the working folder or the reports folder
|
|
390
|
-
|
|
474
|
+
- **Agent tools:** a workflow path the agent gives must be a `.yaml` inside the working folder or the reports folder
|
|
475
|
+
(links out are refused); variables are names and text only; heals are reported, never written by the agent.
|
|
391
476
|
- **Healing:** the model picks one of the window's real controls by number; control text is passed as data, and any
|
|
392
477
|
other answer heals nothing. Heals are written into the workflow only when accepted.
|
|
393
|
-
- **Report:** every value is escaped; images are only the
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
folder, so a workflow cannot read or overwrite another file.
|
|
478
|
+
- **Report:** every value is escaped; images are only the run's own step pictures and image comparisons.
|
|
479
|
+
- **Baselines:** `expect_image` names are file names inside the workflow's baselines folder, so a workflow cannot read
|
|
480
|
+
or overwrite another file.
|
|
397
481
|
- **Unattended machines:** `prepare-runner.ps1` never handles a password; automatic sign-in uses Sysinternals
|
|
398
482
|
Autologon, which stores it encrypted.
|
|
399
|
-
- **Install:**
|
|
400
|
-
and the checkout's `HEAD` is verified; replay's packages are pinned to exact versions.
|
|
401
|
-
|
|
402
|
-
## Code
|
|
403
|
-
|
|
404
|
-
| File | Contents |
|
|
405
|
-
|---|---|
|
|
406
|
-
| `src/desktop/command.ts` | `forgeqe desktop`: setup, apps, doctor, validate, explore, record, replay (folders, `--data`, `--junit`, `--update-baselines`); heal acceptance |
|
|
407
|
-
| `src/desktop/junit.ts` | JUnit XML for a suite |
|
|
408
|
-
| `src/desktop/edit.ts` | Changes to a workflow from chat: shapes, applied with comments kept, validated, diff, backup |
|
|
409
|
-
| `src/desktop/run.ts` | Explore and replay as the CLI and the agent's tools run them; variables, CSV rows, workflow paths |
|
|
410
|
-
| `src/mcp/desktoptools.ts` | ForgeQE's agent's `test_apps`, `desktop_explore`, `desktop_record`, `desktop_replay`, `desktop_edit_workflow` |
|
|
411
|
-
| `src/desktop/bridge.ts` | Starts `python -m forgeqe_desktop serve`, passes events on, records model calls in the usage ledger |
|
|
412
|
-
| `src/desktop/setup.ts` | The desktop environment, the pinned UFO checkout (`ufoCommit`), `desktopDoctor` |
|
|
413
|
-
| `scripts/ufo-bump.ts` | Pins a new UFO commit in every place that names it |
|
|
414
|
-
| `ci/desktop-runner/` | `prepare-runner.ps1` and the nightly workflow example for unattended runs |
|
|
415
|
-
| `src/desktop/report.ts` | `report.html` for a run |
|
|
416
|
-
| `py/forgeqe_desktop/service.py` | `serve`: the JSON-lines protocol, replay and explore runs, `run.json` |
|
|
417
|
-
| `py/forgeqe_desktop/workflow.py` | Load, validate and save workflows; variables and secrets; the key-chord grammar |
|
|
418
|
-
| `py/forgeqe_desktop/apps.py` | `desktop.apps`: the app allowlist and the argument array a launch uses |
|
|
419
|
-
| `py/forgeqe_desktop/models.py` | The profile through the `openai` SDK; image checks |
|
|
420
|
-
| `py/forgeqe_desktop/ufo_bridge.py` | UFO's model blocks, and the `forgeqe` model service |
|
|
421
|
-
| `py/forgeqe_desktop/ufo_runner.py` | UFO's config, the action trace and key guard, running UFO in-process |
|
|
422
|
-
| `py/forgeqe_desktop/record.py` | Trace to workflow steps |
|
|
423
|
-
| `py/forgeqe_desktop/replay.py` | Runs a workflow on a `Driver`: timeouts, retries, `wait_for`, dismissing dialogs, heal and stop |
|
|
424
|
-
| `py/forgeqe_desktop/handrecord.py` | Recording by hand: clicks, typing, chords and checks as steps; secrets |
|
|
425
|
-
| `py/forgeqe_desktop/handhooks.py` | The Windows hooks and UI Automation lookups that feed it |
|
|
426
|
-
| `py/forgeqe_desktop/visual.py` | `expect_image`: baselines, pixel comparison, diff images |
|
|
427
|
-
| `py/forgeqe_desktop/session.py` | Whether this Windows session can be driven (service, locked, no screen) |
|
|
428
|
-
| `py/forgeqe_desktop/heal.py` | One model call to re-find a moved control |
|
|
429
|
-
| `py/forgeqe_desktop/memory.py` | App memory: an explore replays what earlier ones did before calling the model, and a heal found once is reused (mobile too) |
|
|
430
|
-
| `py/forgeqe_desktop/checks.py` | One model call for checks of the outcome, kept only when on screen |
|
|
431
|
-
| `py/forgeqe_desktop/pywinauto_driver.py` | The Windows `Driver` |
|
|
432
|
-
|
|
433
|
-
Tests: `bun test tests/desktop.test.ts`, and `<engine-python> -m pytest tests/desktop -q` (needs `openai==1.66.2`
|
|
434
|
-
and PyYAML; they use a fake driver and a fake UFO, so they run on any OS).
|
|
483
|
+
- **Install:** what setup downloads is pinned to exact versions and checked.
|
|
435
484
|
|
|
436
485
|
## Before first use on Windows
|
|
437
486
|
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
machine with your apps:
|
|
487
|
+
Tested by the ForgeQE team: setup with and without the explore part, replay, healing, and recording. Still to check, on
|
|
488
|
+
a Windows test machine with your apps:
|
|
441
489
|
|
|
442
|
-
1. **
|
|
443
|
-
(needs Java Access Bridge), Delphi, SAP GUI and Citrix
|
|
490
|
+
1. **Control coverage:** Windows' `Inspect.exe` shows the controls that matter with stable `AutomationId`s. Custom
|
|
491
|
+
grids, Java (needs Java Access Bridge), Delphi, SAP GUI and Citrix are where Windows' control information falls
|
|
492
|
+
short.
|
|
444
493
|
2. **Explore with your model:** one goal with an Azure profile and one with `auth: entra`; `trace.json` has the
|
|
445
|
-
controls' AutomationIds
|
|
494
|
+
controls' AutomationIds.
|
|
446
495
|
3. **Replay:** the recorded workflow passes 10 runs out of 10; a renamed control is healed.
|
|
447
|
-
4. **Cost and time** of one explore, from
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
failed the next step with a COM error (now searched again). On that VM a synthetic double-click did not register;
|
|
459
|
-
check `double_click` on real hardware. The x64 Python the engine runs in needs the x64 Visual C++ runtime (`win32ui`).
|
|
460
|
-
On agent-desktop there: npm 11.20 refuses `--allow-scripts` with `--prefix` (the install script is now allowed for the
|
|
461
|
-
pinned version in the folder's `package.json`); the state folder's Windows ACL (Administrators, OWNER RIGHTS) was
|
|
462
|
-
refused by agent-desktop (now this user and SYSTEM only); and a dialog listed as its own window and inside its main
|
|
463
|
-
window's snapshot matched twice (now one control). Still open: a button whose click opens a modal message box times out
|
|
464
|
-
in UI Automation's Invoke, and the step fails without sending it again, so such steps need the pywinauto driver.
|
|
465
|
-
|
|
466
|
-
Found by exploring and healing KeePass there with Azure OpenAI gpt-5.4 and fixed: a drop-down menu's items are listed
|
|
467
|
-
twice by UI Automation, so a recorded menu click was "several controls match" and could not replay (now one control
|
|
468
|
-
seen twice, the same runtime id, is that control); a check of the app's main window could never be found, as replay
|
|
469
|
-
searched only inside windows (now a target equal to the window is the window); the heal model, given only the old
|
|
470
|
-
target, replaced a renamed menu item by the menu itself (that step passed and the next one failed), and the heal was
|
|
471
|
-
remembered and offered for the workflow (now the model is told the step and the one before it, and a heal is
|
|
472
|
-
remembered, written or offered only from a replay that passed; a remembered heal used in a failed replay is
|
|
473
|
-
forgotten); and the offer to write heals waited for an answer with no terminal (now never asked without one). Explore
|
|
474
|
-
ran 4 steps for $0.12 when the app opened at its main window.
|
|
475
|
-
|
|
476
|
-
Also found there and fixed: an app that opens with a start-up dialog (KeePass's update question) left UFO on that
|
|
477
|
-
dialog's window after it closed, so every later click went to (0, 0) until the step limit ($1.22 for nothing); now a
|
|
478
|
-
closed window UFO chose is replaced by the app's live window (`follow_live_window`, `ufo_runner.py`), and the same
|
|
479
|
-
explore passes for $0.18. In recording by hand, the OK that closed a dialog right after typing was lost, since the
|
|
480
|
-
control under the click was looked up after a lookup per typed key (now the click is held while it is looked up, and
|
|
481
|
-
typing is one lookup). A click on a list row's `********` cell was recorded as that cell alone, which every row has (now
|
|
482
|
-
inside its row). App memory borrowed another goal's whole flow as a "shared start"; that flow ended where it began (a
|
|
483
|
-
dialog opened and closed again), so UFO, seeing the screen it started from, did it all again and the workflow held it
|
|
484
|
-
twice. Now the note lists the replayed steps and says to finish if they do the goal (UFO then made no click, $0.02),
|
|
485
|
-
and steps that exactly repeat the replayed block are kept once. A replay with `--no-heal`, or with a model whose key
|
|
486
|
-
is not set, stopped at "No model in llms.json can …" (now healing is off for that replay, and it runs).
|
|
496
|
+
4. **Cost and time** of one explore, from ForgeQE's usage.
|
|
497
|
+
|
|
498
|
+
Known limits:
|
|
499
|
+
|
|
500
|
+
- In a virtual machine, a synthetic double-click may not register; check `double_click` on real hardware.
|
|
501
|
+
- On Windows on ARM, the x64 Visual C++ runtime must be installed.
|
|
502
|
+
- With `desktop.driver: agent-desktop`, a button whose click opens a modal message box times out, and the step fails
|
|
503
|
+
without sending the click again. Replay such workflows with the mouse and keyboard (`pywinauto` or `auto` on
|
|
504
|
+
Windows).
|
|
505
|
+
- An explore makes model calls, so it costs what your model charges; a replay makes none. Each run's report and Cost
|
|
506
|
+
show what it used.
|
|
487
507
|
|
|
488
508
|
## Next steps
|
|
489
509
|
|
|
490
510
|
1. The checks above.
|
|
491
511
|
2. `forgeqe suite` and test cases from Azure DevOps, Jira and Xray for desktop workflows, with results written back.
|
|
492
|
-
3. Quill: export a workflow as
|
|
493
|
-
4.
|
|
512
|
+
3. Quill: export a workflow as code in the user's repository.
|
|
513
|
+
4. Better support where Windows' control information falls short: Java, SAP GUI, and vision only for Citrix.
|
|
494
514
|
5. A pipeline template for a self-hosted Windows runner signed in to a desktop session.
|