@capagents/forgeqe 2.9.1 → 2.9.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.
Files changed (110) hide show
  1. package/HOW_TO_USE.md +1 -1
  2. package/dist/docs-site/docs/architecture/index.html +6 -0
  3. package/dist/docs-site/docs/index.html +1 -1
  4. package/dist/docs-site/docs/search.js +1 -1
  5. package/dist/docs-site/docs/web-app/index.html +12 -1
  6. package/dist/forgeqe.js +1722 -1676
  7. package/dist/web/assets/Agent-B6xfobJ9.js +4 -0
  8. package/dist/web/assets/ApiTests-BwgezlYi.js +10 -0
  9. package/dist/web/assets/Browse-DDzk_KTh.js +2 -0
  10. package/dist/web/assets/Chat-BdlfK2ra.js +3 -0
  11. package/dist/web/assets/{CommandPalette-VSEzjRS1.js → CommandPalette-Cla7m818.js} +1 -1
  12. package/dist/web/assets/{Compare-Bjh-qB8C.js → Compare-BxUfo0rI.js} +1 -1
  13. package/dist/web/assets/Cost-Dpa8aWQG.js +1 -0
  14. package/dist/web/assets/Data-D_7m2GL6.js +6 -0
  15. package/dist/web/assets/Desktop-CgslBkAr.js +1 -0
  16. package/dist/web/assets/DesktopReview-CsW65QZz.js +1 -0
  17. package/dist/web/assets/Evidence-SYt-mbDx.js +1 -0
  18. package/dist/web/assets/Explore--B18Jvg9.js +2 -0
  19. package/dist/web/assets/{Features-DFwuL5cN.js → Features-BerYifH7.js} +1 -1
  20. package/dist/web/assets/Flags-ABMq---p.js +2 -0
  21. package/dist/web/assets/Flaky-DKeceXsa.js +1 -0
  22. package/dist/web/assets/{ForceGraph-DC7NzeR4.js → ForceGraph-C9HFjZX3.js} +1 -1
  23. package/dist/web/assets/{Impact-CfnvrPzq.js → Impact-DQ2c0dTT.js} +3 -3
  24. package/dist/web/assets/Jobs-Dy_C2x36.js +5 -0
  25. package/dist/web/assets/KindPage-DQzstMyM.js +6 -0
  26. package/dist/web/assets/Migration-B4GWsCLR.js +2 -0
  27. package/dist/web/assets/Product-CgVhHMMY.js +7 -0
  28. package/dist/web/assets/Production-OdB4gZ3T.js +1 -0
  29. package/dist/web/assets/Quality-DOV4suvD.js +1 -0
  30. package/dist/web/assets/Readiness-DawfUUHc.js +1 -0
  31. package/dist/web/assets/Record-C9uAKGYM.js +2 -0
  32. package/dist/web/assets/Regression-DZdddPfI.js +5 -0
  33. package/dist/web/assets/{Reports-BWtgbiVp.js → Reports-BHOS6af1.js} +2 -2
  34. package/dist/web/assets/{Response-DyvlQXek.js → Response-qfMk4Nrh.js} +2 -2
  35. package/dist/web/assets/RunDiff-BNywFV7t.js +1 -0
  36. package/dist/web/assets/Runs-BJPYXRiB.js +2 -0
  37. package/dist/web/assets/{Steps-DUG1BKJb.js → Steps-Cdzyueit.js} +2 -2
  38. package/dist/web/assets/TestCases-DcYY2l9q.js +1 -0
  39. package/dist/web/assets/TestData-CrzKA3xh.js +2 -0
  40. package/dist/web/assets/TestDebt-CVDJT511.js +1 -0
  41. package/dist/web/assets/Tosca-CBwGCrbL.js +3 -0
  42. package/dist/web/assets/{WhatsNew-B3xewvk5.js → WhatsNew-CIOTidx-.js} +1 -1
  43. package/dist/web/assets/dataParts-CUb0Q0IZ.js +3 -0
  44. package/dist/web/assets/{families-DWrv-fcS.js → families-C9MndVzT.js} +1 -1
  45. package/dist/web/assets/filters-Bk7ovF3M.js +1 -0
  46. package/dist/web/assets/{fold-BgITvJex.js → fold-97yBCSav.js} +1 -1
  47. package/dist/web/assets/frame-CqWJMIHh.js +4 -0
  48. package/dist/web/assets/index-ASvNRLI7.js +73 -0
  49. package/dist/web/assets/index-B5o9vY-v.css +2 -0
  50. package/dist/web/assets/{logos-C067hMmF.js → logos-CbNeXLAM.js} +1 -1
  51. package/dist/web/assets/{palette-Br50dJuQ.js → palette-Dg3RS-ff.js} +1 -1
  52. package/dist/web/assets/{parts-CbA0h_uO.js → parts-CPAyV15O.js} +1 -1
  53. package/dist/web/assets/{productParts-BxQnjrHo.js → productParts-BpXw1jMa.js} +1 -1
  54. package/dist/web/assets/{qualityParts-Cn74cNyX.js → qualityParts-8TPKphgl.js} +1 -1
  55. package/dist/web/assets/recordTest-DvnpHsd2.js +1 -0
  56. package/dist/web/assets/{rows-X8lfgK8j.js → rows-BdYJLCRD.js} +1 -1
  57. package/dist/web/assets/segmented-DlF5rvSR.js +1 -0
  58. package/dist/web/assets/{thread-Bamx8xqR.js → thread-DlyX7xQt.js} +1 -1
  59. package/dist/web/assets/{usePageChat-B-vpiXQ6.js → usePageChat-Dhu3upXA.js} +1 -1
  60. package/dist/web/index.html +4 -4
  61. package/docs/ARCHITECTURE.md +5 -0
  62. package/docs/WEB_APP.md +17 -1
  63. package/docs/user-guide.html +1 -1
  64. package/forgeqe.example.yaml +1 -0
  65. package/package.json +1 -1
  66. package/prompts/brain.md +4 -3
  67. package/py/forgeqe_desktop/agentdesktop_driver.py +69 -0
  68. package/py/forgeqe_desktop/boxes.py +32 -0
  69. package/py/forgeqe_desktop/handhooks.py +55 -5
  70. package/py/forgeqe_desktop/pywinauto_driver.py +25 -0
  71. package/py/forgeqe_desktop/service.py +85 -3
  72. package/py/forgeqe_engine/brand.py +3 -0
  73. package/py/forgeqe_engine/browser.py +46 -6
  74. package/py/forgeqe_engine/cli.py +10 -1
  75. package/py/forgeqe_engine/recordsession.py +92 -2
  76. package/py/forgeqe_engine/video.py +423 -0
  77. package/py/forgeqe_mobile/hyperexecute.py +1 -1
  78. package/py/forgeqe_mobile/maestro.py +1 -1
  79. package/py/forgeqe_tosca/vendored.py +3 -2
  80. package/dist/web/assets/Agent-BNWcLTrm.js +0 -4
  81. package/dist/web/assets/ApiTests-CZFzjMKc.js +0 -10
  82. package/dist/web/assets/Browse-CeiK4X_V.js +0 -2
  83. package/dist/web/assets/Chat-BqXSNxV2.js +0 -3
  84. package/dist/web/assets/Cost-BRtni21m.js +0 -1
  85. package/dist/web/assets/Data-Bzn351xU.js +0 -6
  86. package/dist/web/assets/Evidence-eM1ZsFF-.js +0 -1
  87. package/dist/web/assets/Explore-D07Qbzyq.js +0 -2
  88. package/dist/web/assets/Flags-pxSAu21R.js +0 -2
  89. package/dist/web/assets/Flaky-BdfqCR6j.js +0 -1
  90. package/dist/web/assets/Jobs-CIKpgvcv.js +0 -5
  91. package/dist/web/assets/KindPage-OyYE9NU7.js +0 -6
  92. package/dist/web/assets/Migration-BQA6MOPN.js +0 -2
  93. package/dist/web/assets/Product-DNe8RV_H.js +0 -7
  94. package/dist/web/assets/Production-ClEiFS1u.js +0 -1
  95. package/dist/web/assets/Quality-BZnQcbb2.js +0 -1
  96. package/dist/web/assets/Readiness-Dk2KZZm4.js +0 -1
  97. package/dist/web/assets/Record-CSapdwkr.js +0 -2
  98. package/dist/web/assets/Regression-C7bZ5sSE.js +0 -5
  99. package/dist/web/assets/RunDiff-DWV5qdHx.js +0 -1
  100. package/dist/web/assets/Runs-CET6zwQu.js +0 -2
  101. package/dist/web/assets/TestCases-DyicRSqL.js +0 -1
  102. package/dist/web/assets/TestData-D2aWG3dq.js +0 -2
  103. package/dist/web/assets/TestDebt-DobUiGTz.js +0 -1
  104. package/dist/web/assets/Tosca-DvTni6va.js +0 -3
  105. package/dist/web/assets/dataParts-rU9wRwfo.js +0 -3
  106. package/dist/web/assets/filters-BDJYWuRV.js +0 -1
  107. package/dist/web/assets/frame-Dn34zQXO.js +0 -4
  108. package/dist/web/assets/index-BiMUTOBo.js +0 -45
  109. package/dist/web/assets/index-CGfii-zv.css +0 -2
  110. package/dist/web/assets/segmented-mcjXGwLg.js +0 -1
