@capagents/forgeqe 3.0.9 → 3.1.0

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 (188) hide show
  1. package/HOW_TO_USE.md +1 -1
  2. package/bin/bundle.js +3 -3
  3. package/bin/forgeqe.js +3 -3
  4. package/bin/license.js +1 -1
  5. package/dist/docs-site/CREDITS.md +11 -4
  6. package/dist/docs-site/LICENSE.dm-sans.txt +93 -0
  7. package/dist/docs-site/LICENSE.jetbrains-mono.txt +93 -0
  8. package/dist/docs-site/app-look.css +62 -0
  9. package/dist/docs-site/architecture-map/arch-fill.js +56 -0
  10. package/dist/docs-site/architecture-map/arch-theme.css +203 -0
  11. package/dist/docs-site/architecture-map/arch.css +0 -5
  12. package/dist/docs-site/architecture-map/index.html +57 -43
  13. package/dist/docs-site/docs/app-theme.css +166 -0
  14. package/dist/docs-site/docs/architecture/index.html +14 -11
  15. package/dist/docs-site/docs/containers/index.html +14 -11
  16. package/dist/docs-site/docs/cost-architecture/index.html +14 -11
  17. package/dist/docs-site/docs/custom-agents-first-run/index.html +14 -11
  18. package/dist/docs-site/docs/desktop/index.html +14 -11
  19. package/dist/docs-site/docs/desktop-ci/index.html +14 -11
  20. package/dist/docs-site/docs/docs.css +0 -7
  21. package/dist/docs-site/docs/evidence/index.html +14 -11
  22. package/dist/docs-site/docs/feature-test-prompts/index.html +14 -11
  23. package/dist/docs-site/docs/graphify/index.html +14 -11
  24. package/dist/docs-site/docs/guardrails/index.html +14 -11
  25. package/dist/docs-site/docs/index.html +71 -36
  26. package/dist/docs-site/docs/mobile/index.html +56 -18
  27. package/dist/docs-site/docs/model-routing/index.html +14 -11
  28. package/dist/docs-site/docs/product-graph/index.html +14 -11
  29. package/dist/docs-site/docs/product-knowledge/index.html +14 -11
  30. package/dist/docs-site/docs/product-views/index.html +14 -11
  31. package/dist/docs-site/docs/search.js +1 -1
  32. package/dist/docs-site/docs/web-app/index.html +14 -11
  33. package/dist/docs-site/img/wordmark.webp +0 -0
  34. package/dist/docs-site/site-header.css +0 -5
  35. package/dist/forgeqe.js +1784 -1784
  36. package/dist/template.html +14 -14
  37. package/dist/web/assets/{AgentWork-BhepbEeU.js → AgentWork-C3KdZh5M.js} +1 -1
  38. package/dist/web/assets/ApiTests-BLnl7JGO.js +10 -0
  39. package/dist/web/assets/Browse-C-Enjpmd.js +2 -0
  40. package/dist/web/assets/Chat-Bt6jZI68.js +3 -0
  41. package/dist/web/assets/Choices-D5eTFinz.js +3 -0
  42. package/dist/web/assets/{CommandPalette-DMAmXPq1.js → CommandPalette-D89NM2_E.js} +1 -1
  43. package/dist/web/assets/{Compare-DJNSrM2v.js → Compare-YfFYHwfK.js} +1 -1
  44. package/dist/web/assets/Cost-ClaDz0YR.js +1 -0
  45. package/dist/web/assets/{Data-COFRpcJn.js → Data-jSFgAfej.js} +4 -4
  46. package/dist/web/assets/Desktop-BofKeLVf.js +1 -0
  47. package/dist/web/assets/DesktopReview--WjeZh3w.js +1 -0
  48. package/dist/web/assets/Evidence-CJNzSQpY.js +1 -0
  49. package/dist/web/assets/{Explore-DDXgQj5Q.js → Explore-BdFvqgF4.js} +2 -2
  50. package/dist/web/assets/{Features-BM5iXhOR.js → Features-CIBbw6PG.js} +1 -1
  51. package/dist/web/assets/Flags-B62v4uWR.js +2 -0
  52. package/dist/web/assets/{Flaky-BqUHVLao.js → Flaky-Cut1kZw6.js} +1 -1
  53. package/dist/web/assets/{Impact-CA6s3POt.js → Impact-jOSl5Q0k.js} +3 -3
  54. package/dist/web/assets/{Jobs-B59p1qvn.js → Jobs-DMJGgWtQ.js} +2 -2
  55. package/dist/web/assets/KindPage-BbQWH5wa.js +6 -0
  56. package/dist/web/assets/{Migration-DtynahwR.js → Migration-BBgv7xXo.js} +2 -2
  57. package/dist/web/assets/PageAgent-txbNoP6u.js +1 -0
  58. package/dist/web/assets/{Product-wWMz2Nnk.js → Product-BrXH81Ns.js} +3 -3
  59. package/dist/web/assets/Production-CCVtFNGQ.js +1 -0
  60. package/dist/web/assets/Quality-Dxh-60A8.js +1 -0
  61. package/dist/web/assets/Readiness-DyJvSOLN.js +1 -0
  62. package/dist/web/assets/Record-Dnlkimjb.js +1 -0
  63. package/dist/web/assets/Regression-D2DDTwzs.js +5 -0
  64. package/dist/web/assets/{Reports-C-NSlVAn.js → Reports-ClcY7M0Q.js} +2 -2
  65. package/dist/web/assets/Response-D9FYUvHg.js +9 -0
  66. package/dist/web/assets/RunDiff-CNImaEdz.js +1 -0
  67. package/dist/web/assets/{Runs-DIDCOhbK.js → Runs-CFvmdULI.js} +2 -2
  68. package/dist/web/assets/{Steps-BOWDBzu4.js → Steps-BS66s0E1.js} +1 -1
  69. package/dist/web/assets/TestCases-CrQEUtfD.js +1 -0
  70. package/dist/web/assets/{TestData-kXWCn7uZ.js → TestData-e3IX0xwG.js} +2 -2
  71. package/dist/web/assets/TestDebt-tXPoexMF.js +1 -0
  72. package/dist/web/assets/TestManagement-wjGaoZzI.js +1 -0
  73. package/dist/web/assets/{Tosca-dhFuqYxV.js → Tosca-C5YaMLS0.js} +2 -2
  74. package/dist/web/assets/{WhatsNew-DpJWNec7.js → WhatsNew-CwnRbDnd.js} +1 -1
  75. package/dist/web/assets/azuredevops-BcQ5AFOM.js +1 -0
  76. package/dist/web/assets/crew-CWfjZIxE.js +1 -0
  77. package/dist/web/assets/{fold-BRxvbN9r.js → fold-tvLGnxD1.js} +1 -1
  78. package/dist/web/assets/frame-Deu1IqzV.js +13 -0
  79. package/dist/web/assets/index-BWMIKyPB.js +76 -0
  80. package/dist/web/assets/index-C2Yq55oT.css +2 -0
  81. package/dist/web/assets/logos-C1NBtBMc.js +1 -0
  82. package/dist/web/assets/logos-DFyhMw0i.js +1 -0
  83. package/dist/web/assets/{markdown-CWisJbSJ.js → markdown-DC2HA0yZ.js} +1 -1
  84. package/dist/web/assets/paletteCommands-Qxm5DZIs.js +1 -0
  85. package/dist/web/assets/parts-BR6dUwqn.js +1 -0
  86. package/dist/web/assets/qualityParts-lz6eYVxC.js +1 -0
  87. package/dist/web/assets/today-DuQFapJM.js +1 -0
  88. package/dist/web/assets/when-CHnpLdYw.js +1 -0
  89. package/dist/web/index.html +10 -4
  90. package/docs/ForgeQE-Client-Overview.pdf +0 -0
  91. package/docs/ForgeQE-Installation-Guide.pdf +0 -0
  92. package/docs/MOBILE.md +42 -7
  93. package/docs/user-guide.html +1 -1
  94. package/package.json +1 -1
  95. package/prompts/brain.md +1 -0
  96. package/py/forgeqe_data/connect.py +3 -1
  97. package/py/forgeqe_data/flows.py +1 -1
  98. package/py/forgeqe_data/service.py +1 -1
  99. package/py/forgeqe_data/streams.py +1 -1
  100. package/py/forgeqe_data/testdata.py +1 -1
  101. package/py/forgeqe_desktop/replay.py +43 -1
  102. package/py/forgeqe_desktop/service.py +2 -0
  103. package/py/forgeqe_desktop/workflow.py +77 -15
  104. package/py/forgeqe_engine/brand.py +1 -1
  105. package/py/forgeqe_engine/browser.py +2 -1
  106. package/py/forgeqe_engine/diagnostics.py +1 -1
  107. package/py/forgeqe_engine/memory.py +2 -1
  108. package/py/forgeqe_engine/neutral_log.py +1 -1
  109. package/py/forgeqe_engine/otp.py +127 -12
  110. package/py/forgeqe_engine/pwlaunch.mjs +1 -1
  111. package/py/forgeqe_engine/recordsession.py +13 -3
  112. package/py/forgeqe_engine/webrecord.py +20 -0
  113. package/py/forgeqe_mobile/appium_driver.py +225 -10
  114. package/py/forgeqe_mobile/locators.py +277 -0
  115. package/py/forgeqe_mobile/maestro.py +28 -1
  116. package/py/forgeqe_mobile/magiclink.py +79 -0
  117. package/py/forgeqe_mobile/record.py +284 -67
  118. package/py/forgeqe_mobile/service.py +9 -0
  119. package/py/forgeqe_mobile/webview.py +142 -0
  120. package/py/forgeqe_tosca/ntir.py +45 -6
  121. package/dist/docs-site/LICENSE.ubuntu.txt +0 -96
  122. package/dist/docs-site/img/icons/api.svg +0 -1
  123. package/dist/docs-site/img/icons/architecture.svg +0 -1
  124. package/dist/docs-site/img/icons/branch.svg +0 -1
  125. package/dist/docs-site/img/icons/browser-agent.svg +0 -1
  126. package/dist/docs-site/img/icons/case.svg +0 -1
  127. package/dist/docs-site/img/icons/container.svg +0 -1
  128. package/dist/docs-site/img/icons/context-engine.svg +0 -1
  129. package/dist/docs-site/img/icons/desktop.svg +0 -1
  130. package/dist/docs-site/img/icons/download.svg +0 -1
  131. package/dist/docs-site/img/icons/explorer.svg +0 -1
  132. package/dist/docs-site/img/icons/feature.svg +0 -1
  133. package/dist/docs-site/img/icons/healer.svg +0 -1
  134. package/dist/docs-site/img/icons/knowledge-base.svg +0 -1
  135. package/dist/docs-site/img/icons/mail.svg +0 -1
  136. package/dist/docs-site/img/icons/mobile.svg +0 -1
  137. package/dist/docs-site/img/icons/model.svg +0 -1
  138. package/dist/docs-site/img/icons/network.svg +0 -1
  139. package/dist/docs-site/img/icons/orchestrator.svg +0 -1
  140. package/dist/docs-site/img/icons/plug.svg +0 -1
  141. package/dist/docs-site/img/icons/pr-reviewer.svg +0 -1
  142. package/dist/docs-site/img/icons/replay.svg +0 -1
  143. package/dist/docs-site/img/icons/report.svg +0 -1
  144. package/dist/docs-site/img/icons/result.svg +0 -1
  145. package/dist/docs-site/img/icons/rule.svg +0 -1
  146. package/dist/docs-site/img/icons/scribe.svg +0 -1
  147. package/dist/docs-site/img/icons/shield.svg +0 -1
  148. package/dist/docs-site/img/icons/specs.svg +0 -1
  149. package/dist/docs-site/img/icons/speed.svg +0 -1
  150. package/dist/docs-site/img/icons/stories.svg +0 -1
  151. package/dist/docs-site/img/icons/terminal.svg +0 -1
  152. package/dist/docs-site/img/icons/test-finder.svg +0 -1
  153. package/dist/docs-site/img/icons/visual.svg +0 -1
  154. package/dist/docs-site/img/icons/web.svg +0 -1
  155. package/dist/docs-site/img/icons/wikis.svg +0 -1
  156. package/dist/web/assets/Agent-MlW7cfAm.js +0 -7
  157. package/dist/web/assets/ApiTests-mxUkUZvv.js +0 -10
  158. package/dist/web/assets/Browse-DENLuv4C.js +0 -2
  159. package/dist/web/assets/Chat-jxak1jci.js +0 -3
  160. package/dist/web/assets/Cost-CEOZgbPs.js +0 -1
  161. package/dist/web/assets/Desktop-DGNdy7iS.js +0 -1
  162. package/dist/web/assets/DesktopReview-SdAwvi9y.js +0 -1
  163. package/dist/web/assets/Evidence-DTrdEz3M.js +0 -1
  164. package/dist/web/assets/Flags-CkKp4bbv.js +0 -2
  165. package/dist/web/assets/KindPage-DPADNnwH.js +0 -6
  166. package/dist/web/assets/PageAgent-CB8HtdGd.js +0 -1
  167. package/dist/web/assets/Production-Nst6__N7.js +0 -1
  168. package/dist/web/assets/Quality-DgNo4H0u.js +0 -1
  169. package/dist/web/assets/Readiness--GiTxFZo.js +0 -1
  170. package/dist/web/assets/Record-a4whC1jV.js +0 -1
  171. package/dist/web/assets/Regression-hesOlN4G.js +0 -5
  172. package/dist/web/assets/RelationGraph-C3Re0M1N.js +0 -1
  173. package/dist/web/assets/Response-CzX2rQEZ.js +0 -9
  174. package/dist/web/assets/RunDiff-CIdQD95y.js +0 -1
  175. package/dist/web/assets/TestCases-D-ZRb2N7.js +0 -1
  176. package/dist/web/assets/TestDebt-BvP3w7ye.js +0 -1
  177. package/dist/web/assets/TestManagement-CphGo9DZ.js +0 -1
  178. package/dist/web/assets/agentTabs-BO5l3zw2.js +0 -1
  179. package/dist/web/assets/dataParts-DeUdfjjv.js +0 -3
  180. package/dist/web/assets/diff-D1_Qo2h1.js +0 -2
  181. package/dist/web/assets/frame-VTMu7MoC.js +0 -13
  182. package/dist/web/assets/index-CKRa-K2y.css +0 -2
  183. package/dist/web/assets/index-nuLrB-Rb.js +0 -69
  184. package/dist/web/assets/logos-J6txZkKc.js +0 -1
  185. package/dist/web/assets/paletteCommands-BmYmp6YY.js +0 -1
  186. package/dist/web/assets/parts-CDBCk_Xz.js +0 -1
  187. package/dist/web/assets/qualityParts-CGKSK9Dq.js +0 -1
  188. package/dist/web/assets/rows-yPc39hV7.js +0 -1