package/HOW_TO_USE.md CHANGED
@@ -139,7 +139,7 @@ Everything ForgeQE can do, by area. ForgeQE's agent answers "can you…?" questi
139
139
  | Test cases | **Domain and regulatory test design**: Every agent works as an expert in the product's industry would, automatically: the risks the industry is known for and the obligations of its regulations and standards (for example DORA, PSD2, GDPR, ISO 27001), declared in forgeqe.yaml or worked out from the story and the application. It applies to analysing requirements, writing and checking test cases, exploration, writing, reviewing, and healing test code, API tests, finding tests, and pull request reviews, labelled so coverage can be traced and citing only the control ids in the team's compliance file. forgeqe eval domain measures how well the agent does it. | | [docs](#16-domain-and-regulations) |
140
140
  | Test cases | **Exploratory testing of a story**: Explores a story in real browsers beyond its scripted cases (edge cases, invalid input, boundaries, roles, state), confirms each defect by reproducing it, proposes test cases, and files bugs once the user agrees. | `explore_story` | [docs](#exploratory-testing-from-a-story) |
141
141
  | Setup | **Test environments and their apps**: Knows the test environments in env.yaml (QA, UAT, …) and each one's apps: web apps and APIs by URL, Windows desktop apps, and mobile apps, with what each is for. Every agent works from the active one; switches environment on request, picks the apps a scenario needs, and carries values such as an order number from one app to the next. | `test_apps`, `use_environment` | [docs](#environments-and-apps) |
142
- | Desktop | **Automate Windows desktop apps**: Carries out a plain-language goal in a Windows thick-client app with UFO² and saves it as a workflow with checks of the outcome, or records the steps a tester does by hand, with no model; replays saved workflows with no model, healing a step whose control moved, and fixes a workflow from chat (a timeout, a wait, a dialog to dismiss) after showing the change. Apps and the secrets they may type come from env.yaml or forgeqe.yaml desktop:. | `desktop_explore`, `desktop_record`, `desktop_replay`, `desktop_edit_workflow` | [docs](#desktop-apps-windows) |
142
+ | Desktop | **Automate Windows desktop apps**: Carries out a plain-language goal in a Windows thick-client app with UFO² and saves it as a workflow with checks of the outcome, or records the steps a tester does by hand, with no model; replays saved workflows with no model, healing a step whose control moved, and fixes a workflow from chat (a timeout, a wait, a dialog to dismiss) after showing the change. Apps and the secrets they may type come from env.yaml or forgeqe.yaml desktop:. | `desktop_explore`, `desktop_record`, `desktop_replay`, `desktop_edit_workflow`, `desktop_manage` | [docs](#desktop-apps-windows) |
143
143
  | Mobile | **Automate Android and iOS apps**: Carries out a plain-language goal in an Android or iOS app through Appium and saves it as a mobile workflow with checks of the outcome; replays workflows with no model on Appium (healing a moved control) or Maestro; runs the team's own Maestro flows after checking them against an allowlist; uploads an app build to TestMu AI and saves its lt:// id as the app's build. Apps come from env.yaml (kind: mobile) or forgeqe.yaml mobile:. | `mobile_explore`, `mobile_replay`, `mobile_maestro`, `mobile_upload` | [docs](#mobile-apps-android-ios) |
144
144
  | Operations | **Services, mocks, workspace and browser in Docker or Podman**: Starts the services a test run needs (a database, a queue, the API under test) in Docker or Podman, as forgeqe.yaml declares them, and waits until each is ready; stops them, and shows their status and logs. Starts mocks of an API on WireMock, from the calls a browser run recorded or from an OpenAPI description, with an optional rules file for conditional responses and fault or latency injection, and can point an API app of the environment at the mock for the session. With containers.workspace, the coding agents' shell commands (build, restore, run) and every test ForgeQE runs go to a container of the project's image; with browser.provider docker, the browser agent, the replay and the coding agent's live browser use Chromium in a container. | `services`, `mock_service` | [docs](#containers-and-mock-services) |
145
145
  | Data | **Ask a database in plain language**: Connects to the project's databases (PostgreSQL, MySQL and MariaDB, SQL Server and Azure SQL, Oracle, Snowflake, Redshift, CockroachDB, SQLite, DuckDB, and MongoDB) from a connection string or host and user, signing in with a password, Microsoft Entra ID or AWS IAM. Reads the schema through DB-GPT's connectors and turns questions into SQL that is checked before it runs: reads in a read-only session that is rolled back, writes only on a database marked writable, after you confirm them. | `databases`, `database_schema`, `run_sql` | [docs](#databases) |
@@ -177,6 +177,12 @@
177
177
  <p><strong>Step verdicts.</strong> When the goal came from a test case with steps, <code>CASE_REPORT_INSTRUCTION</code> goes into the system prompt and <code>output_model_schema=CaseReport</code> makes the engine library's <code>done</code> action return <code>{summary, steps: [{step, status, actual}]}</code>; <code>history.structured_output</code> becomes <code>case_report</code> in the result. If the Agent rejects the schema, the run continues without it.</p>
178
178
  <p><strong>Finishing and the judge.</strong> <code>_GOAL_VERIFICATION_SYSTEM_MESSAGE</code> is added to every agent's system prompt: <code>done</code> with success only when every field holds exactly what the goal asked for (pre-filled or extra values in multi-value fields removed), every setting the goal names is applied through the page's own controls and shown by the page, and findings are read from the page, items a list already shows are read from it in one step, and a tab that looks blank right after opening is still loading. The engine library's judge (<code>use_judge</code>) is off by default: <code>browser.judge: true</code> (passed to the engine as its judge setting) or <code>FORGEQE_ENGINE_USE_JUDGE=1</code> turns it on, and it then makes one model call over the steps and screenshots. It was turned off because it failed completed runs whose answer came from one screenshot (five result scores) instead of one step per item, and ForgeQE's agent then retried with ever stricter goals. When the agent says success and the judge's verdict is false, the run fails with the judge's <code>failure_reason</code> ahead of the agent's report; the verdict goes into <code>run.json</code> as <code>judge</code>. A judge call that errors leaves the agent's result as it was.</p>
179
179
  <p><strong>Window and video.</strong> <code>window_launch_kwargs</code> sizes a local browser from <code>browser.viewport</code>: the page when headless, the window with <code>browser.window: viewport</code>. Otherwise a visible window opens screen-sized (the engine library's default) and, before the first page, <code>maximize_window</code> sets <code>windowState: maximized</code> over CDP. With <code>browser.video</code> on (the default), the browser is started before the replay or the agent, and <code>start_video</code> starts the library's recording watchdog on <code>&amp;lt;run&gt;/video.mp4</code>; <code>stop_video</code> finishes it before the browser closes, and <code>run_with_events</code> adds it to the run's files. The watchdog encodes Chrome's screencast frames at 30 fps as they arrive, so the video's timing follows how often the page repaints, not the clock. The encoder (<code>browser-use[video]</code>: imageio with ffmpeg, numpy) is installed with the engine, and added to an engine set up before it. The report lists <code>video.mp4</code> among the run's files and plays it on the Artifacts tab.</p>
180
+ <p><strong>Videos of recordings, replays and desktop runs.</strong> These have no browser-use agent, so <code>py/forgeqe_engine/video.py</code> makes their videos itself, with the ffmpeg that the pinned <code>imageio-ffmpeg</code> ships inside the package. It finds that binary in the package's own <code>binaries</code> folder, never on PATH or through <code>IMAGEIO_FFMPEG_EXE</code>, and starts it with an argument list and system settings only. Frames reach ffmpeg on stdin as raw RGB of a fixed size, letterboxed when a picture's size changes, so nothing a page shows reaches its command line. <code>FrameVideo</code> writes in real time at 5 fps, repeating the latest picture while nothing changes, and stops after an hour. A video that could not be finished is removed.</p>
181
+ <ul>
182
+ <li><em>Recording by hand</em> (<code>browser.video</code>): <code>recordsession.py</code> runs the page's screencast over its own DevTools connection, follows the tester from tab to tab, and holds the video while the recording is paused. The file is <code>&amp;lt;run&gt;/video.mp4</code>. Making a typed value a secret in the review removes the recording's videos, since a value cannot be taken out of a video's pictures.</li>
183
+ <li><em>Replays</em> (the <code>forgeqe code</code> replay check, and a recording's re-runs on the Record page): the Playwright runner keeps screencast frames as <code>&amp;lt;ms&gt;.jpg</code>, at most one per tenth of a second, plus a closing screenshot so the video lasts as long as the replay. <code>python -m forgeqe_engine video</code> turns them into <code>replay/&amp;lt;setup&gt;.mp4</code> (<code>src/engine/video.ts</code>) and the frames are removed. A re-run keeps only its last pass's video, as <code>tries/video.mp4</code>. Steps played in a person's own tab (a block) are never filmed; the recording's own video already shows them.</li>
184
+ <li><em>Desktop runs</em> (<code>desktop.video</code>, default on): <code>serve</code> films the main screen with Pillow's <code>ImageGrab</code> while a replay, explore or recording runs, and finishes <code>&amp;lt;run&gt;/video.mp4</code> before <code>run.json</code> is written, so the desktop report plays it. A computer whose screen cannot be read (no display, or macOS without Screen Recording permission) runs without a video and says so.</li>
185
+ </ul>
180
186
  <p><strong>Browser profile.</strong> At the end of the first step (or before writing a trust-mode replay), <code>browser_profile</code> reads how the browser was set up: the engine's driver, channel and executable, headless, the default switches removed, extra HTTP headers (none), <code>Browser.getVersion</code>, and from the page <code>navigator.userAgent</code>, <code>navigator.webdriver</code>, language, time zone, and viewport. It goes into <code>run.json</code> as <code>browser</code>, and the handoff shows it so the coding agent can compare its test's browser with it.</p>
181
187
  <p><strong>Timeline.</strong> <code>build_timeline</code> writes <code>steps.json</code> from the history (and the replayed steps): URL, title, the model's evaluation, memory and next goal, each action with its error, start time (<code>t0</code>) and duration, the part of it spent waiting for the model (<code>model_ms</code>, from wrapping <code>llm.ainvoke</code> and overlapping the calls with the step's <code>step_start_time</code>/<code>step_end_time</code>), and a JPEG of the page (max 1280 wide) under <code>steps/</code>, subject to <code>report.screenshots</code>. Each action on an element carries <code>box</code>: the element's <code>absolute_position</code> from the DOM snapshot the model saw, minus the page's scroll, as fractions of the viewport, so the report can outline it on that step's screenshot. Timeouts, stops, and crashes still write it from the partial history.</p>
182
188
  <p><strong>Diagnostics.</strong> <code>Diagnostics</code> registers <code>Runtime.consoleAPICalled</code>, <code>Runtime.exceptionThrown</code> and <code>Log.entryAdded</code> on the engine library's CDP client (cdp-use allows one handler per event, and the engine library's own watchdogs don't use these three; <code>Network.responseReceived</code> belongs to the downloads watchdog, so failed and slow requests come from the page's resource timing entries, <code>responseStatus</code> and duration, at each sample). It samples at every step start and end and after each replayed step. Each new page (by URL without the hash, up to 25) is checked once: <code>Accessibility.getFullAXTree</code> for unnamed buttons, links, fields and images, heading order and the document title, plus a page script for <code>lang</code>, text contrast (WCAG ratios, skipping text over images) and zoom-blocking viewports, with up to five examples each from <code>DOM.getOuterHTML</code>. A request counts as slow from 3 s. <code>assign_problems</code> attaches each event to the step it happened in (by <code>t0</code>), at most 25 per step; <code>run.json</code> gets the totals as <code>diagnostics</code>, and the pages go to <code>accessibility.json</code>. <code>report.accessibility: false</code> skips the page checks.</p>
@@ -2350,7 +2350,7 @@ other agents, and those are routed.</li>
2350
2350
  <div class="fact"><span class="mono">Ask it</span><ul class="asks"><li>Create an invoice for Contoso in the Billing app and save it as a test</li><li>I'll show you the steps in Billing: record them</li><li>Replay the billing workflow with customer Fabrikam</li><li>Step 4 timed out while the list loaded: fix the workflow</li></ul></div>
2351
2351
  <div class="fact"><span class="mono">What it needs</span><ul class="needs"><li><span class="need opt">Optional</span><span>A live model profile in llms.json (an API key or Microsoft Entra ID sign-in)</span></li><li><span class="need req">Required</span><span>Windows desktop apps: env.yaml (kind: desktop) or desktop.apps in forgeqe.yaml</span></li><li><span class="need input">You give</span><span>a Windows machine, and the app in forgeqe.yaml desktop.apps</span></li></ul></div>
2352
2352
  <div class="fact"><span class="mono">Limits</span><ul class="plainlist"><li>Windows only, one run at a time per desktop</li><li>Apps whose controls UI Automation cannot see (Citrix, some Java and custom-drawn apps) are not supported yet</li></ul></div>
2353
- <div class="fact"><span class="mono">Tools</span><p class="tools"><code>desktop_explore</code> <code>desktop_record</code> <code>desktop_replay</code> <code>desktop_edit_workflow</code></p></div>
2353
+ <div class="fact"><span class="mono">Tools</span><p class="tools"><code>desktop_explore</code> <code>desktop_record</code> <code>desktop_replay</code> <code>desktop_edit_workflow</code> <code>desktop_manage</code></p></div>
2354
2354
  </div>
2355
2355
  <div class="detail"><span class="mono">In detail</span>
2356
2356
  <section class="doc" id="doc-how_to_use-desktop-apps-windows">