@@ -7,4 +7,4 @@ https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(
7
7
  `),[c,l]=(0,Z.useState)(!1),u=!c&&s.length>28,d=u?s.slice(0,Ra).join(`
8
8
  `):e,f=i===`diff`||i===`patch`,p=(0,Z.useMemo)(()=>f?null:Ya(d,i),[d,i,f]);return(0,Q.jsxs)(`figure`,{className:`my-4 overflow-hidden rounded-[12px] border border-line bg-surface-muted`,children:[(0,Q.jsxs)(`figcaption`,{className:`flex min-h-9 items-center gap-2 border-b border-line-soft pr-1 pl-4`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-[13px] text-muted`,children:o||i||`text`}),o&&i&&(0,Q.jsx)(`span`,{className:`font-mono text-[13px] text-muted`,children:i}),(0,Q.jsx)(qa,{text:e,label:`Copy ${o||`the code`}`})]}),(0,Q.jsx)(`pre`,{className:`m-0 overflow-x-auto px-4 py-4 font-mono text-[13px] leading-relaxed`,children:(0,Q.jsx)(`code`,{className:`hljs`,children:f?d.split(`
9
9
  `).map((e,t)=>(0,Q.jsx)(`span`,{className:g(`-mx-4 block px-4`,/^\+(?!\+\+)/.test(e)?`bg-pass-soft text-pass`:/^-(?!--)/.test(e)?`bg-fail-soft text-fail`:/^@@/.test(e)?`text-accent-fg`:``),children:e||` `},t)):p})}),u&&(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>l(!0),"data-tip":`Show all ${s.length} lines`,className:`flex min-h-9 w-full cursor-pointer items-center justify-center gap-2 border-0 border-t border-line-soft bg-transparent text-[13px] font-medium text-ink-2 hover:bg-surface-strong`,children:[(0,Q.jsx)(t,{size:14,"aria-hidden":`true`}),`All (`,s.length,`)`]})]})}var $a=/^(passed|pass|ok|success|succeeded|done|✓|✅|yes)$/i,eo=/^(failed|fail|error|errored|broken|✗|❌|no)$/i,to=/^(skipped|skip|pending|blocked|n\/a|stopped|flaky)$/i;function no({node:e,ctx:n}){let[r,i]=(0,Z.useState)(!1),[a,...o]=e.children,s=e.align||[],c=r?o:o.slice(0,za),l=e.children.map(e=>e.children.map(e=>Ga(e).replace(/\s+/g,` `).trim()).join(` `)).join(`
10
- `),u=(e,t,r,i)=>{let a=Ga(e).trim(),o=r?`th`:`td`,c=!r&&($a.test(a)?`pass`:eo.test(a)?`fail`:to.test(a)?`skip`:``);return(0,Q.jsx)(o,{scope:r?`col`:void 0,className:g(`border-t border-line-soft px-4 py-2 align-top`,r&&`border-t-0 bg-surface-muted text-[13px] font-medium whitespace-nowrap text-ink-2`,s[i]===`right`?`text-right tabular-nums`:s[i]===`center`?`text-center`:`text-left`),children:c?(0,Q.jsx)(`span`,{className:g(`inline-flex min-h-6 items-center rounded-full px-2 text-xs font-medium`,c===`pass`?`bg-pass-soft text-pass`:c===`fail`?`bg-fail-soft text-fail`:`bg-surface-strong text-ink-2`),children:a}):$(e,n)},t)};return(0,Q.jsxs)(`figure`,{className:`my-4`,children:[(0,Q.jsx)(`div`,{className:`overflow-x-auto rounded-[12px] card border`,children:(0,Q.jsxs)(`table`,{className:`min-w-full border-collapse text-sm [overflow-wrap:normal]`,children:[a&&(0,Q.jsx)(`thead`,{className:`bg-surface-strong`,children:(0,Q.jsx)(`tr`,{children:a.children.map((e,t)=>u(e,t,!0,t))})}),(0,Q.jsx)(`tbody`,{children:c.map((e,t)=>(0,Q.jsx)(`tr`,{className:`even:bg-surface-muted/50`,children:e.children.map((e,t)=>u(e,t,!1,t))},t))})]})}),(0,Q.jsxs)(`figcaption`,{className:`mt-1 flex items-center gap-2`,children:[(0,Q.jsxs)(`span`,{className:`flex-1 text-[13px] text-muted`,children:[o.length,` row`,o.length===1?``:`s`]}),o.length>c.length&&(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>i(!0),"data-tip":`Show all ${o.length} rows`,className:`inline-flex min-h-8 cursor-pointer items-center gap-2 rounded-lg border-0 bg-transparent px-2 text-[13px] font-medium text-ink-2 hover:bg-surface-strong`,children:[(0,Q.jsx)(t,{size:14,"aria-hidden":`true`}),`All (`,o.length,`)`]}),(0,Q.jsx)(qa,{text:l,label:`Copy the table, for a spreadsheet`})]})]})}var ro=e=>{try{return new URL(e).host.replace(/^www\./,``)}catch{return``}},io=e=>{try{let t=new URL(e);return`${t.host.replace(/^www\./,``)}${t.pathname.replace(/\/$/,``)}`}catch{return e}};function ao(e){let t=e.trim().replace(/[\\/]+$/,``);return/\.html?$/i.test(t)||!/\.[A-Za-z][A-Za-z0-9]{0,7}$/.test(t.split(/[\\/]/).pop()||``)?`report`:/\.(cs|ts|tsx|js|jsx|mjs|py|java|kt|go|rb|php|feature|spec|robot|cy\.ts|json|ya?ml|xml|csproj|sln|sql|sh|ps1)$/i.test(t)?`code`:`file`}function oo(e,t=3){let n=e.trim().split(/[\\/]/).filter(Boolean);return n.length>t?`…/${n.slice(-t).join(`/`)}`:e.trim()}function so({note:e}){return(0,Q.jsx)(`span`,{role:`status`,className:`mx-1 inline-block max-w-full align-baseline text-[13px] text-muted [overflow-wrap:anywhere]`,children:e})}function co({path:e,children:t,onNote:r}){let[i,a]=(0,Z.useState)(``),[c,u]=(0,Z.useState)(!1),d=async()=>{a(``);let t=await v(e);r?r(t):a(t)},m=ao(e),h=m===`report`?/\.html?$/i.test(e)?l:n:m===`code`?f:s;return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`span`,{className:`group/file mx-1 inline-flex max-w-full items-baseline gap-1 align-baseline`,children:[(0,Q.jsxs)(`button`,{type:`button`,"data-tip":`Open ${e}`,onClick:()=>void d(),className:`inline-flex min-w-0 cursor-pointer items-center gap-1 self-center rounded border-0 bg-transparent p-0 font-mono text-[13px] text-accent-fg underline decoration-accent/30 underline-offset-[3px] hover:decoration-accent`,children:[(0,Q.jsx)(_,{icon:h,size:13,className:`flex-none`}),(0,Q.jsx)(`span`,{className:`truncate`,children:t??oo(e)})]}),(0,Q.jsx)(`button`,{type:`button`,"aria-label":c?`Copied`:`Copy the path ${e}`,"data-tip":c?`Copied`:`Copy the path ${e}`,onClick:async()=>{await Ka(e)&&(u(!0),setTimeout(()=>u(!1),1500))},className:`inline-flex cursor-pointer items-center self-center rounded border-0 bg-transparent p-1 text-muted opacity-40 group-hover/file:opacity-100 hover:bg-surface-strong hover:text-ink focus-visible:opacity-100`,children:c?(0,Q.jsx)(p,{size:12,"aria-hidden":`true`,className:`text-pass`}):(0,Q.jsx)(o,{size:12,"aria-hidden":`true`})})]}),i&&(0,Q.jsx)(so,{note:i})]})}function lo({path:e,alt:t}){let[n,r]=(0,Z.useState)(``),[i,a]=(0,Z.useState)(!1);return(0,Z.useEffect)(()=>{let t=!1;return y.open(e).then(e=>!t&&(e.kind===`image`?r(e.url):a(!0)),()=>!t&&a(!0)),()=>{t=!0}},[e]),i?(0,Q.jsx)(co,{path:e,children:t}):n?(0,Q.jsx)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,"data-tip":`${t}: open full size`,className:`my-2 block w-fit`,children:(0,Q.jsx)(`img`,{src:n,alt:t,className:`block max-h-[360px] max-w-full rounded-[10px] border border-line-soft`})}):(0,Q.jsxs)(`span`,{className:`text-[13px] text-muted`,children:[t,`…`]})}var uo=/(?<![\w/\\.:@~-])((?:[A-Za-z]:)?(?:\.{1,2})?[\\/]?(?:\.?[\w@-][\w@.-]*[\\/])+\.?[\w@-][\w@.-]*\.[A-Za-z][A-Za-z0-9]{0,7})(?![\w\\/-])/g;function fo(e){let t=[],n=0;for(let r of e.matchAll(uo))r.index>n&&t.push(e.slice(n,r.index)),t.push((0,Q.jsx)(co,{path:r[1]},r.index)),n=r.index+r[0].length;return t.length?(n<e.length&&t.push(e.slice(n)),t):e}var po=/^(?:[A-Za-z]:)?[\\/]?(?:[\w@.~-]+[\\/])*\.forgeqe[\\/]reports[\\/][\w.-]+[\\/]?$/,mo=e=>{if(po.test(e.trim()))return!0;uo.lastIndex=0;let t=[...e.trim().matchAll(uo)];return t.length===1&&t[0][0]===e.trim()};function ho({url:e,children:t}){return(0,Q.jsxs)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,className:`inline text-accent-fg underline-offset-2 hover:underline`,"data-tip":e,children:[t,(0,Q.jsx)(c,{size:12,"aria-hidden":`true`,className:`ml-1 inline align-[-1px]`})]})}function go({name:e,refs:t,code:n}){return(0,Q.jsx)(`button`,{type:`button`,onClick:()=>t.open(e),className:g(`cursor-pointer border-0 bg-transparent p-0 font-medium text-accent-fg underline decoration-1 underline-offset-2 hover:text-accent-fg-hover`,n&&`font-mono text-[13px]`),children:e})}function _o(e,t){let n=[...t].filter(Boolean).sort((e,t)=>t.length-e.length);if(!n.length)return[{text:e,ref:!1}];let r=RegExp(`(?<![\\w./-])(${n.map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`)})(?![\\w/-]|\\.\\w)`,`g`),i=[],a=0;for(let t of e.matchAll(r))t.index>a&&i.push({text:e.slice(a,t.index),ref:!1}),i.push({text:t[0],ref:!0}),a=t.index+t[0].length;return a<e.length&&i.push({text:e.slice(a),ref:!1}),i}function $(e,t){return`children`in e?e.children.map((e,n)=>(0,Q.jsx)(Z.Fragment,{children:vo(e,t)},n)):null}function vo(t,n){switch(t.type){case`paragraph`:return(0,Q.jsx)(`p`,{className:g(`my-2`,Ba),children:$(t,n)});case`heading`:{let e=[`text-[25px] tracking-[-0.01em]`,`text-[20px] tracking-[-0.01em]`,`text-[16px]`,`text-[13px] text-muted`,`text-[13px] text-muted`,`text-[13px] text-muted`][t.depth-1],r=`h${Math.min(6,t.depth+2)}`;return(0,Q.jsx)(r,{className:g(`mb-2 font-semibold`,e,Ba,t.depth<=2?`mt-8`:`mt-6`),children:$(t,n)})}case`text`:if(n.refs?.names.length){let e=n.refs;return _o(t.value,e.names).map((t,n)=>(0,Q.jsx)(Z.Fragment,{children:t.ref?(0,Q.jsx)(go,{name:t.text,refs:e}):fo(t.text)},n))}return fo(t.value);case`strong`:return(0,Q.jsx)(`strong`,{className:`font-semibold`,children:$(t,n)});case`emphasis`:return(0,Q.jsx)(`em`,{children:$(t,n)});case`delete`:return(0,Q.jsx)(`del`,{className:`text-muted`,children:$(t,n)});case`inlineCode`:return n.refs?.names.includes(t.value.trim())?(0,Q.jsx)(go,{name:t.value.trim(),refs:n.refs,code:!0}):mo(t.value)?(0,Q.jsx)(co,{path:t.value.trim()}):(0,Q.jsx)(`code`,{className:`rounded-md bg-surface-strong px-2 py-px font-mono text-[13px]`,children:t.value});case`break`:return(0,Q.jsx)(`br`,{});case`thematicBreak`:return(0,Q.jsx)(`hr`,{className:`my-6 border-0 border-t border-line`});case`blockquote`:return(0,Q.jsx)(`blockquote`,{className:g(`my-4 border-0 border-l-[3px] border-solid border-line-strong py-1 pl-4 text-ink-2`,Ba),children:$(t,n)});case`list`:{let e=t.children.some(e=>typeof e.checked==`boolean`),r=t.ordered?`ol`:`ul`;return(0,Q.jsx)(r,{start:t.ordered&&t.start&&t.start!==1?t.start:void 0,className:g(`my-2 pl-6 marker:text-muted [&_ol]:my-1 [&_ol]:pl-6 [&_ul]:my-1 [&_ul]:list-[circle] [&_ul]:pl-6`,Ba,e?`list-none pl-1`:t.ordered?`list-decimal`:`list-disc`),children:$(t,n)})}case`listItem`:{let e=t.children.map((e,r)=>e.type===`paragraph`&&!t.spread?(0,Q.jsx)(Z.Fragment,{children:$(e,n)},r):(0,Q.jsx)(Z.Fragment,{children:vo(e,n)},r));return typeof t.checked==`boolean`?(0,Q.jsxs)(`li`,{className:`my-1 flex items-start gap-2`,children:[t.checked?(0,Q.jsx)(d,{size:16,"aria-label":`Done`,className:`mt-1 flex-none text-pass`}):(0,Q.jsx)(u,{size:16,"aria-label":`Not done`,className:`mt-1 flex-none text-muted`}),(0,Q.jsx)(`span`,{className:g(`min-w-0`,t.checked&&`text-ink-2`),children:e})]}):(0,Q.jsx)(`li`,{className:`my-1 pl-1`,children:e})}case`code`:return(0,Q.jsx)(Qa,{value:t.value,lang:t.lang,meta:t.meta});case`table`:return(0,Q.jsx)(no,{node:t,ctx:n});case`link`:{let e=Ua(t.url),r=$(t,{...n,refs:void 0});if(e===`web`){let e=Ga(t);return(0,Q.jsx)(ho,{url:t.url,children:e===t.url?io(t.url):r})}return e===`mail`?(0,Q.jsx)(`a`,{href:t.url,className:`text-accent-fg underline-offset-2 hover:underline`,children:r}):e===`path`?(0,Q.jsx)(co,{path:t.url,children:Ga(t)===t.url?void 0:r}):(0,Q.jsx)(`span`,{children:r})}case`image`:{let n=Ua(t.url),r=t.alt||`image`;return n===`web`?(0,Q.jsxs)(ho,{url:t.url,children:[(0,Q.jsx)(e,{size:14,"aria-hidden":`true`,className:`mr-1 inline align-[-2px]`}),r,` (`,ro(t.url),`)`]}):n===`path`?(0,Q.jsx)(lo,{path:t.url,alt:r}):(0,Q.jsx)(`span`,{children:r})}case`html`:return(0,Q.jsx)(`span`,{className:`font-mono text-[13px] text-ink-2`,children:t.value});case`footnoteReference`:{let e=n.footnotes.get(t.identifier)??n.footnotes.size+1;return n.footnotes.set(t.identifier,e),(0,Q.jsxs)(`sup`,{className:`text-[13px] text-muted`,children:[`[`,e,`]`]})}case`footnoteDefinition`:return(0,Q.jsxs)(`div`,{className:`my-1 flex gap-2 text-[13px] text-ink-2`,children:[(0,Q.jsxs)(`span`,{className:`text-muted`,children:[`[`,n.footnotes.get(t.identifier)??t.label??t.identifier,`]`]}),(0,Q.jsx)(`div`,{className:`min-w-0 [&>p]:my-0`,children:$(t,n)})]});case`definition`:return null;case`yaml`:return(0,Q.jsx)(Qa,{value:t.value,lang:`yaml`});default:return`children`in t?$(t,n):`value`in t?String(t.value):null}}function yo({text:e,className:t,refs:n}){let r=(0,Z.useMemo)(()=>Wa(e),[e]),i={footnotes:new Map,refs:n};return(0,Q.jsx)(`div`,{className:g(`text-[16px] leading-[1.65] text-ink [overflow-wrap:anywhere] [&>:first-child]:mt-0 [&>:last-child]:mb-0`,Ha,t),children:r.children.map((e,t)=>(0,Q.jsx)(Z.Fragment,{children:vo(e,i)},t))})}export{Ka as a,Va as i,co as n,Ya as o,yo as r,Ua as s,qa as t};
10
+ `),u=(e,t,r,i)=>{let a=Ga(e).trim(),o=r?`th`:`td`,c=!r&&($a.test(a)?`pass`:eo.test(a)?`fail`:to.test(a)?`skip`:``);return(0,Q.jsx)(o,{scope:r?`col`:void 0,className:g(`border-t border-line-soft px-4 py-2 align-top`,r&&`border-t-0 bg-surface-muted text-[13px] font-medium whitespace-nowrap text-ink-2`,s[i]===`right`?`text-right tabular-nums`:s[i]===`center`?`text-center`:`text-left`),children:c?(0,Q.jsx)(`span`,{className:g(`inline-flex min-h-6 items-center rounded-full px-2 text-xs font-medium`,c===`pass`?`bg-pass-soft text-pass`:c===`fail`?`bg-fail-soft text-fail`:`bg-surface-strong text-ink-2`),children:a}):$(e,n)},t)};return(0,Q.jsxs)(`figure`,{className:`my-4`,children:[(0,Q.jsx)(`div`,{className:`overflow-x-auto rounded-[12px] card border`,children:(0,Q.jsxs)(`table`,{className:`min-w-full border-collapse text-sm [overflow-wrap:normal]`,children:[a&&(0,Q.jsx)(`thead`,{className:`bg-surface-strong`,children:(0,Q.jsx)(`tr`,{children:a.children.map((e,t)=>u(e,t,!0,t))})}),(0,Q.jsx)(`tbody`,{children:c.map((e,t)=>(0,Q.jsx)(`tr`,{className:`even:bg-surface-muted/50`,children:e.children.map((e,t)=>u(e,t,!1,t))},t))})]})}),(0,Q.jsxs)(`figcaption`,{className:`mt-1 flex items-center gap-2`,children:[(0,Q.jsxs)(`span`,{className:`flex-1 text-[13px] text-muted`,children:[o.length,` row`,o.length===1?``:`s`]}),o.length>c.length&&(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>i(!0),"data-tip":`Show all ${o.length} rows`,className:`inline-flex min-h-8 cursor-pointer items-center gap-2 rounded-lg border-0 bg-transparent px-2 text-[13px] font-medium text-ink-2 hover:bg-surface-strong`,children:[(0,Q.jsx)(t,{size:14,"aria-hidden":`true`}),`All (`,o.length,`)`]}),(0,Q.jsx)(qa,{text:l,label:`Copy the table, for a spreadsheet`})]})]})}var ro=e=>{try{return new URL(e).host.replace(/^www\./,``)}catch{return``}},io=e=>{try{let t=new URL(e);return`${t.host.replace(/^www\./,``)}${t.pathname.replace(/\/$/,``)}`}catch{return e}};function ao(e){let t=e.trim().replace(/(?<![\\/])[\\/]+$/,``);return/\.html?$/i.test(t)||!/\.[A-Za-z][A-Za-z0-9]{0,7}$/.test(t.split(/[\\/]/).pop()||``)?`report`:/\.(cs|ts|tsx|js|jsx|mjs|py|java|kt|go|rb|php|feature|spec|robot|cy\.ts|json|ya?ml|xml|csproj|sln|sql|sh|ps1)$/i.test(t)?`code`:`file`}function oo(e,t=3){let n=e.trim().split(/[\\/]/).filter(Boolean);return n.length>t?`…/${n.slice(-t).join(`/`)}`:e.trim()}function so({note:e}){return(0,Q.jsx)(`span`,{role:`status`,className:`mx-1 inline-block max-w-full align-baseline text-[13px] text-muted [overflow-wrap:anywhere]`,children:e})}function co({path:e,children:t,onNote:r}){let[i,a]=(0,Z.useState)(``),[c,u]=(0,Z.useState)(!1),d=async()=>{a(``);let t=await v(e);r?r(t):a(t)},m=ao(e),h=m===`report`?/\.html?$/i.test(e)?l:n:m===`code`?f:s;return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`span`,{className:`group/file mx-1 inline-flex max-w-full items-baseline gap-1 align-baseline`,children:[(0,Q.jsxs)(`button`,{type:`button`,"data-tip":`Open ${e}`,onClick:()=>void d(),className:`inline-flex min-w-0 cursor-pointer items-center gap-1 self-center rounded border-0 bg-transparent p-0 font-mono text-[13px] text-accent-fg underline decoration-accent/30 underline-offset-[3px] hover:decoration-accent`,children:[(0,Q.jsx)(_,{icon:h,size:13,className:`flex-none`}),(0,Q.jsx)(`span`,{className:`truncate`,children:t??oo(e)})]}),(0,Q.jsx)(`button`,{type:`button`,"aria-label":c?`Copied`:`Copy the path ${e}`,"data-tip":c?`Copied`:`Copy the path ${e}`,onClick:async()=>{await Ka(e)&&(u(!0),setTimeout(()=>u(!1),1500))},className:`inline-flex cursor-pointer items-center self-center rounded border-0 bg-transparent p-1 text-muted opacity-40 group-hover/file:opacity-100 hover:bg-surface-strong hover:text-ink focus-visible:opacity-100`,children:c?(0,Q.jsx)(p,{size:12,"aria-hidden":`true`,className:`text-pass`}):(0,Q.jsx)(o,{size:12,"aria-hidden":`true`})})]}),i&&(0,Q.jsx)(so,{note:i})]})}function lo({path:e,alt:t}){let[n,r]=(0,Z.useState)(``),[i,a]=(0,Z.useState)(!1);return(0,Z.useEffect)(()=>{let t=!1;return y.open(e).then(e=>!t&&(e.kind===`image`?r(e.url):a(!0)),()=>!t&&a(!0)),()=>{t=!0}},[e]),i?(0,Q.jsx)(co,{path:e,children:t}):n?(0,Q.jsx)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,"data-tip":`${t}: open full size`,className:`my-2 block w-fit`,children:(0,Q.jsx)(`img`,{src:n,alt:t,className:`block max-h-[360px] max-w-full rounded-[10px] border border-line-soft`})}):(0,Q.jsxs)(`span`,{className:`text-[13px] text-muted`,children:[t,`…`]})}var uo=/(?<![\w/\\.:@~-])((?:[A-Za-z]:)?(?:\.{1,2})?[\\/]?(?:\.?[\w@-][\w@.-]*[\\/])+\.?[\w@-][\w@.-]*\.[A-Za-z][A-Za-z0-9]{0,7})(?![\w\\/-])/g;function fo(e){let t=[],n=0;for(let r of e.matchAll(uo))r.index>n&&t.push(e.slice(n,r.index)),t.push((0,Q.jsx)(co,{path:r[1]},r.index)),n=r.index+r[0].length;return t.length?(n<e.length&&t.push(e.slice(n)),t):e}var po=/^(?:[A-Za-z]:)?[\\/]?(?:[\w@.~-]+[\\/])*\.forgeqe[\\/]reports[\\/][\w.-]+[\\/]?$/,mo=e=>{if(po.test(e.trim()))return!0;uo.lastIndex=0;let t=[...e.trim().matchAll(uo)];return t.length===1&&t[0][0]===e.trim()};function ho({url:e,children:t}){return(0,Q.jsxs)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,className:`inline text-accent-fg underline-offset-2 hover:underline`,"data-tip":e,children:[t,(0,Q.jsx)(c,{size:12,"aria-hidden":`true`,className:`ml-1 inline align-[-1px]`})]})}function go({name:e,refs:t,code:n}){return(0,Q.jsx)(`button`,{type:`button`,onClick:()=>t.open(e),className:g(`cursor-pointer border-0 bg-transparent p-0 font-medium text-accent-fg underline decoration-1 underline-offset-2 hover:text-accent-fg-hover`,n&&`font-mono text-[13px]`),children:e})}function _o(e,t){let n=[...t].filter(Boolean).sort((e,t)=>t.length-e.length);if(!n.length)return[{text:e,ref:!1}];let r=RegExp(`(?<![\\w./-])(${n.map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`)})(?![\\w/-]|\\.\\w)`,`g`),i=[],a=0;for(let t of e.matchAll(r))t.index>a&&i.push({text:e.slice(a,t.index),ref:!1}),i.push({text:t[0],ref:!0}),a=t.index+t[0].length;return a<e.length&&i.push({text:e.slice(a),ref:!1}),i}function $(e,t){return`children`in e?e.children.map((e,n)=>(0,Q.jsx)(Z.Fragment,{children:vo(e,t)},n)):null}function vo(t,n){switch(t.type){case`paragraph`:return(0,Q.jsx)(`p`,{className:g(`my-2`,Ba),children:$(t,n)});case`heading`:{let e=[`text-[25px] tracking-[-0.01em]`,`text-[20px] tracking-[-0.01em]`,`text-[16px]`,`text-[13px] text-muted`,`text-[13px] text-muted`,`text-[13px] text-muted`][t.depth-1],r=`h${Math.min(6,t.depth+2)}`;return(0,Q.jsx)(r,{className:g(`mb-2 font-semibold`,e,Ba,t.depth<=2?`mt-8`:`mt-6`),children:$(t,n)})}case`text`:if(n.refs?.names.length){let e=n.refs;return _o(t.value,e.names).map((t,n)=>(0,Q.jsx)(Z.Fragment,{children:t.ref?(0,Q.jsx)(go,{name:t.text,refs:e}):fo(t.text)},n))}return fo(t.value);case`strong`:return(0,Q.jsx)(`strong`,{className:`font-semibold`,children:$(t,n)});case`emphasis`:return(0,Q.jsx)(`em`,{children:$(t,n)});case`delete`:return(0,Q.jsx)(`del`,{className:`text-muted`,children:$(t,n)});case`inlineCode`:return n.refs?.names.includes(t.value.trim())?(0,Q.jsx)(go,{name:t.value.trim(),refs:n.refs,code:!0}):mo(t.value)?(0,Q.jsx)(co,{path:t.value.trim()}):(0,Q.jsx)(`code`,{className:`rounded-md bg-surface-strong px-2 py-px font-mono text-[13px]`,children:t.value});case`break`:return(0,Q.jsx)(`br`,{});case`thematicBreak`:return(0,Q.jsx)(`hr`,{className:`my-6 border-0 border-t border-line`});case`blockquote`:return(0,Q.jsx)(`blockquote`,{className:g(`my-4 border-0 border-l-[3px] border-solid border-line-strong py-1 pl-4 text-ink-2`,Ba),children:$(t,n)});case`list`:{let e=t.children.some(e=>typeof e.checked==`boolean`),r=t.ordered?`ol`:`ul`;return(0,Q.jsx)(r,{start:t.ordered&&t.start&&t.start!==1?t.start:void 0,className:g(`my-2 pl-6 marker:text-muted [&_ol]:my-1 [&_ol]:pl-6 [&_ul]:my-1 [&_ul]:list-[circle] [&_ul]:pl-6`,Ba,e?`list-none pl-1`:t.ordered?`list-decimal`:`list-disc`),children:$(t,n)})}case`listItem`:{let e=t.children.map((e,r)=>e.type===`paragraph`&&!t.spread?(0,Q.jsx)(Z.Fragment,{children:$(e,n)},r):(0,Q.jsx)(Z.Fragment,{children:vo(e,n)},r));return typeof t.checked==`boolean`?(0,Q.jsxs)(`li`,{className:`my-1 flex items-start gap-2`,children:[t.checked?(0,Q.jsx)(d,{size:16,"aria-label":`Done`,className:`mt-1 flex-none text-pass`}):(0,Q.jsx)(u,{size:16,"aria-label":`Not done`,className:`mt-1 flex-none text-muted`}),(0,Q.jsx)(`span`,{className:g(`min-w-0`,t.checked&&`text-ink-2`),children:e})]}):(0,Q.jsx)(`li`,{className:`my-1 pl-1`,children:e})}case`code`:return(0,Q.jsx)(Qa,{value:t.value,lang:t.lang,meta:t.meta});case`table`:return(0,Q.jsx)(no,{node:t,ctx:n});case`link`:{let e=Ua(t.url),r=$(t,{...n,refs:void 0});if(e===`web`){let e=Ga(t);return(0,Q.jsx)(ho,{url:t.url,children:e===t.url?io(t.url):r})}return e===`mail`?(0,Q.jsx)(`a`,{href:t.url,className:`text-accent-fg underline-offset-2 hover:underline`,children:r}):e===`path`?(0,Q.jsx)(co,{path:t.url,children:Ga(t)===t.url?void 0:r}):(0,Q.jsx)(`span`,{children:r})}case`image`:{let n=Ua(t.url),r=t.alt||`image`;return n===`web`?(0,Q.jsxs)(ho,{url:t.url,children:[(0,Q.jsx)(e,{size:14,"aria-hidden":`true`,className:`mr-1 inline align-[-2px]`}),r,` (`,ro(t.url),`)`]}):n===`path`?(0,Q.jsx)(lo,{path:t.url,alt:r}):(0,Q.jsx)(`span`,{children:r})}case`html`:return(0,Q.jsx)(`span`,{className:`font-mono text-[13px] text-ink-2`,children:t.value});case`footnoteReference`:{let e=n.footnotes.get(t.identifier)??n.footnotes.size+1;return n.footnotes.set(t.identifier,e),(0,Q.jsxs)(`sup`,{className:`text-[13px] text-muted`,children:[`[`,e,`]`]})}case`footnoteDefinition`:return(0,Q.jsxs)(`div`,{className:`my-1 flex gap-2 text-[13px] text-ink-2`,children:[(0,Q.jsxs)(`span`,{className:`text-muted`,children:[`[`,n.footnotes.get(t.identifier)??t.label??t.identifier,`]`]}),(0,Q.jsx)(`div`,{className:`min-w-0 [&>p]:my-0`,children:$(t,n)})]});case`definition`:return null;case`yaml`:return(0,Q.jsx)(Qa,{value:t.value,lang:`yaml`});default:return`children`in t?$(t,n):`value`in t?String(t.value):null}}function yo({text:e,className:t,refs:n}){let r=(0,Z.useMemo)(()=>Wa(e),[e]),i={footnotes:new Map,refs:n};return(0,Q.jsx)(`div`,{className:g(`text-[16px] leading-[1.65] text-ink [overflow-wrap:anywhere] [&>:first-child]:mt-0 [&>:last-child]:mb-0`,Ha,t),children:r.children.map((e,t)=>(0,Q.jsx)(Z.Fragment,{children:vo(e,i)},t))})}export{Ka as a,Va as i,co as n,Ya as o,yo as r,Ua as s,qa as t};
@@ -0,0 +1 @@
1
+ import{d as e,p as t}from"./filters-CVzIOjPG.js";import{Dn as n,Fn as r,Zn as i}from"./frame-Deu1IqzV.js";import{n as a,r as o,t as s}from"./index-BWMIKyPB.js";function c(c){let l=e=>s.find(t=>t.id===e)?.label||e;return[...c,...n.map(t=>({id:`agent:${t.id}`,label:r(t.agent).name,meta:`Agent · ${t.short}`,href:e(t),words:t.about,kind:`agent`})),...s.filter(e=>!a.includes(e.id)).map(e=>({id:`settings:${e.id}`,label:e.label,meta:`Settings · ${e.group}`,href:t(`settings`,e.id),words:e.intro,kind:`setting`})),...o.map(e=>({id:`field:${e.section}:${e.key}`,label:e.label,meta:`Settings · ${l(e.section)} · ${e.key}`,href:t(`settings`,e.section),kind:`field`}))].map(e=>({...e,label:i(e.label),words:e.words&&i(e.words)}))}export{c as everyCommand};
@@ -0,0 +1 @@
1
+ import{Nr as e,in as t,w as n}from"./line-icons-C_amZ5-o.js";import{$t as r,V as i}from"./filters-CVzIOjPG.js";var a=r(),o={ok:{label:`Ready to start`,tone:`pass`},limits:{label:`Ready, with limits`,tone:`warn`},blocked:{label:`Not possible`,tone:`fail`}},s={migrated:{label:`Migrated`,tone:`pass`},partial:{label:`Needs review`,tone:`warn`},failed:{label:`Failed`,tone:`fail`},stopped:{label:`Stopped`,tone:`neutral`},running:{label:`Running`,tone:`running`}},c={migrated:{label:`Migrated`,tone:`pass`},written:{label:`Written`,tone:`neutral`},failed:{label:`Failed`,tone:`fail`},blocked:{label:`Not possible`,tone:`warn`},skipped:{label:`Skipped`,tone:`neutral`}},l={setup:`Set-up`,support:`Support`,feature:`Feature`,test:`Test`};function u(e){let t=e.replace(/\.git$/,``).replace(/(?<!\/)\/+$/,``),n=t.split(/[/\\:]/).filter(Boolean);return n.length>=2&&/github|gitlab|bitbucket|dev\.azure|visualstudio/.test(t)?n.slice(-2).join(`/`):n.at(-1)||e}function d(e){let t=Math.max(0,Math.round(e/1e3));if(t<60)return`${t}s`;let n=Math.floor(t/60);return n<60?`${n}m ${t%60}s`:`${Math.floor(n/60)}h ${n%60}m`}var f=e=>e?new Date(e).toLocaleString([],{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`}):`–`;function p({label:e,value:t,sub:n,tone:r,onClick:o,on:s}){let c=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(`span`,{className:`block w-full truncate text-[13px] text-muted`,children:e}),(0,a.jsx)(`span`,{className:i(`text-[20px] leading-tight font-semibold tabular-nums`,r),children:t}),n&&(0,a.jsx)(`span`,{className:`block w-full truncate text-[13px] text-muted`,children:n})]}),l=`flex min-w-0 flex-col items-start gap-1 px-4 py-4 text-left`;return o?(0,a.jsx)(`button`,{type:`button`,"aria-pressed":s,onClick:o,className:i(l,`cursor-pointer border-0 hover:bg-surface-muted`,s?`bg-surface-muted`:`bg-transparent`),children:c}):(0,a.jsx)(`div`,{className:l,children:c})}function m({children:e}){return(0,a.jsx)(`div`,{className:`overflow-hidden border-y border-line-soft`,children:(0,a.jsx)(`div`,{className:`grid grid-cols-2 divide-line-soft @xl:grid-cols-4 @xl:divide-x`,children:e})})}function h({value:e,tone:t=`bg-accent`,label:n}){let r=Math.max(0,Math.min(100,Math.round(e)));return(0,a.jsx)(`div`,{role:`progressbar`,"aria-label":n,"aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,className:`h-1.5 w-full overflow-hidden rounded-full bg-surface-strong`,children:(0,a.jsx)(`div`,{className:i(`h-full rounded-full transition-[width] duration-250 ease-out`,t),style:{width:`${r}%`}})})}function g(e,t){if(!t)return 0;if(t.stages?.review.status===`done`)return 100;let n=e.units.length||1,r=t.stages,i=r?[`validate`,`fix`].filter(e=>r[e].status===`done`||r[e].status===`skipped`).length:0;return Math.min(99,t.units.length/n*85+i*7)}var _={prepare:`Prepare`,setup:`Set up`,migrate:`Migrate`,validate:`Validate`,fix:`Fix`,review:`Review`};function v(e){let t=e?.status||`pending`,n=e?.startedAt&&e?.endedAt?d(Date.parse(e.endedAt)-Date.parse(e.startedAt)):``;return t===`running`?e?.startedAt?`Running · ${d(Date.now()-Date.parse(e.startedAt))}`:`Running`:t===`done`?e?.note||(n?`Done · ${n}`:`Done`):t===`failed`?e?.note||`Did not finish`:t===`skipped`?e?.note||`Skipped`:`Waiting`}function y({ids:r,states:o}){return(0,a.jsx)(`ol`,{"aria-label":`Stages`,className:`m-0 flex w-full min-w-0 list-none items-center gap-1 p-0 @xl:gap-2`,children:r.map((s,c)=>{let l=o?.[s],u=l?.status||`pending`,d=u===`done`||u===`skipped`,f=u===`running`||u===`failed`,p=v(l);return(0,a.jsxs)(`li`,{"data-tip":`${_[s]}: ${p}`,className:i(`relative flex items-center gap-1 @xl:gap-2`,c<r.length-1&&`flex-1`),"aria-current":u===`running`?`step`:void 0,children:[(0,a.jsx)(`span`,{"aria-hidden":`true`,className:i(`inline-flex size-5 flex-none items-center justify-center rounded-full text-[13px] font-semibold tabular-nums @xl:size-6`,d?`bg-pass text-white`:u===`running`?`border-2 border-accent bg-accent-soft text-accent-fg`:u===`failed`?`bg-fail text-white`:`border border-line bg-bg text-muted`),children:d?(0,a.jsx)(n,{size:12,strokeWidth:3}):u===`failed`?(0,a.jsx)(e,{size:12,strokeWidth:3}):u===`running`?(0,a.jsx)(t,{size:12,strokeWidth:2.5,className:`animate-spin`}):c+1}),(0,a.jsxs)(`span`,{className:i(`flex-none text-[13px] whitespace-nowrap`,f?`inline`:`hidden @xl:inline`,u===`running`?`font-medium text-accent-fg`:u===`failed`?`font-medium text-fail`:u===`pending`?`text-muted`:`text-ink`),children:[_[s],f&&(0,a.jsx)(`span`,{className:`ml-2 hidden font-normal text-muted @3xl:inline`,children:p})]}),(0,a.jsxs)(`span`,{className:`sr-only`,children:[_[s],`: `,p]}),c<r.length-1&&(0,a.jsx)(`span`,{"aria-hidden":`true`,className:`h-0.5 min-w-4 flex-1 overflow-hidden rounded-full bg-line @xl:min-w-8`,children:(0,a.jsx)(`span`,{className:i(`block h-full rounded-full bg-pass transition-[width] duration-250 ease-out`,d?`w-full`:`w-0`)})})]},s)})})}export{y as a,o as c,u as d,f,s as i,g as l,l as n,m as o,p as r,c as s,h as t,d as u};
@@ -0,0 +1 @@
1
+ import{E as e,Ht as t,Ir as n,M as r,Nr as i,R as a,_r as o,at as s,o as c,pt as l,vr as u,yr as d,zr as f}from"./line-icons-C_amZ5-o.js";import{$t as p,Pt as m,V as h,a as g,c as _,g as v,p as y,t as b,z as x}from"./filters-CVzIOjPG.js";import{$ as S,Q as C,X as w,Z as T,et as E}from"./frame-Deu1IqzV.js";import{n as D,s as O}from"./markdown-DC2HA0yZ.js";import{t as k}from"./when-CHnpLdYw.js";var A=f(n(),1),j=p(),M=[`critical`,`serious`,`moderate`,`minor`],N={critical:`fail`,serious:`fail`,moderate:`warn`,minor:`neutral`},P=[{key:`lcp`,label:`LCP`,good:2500,poor:4e3,unit:`ms`},{key:`cls`,label:`CLS`,good:.1,poor:.25,unit:``},{key:`inp`,label:`INP`,good:200,poor:500,unit:`ms`},{key:`fcp`,label:`FCP`,good:1800,poor:3e3,unit:`ms`},{key:`ttfb`,label:`TTFB`,good:800,poor:1800,unit:`ms`},{key:`load`,label:`Load`,good:1/0,poor:1/0,unit:`ms`}],F={same:{label:`Same`,tone:`pass`},changed:{label:`Changed`,tone:`warn`},new:{label:`New baseline`,tone:`neutral`},no_baseline:{label:`No baseline`,tone:`neutral`}},I=e=>new Date(e).toLocaleString([],{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`}),L=(e,t)=>t?e>=1e3?`${(e/1e3).toFixed(1)}s`:`${Math.round(e)}ms`:e.toFixed(3).replace(/(?<!0)0+$/,``).replace(/\.$/,``),R=(e,t)=>`${e} ${t}${e===1?``:`s`}`,z=e=>e.replace(/(data:[\w/+.-]+;base64,)[A-Za-z0-9+/=]{24,}/g,`$1…`),B=e=>{try{let t=new URL(e),n=t.pathname===`/`?``:t.pathname.length>44?`${t.pathname.slice(0,20)}…${t.pathname.slice(-20)}`:t.pathname;return`${t.host}${n}${t.search?`?…`:``}`}catch{return e.length>70?`${e.slice(0,68)}…`:e}},V=e=>!!(e.breaches||e.a11y?.failed||e.perf.over||e.visual?.changed);function H({run:t,standard:n,disclaimer:r}){let i=t.report,[a,o]=(0,A.useState)(new Set),[c,l]=(0,A.useState)(`all`),[u,d]=(0,A.useState)(!1);if(!i?.accessibility.pages)return(0,j.jsx)(`p`,{className:`m-0 text-[13px] text-muted`,children:`This run has no accessibility results: report.accessibility was off, or the run visited no page.`});let f=i.accessibility,p=i.breaches.filter(e=>e.kind===`accessibility`),m=f.failed.filter(e=>c===`all`||e.impact===c).sort((e,t)=>M.indexOf(e.impact)-M.indexOf(t.impact)||t.count-e.count),g=e=>{let t=new Set(a);t.has(e)?t.delete(e):t.add(e),o(t)};return(0,j.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,j.jsxs)(`p`,{className:`m-0 text-[13px] text-muted`,children:[n,` with `,i.engine||`axe`,` on `,R(f.pages,`page`),`: `,(0,j.jsxs)(`span`,{className:`text-pass`,children:[R(f.passed.length,`rule`),` passed`]}),`, `,(0,j.jsxs)(`span`,{className:f.failed.length?`text-fail`:``,children:[f.failed.length,` failed`]}),`.`,` `,i.budgets.accessibility?p.length?`${R(p.length,`budget`)} exceeded.`:`Within the budget.`:`No budget set, so nothing here fails the run.`]}),p.map((e,t)=>(0,j.jsxs)(`p`,{className:`m-0 rounded-[8px] bg-fail-soft px-4 py-2 text-[13px] text-fail [overflow-wrap:anywhere]`,children:[`Over budget · `,B(e.page),`: `,e.text]},t)),f.failed.length>0&&(0,j.jsx)(`div`,{className:`flex flex-wrap items-center gap-2`,children:(0,j.jsx)(`div`,{role:`group`,"aria-label":`Impact`,className:`flex flex-wrap gap-1`,children:[`all`,...M].map(e=>{let t=e===`all`?f.failed.length:f.failed.filter(t=>t.impact===e).length;return e!==`all`&&!t?null:(0,j.jsxs)(`button`,{type:`button`,"aria-pressed":c===e,onClick:()=>l(e),className:h(`inline-flex min-h-7 cursor-pointer items-center gap-1 rounded-[6px] border px-2 text-[13px] capitalize`,c===e?`border-accent bg-accent-soft text-ink`:`border-transparent bg-surface-strong text-ink-2 hover:text-ink`),children:[e,` `,(0,j.jsx)(`span`,{className:`tabular-nums opacity-75`,children:t})]},e)})})}),f.failed.length?(0,j.jsx)(w,{label:`Failed rules`,placeholder:`Find a rule, WCAG criterion, page or element`,resetKey:c,empty:`Nothing matches.`,head:(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`th`,{className:h(S,`w-[96px]`),children:`Impact`}),(0,j.jsx)(`th`,{className:S,children:`Rule`}),(0,j.jsx)(`th`,{className:h(S,`hidden @2xl:table-cell`),children:`WCAG`}),(0,j.jsx)(`th`,{className:E,children:`Elements`}),(0,j.jsx)(`th`,{className:E,children:`Pages`})]}),children:m.map(n=>{let r=a.has(n.rule),i=t.examples[n.rule]??[];return(0,j.jsxs)(A.Fragment,{children:[(0,j.jsxs)(`tr`,{onClick:()=>g(n.rule),"aria-expanded":r,className:h(`cursor-pointer border-t border-line-soft align-top hover:bg-surface-muted`,r&&`bg-surface-muted`),children:[(0,j.jsx)(`td`,{className:T,children:(0,j.jsx)(_,{tone:N[n.impact],className:`min-h-5 px-2 text-[13px] capitalize`,children:n.impact})}),(0,j.jsx)(`td`,{className:T,children:(0,j.jsxs)(`span`,{className:`flex items-start gap-1`,children:[(0,j.jsx)(e,{size:13,"aria-hidden":`true`,className:h(`mt-1 flex-none text-muted transition-transform`,!r&&`-rotate-90`)}),(0,j.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,j.jsx)(`span`,{className:`[overflow-wrap:anywhere]`,children:n.help}),(0,j.jsx)(`span`,{className:`font-mono text-[13px] text-muted`,children:n.rule})]})]})}),(0,j.jsx)(`td`,{className:h(T,`hidden whitespace-nowrap text-ink-2 @2xl:table-cell`),children:n.wcag?`${n.wcag}${n.level?` · ${n.level}`:``}`:`–`}),(0,j.jsx)(`td`,{className:C,children:n.count}),(0,j.jsx)(`td`,{className:C,children:n.pages})]}),r&&(0,j.jsxs)(`tr`,{className:`bg-surface-muted`,children:[(0,j.jsx)(`td`,{}),(0,j.jsx)(`td`,{colSpan:4,className:`px-4 py-2`,children:(0,j.jsxs)(`div`,{className:`flex flex-col gap-2 pl-4`,children:[i.length?i.map((e,t)=>(0,j.jsxs)(`div`,{className:`flex flex-col gap-1 rounded-[8px] border border-line-soft bg-bg px-2 py-2`,children:[(0,j.jsxs)(`span`,{className:`flex min-w-0 gap-2 text-[13px] text-muted`,children:[(0,j.jsx)(`span`,{className:`flex-none`,"data-tip":e.page,children:B(e.page)}),e.target&&(0,j.jsxs)(`span`,{className:`min-w-0 truncate font-mono text-[13px]`,"data-tip":e.target,children:[`· `,e.target]})]}),e.html&&(0,j.jsx)(`code`,{className:`line-clamp-3 font-mono text-[13px] break-all text-ink-2`,children:z(e.html)})]},t)):(0,j.jsx)(`span`,{className:`text-[13px] text-muted`,children:`No elements were kept for this rule.`}),n.helpUrl&&O(n.helpUrl)===`web`&&(0,j.jsxs)(`a`,{href:n.helpUrl,target:`_blank`,rel:`noreferrer noopener`,className:`inline-flex items-center gap-1 self-start text-[13px]`,children:[`How to fix it `,(0,j.jsx)(s,{size:12,"aria-hidden":`true`})]})]})})]})]},n.rule)})}):(0,j.jsx)(`p`,{className:`m-0 text-[13px] text-pass`,children:`No rule failed on the pages this run visited.`}),f.passed.length>0&&(0,j.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,j.jsxs)(`button`,{type:`button`,"aria-expanded":u,onClick:()=>d(!u),className:`flex cursor-pointer items-center gap-1 self-start border-0 bg-transparent p-0 text-[13px] font-medium text-ink`,children:[(0,j.jsx)(e,{size:13,"aria-hidden":`true`,className:h(`text-muted transition-transform`,!u&&`-rotate-90`)}),`Rules that passed `,(0,j.jsx)(`span`,{className:`font-normal text-muted tabular-nums`,children:f.passed.length})]}),u&&(0,j.jsx)(`ul`,{className:`m-0 flex list-none flex-wrap gap-1 p-0`,children:f.passed.map(e=>(0,j.jsx)(`li`,{className:`rounded-[6px] bg-pass-soft px-2 py-1 font-mono text-[13px] text-pass`,children:e},e))})]}),(0,j.jsx)(`p`,{className:`m-0 text-[13px] text-muted`,children:r})]})}function U({run:e}){let t=e.report;if(!t?.performance.pages.length)return(0,j.jsx)(`p`,{className:`m-0 text-[13px] text-muted`,children:`This run has no timings: the run visited no page.`});let n=(e,t)=>e>t.poor?`poor`:e>t.good?`needs improvement`:`good`,r={poor:`text-fail`,"needs improvement":`text-warn`,good:`text-pass`},i=t.breaches.filter(e=>e.kind===`performance`);return(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4`,children:[(0,j.jsxs)(`p`,{className:`m-0 text-[13px] text-muted`,children:[`Core Web Vitals of each page, from one visit in the browser the agent drove, against Google's thresholds: `,(0,j.jsx)(`span`,{className:`text-pass`,children:`good`}),`, `,(0,j.jsx)(`span`,{className:`text-warn`,children:`needs improvement`}),`, `,(0,j.jsx)(`span`,{className:`text-fail`,children:`poor`}),`.`,` `,t.budgets.performance?`Pages over quality.budgets.performance are marked.`:`No performance budget set: nothing fails on timings.`]}),i.map((e,t)=>(0,j.jsxs)(`p`,{className:`m-0 rounded-[8px] bg-fail-soft px-4 py-2 text-[13px] text-fail [overflow-wrap:anywhere]`,children:[`Over budget · `,B(e.page),`: `,e.text]},t)),(0,j.jsx)(w,{label:`Timings`,minWidth:720,head:(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`th`,{className:S,children:`Page`}),P.map(e=>(0,j.jsx)(`th`,{className:E,"data-tip":e.label,children:e.label},e.key)),(0,j.jsx)(`th`,{className:E,children:`Requests`}),(0,j.jsx)(`th`,{className:E,children:`Size`})]}),children:t.performance.pages.map((e,t)=>(0,j.jsxs)(`tr`,{className:`border-t border-line-soft align-top`,children:[(0,j.jsxs)(`td`,{className:T,children:[(0,j.jsx)(`span`,{className:`block max-w-[340px] truncate font-mono text-[13px]`,"data-tip":e.url,children:B(e.url)}),e.over.length>0&&(0,j.jsxs)(`span`,{className:`text-[13px] text-fail`,children:[`over: `,e.over.join(`, `)]})]}),P.map(t=>{let i=e[t.key];return(0,j.jsxs)(`td`,{className:h(`px-2 py-2 text-right whitespace-nowrap tabular-nums`,typeof i==`number`&&t.good!==1/0?r[n(i,t)]:typeof i==`number`?`text-ink-2`:`text-muted`),children:[typeof i==`number`?L(i,t.unit):`–`,typeof i==`number`&&t.good!==1/0&&(0,j.jsxs)(`span`,{className:`sr-only`,children:[` (`,n(i,t),`)`]})]},t.key)}),(0,j.jsx)(`td`,{className:h(C,`text-muted`),children:e.requests??`–`}),(0,j.jsx)(`td`,{className:h(C,`text-muted`),children:e.kb===void 0?`–`:`${e.kb} KB`})]},t))}),(0,j.jsxs)(`p`,{className:`m-0 text-[13px] text-muted`,children:[P.filter(e=>e.good!==1/0).map(e=>`${e.label}: good up to ${L(e.good,e.unit)}, poor over ${L(e.poor,e.unit)}`).join(` · `),`. Lab values from one visit, not data from real users.`]})]})}function W({run:e,index:n,which:r,label:i}){let[a,o]=(0,A.useState)(``),[s,c]=(0,A.useState)(!1);return(0,A.useEffect)(()=>{let t=!1;return o(``),c(!1),m.image(e,n,r).then(e=>!t&&o(e),()=>!t&&c(!0)),()=>{t=!0}},[e,n,r]),(0,j.jsxs)(`figure`,{className:`m-0 flex min-w-0 flex-col gap-2`,children:[(0,j.jsx)(`figcaption`,{className:`text-[13px] font-medium text-muted`,children:i}),a?(0,j.jsx)(`img`,{src:a,alt:`${i} of the page`,className:`block h-auto w-full rounded-[10px] border border-line-soft bg-surface-muted`}):(0,j.jsx)(`span`,{className:`flex h-[120px] items-center justify-center gap-2 rounded-[10px] border border-line-soft bg-surface-muted text-[13px] text-muted`,children:s?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(v,{icon:t,size:14}),` Not available`]}):`Loading…`})]})}function G({run:t,budget:n,onChange:a}){let[o,s]=(0,A.useState)(null),[c,u]=(0,A.useState)(``),[d,f]=(0,A.useState)(!1),[p,v]=(0,A.useState)(``),[y,b]=(0,A.useState)(new Set),[D,O]=(0,A.useState)(`all`),k=t.visual?.pages??[],M=k.find(e=>e.status===`changed`)?.index;(0,A.useEffect)(()=>b(M===void 0?new Set:new Set([M])),[t.id,M]);let N=async e=>{f(!0),v(``);try{a(await e()),s(null),u(``)}catch(e){v(e.message)}finally{f(!1)}};if(!t.visual)return t.captured?(0,j.jsxs)(`div`,{className:`flex flex-col items-start gap-2`,children:[(0,j.jsxs)(`p`,{className:`m-0 text-[13px] text-ink-2`,children:[`This run captured `,R(t.captured,`page`),` but they were not compared with the baselines yet.`]}),(0,j.jsxs)(x,{size:`sm`,variant:`primary`,disabled:d,"data-tip":`Compare with the baselines`,onClick:()=>N(()=>m.compare(t.id)),children:[(0,j.jsx)(l,{"aria-hidden":`true`}),`Compare`]}),p&&(0,j.jsx)(`p`,{className:`m-0 text-[13px] text-fail`,children:p})]}):(0,j.jsx)(`p`,{className:`m-0 text-[13px] text-muted`,children:`This run has no visual captures: quality.visual.enabled was off, or the run visited no page.`});let P=k.filter(e=>e.status===`changed`),I=(D===`changed`?P:k).slice().sort((e,t)=>Number(t.status===`changed`)-Number(e.status===`changed`)||(t.diffPercent??0)-(e.diffPercent??0)),L=e=>{let t=new Set(y);t.has(e)?t.delete(e):t.add(e),b(t)};return(0,j.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,j.jsxs)(`p`,{className:`m-0 text-[13px] text-muted`,children:[`Each page captured with animations frozen and masked regions hidden, against its approved baseline. `,n?`A page over quality.budgets.visual fails the run.`:`No visual budget set: a change does not fail the run.`]}),(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsx)(`div`,{role:`group`,"aria-label":`Show`,className:`flex gap-1`,children:[[`all`,`All pages`,k.length],[`changed`,`Changed`,P.length]].map(([e,t,n])=>(0,j.jsxs)(`button`,{type:`button`,"aria-pressed":D===e,onClick:()=>O(e),className:h(`inline-flex min-h-7 cursor-pointer items-center gap-1 rounded-[6px] border px-2 text-[13px]`,D===e?`border-accent bg-accent-soft text-ink`:`border-transparent bg-surface-strong text-ink-2 hover:text-ink`),children:[t,` `,(0,j.jsx)(`span`,{className:`tabular-nums opacity-75`,children:n})]},e))}),(0,j.jsx)(`span`,{className:`flex-1`}),P.length>1&&(0,j.jsxs)(x,{size:`sm`,disabled:d,"data-tip":`Approve all ${P.length} changes`,onClick:()=>s(P.map(e=>e.url)),children:[(0,j.jsx)(r,{"aria-hidden":`true`}),`Approve (`,P.length,`)`]})]}),o&&(0,j.jsxs)(`div`,{role:`alertdialog`,"aria-label":`Approve as baseline`,className:`flex flex-col gap-2 rounded-[10px] border border-accent-line bg-accent-soft p-4 text-[13px]`,children:[(0,j.jsxs)(`span`,{className:`font-medium`,children:[`Make this run's capture the baseline of `,o.length===1?B(o[0]):R(o.length,`page`),`?`]}),(0,j.jsx)(`span`,{className:`text-ink-2`,children:`Later runs are compared with it. Approve only a change that was intended; one that was not is a visual defect.`}),(0,j.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[`Why it changed (kept with the baseline)`,(0,j.jsx)(g,{size:`sm`,value:c,maxLength:300,placeholder:`New checkout banner`,onChange:e=>u(e.target.value),className:`max-w-[480px] bg-bg`})]}),(0,j.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,j.jsxs)(x,{size:`sm`,variant:`primary`,disabled:d,onClick:()=>N(()=>m.approve(t.id,o,c.trim()||void 0)),children:[(0,j.jsx)(r,{"aria-hidden":`true`}),`Approve`]}),(0,j.jsxs)(x,{size:`sm`,onClick:()=>s(null),children:[(0,j.jsx)(i,{"aria-hidden":`true`}),`Cancel`]})]})]}),p&&(0,j.jsx)(`p`,{className:`m-0 text-[13px] text-fail`,children:p}),(0,j.jsx)(w,{label:`Pages against their baselines`,fixed:!0,resetKey:D,empty:`No page changed.`,head:(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`th`,{className:S,children:`Page`}),(0,j.jsx)(`th`,{className:h(S,`hidden w-[110px] @2xl:table-cell`),children:`Size`}),(0,j.jsx)(`th`,{className:h(E,`w-[90px]`),children:`Changed`}),(0,j.jsx)(`th`,{className:h(S,`w-[120px]`),children:`Result`}),(0,j.jsx)(`th`,{className:h(S,`w-[96px]`),children:(0,j.jsx)(`span`,{className:`sr-only`,children:`Approve`})})]}),children:I.map(n=>{let i=y.has(n.index);return(0,j.jsxs)(A.Fragment,{children:[(0,j.jsxs)(`tr`,{onClick:()=>L(n.index),"aria-expanded":i,className:h(`cursor-pointer border-t border-line-soft align-top hover:bg-surface-muted`,i&&`bg-surface-muted`),children:[(0,j.jsx)(`td`,{className:T,children:(0,j.jsxs)(`span`,{className:`flex items-start gap-1`,children:[(0,j.jsx)(e,{size:13,"aria-hidden":`true`,className:h(`mt-1 flex-none text-muted transition-transform`,!i&&`-rotate-90`)}),(0,j.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,j.jsx)(`span`,{className:`truncate`,"data-tip":n.title||n.url,children:n.title||B(n.url)}),(0,j.jsx)(`span`,{className:`truncate font-mono text-[13px] text-muted`,"data-tip":n.url,children:B(n.url)})]})]})}),(0,j.jsxs)(`td`,{className:h(T,`hidden whitespace-nowrap text-muted @2xl:table-cell`),children:[n.size||`–`,n.resized?` · resized ${n.resized}`:``]}),(0,j.jsx)(`td`,{className:h(`py-2 pr-4 text-right whitespace-nowrap tabular-nums`,n.over?`text-fail`:n.status===`changed`?`text-warn`:`text-muted`),children:n.status===`changed`?`${n.diffPercent}%${n.limit===void 0?``:` / ${n.limit}%`}`:`–`}),(0,j.jsx)(`td`,{className:T,children:(0,j.jsx)(_,{tone:n.over?`fail`:F[n.status].tone,className:`min-h-5 px-2 text-[13px]`,children:n.over?`Over budget`:F[n.status].label})}),(0,j.jsx)(`td`,{className:C,onClick:e=>e.stopPropagation(),children:n.status===`changed`&&(0,j.jsx)(x,{variant:`icon`,size:`icon-sm`,disabled:d,"aria-label":`Approve ${B(n.url)}`,"data-tip":`Approve ${B(n.url)}`,onClick:()=>s([n.url]),children:(0,j.jsx)(r,{"aria-hidden":`true`})})})]}),i&&(0,j.jsx)(`tr`,{className:`bg-surface-muted`,children:(0,j.jsx)(`td`,{colSpan:5,className:`px-4 py-2`,children:(0,j.jsxs)(`div`,{className:`grid grid-cols-[repeat(auto-fit,minmax(180px,1fr))] gap-4`,children:[n.images.baseline&&(0,j.jsx)(W,{run:t.id,index:n.index,which:`baseline`,label:`Baseline`}),n.images.current&&(0,j.jsx)(W,{run:t.id,index:n.index,which:`current`,label:`This run`}),n.images.diff&&(0,j.jsx)(W,{run:t.id,index:n.index,which:`diff`,label:`Difference (in red)`})]})})})]},n.index)})})]})}function K({values:e}){if(e.length<2)return null;let t=Math.max(1,...e),n=e.map((n,r)=>`${r/(e.length-1)*96+2},${22-n/t*20}`).join(` `);return(0,j.jsx)(`svg`,{width:`100`,height:`24`,viewBox:`0 0 100 24`,"aria-label":`Violations over the last ${e.length} runs: ${e.join(`, `)}`,role:`img`,className:`flex-none text-muted`,children:(0,j.jsx)(`polyline`,{points:n,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinejoin:`round`})})}function q({icon:e,className:t,lines:n}){return n.length?(0,j.jsxs)(`span`,{className:h(`flex items-start gap-2 text-[13px]`,t),children:[(0,j.jsx)(v,{icon:e,size:14,className:`mt-1 flex-none`}),(0,j.jsx)(`span`,{className:`[overflow-wrap:anywhere]`,children:n.join(` · `)})]}):null}function J({trends:e}){return e.length?(0,j.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:e.map(e=>{let t=e.a11y.latest?M.reduce((t,n)=>t+(e.a11y.latest[n]||0),0):void 0;return(0,j.jsxs)(`li`,{className:`flex flex-col gap-2 border-t border-line-soft py-4 first:border-t-0`,children:[(0,j.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-4`,children:[(0,j.jsx)(`span`,{className:`min-w-0 flex-[1_1_240px] truncate font-mono text-[13px]`,"data-tip":e.page,children:/^https?:/.test(e.page)?B(e.page):e.page}),(0,j.jsx)(K,{values:e.a11y.trail}),(0,j.jsxs)(`span`,{className:`text-[13px] text-muted`,children:[R(e.runs,`run`),t===void 0?``:` · ${R(t,`violation`)} now`]})]}),(0,j.jsx)(q,{icon:u,className:`text-fail`,lines:[...e.perf.worse.map(e=>`slower: ${e}`),...e.a11y.newRules.map(e=>`newly failing: ${e}`)]}),(0,j.jsx)(q,{icon:o,className:`text-pass`,lines:[...e.perf.better.map(e=>`faster: ${e}`),...e.a11y.fixedRules.map(e=>`fixed: ${e}`)]})]},e.page)})}):(0,j.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`No history yet: every browser run adds each page's accessibility and timings to quality-history.json in the reports folder.`})}var Y={accessibility:e=>!!e.a11y?.pages,performance:e=>e.perf.pages>0,visual:e=>!!e.visual||e.captured>0},X={accessibility:e=>!!e.a11y?.failed,performance:e=>e.perf.over>0,visual:e=>!!(e.visual?.changed||e.visual?.over)},Z=(e,t)=>t.filter(Y[e]);function Q({kind:e,runs:t}){let[n,i]=(0,A.useState)(`all`),o=Z(e,t),s=n===`attention`?o.filter(X[e]):o,c=t=>location.hash=y(e,encodeURIComponent(t)),l=`py-2 pr-4 text-right tabular-nums`;return(0,j.jsx)(w,{label:`Runs`,placeholder:`Find a run by what it did`,resetKey:n,empty:`Nothing matches.`,tools:(0,j.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:(0,j.jsx)(b,{items:[{id:`all`,label:`All`,n:o.length},{id:`attention`,label:`Needs a look`,n:o.filter(X[e]).length,alert:!0}],value:n,onChange:i})}),head:(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`th`,{className:h(S,`w-[46%]`),children:`Run`}),e===`accessibility`&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`th`,{className:`px-4 py-2 text-right text-[13px] font-medium whitespace-nowrap text-muted`,children:`Rules failed`}),(0,j.jsx)(`th`,{className:h(`px-4 py-2 text-right text-[13px] font-medium whitespace-nowrap text-muted`,`hidden @2xl:table-cell`),children:`Critical · serious`}),(0,j.jsx)(`th`,{className:h(`px-4 py-2 text-right text-[13px] font-medium whitespace-nowrap text-muted`,`hidden @3xl:table-cell`),children:`Moderate · minor`}),(0,j.jsx)(`th`,{className:h(`px-4 py-2 text-right text-[13px] font-medium whitespace-nowrap text-muted`,`hidden @xl:table-cell`),children:`Pages`})]}),e===`performance`&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`th`,{className:`px-4 py-2 text-right text-[13px] font-medium whitespace-nowrap text-muted`,children:`Over budget`}),(0,j.jsx)(`th`,{className:h(`px-4 py-2 text-right text-[13px] font-medium whitespace-nowrap text-muted`,`hidden @xl:table-cell`),children:`Pages timed`})]}),e===`visual`&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`th`,{className:`px-4 py-2 text-right text-[13px] font-medium whitespace-nowrap text-muted`,children:`Changed`}),(0,j.jsx)(`th`,{className:h(`px-4 py-2 text-right text-[13px] font-medium whitespace-nowrap text-muted`,`hidden @2xl:table-cell`),children:`New`}),(0,j.jsx)(`th`,{className:h(`px-4 py-2 text-right text-[13px] font-medium whitespace-nowrap text-muted`,`hidden @xl:table-cell`),children:`Same`})]}),(0,j.jsx)(`th`,{className:h(S,`hidden @xl:table-cell`),children:`When`})]}),children:s.map(t=>{let n=X[e](t),i=(t.over?.[e]??0)>0,o=i?a:n?d:r,s=i?`text-fail`:n?`text-warn`:`text-pass`,u=i?`Over a budget`:n?`Needs a look`:`Within budgets`;return(0,j.jsxs)(`tr`,{onClick:()=>c(t.id),className:`cursor-pointer border-t border-line-soft hover:bg-surface-muted`,children:[(0,j.jsx)(`td`,{className:h(T,`max-w-0`),children:(0,j.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,j.jsx)(o,{size:15,"aria-label":u,className:h(`flex-none`,s)}),(0,j.jsx)(`a`,{href:y(e,encodeURIComponent(t.id)),onClick:e=>e.stopPropagation(),"data-tip":t.goal,className:`truncate text-ink no-underline hover:underline`,children:t.goal})]})}),e===`accessibility`&&t.a11y&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`td`,{className:h(l,t.a11y.failed?`text-fail`:`text-muted`),children:t.a11y.failed}),(0,j.jsx)(`td`,{className:h(l,`hidden @2xl:table-cell`,t.a11y.critical+t.a11y.serious?`text-fail`:`text-muted`),children:`${t.a11y.critical} · ${t.a11y.serious}`}),(0,j.jsx)(`td`,{className:h(l,`hidden text-muted @3xl:table-cell`),children:`${t.a11y.moderate} · ${t.a11y.minor}`}),(0,j.jsx)(`td`,{className:h(l,`hidden text-muted @xl:table-cell`),children:t.a11y.pages})]}),e===`performance`&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`td`,{className:h(l,t.perf.over?`text-fail`:`text-muted`),children:t.perf.over}),(0,j.jsx)(`td`,{className:h(l,`hidden text-muted @xl:table-cell`),children:t.perf.pages})]}),e===`visual`&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`td`,{className:h(l,t.visual?.changed?`text-warn`:`text-muted`),children:t.visual?t.visual.changed:`not compared`}),(0,j.jsx)(`td`,{className:h(l,`hidden text-muted @2xl:table-cell`),children:t.visual?t.visual.new+t.visual.no_baseline:`–`}),(0,j.jsx)(`td`,{className:h(l,`hidden text-muted @xl:table-cell`),children:t.visual?t.visual.same:`–`})]}),(0,j.jsx)(`td`,{className:h(T,`hidden whitespace-nowrap text-[13px] text-muted @xl:table-cell`),"data-tip":I(t.at),children:k(t.at)})]},t.id)})})}function $({kind:t,id:n,view:r,onChanged:i}){let[a,o]=(0,A.useState)(null),[s,c]=(0,A.useState)(``);(0,A.useEffect)(()=>{let e=!1;return o(null),m.run(n).then(t=>{e||(o(t),c(``))},t=>!e&&c(t.message)),()=>{e=!0}},[n]);let l=(0,j.jsxs)(`a`,{href:y(t),className:`inline-flex items-center gap-1 self-start text-[13px] no-underline`,children:[(0,j.jsx)(e,{size:14,"aria-hidden":`true`,className:`rotate-90`}),`All runs`]});return s||!a?(0,j.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[l,s?(0,j.jsx)(`p`,{className:`m-0 rounded-[10px] bg-fail-soft px-4 py-2 text-[13px] text-fail`,children:s}):(0,j.jsx)(`p`,{className:`m-0 text-[13px] text-muted`,children:`Loading…`})]}):(0,j.jsxs)(`section`,{"aria-labelledby":`run-h`,className:`flex min-w-0 flex-col gap-4`,children:[l,(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,j.jsx)(`h2`,{id:`run-h`,"data-tip":a.goal,className:`m-0 truncate text-[16px] leading-snug font-semibold`,children:a.goal}),(0,j.jsxs)(`span`,{className:`flex flex-wrap items-center gap-x-2 text-[13px] text-muted`,children:[I(a.at),` · `,(0,j.jsx)(D,{path:a.dir}),` · `,(0,j.jsx)(`a`,{href:y(`quality`,encodeURIComponent(a.id)),children:`Everything it measured`})]})]}),t===`accessibility`&&(0,j.jsx)(H,{run:a,standard:r.standard,disclaimer:r.disclaimer}),t===`performance`&&(0,j.jsx)(U,{run:a}),t===`visual`&&(0,j.jsx)(G,{run:a,budget:r.budgets.visual,onChange:e=>{o(e),i()}})]})}function ee({r:e,to:t,line:n}){return(0,j.jsxs)(`div`,{className:`ml-12 flex flex-wrap items-center gap-x-4 gap-y-2 rounded-[14px] card border px-4 py-4`,children:[(0,j.jsxs)(`span`,{className:`flex min-w-0 flex-[1_1_240px] flex-col`,children:[(0,j.jsx)(`span`,{className:`text-[16px] font-medium [overflow-wrap:anywhere]`,children:e.goal}),(0,j.jsx)(`span`,{className:`text-[13px] text-muted`,children:n})]}),(0,j.jsxs)(x,{size:`sm`,variant:`primary`,"data-tip":`Open the run`,onClick:()=>location.hash=t,children:[(0,j.jsx)(c,{"aria-hidden":`true`}),`Open`]})]})}function te({label:e,value:t,sub:n,tone:r}){return(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1 px-4 py-2`,children:[(0,j.jsx)(`span`,{className:`text-[13px] text-muted`,children:e}),(0,j.jsx)(`span`,{className:h(`text-[16px] leading-tight font-semibold tabular-nums`,r),children:t}),n&&(0,j.jsx)(`span`,{className:`truncate text-[13px] text-muted`,children:n})]})}export{I as _,Q as a,ee as c,G as d,L as f,B as g,Z as h,$ as i,J as l,R as m,M as n,te as o,V as p,N as r,U as s,H as t,P as u};
@@ -0,0 +1 @@
1
+ import{An as e,O as t,Rt as n,yr as r}from"./line-icons-C_amZ5-o.js";import{$t as i,V as a,g as o,p as s}from"./filters-CVzIOjPG.js";var c=i(),l={fail:{icon:r,tone:`text-fail`,bar:`bg-fail`},warn:{icon:n,tone:`text-warn`,bar:`bg-warn`},accent:{icon:e,tone:`text-accent-fg`,bar:`bg-accent`}};function u({items:e,title:n,id:r,className:i}){return e?.length?(0,c.jsxs)(`section`,{"aria-labelledby":r,className:a(`flex w-full flex-col gap-2`,i),children:[(0,c.jsx)(`h2`,{id:r,className:`m-0 text-[13px] font-semibold text-muted`,children:n}),(0,c.jsx)(`ul`,{className:`m-0 flex list-none flex-col divide-y divide-line overflow-hidden rounded-[12px] border border-l-0 border-line p-0`,children:e.map(e=>{let n=l[e.tone];return(0,c.jsx)(`li`,{children:(0,c.jsxs)(`a`,{href:e.href,className:`group relative flex min-h-12 items-center gap-4 py-2 pr-4 pl-6 text-ink no-underline hover:bg-surface-muted hover:text-ink`,children:[(0,c.jsx)(`span`,{"aria-hidden":`true`,className:a(`absolute inset-y-0 left-0 w-2`,n.bar)}),(0,c.jsx)(o,{icon:n.icon,size:16,className:a(`flex-none`,n.tone)}),(0,c.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[13px] font-medium`,children:e.label}),(0,c.jsx)(`span`,{className:`hidden flex-none text-[13px] text-muted sm:inline`,children:e.action}),(0,c.jsx)(t,{size:16,"aria-hidden":`true`,className:`flex-none text-muted group-hover:text-ink`})]})},e.id)})})]}):null}var d=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`;function f(e,t,n,r=new Date){let i=new Date(r);i.setHours(0,0,0,0);let a=e=>{let t=Date.parse(e);return Number.isFinite(t)&&t>=i.getTime()};return{failed:(e||[]).filter(e=>e.status===`failed`&&a(e.lastAt||e.startedAt)).length,waiting:(t||[]).filter(e=>e.state===`waiting`).length,jobsFailed:(n||[]).filter(e=>e.enabled&&e.last&&[`failed`,`timed_out`].includes(e.last.status)).length,running:(e||[]).filter(e=>e.status===`running`).length}}function p(e,t,n,r=new Date){let{failed:i,waiting:a,jobsFailed:o,running:c}=f(e,t,n,r),l=[];return i&&l.push({id:`failed`,label:`${d(i,`run`)} failed today`,action:`See what broke`,href:s(`runs`),tone:`fail`,category:`quality`}),a&&l.push({id:`approvals`,label:`${d(a,`request`)} waiting for your approval`,action:`Approve or decline`,href:s(`agents`),tone:`warn`,category:`agents`}),o&&l.push({id:`jobs`,label:`${d(o,`job`)} failed last time`,action:`See the jobs`,href:s(`jobs`),tone:`fail`,category:`agents`}),c&&l.push({id:`running`,label:`${d(c,`run`)} going now`,action:`Watch them`,href:s(`runs`),tone:`accent`,category:`quality`}),l}function m(e){let t=e?.waiting.length||0;return t?[{id:`review`,label:`${d(t,`agent run`)} waiting for review`,action:`Review them`,href:s(`evidence-review`),tone:`warn`,category:`assurance`}]:[]}export{u as i,f as n,p as r,m as t};
@@ -0,0 +1 @@
1
+ function e(e){let t=e?Date.parse(e):NaN;if(Number.isNaN(t))return``;let n=Math.max(0,(Date.now()-t)/1e3);if(n<60)return`just now`;if(n<3600)return`${Math.floor(n/60)} min ago`;if(n<21600)return`${Math.floor(n/3600)} h ago`;let r=new Date(t);return r.toDateString()===new Date().toDateString()?r.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):n<518400?r.toLocaleString([],{weekday:`short`,hour:`2-digit`,minute:`2-digit`}):r.toLocaleDateString([],{day:`numeric`,month:`short`})}function t(e,t=new Date){let n=e?new Date(e):null;if(!n||Number.isNaN(n.getTime()))return`Older`;let r=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime();return n.getTime()>=r?`Today`:n.getTime()>=r-864e5?`Yesterday`:n.getTime()>=r-5184e5?`Earlier this week`:`Older`}export{t as n,e as t};
@@ -5,12 +5,18 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <meta name="referrer" content="no-referrer" />
7
7
  <title>ForgeQE</title>
8
- <script type="module" crossorigin src="/assets/index-nuLrB-Rb.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-BWMIKyPB.js"></script>
9
9
  <link rel="modulepreload" crossorigin href="/assets/line-icons-C_amZ5-o.js">
10
10
  <link rel="modulepreload" crossorigin href="/assets/filters-CVzIOjPG.js">
11
- <link rel="modulepreload" crossorigin href="/assets/frame-VTMu7MoC.js">
12
- <link rel="modulepreload" crossorigin href="/assets/markdown-CWisJbSJ.js">
13
- <link rel="stylesheet" crossorigin href="/assets/index-CKRa-K2y.css">
11
+ <link rel="modulepreload" crossorigin href="/assets/frame-Deu1IqzV.js">
12
+ <link rel="modulepreload" crossorigin href="/assets/crew-CWfjZIxE.js">
13
+ <link rel="modulepreload" crossorigin href="/assets/azuredevops-BcQ5AFOM.js">
14
+ <link rel="modulepreload" crossorigin href="/assets/logos-DFyhMw0i.js">
15
+ <link rel="modulepreload" crossorigin href="/assets/Choices-D5eTFinz.js">
16
+ <link rel="modulepreload" crossorigin href="/assets/today-DuQFapJM.js">
17
+ <link rel="modulepreload" crossorigin href="/assets/markdown-DC2HA0yZ.js">
18
+ <link rel="modulepreload" crossorigin href="/assets/when-CHnpLdYw.js">
19
+ <link rel="stylesheet" crossorigin href="/assets/index-C2Yq55oT.css">
14
20
  </head>
15
21
  <body>
16
22
  <div id="root"></div>
Binary file
package/docs/MOBILE.md CHANGED
@@ -198,7 +198,10 @@ steps:
198
198
  - **Ops:** `launch`, `tap`, `double_tap`, `long_press`, `type`, `expect`, `expect_image`, `swipe` (`direction` up,
199
199
  down, left or right, optionally on a `target`: a finger moving that way, as on a carousel), `scroll` (`direction`:
200
200
  which way the content moves, down to show what is further down; on the screen's scrolling view or a `target`),
201
- `scroll_to` (scrolls until the target is on screen), `drag` (picks up the `target` and drops it on the control
201
+ `scroll_to` (scrolls until the target is on screen), `open_link` (`login: NAME`: the newest magic link that login's
202
+ site sent to its mailbox, opened on the device; Appium only), `set_checked` (`checked: true|false`: a checkbox, switch or
203
+ radio button left on or off, tapped only when it is not so already, then confirmed; `expect` takes `checked` too),
204
+ `drag` (picks up the `target` and drops it on the control
202
205
  `to` names, such as a puzzle piece on its slot; Appium only, as Maestro has no drag onto a control), `back`,
203
206
  `hide_keyboard`, `keys` (`enter`, `back`, `tab`, `delete`, `search`), `wait`, `wait_for`, `close`. Timeouts,
204
207
  retries and `dismiss` work as in desktop workflows. Explore saves a tap on a system dialog (another package's
@@ -207,7 +210,12 @@ steps:
207
210
  - **Targets** use the desktop keys, mapped per platform: `automation_id` is the Android resource-id (with or without the
208
211
  `package:id/` prefix) or the iOS accessibility identifier; `name` is the Android text or content-desc, or the iOS
209
212
  label; `control_type` is the Android class (`android.widget.Button`) or the iOS type (`XCUIElementTypeButton`);
210
- `index` picks one of several matches.
213
+ `index` picks one of several matches. Mobile targets may also have `fallbacks` (up to 4 more targets a replay tries in
214
+ order when the first finds nothing), `within` (`{automation_id}` or `{name}`: the uniquely named parent the control
215
+ is found inside), and `web` (an element of a web page inside the app, by `test_id` with its `attr`, `id`, `name`
216
+ with its `tag`, `label`, `placeholder`, `tag` with `text`, or `text`). None of them is a query: the replay builds each
217
+ (an accessibility id, a UiSelector, an iOS predicate, CSS or XPath) from the plain values, quoting every one.
218
+ `tap`, `double_tap` and `long_press` take `at: [x, y]`, a point inside the target in thousandths of its size.
211
219
 
212
220
  ## Explore
213
221
 
@@ -251,15 +259,39 @@ computer's, or TestMu AI's or BrowserStack's), and the device's screen appears o
251
259
  - **Tap** a control on the screen and it is tapped on the device; a field opens a box to type into it (plain text, or a
252
260
  saved secret by its name). **Check** adds a check of what a control shows now, **Long-press** and **Wait for** do
253
261
  what they say. Under the screen: scroll, swipe, Back, Enter, hide the keyboard, wait.
254
- - Each action is done on the device through the locator ForgeQE records for it (the control's id, its text, and its
255
- place among controls alike), so a step a replay could not find is never kept. A control with neither an id nor a
256
- text is not offered.
262
+ - Each action is done on the device through the locator ForgeQE records for it, so a step a replay could not find is
263
+ never kept. Locators come from the app's own tree (UiAutomator2 on Android, XCUITest on iOS), ranked as Playwright
264
+ ranks a web page's: the resource id or accessibility identifier, the accessibility label, what the control is and
265
+ says, its text (a field's text and text that reads as data last). Only one that matches that control alone on the
266
+ screen is kept; alike rows are found inside their uniquely named parent, a position among them only as the last
267
+ resort; up to three more become fallbacks. Android's own ids (`android:id/button1`) come after the text. The Steps
268
+ list shows each step's locators, the one a replay uses first. A control with neither an id nor a text is not
269
+ offered; **Point** taps a spot where the app draws something with no control (a canvas, a chart), kept inside the
270
+ nearest control that can be found.
271
+ - Scrolls made just before acting on a control become one `scroll_to` it. A tap on a checkbox, switch or radio button
272
+ is a `set_checked`; **Check** on one checks whether it is on.
273
+ - **Open magic link** (under the screen, for a login whose one-time codes come by email: `code: email` with its
274
+ mailbox and its `domains`) reads the newest message since the step before it (the tap that asked for the link) and
275
+ opens its link on the device, as a tap in a mail would: Android's App Link for the app's package, iOS's deep link for
276
+ its bundle. Only an https link to one of the login's sites is taken, never one with a user name. The workflow keeps
277
+ `open_link: {login: NAME}` and a replay reads the mailbox again; the link is never logged, shown or kept, and one
278
+ opened already in the run is not opened again. The app must take its site's links (an App Link or Universal Link);
279
+ the page it opens is often a web page inside the app, read as the next point says. Replay such a workflow on one
280
+ device at a time: devices replaying it together read the same mailbox and would open the same link. Only an https
281
+ link to one of the login's `domains` is taken: an exact host only, or any subdomain of a `https://*.` pattern.
282
+ - A web page inside the app (a WebView: a sign-in, a payment, a verification page) is read as a web page when the
283
+ build lets Appium debug it (Android: `WebView.setWebContentsDebuggingEnabled(true)`; iOS: a debuggable
284
+ `WKWebView`, and on a local Android device Appium's Chromedriver for that WebView): a control there is kept by the
285
+ page's own locators (a test id, an id, a field's name, a label…), with what the screen shows as fallbacks. When the
286
+ page cannot be read, its controls are kept by what the screen shows, and the log says so once.
257
287
  - A permission prompt's answer (Android's permission controller, iOS's own alerts) goes to the workflow's `dismiss`
258
288
  list, so a replay answers it only when asked.
259
289
  - A password field takes only a saved secret (`mobile.secrets`), typed from the environment; the workflow keeps
260
290
  `{{secret:NAME}}`, and the value never reaches the page. Text equal to a secret is saved as its placeholder.
261
- - A tap on a drop-down (an Android `Spinner`) and then on one of its items is one `select` step: the drop-down by its
262
- id and the item by the text it shows (`value`), which a replay picks again, and Maestro does as two taps.
291
+ - A tap on a drop-down and then on one of its items is one `select` step: the drop-down by its id and the item by the
292
+ text it shows (`value`), which a replay picks again, and Maestro does as two taps. A native `Spinner` or iOS pop-up
293
+ button is known by its kind, a custom one by the list it opens (an item of a list in a floating window on Android, of
294
+ a menu on iOS); an iOS picker wheel is chosen by its value ("Choose in").
263
295
  - Stop saves `workflow.yaml`, a picture of each step with the controls it shows, and a report in
264
296
  `.forgeqe/reports/mobile-record-…/`, and opens the workflow's review, as a desktop recording does: change a step's
265
297
  control, add a check by clicking a control on a step's picture, make a typed value test data or a secret
@@ -388,6 +420,9 @@ mobile:
388
420
  | `py/forgeqe_mobile/hyperexecute.py` | Maestro on TestMu: the HyperExecute project and running its CLI |
389
421
  | `py/forgeqe_mobile/explore.py` | The model's action loop on Appium |
390
422
  | `py/forgeqe_mobile/record.py` | Recording by hand: the screen's controls and their locators, the page's commands as steps |
423
+ | `py/forgeqe_mobile/locators.py` | How a recorded control is found again: ranked candidates, unique on the screen, fallbacks |
424
+ | `py/forgeqe_mobile/webview.py` | A web page inside the app: the element at a spot, its web locators, their queries |
425
+ | `py/forgeqe_mobile/magiclink.py` | Magic links: the logins with a mailbox, the newest link read and opened on the device |
391
426
  | `src/mobile/record.ts` | The commands the Record page may send a mobile recording, checked |
392
427
  | `src/mobile/setup.ts` | `forgeqe mobile setup`: the pinned Appium and drivers, finding the SDK and Java, starting Appium here |
393
428
  | `py/forgeqe_mobile/service.py` | `serve`: replay, explore and maestro runs, `run.json` |
@@ -6172,7 +6172,7 @@ forgeqe pr-tests 42 --run --post # and post the results on p
6172
6172
  <div class="fact"><span class="mono">Ask it</span><ul class="asks"><li>Turn the last run's API calls into tests</li><li>Test the API in openapi.yaml</li><li>Write API scenario tests for the order lifecycle</li><li>Import our Postman collection and send its calls</li><li>Add these cURL calls to the shop API</li><li>Heal the API contracts from the latest run</li></ul></div>
6173
6173
  <div class="fact"><span class="mono">What it needs</span><ul class="needs"><li><span class="need opt">Optional</span><span>The coding agent, Quill: a live model profile (or code.model) and the agent runtime, which forgeqe setup installs</span></li></ul></div>
6174
6174
  <div class="fact"><span class="mono">Limits</span><ul class="plainlist"><li>Calls that change data run only when the user allows them, on a test environment, never production; healing never replays them.</li><li>A contract that fails can be a real defect: healing proposes a new version, and a person decides.</li></ul></div>
6175
- <div class="fact"><span class="mono">Tools</span><p class="tools"><code>api_contracts</code> <code>run_api_contracts</code> <code>heal_api_contracts</code> <code>api_scenarios</code> <code>run_api_scenarios</code> <code>write_api_tests</code> <code>api_new_set</code> <code>api_add_calls</code> <code>api_import_collection</code></p></div>
6175
+ <div class="fact"><span class="mono">Tools</span><p class="tools"><code>api_contracts</code> <code>run_api_contracts</code> <code>heal_api_contracts</code> <code>api_scenarios</code> <code>run_api_scenarios</code> <code>write_api_tests</code> <code>api_find_calls</code> <code>api_new_set</code> <code>api_add_calls</code> <code>api_import_collection</code></p></div>
6176
6176
  </div>
6177
6177
  <div class="detail"><span class="mono">In detail</span>
6178
6178
  <section class="doc" id="doc-how_to_use-api-and-contract-tests">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capagents/forgeqe",
3
- "version": "3.0.9",
3
+ "version": "3.1.0",
4
4
  "description": "ForgeQE: a browser agent CLI that runs goals and test cases in local Chrome or Chromium, or BrowserStack and TestMu AI/LambdaTest when configured, and turns passing runs into tests in your repo",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {
package/prompts/brain.md CHANGED
@@ -459,6 +459,7 @@ For REST, GraphQL, SOAP, and gRPC:
459
459
  - When write_api_tests is not in your tools, you MUST add it with use_capabilities (api-testing). You MUST NOT write the tests with your file tools.
460
460
  - When the calls are not in a set yet, make the set first: api_contracts from run for browser runs, or api_new_set and api_add_calls for calls in the code. Then use write_api_tests with that set.
461
461
  - To run API tests that are already in the repository, you MUST use find_tests, then run_tests. You MUST NOT run them with the shell.
462
+ - Before api_new_set or api_add_calls, and whenever a set id is not in the conversation (a conversation picked up again), you MUST look for the API and the call with api_find_calls and reuse what is there. You MUST NOT make a second API or call with the same method and path; when you cannot tell which API is meant, ask the user.
462
463
  - To send API calls found in the repository's code, read the code, then use api_new_set and api_add_calls. To make tests of them, use write_api_tests.
463
464
 
464
465
  ### Monitoring
@@ -135,7 +135,9 @@ def rds_ca() -> str:
135
135
  path = _home() / "data" / "certs" / "rds-global-bundle.pem"
136
136
  if not path.exists():
137
137
  path.parent.mkdir(parents=True, exist_ok=True)
138
- with urllib.request.urlopen(RDS_CA_URL, timeout=30, context=ssl_lib.create_default_context()) as res:
138
+ ctx = ssl_lib.create_default_context() # verified, and never below TLS 1.2 (Python 3.9 still offers 1.0)
139
+ ctx.minimum_version = ssl_lib.TLSVersion.TLSv1_2
140
+ with urllib.request.urlopen(RDS_CA_URL, timeout=30, context=ctx) as res:
139
141
  body = res.read()
140
142
  if b"BEGIN CERTIFICATE" not in body:
141
143
  raise ConnectError("The Amazon RDS CA bundle download did not contain certificates")
@@ -419,7 +419,7 @@ def _naive(v: Any) -> Optional[dt.datetime]:
419
419
  def check(f: Flow, src: Reader, dst: Reader, *, now: Optional[dt.datetime] = None, began: Optional[dt.datetime] = None,
420
420
  mask: Callable[[str], bool] = lambda _: False, log: Callable[[str], None] = lambda _: None) -> Dict[str, Any]:
421
421
  """One flow's checks; ok when nothing is missing, wrong, late or duplicated."""
422
- now = now or dt.datetime.utcnow()
422
+ now = now or dt.datetime.now(dt.timezone.utc).replace(tzinfo=None)
423
423
  began = began or now
424
424
  result: Dict[str, Any] = {"flow": f.name, "from": f.src.label, "to": f.dst.label, "mode": f.mode}
425
425
 
@@ -531,7 +531,7 @@ def handle_flows(req: Mapping[str, Any], events: Events, env: Mapping[str, str])
531
531
  problems[n].append(f"ready.sql does not run on {f.dst.db} (write table names as that database knows them, without the database's name): {_error(err)}")
532
532
  return {"ok": not any(problems.values()), "problems": {n: p for n, p in problems.items() if p}}
533
533
  if op == "flow_check":
534
- began = dt.datetime.utcnow()
534
+ began = dt.datetime.now(dt.timezone.utc).replace(tzinfo=None)
535
535
  results = []
536
536
  for name, f in all_flows.items():
537
537
  problems = flows.check_names(f, catalog(f.src.db), catalog(f.dst.db))
@@ -250,7 +250,7 @@ def _at(value: Any, path: str) -> Any:
250
250
  def _when(v: Any) -> Optional[dt.datetime]:
251
251
  """When a record changed, from an API's JSON: an ISO date and time, or seconds (or milliseconds) since 1970; UTC, naive."""
252
252
  if isinstance(v, (int, float)) and not isinstance(v, bool):
253
- return dt.datetime.utcfromtimestamp(v / 1000 if v > 1e11 else v)
253
+ return dt.datetime.fromtimestamp(v / 1000 if v > 1e11 else v, dt.timezone.utc).replace(tzinfo=None)
254
254
  if isinstance(v, str) and v.strip():
255
255
  try:
256
256
  t = dt.datetime.fromisoformat(v.strip().replace("Z", "+00:00"))
@@ -727,7 +727,7 @@ def write_files(g: Generated, out_dir: Path, fmt: str, *, engine: Any = None, sc
727
727
  r = {k: v for k, v in r.items() if k not in omit.get(t, set())}
728
728
  stmt = insert(table).values(**r).compile(dialect=dialect, compile_kwargs={"literal_binds": True})
729
729
  # The key the database makes is not read back by a script: no RETURNING.
730
- lines.append(re.sub(r"\s+RETURNING\s+[^;]*$", "", str(stmt)) + ";")
730
+ lines.append(re.sub(r"(?<!\s)\s+RETURNING\s+[^;]*$", "", str(stmt)) + ";")
731
731
  path.write_text("\n".join(lines) + "\n", encoding="utf-8")
732
732
  files.append(str(path))
733
733
  return files
@@ -49,6 +49,8 @@ class StepResult:
49
49
  error: str = ""
50
50
  healed_target: Optional[Dict[str, Any]] = None
51
51
  attempts: int = 1
52
+ # Which of the target's locators found its control (mobile): 0 its own, n its n-th fallback, when its own failed.
53
+ found_by: int = 0
52
54
  # Labels of the dialogs dismissed while this step ran.
53
55
  dismissed: List[str] = field(default_factory=list)
54
56
  # A dismiss control found but not clicked, with the reason: told with the step's error, never dropped.
@@ -83,6 +85,10 @@ STALE_RETRIES = 2
83
85
  LAUNCH_SETTLE = 1.5
84
86
 
85
87
 
88
+ # How long a checkbox or switch is given to show its new state after a tap.
89
+ CHECKED_SECONDS = 3.0
90
+
91
+
86
92
  def _label(target: Mapping[str, Any]) -> str:
87
93
  return str(target.get("name") or target.get("automation_id") or "")
88
94
 
@@ -104,6 +110,7 @@ def replay(
104
110
  clock: Callable[[], float] = time.time,
105
111
  keep_open: bool = False,
106
112
  secret_aliases: Optional[Mapping[str, str]] = None,
113
+ open_link: Optional[Callable[[str, float], None]] = None,
107
114
  ) -> ReplayResult:
108
115
  wf = validate(dict(workflow))
109
116
  spec = resolve_app(wf["app"], apps, must_exist=must_exist)
@@ -134,6 +141,9 @@ def replay(
134
141
 
135
142
  runner = _Runner(driver, spec, values, allowed_secret, wf.get("timeout", find_timeout), wf.get("dismiss") or [], sleep, clock, compare_image)
136
143
  runner.mobile = wf["format"] == MOBILE_FORMAT
144
+ runner.open_link = open_link
145
+ if any(s["op"] == "open_link" for s in wf["steps"]) and open_link is None:
146
+ raise WorkflowError("this workflow opens a magic link, and this replay has no mailbox to read it from")
137
147
  retry_ops = MOBILE_RETRY_OPS if runner.mobile else RETRY_OPS
138
148
  default_retries = int(wf.get("retries", 0))
139
149
  result = ReplayResult(ok=True)
@@ -146,6 +156,8 @@ def replay(
146
156
  op = step["op"]
147
157
  res = StepResult(index=i, op=op, ok=True, ms=0)
148
158
  runner.res = res
159
+ # A magic link is the one sent since the step before it started (the step that asked for it).
160
+ runner.prev_started, runner.started = runner.started, started
149
161
  tries = 1 + (int(step.get("retries", default_retries)) if op in retry_ops else 0)
150
162
  error: Optional[Exception] = None
151
163
  attempt = failures = stale = 0
@@ -223,6 +235,9 @@ class _Runner:
223
235
  self.timeout, self.dismiss, self.sleep, self.clock, self.compare_image = timeout, dismiss, sleep, clock, compare_image
224
236
  self.res = StepResult(index=0, op="", ok=True, ms=0)
225
237
  self.mobile = False
238
+ self.open_link: Optional[Callable[[str, float], None]] = None
239
+ self.started: Optional[float] = None
240
+ self.prev_started: Optional[float] = None
226
241
 
227
242
  def dismiss_dialogs(self) -> bool:
228
243
  """Click every ``dismiss`` control that is on screen now; whether any was."""
@@ -253,6 +268,9 @@ class _Runner:
253
268
  started = self.clock()
254
269
  try:
255
270
  control = self.driver.find(target, timeout)
271
+ by = getattr(self.driver, "found_by", 0)
272
+ if isinstance(by, int) and by > 0:
273
+ self.res.found_by = max(self.res.found_by, by)
256
274
  wait_ready = getattr(self.driver, "wait_ready", None)
257
275
  if ready and wait_ready is not None:
258
276
  wait_ready(control, max(0.0, timeout - (self.clock() - started)))
@@ -281,6 +299,10 @@ class _Runner:
281
299
  self.dismiss_dialogs()
282
300
  elif op == "close":
283
301
  driver.close()
302
+ elif op == "open_link":
303
+ if self.open_link is None:
304
+ raise WorkflowError("this replay has no mailbox to read a magic link from")
305
+ self.open_link(step["login"], self.prev_started if self.prev_started is not None else self.started or self.clock())
284
306
  elif op == "wait":
285
307
  self.sleep(float(step["seconds"]))
286
308
  elif op == "keys" and self.mobile:
@@ -302,6 +324,10 @@ class _Runner:
302
324
  driver.scroll(step["direction"], control) # type: ignore[attr-defined]
303
325
  elif op == "scroll_to":
304
326
  self._scroll_to(step, timeout)
327
+ elif op in ("tap", "double_tap", "long_press") and "at" in step:
328
+ # A point inside the control (what the app draws there has no control of its own).
329
+ control = self.find(step["target"], timeout, ready=True)
330
+ driver.tap_point(control, step["at"], double=op == "double_tap", hold=op == "long_press") # type: ignore[attr-defined]
305
331
  elif op in ("tap", "double_tap"):
306
332
  driver.click(self.find(step["target"], timeout, ready=True), double=op == "double_tap")
307
333
  elif op == "long_press":
@@ -311,13 +337,17 @@ class _Runner:
311
337
  elif op == "expect_image":
312
338
  self._expect_image(index, step, timeout)
313
339
  else:
314
- control = self.find(step["target"], timeout, ready=op in ("click", "double_click", "type", "select"))
340
+ control = self.find(step["target"], timeout, ready=op in ("click", "double_click", "type", "select", "set_checked"))
315
341
  if op in ("click", "double_click"):
316
342
  driver.click(control, double=op == "double_click")
317
343
  elif op == "type":
318
344
  driver.type_text(control, fill(step["text"], self.values, self.secret))
319
345
  elif op == "select":
320
346
  driver.select(control, fill(step["value"], self.values, self.secret))
347
+ elif op == "set_checked":
348
+ self._set_checked(control, bool(step["checked"]), timeout)
349
+ elif op == "expect" and "checked" in step and driver.is_checked(control) != bool(step["checked"]): # type: ignore[attr-defined]
350
+ raise AssertionError(f"expected {_label(step['target'])!r} to be {'on' if step['checked'] else 'off'}, it is {'off' if step['checked'] else 'on'}")
321
351
  elif op == "expect" and "text" in step:
322
352
  want = fill(step["text"], self.values, self.secret)
323
353
  got = driver.text_of(control)
@@ -326,6 +356,18 @@ class _Runner:
326
356
  raise AssertionError("the control's text does not contain the expected value (it holds a secret, so it is not shown)")
327
357
  raise AssertionError(f"expected {want!r} in the control's text, found {got!r}")
328
358
 
359
+ def _set_checked(self, control: Any, want: bool, timeout: float) -> None:
360
+ """A checkbox, switch or radio button left ``want``: tapped only when it is not so already, then confirmed."""
361
+ driver = self.driver
362
+ if driver.is_checked(control) == want: # type: ignore[attr-defined]
363
+ return
364
+ driver.click(control)
365
+ deadline = self.clock() + min(timeout, CHECKED_SECONDS)
366
+ while driver.is_checked(control) != want: # type: ignore[attr-defined]
367
+ if self.clock() >= deadline:
368
+ raise AssertionError(f"it was tapped but stayed {'off' if want else 'on'}")
369
+ self.sleep(POLL_SECONDS)
370
+
329
371
  def _scroll_to(self, step: Mapping[str, Any], timeout: float) -> None:
330
372
  """Scroll (default: down the page) until the target is on screen, up to the timeout or MAX_SCROLLS."""
331
373
  direction = step.get("direction", "down")
@@ -76,6 +76,8 @@ def _model(req: Mapping[str, Any], events: Events, model_factory: Optional[Calla
76
76
 
77
77
  def _step_fields(res: Any) -> Dict[str, Any]:
78
78
  out = {"index": res.index, "op": res.op, "ok": res.ok, "ms": res.ms, "error": res.error, "healed_target": res.healed_target}
79
+ if res.found_by:
80
+ out["found_by"] = res.found_by
79
81
  if res.attempts > 1:
80
82
  out["attempts"] = res.attempts
81
83
  if res.dismissed: