literally-aeo 0.2.0 → 0.2.2

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 (272) hide show
  1. package/README.md +29 -1
  2. package/dist/author-tools.js +479 -397
  3. package/dist/cli.mjs +808 -386
  4. package/dist/lib/access/schema.js +6 -6
  5. package/dist/lib/agents/author-schema.js +10 -10
  6. package/dist/lib/agents/author-validation.js +20 -18
  7. package/dist/lib/agents/copy-validation.js +22 -21
  8. package/dist/lib/agents/copywriter-input.js +23 -8
  9. package/dist/lib/agents/facts.js +22 -7
  10. package/dist/lib/agents/narrative-facts.js +20 -2
  11. package/dist/lib/agents/verifier.js +25 -24
  12. package/dist/lib/analysis/domain-classifier.js +19 -20
  13. package/dist/lib/analysis/domain-labels.js +10 -10
  14. package/dist/lib/analysis/progress-schema.js +2 -2
  15. package/dist/lib/analysis/progress.js +18 -19
  16. package/dist/lib/analysis/retrieval.js +20 -3
  17. package/dist/lib/analysis/scoring.js +20 -3
  18. package/dist/lib/analysis/search-analyzer.js +19 -5
  19. package/dist/lib/analysis/sentiment.js +16 -17
  20. package/dist/lib/author/examples.js +11 -11
  21. package/dist/lib/bundle/contracts.js +14 -12
  22. package/dist/lib/bundle/export.js +27 -27
  23. package/dist/lib/bundle/isolation.js +2 -2
  24. package/dist/lib/bundle/journal.js +13 -13
  25. package/dist/lib/bundle/project-journal.js +17 -17
  26. package/dist/lib/bundle/project.js +25 -25
  27. package/dist/lib/bundle/read.js +28 -28
  28. package/dist/lib/bundle/recorder.js +15 -15
  29. package/dist/lib/bundle/redact.js +13 -13
  30. package/dist/lib/bundle/trace-coverage.js +13 -13
  31. package/dist/lib/bundle/verify-integrity.js +15 -15
  32. package/dist/lib/bundle/verify-measurement.js +21 -21
  33. package/dist/lib/bundle/verify-report.js +29 -29
  34. package/dist/lib/bundle/verify.js +37 -37
  35. package/dist/lib/capture-manifest.js +12 -12
  36. package/dist/lib/checks/crawler-access.js +4 -1
  37. package/dist/lib/checks/money-pages.js +13 -0
  38. package/dist/lib/checks/renderability.js +5 -1
  39. package/dist/lib/checks/run-checks.js +21 -18
  40. package/dist/lib/chunks/{chunk-BSRKN6FU.js → chunk-2FOKEIIN.js} +1 -1
  41. package/dist/lib/chunks/{chunk-JXMDOAKA.js → chunk-2KH7LNK7.js} +11 -11
  42. package/dist/lib/chunks/{chunk-D3GE3OCB.js → chunk-3CMPR6ZZ.js} +1 -1
  43. package/dist/lib/chunks/{chunk-TJQ5OPLQ.js → chunk-3OE4UQIB.js} +7 -7
  44. package/dist/lib/chunks/{chunk-Y4OGZ3Q5.js → chunk-46PVVQYR.js} +1 -1
  45. package/dist/lib/chunks/{chunk-OU73OUX4.js → chunk-4GLW3ZRO.js} +67 -7
  46. package/dist/lib/chunks/{chunk-EV4DRS5M.js → chunk-4XIAXX7K.js} +1 -1
  47. package/dist/lib/chunks/{chunk-IBOWGKN7.js → chunk-52F5XYOW.js} +1 -1
  48. package/dist/lib/chunks/{chunk-FFOVLI3U.js → chunk-66T7JC57.js} +12 -10
  49. package/dist/lib/chunks/{chunk-IE7NAL6B.js → chunk-6HMHXSCS.js} +2 -2
  50. package/dist/lib/chunks/chunk-75DMLOQ7.js +127 -0
  51. package/dist/lib/chunks/{chunk-6G25V4CF.js → chunk-7CW6U5WJ.js} +1 -1
  52. package/dist/lib/chunks/{chunk-CUYVHXHI.js → chunk-7DNLRXEY.js} +3 -3
  53. package/dist/lib/chunks/{chunk-622NMXN6.js → chunk-7HM6IZ3L.js} +2 -2
  54. package/dist/lib/chunks/{chunk-F4W5YHDZ.js → chunk-7WO3FFPS.js} +2 -2
  55. package/dist/lib/chunks/{chunk-ULRXHSJL.js → chunk-7YDXD4MD.js} +9 -6
  56. package/dist/lib/chunks/{chunk-UEMZYHYJ.js → chunk-7YZPEX3T.js} +2 -2
  57. package/dist/lib/chunks/{chunk-OBXAHX3L.js → chunk-AASWJR7Q.js} +1 -5
  58. package/dist/lib/chunks/{chunk-NCXSNHXX.js → chunk-AJO7XVXK.js} +12 -12
  59. package/dist/lib/chunks/{chunk-2GU6CNQI.js → chunk-AT3XMGES.js} +5 -5
  60. package/dist/lib/chunks/{chunk-MNWO7EHC.js → chunk-BFWK3TBN.js} +2 -2
  61. package/dist/lib/chunks/{chunk-BGOIPHJZ.js → chunk-BGAHZIL3.js} +18 -12
  62. package/dist/lib/chunks/{chunk-ZCOI3HE2.js → chunk-BRENK356.js} +1 -1
  63. package/dist/lib/chunks/{chunk-KJMU5KH4.js → chunk-BXF4OC74.js} +18 -9
  64. package/dist/lib/chunks/{chunk-5JPYM4MD.js → chunk-BYHXNFWN.js} +1 -1
  65. package/dist/lib/chunks/{chunk-NCLFZOZU.js → chunk-CH7OCYDL.js} +1 -1
  66. package/dist/lib/chunks/{chunk-OKL7GN2F.js → chunk-DL6YQDTE.js} +31 -5
  67. package/dist/lib/chunks/{chunk-PDS5KWO3.js → chunk-E2YTTB6Q.js} +56 -42
  68. package/dist/lib/chunks/{chunk-SDWYZM64.js → chunk-EDQTINTL.js} +5 -1
  69. package/dist/lib/chunks/{chunk-4PD65FRJ.js → chunk-EOO5RBUW.js} +3 -3
  70. package/dist/lib/chunks/chunk-ESEMYWUH.js +257 -0
  71. package/dist/lib/chunks/{chunk-YHS5IEVZ.js → chunk-F2NSJ6PG.js} +12 -8
  72. package/dist/lib/chunks/{chunk-BLKLPUYR.js → chunk-F7DBTXKG.js} +6 -6
  73. package/dist/lib/chunks/{chunk-EE26FNSY.js → chunk-FDM2YNQL.js} +1 -1
  74. package/dist/lib/chunks/{chunk-RJ5R6YYA.js → chunk-FJL2V6P5.js} +6 -6
  75. package/dist/lib/chunks/chunk-FK2JQHAX.js +30 -0
  76. package/dist/lib/chunks/{chunk-QHUDJVPJ.js → chunk-GLUGYZQO.js} +7 -7
  77. package/dist/lib/chunks/{chunk-GNMFJ2OK.js → chunk-HCUJ2J7P.js} +8 -8
  78. package/dist/lib/chunks/{chunk-2ROXN2EC.js → chunk-HGGOGCPX.js} +10 -10
  79. package/dist/lib/chunks/{chunk-VPZQGND4.js → chunk-HGGRPOSA.js} +3 -3
  80. package/dist/lib/chunks/{chunk-EJ655TVU.js → chunk-I3UE52ZV.js} +2 -2
  81. package/dist/lib/chunks/{chunk-ML4W6KC6.js → chunk-J5NPHPXY.js} +5 -4
  82. package/dist/lib/chunks/{chunk-HFRAHG5C.js → chunk-J7QKT5E7.js} +17 -17
  83. package/dist/lib/chunks/{chunk-V7OAPKNF.js → chunk-JBOOD6MU.js} +10 -9
  84. package/dist/lib/chunks/{chunk-YAAUWCJ4.js → chunk-JKPBXPCW.js} +3 -3
  85. package/dist/lib/chunks/{chunk-5HT55QYX.js → chunk-JQDQVG3D.js} +1 -1
  86. package/dist/lib/chunks/{chunk-GESHTTSA.js → chunk-JYCVBFH5.js} +2 -2
  87. package/dist/lib/chunks/{chunk-W2VGLWTS.js → chunk-K2FZFESR.js} +10 -10
  88. package/dist/lib/chunks/{chunk-DC6PN7QJ.js → chunk-K4Y5NT4M.js} +11 -7
  89. package/dist/lib/chunks/chunk-K7YFL5KB.js +182 -0
  90. package/dist/lib/chunks/{chunk-EBUQPCKB.js → chunk-KFAT65P7.js} +1 -1
  91. package/dist/lib/chunks/{chunk-ZYSPTOKK.js → chunk-KQCRJIEG.js} +1 -1
  92. package/dist/lib/chunks/{chunk-R6XDZWUL.js → chunk-LR27H2HZ.js} +11 -11
  93. package/dist/lib/chunks/{chunk-FUAUPNRO.js → chunk-LTCDLURT.js} +7 -7
  94. package/dist/lib/chunks/{chunk-KZR25REO.js → chunk-LTI2YYU3.js} +1 -1
  95. package/dist/lib/chunks/{chunk-EPQHVILQ.js → chunk-MA27TFEY.js} +5 -3
  96. package/dist/lib/chunks/{chunk-UZJSTJFP.js → chunk-MENTBQGB.js} +6 -5
  97. package/dist/lib/chunks/chunk-MPJCZN4G.js +155 -0
  98. package/dist/lib/chunks/{chunk-BE4ENGUY.js → chunk-OOLWU667.js} +6 -6
  99. package/dist/lib/chunks/{chunk-QSJ4IKUF.js → chunk-PIF3GL62.js} +5 -5
  100. package/dist/lib/chunks/{chunk-W5X7WJYL.js → chunk-PIFTG6YW.js} +3 -3
  101. package/dist/lib/chunks/{chunk-YRBIC5QH.js → chunk-PKNODC6Y.js} +1 -1
  102. package/dist/lib/chunks/{chunk-SHUMCKCS.js → chunk-PWOYEIPF.js} +4 -4
  103. package/dist/lib/chunks/{chunk-RR46EDDR.js → chunk-QD3JXA3Y.js} +25 -25
  104. package/dist/lib/chunks/{chunk-7ZOJE6BH.js → chunk-QGZ4QSUE.js} +8 -7
  105. package/dist/lib/chunks/{chunk-D2INDP5W.js → chunk-R5UPOEWE.js} +9 -8
  106. package/dist/lib/chunks/{chunk-VKM6MMA4.js → chunk-RIJERFGU.js} +34 -3
  107. package/dist/lib/chunks/{chunk-5B3RNVZ6.js → chunk-RK57YZKM.js} +1 -1
  108. package/dist/lib/chunks/{chunk-GDKGZQ3T.js → chunk-RXSHKWZJ.js} +3 -3
  109. package/dist/lib/chunks/{chunk-NGHAP2P5.js → chunk-S6QOXJAL.js} +4 -4
  110. package/dist/lib/chunks/{chunk-6GHHNPFJ.js → chunk-SIJOQRRK.js} +1 -1
  111. package/dist/lib/chunks/{chunk-663HABKP.js → chunk-T6XZQOXS.js} +8 -8
  112. package/dist/lib/chunks/{chunk-EYKINDNK.js → chunk-TAPVCSCR.js} +1 -1
  113. package/dist/lib/chunks/{chunk-ISN6MBNB.js → chunk-U5USH2HB.js} +7 -7
  114. package/dist/lib/chunks/{chunk-MRL5RUP7.js → chunk-U6BW6LGX.js} +10 -3
  115. package/dist/lib/chunks/{chunk-L7MEIRJB.js → chunk-UNCUG2YS.js} +15 -6
  116. package/dist/lib/chunks/{chunk-3JO5TXBA.js → chunk-UYDQXXDQ.js} +4 -4
  117. package/dist/lib/chunks/{chunk-LOBXOZ2R.js → chunk-V5JJEEBT.js} +1 -1
  118. package/dist/lib/chunks/{chunk-XR44YSHT.js → chunk-VHKHYAC5.js} +30 -9
  119. package/dist/lib/chunks/{chunk-Z7V63UZA.js → chunk-VXDMOB7O.js} +4 -4
  120. package/dist/lib/chunks/{chunk-G62E525I.js → chunk-VXYQWE45.js} +2 -2
  121. package/dist/lib/chunks/{chunk-W5DC23OP.js → chunk-WCLKIPJV.js} +1 -1
  122. package/dist/lib/chunks/{chunk-7XO3SQAX.js → chunk-WDT2Y7D7.js} +1 -1
  123. package/dist/lib/chunks/{chunk-OVUCZLH2.js → chunk-WIBMVNIH.js} +2 -2
  124. package/dist/lib/chunks/{chunk-5T3V6XJS.js → chunk-WNIXDMJL.js} +1 -1
  125. package/dist/lib/chunks/{chunk-HTOD4W4E.js → chunk-WZGI7UVM.js} +2 -2
  126. package/dist/lib/chunks/{chunk-HQG63ZKO.js → chunk-XA27KAUV.js} +17 -17
  127. package/dist/lib/chunks/{chunk-I3XGRGXE.js → chunk-XAN4CRFP.js} +33 -41
  128. package/dist/lib/chunks/{chunk-AYY4MYTW.js → chunk-XFUYEFQP.js} +1 -1
  129. package/dist/lib/chunks/{chunk-FOCJ7HPC.js → chunk-XSER7WEB.js} +11 -11
  130. package/dist/lib/chunks/{chunk-WVACVWBL.js → chunk-YEUCAPKP.js} +6 -4
  131. package/dist/lib/chunks/{chunk-7Z27HQWL.js → chunk-YGLWQFKL.js} +3 -3
  132. package/dist/lib/chunks/{chunk-D7GEQVLL.js → chunk-YKJHFD64.js} +1 -1
  133. package/dist/lib/chunks/{chunk-OQU5IXAJ.js → chunk-ZOGIJGU3.js} +10 -10
  134. package/dist/lib/chunks/{chunk-5ZITQDVE.js → chunk-ZQ3ER7JD.js} +12 -13
  135. package/dist/lib/cli/bundle-commands.js +91 -88
  136. package/dist/lib/cli/run-commands.js +110 -105
  137. package/dist/lib/cli/status-command.js +77 -74
  138. package/dist/lib/codex-workflow/aggregate.js +21 -22
  139. package/dist/lib/codex-workflow/author-search.js +4 -3
  140. package/dist/lib/codex-workflow/author-tools.js +17 -15
  141. package/dist/lib/codex-workflow/author.js +38 -34
  142. package/dist/lib/codex-workflow/capture.js +25 -25
  143. package/dist/lib/codex-workflow/checkpoint.js +13 -13
  144. package/dist/lib/codex-workflow/checks.js +15 -16
  145. package/dist/lib/codex-workflow/copy-editor.js +31 -30
  146. package/dist/lib/codex-workflow/copy-recovery.js +11 -11
  147. package/dist/lib/codex-workflow/copy.js +28 -27
  148. package/dist/lib/codex-workflow/finish.js +34 -34
  149. package/dist/lib/codex-workflow/loop.js +65 -62
  150. package/dist/lib/codex-workflow/quality.js +11 -11
  151. package/dist/lib/codex-workflow/run-inputs.js +12 -12
  152. package/dist/lib/codex-workflow/run-source.js +26 -23
  153. package/dist/lib/codex-workflow/schemas.js +11 -11
  154. package/dist/lib/codex-workflow/session.js +14 -14
  155. package/dist/lib/codex-workflow/stage.js +45 -41
  156. package/dist/lib/codex-workflow/workdir.js +13 -13
  157. package/dist/lib/engine/audit-file.js +16 -11
  158. package/dist/lib/engine/author.js +53 -49
  159. package/dist/lib/engine/cost-estimate.js +18 -16
  160. package/dist/lib/engine/local-run.js +76 -73
  161. package/dist/lib/engine/preflight.js +12 -12
  162. package/dist/lib/engine/rejudge.js +82 -79
  163. package/dist/lib/engine/run-status.js +77 -74
  164. package/dist/lib/engine/templates.js +17 -12
  165. package/dist/lib/grounding/chromium-guard.js +13 -0
  166. package/dist/lib/grounding/controller.js +11 -10
  167. package/dist/lib/grounding/extract.js +10 -9
  168. package/dist/lib/grounding/fetch.js +4 -7
  169. package/dist/lib/grounding/file-store.js +5 -5
  170. package/dist/lib/grounding/grounding-runtime.js +32 -31
  171. package/dist/lib/grounding/guarded-request.js +18 -0
  172. package/dist/lib/grounding/model.js +9 -8
  173. package/dist/lib/grounding/profile.js +4 -4
  174. package/dist/lib/grounding/recorded-tools.js +16 -16
  175. package/dist/lib/grounding/session.js +3 -3
  176. package/dist/lib/grounding/tools.js +4 -3
  177. package/dist/lib/grounding/validation.js +2 -2
  178. package/dist/lib/harness/report/artifacts.js +11 -11
  179. package/dist/lib/harness/report/capture-coverage.js +4 -4
  180. package/dist/lib/lib/checkpoint.js +10 -10
  181. package/dist/lib/lib/progress-comparison.js +2 -2
  182. package/dist/lib/models/batching.js +3 -3
  183. package/dist/lib/models/structured.js +2 -2
  184. package/dist/lib/models/supported-models.js +1 -1
  185. package/dist/lib/pipeline.js +20 -21
  186. package/dist/lib/probes/agent-clis.js +10 -10
  187. package/dist/lib/probes/probes.js +12 -12
  188. package/dist/lib/probes/web-tool-guard.js +3 -3
  189. package/dist/lib/report/contracts.js +4 -4
  190. package/dist/lib/report/core/progress-comparison.js +2 -2
  191. package/dist/lib/report/core/progress-schema.js +2 -2
  192. package/dist/lib/report/core/schema.js +2 -4
  193. package/dist/lib/report/core/surfaces.js +1 -3
  194. package/dist/lib/runner.js +23 -24
  195. package/dist/lib/schema.js +19 -13
  196. package/dist/lib/section-result.js +14 -15
  197. package/dist/lib/stores/artifacts.js +17 -17
  198. package/dist/lib/stores/files.js +31 -31
  199. package/dist/lib/stores/local-versions.js +10 -10
  200. package/dist/lib/stores/memory.js +33 -33
  201. package/dist/lib/stores/publication.js +23 -22
  202. package/dist/lib/surfaces.js +1 -3
  203. package/dist/lib/viewer/server.js +38 -38
  204. package/dist/lib/workflow/schema.js +8 -8
  205. package/dist/types/agents/author-schema.d.ts +3 -3
  206. package/dist/types/analysis/scoring.d.ts +2 -2
  207. package/dist/types/bundle/contracts.d.ts +3 -2
  208. package/dist/types/checks/crawler-access.d.ts +3 -2
  209. package/dist/types/checks/money-pages.d.ts +19 -0
  210. package/dist/types/checks/renderability.d.ts +8 -1
  211. package/dist/types/codex-workflow/author-tools.d.ts +3 -3
  212. package/dist/types/codex-workflow/run-inputs.d.ts +3 -0
  213. package/dist/types/codex-workflow/schemas.d.ts +6 -6
  214. package/dist/types/engine/audit-file.d.ts +6 -1
  215. package/dist/types/engine/preflight.d.ts +2 -0
  216. package/dist/types/grounding/chromium-guard.d.ts +41 -0
  217. package/dist/types/grounding/fetch.d.ts +0 -10
  218. package/dist/types/grounding/guarded-request.d.ts +76 -0
  219. package/dist/types/harness/report/artifacts.d.ts +1 -0
  220. package/dist/types/lib/checkpoint.d.ts +5 -6
  221. package/dist/types/pipeline.d.ts +2 -1
  222. package/dist/types/probes/probes.d.ts +2 -1
  223. package/dist/types/report/contracts.d.ts +2 -0
  224. package/dist/types/report/core/schema.d.ts +3 -1
  225. package/dist/types/report/core/surfaces.d.ts +0 -1
  226. package/dist/types/schema.d.ts +22 -0
  227. package/dist/types/section-result.d.ts +1 -1
  228. package/package.json +1 -1
  229. package/resources/guide/OPERATOR.md +12 -3
  230. package/src/agents/author-schema.ts +13 -1
  231. package/src/agents/author-validation.ts +24 -6
  232. package/src/agents/facts.ts +8 -8
  233. package/src/agents/narrative-facts.ts +9 -20
  234. package/src/agents/verifier.ts +2 -2
  235. package/src/analysis/progress.ts +1 -0
  236. package/src/analysis/scoring.ts +9 -13
  237. package/src/bundle/contracts.ts +7 -2
  238. package/src/bundle/verify.ts +3 -3
  239. package/src/capture-manifest.ts +4 -0
  240. package/src/checks/crawler-access.ts +70 -50
  241. package/src/checks/money-pages.ts +48 -0
  242. package/src/checks/renderability.ts +113 -87
  243. package/src/checks/run-checks.ts +16 -3
  244. package/src/cli/run-commands.ts +2 -0
  245. package/src/codex-workflow/aggregate.ts +1 -0
  246. package/src/codex-workflow/author-tools.ts +39 -60
  247. package/src/codex-workflow/capture.ts +1 -0
  248. package/src/codex-workflow/copy-editor.ts +3 -3
  249. package/src/codex-workflow/loop.ts +2 -2
  250. package/src/engine/audit-file.ts +79 -2
  251. package/src/engine/guide/OPERATOR.md +12 -3
  252. package/src/engine/preflight.ts +50 -0
  253. package/src/grounding/chromium-guard.ts +273 -0
  254. package/src/grounding/controller.ts +1 -1
  255. package/src/grounding/fetch.ts +39 -276
  256. package/src/grounding/guarded-request.ts +428 -0
  257. package/src/grounding/tools.ts +2 -1
  258. package/src/grounding/validation.ts +1 -1
  259. package/src/lib/checkpoint.ts +15 -16
  260. package/src/models/supported-models.ts +3 -3
  261. package/src/pipeline.ts +13 -7
  262. package/src/probes/agent-clis.ts +2 -3
  263. package/src/probes/probes.ts +24 -10
  264. package/src/report/core/schema.ts +4 -1
  265. package/src/report/core/surfaces.ts +4 -8
  266. package/src/runner.ts +1 -0
  267. package/src/schema.ts +68 -4
  268. package/src/section-result.ts +6 -5
  269. package/dist/lib/chunks/chunk-6EH4N3EU.js +0 -113
  270. package/dist/lib/chunks/chunk-SWJ7KQSL.js +0 -318
  271. package/dist/lib/chunks/{chunk-CO5T6WU5.js → chunk-OD36HUXA.js} +3 -3
  272. package/dist/lib/chunks/{chunk-XI5H46DF.js → chunk-SASE7U6E.js} +3 -3
@@ -1,4 +1,9 @@
1
1
  import { recorded, type ExecutionRecorder } from '../bundle/recorder';
2
+ import {
3
+ createHostPacer,
4
+ guardedRequest,
5
+ type SiteRequest,
6
+ } from '../grounding/guarded-request';
2
7
  import type { AeoAuditConfig, AeoTechnicalChecks } from '../schema';
3
8
  import type { PartialFailure } from '../probes/web-tool-guard';
4
9
  import { checkLlmsTxt, runCrawlerAccessCheck } from './crawler-access';
@@ -11,6 +16,10 @@ import { runRenderabilityCheck } from './renderability';
11
16
  // run with a stub — checks are live fetches and a Playwright browser.
12
17
  // ============================================================================
13
18
 
19
+ // At most one request at a time per host, this far apart, across every check
20
+ // of the phase (specs/aeo-checks-and-reach-spec.md §3.1).
21
+ const hostIntervalInMs = 1000;
22
+
14
23
  export type CheckPhaseResult = {
15
24
  checks: AeoTechnicalChecks;
16
25
  failures: PartialFailure[];
@@ -21,6 +30,10 @@ export const runTechnicalChecks = async (
21
30
  recorder?: ExecutionRecorder,
22
31
  ): Promise<CheckPhaseResult> => {
23
32
  const failures: PartialFailure[] = [];
33
+ const pace = createHostPacer(hostIntervalInMs);
34
+ const request: SiteRequest = (options) => {
35
+ return guardedRequest({ ...options, pace });
36
+ };
24
37
 
25
38
  // One operation per check, with its parameters and its extracted result
26
39
  // (spec §7.2). The checks' own HTTP requests and raw bodies stay inside
@@ -52,13 +65,13 @@ export const runTechnicalChecks = async (
52
65
 
53
66
  const [crawlerAccess, llmsTxt, renderability] = await Promise.all([
54
67
  check('crawler_access', { domain: config.brand.domain }, () =>
55
- runCrawlerAccessCheck(config.brand.domain),
68
+ runCrawlerAccessCheck(config.brand.domain, request),
56
69
  ),
57
70
  check('llms_txt', { domain: config.brand.domain }, () =>
58
- checkLlmsTxt(config.brand.domain),
71
+ checkLlmsTxt(config.brand.domain, request),
59
72
  ),
60
73
  check('renderability', { moneyPages: config.moneyPages }, () =>
61
- runRenderabilityCheck(config.moneyPages),
74
+ runRenderabilityCheck(config.moneyPages, { request, pace }),
62
75
  ),
63
76
  ]);
64
77
 
@@ -174,6 +174,7 @@ export const runDoctor = async (flags: Flags) => {
174
174
  dir: runDirOf(flags),
175
175
  model: file.model,
176
176
  groundingSearch: usesGroundingSearch(request),
177
+ rendersPages: file.moneyPages.length > 0,
177
178
  });
178
179
  const ok = checks.every((check) => check.ok);
179
180
 
@@ -307,6 +308,7 @@ export const runRun = async (flags: Flags) => {
307
308
  dir,
308
309
  model: file.model,
309
310
  groundingSearch: usesGroundingSearch(request),
311
+ rendersPages: file.moneyPages.length > 0,
310
312
  });
311
313
  const failing = checks.filter((check) => !check.ok);
312
314
 
@@ -234,6 +234,7 @@ export const aggregateJudgments = (
234
234
  prompts: section.prompts,
235
235
  surfaces: inputs.surfaces,
236
236
  agentProbes: config.agentProbes,
237
+ chatProbes: config.chatProbes,
237
238
  },
238
239
  {
239
240
  probeCount: sectionCapture.units.length,
@@ -7,9 +7,16 @@ import {
7
7
  canonicalResearchUrl,
8
8
  extractSourceDocument,
9
9
  fetchGroundingSource,
10
+ } from '../grounding/fetch';
11
+ import {
12
+ resolvePublicAddress,
10
13
  SourceRetrievalError,
11
14
  validateResearchUrl,
12
- } from '../grounding/fetch';
15
+ } from '../grounding/guarded-request';
16
+ import {
17
+ withBoundedPage,
18
+ withGuardedChromium,
19
+ } from '../grounding/chromium-guard';
13
20
  import {
14
21
  groundingSourceSchema,
15
22
  type GroundingSource,
@@ -987,70 +994,42 @@ export const createAuthorTools = (options: AuthorToolsOptions): AuthorTools => {
987
994
  };
988
995
 
989
996
  /** Rendered HTML for a public page through the Chromium the image already
990
- * carries for the renderability check. The URL was validated and resolves
991
- * to public addresses; subresource requests are held to HTTPS and public
992
- * hosts as well. */
997
+ * carries for the renderability check. Every connection the browser makes
998
+ * passes the guarding proxy; the page's own host is checked first so a
999
+ * private destination fails with its own reason, not a tunnel error. */
993
1000
  export const renderWithChromium = async (
994
1001
  url: URL,
995
1002
  signal: AbortSignal,
996
1003
  ): Promise<string> => {
997
- const { lookup } = await import('node:dns/promises');
998
- const { isIP } = await import('node:net');
999
- const { isPublicAddress } = await import('../workflow/callbacks');
1000
- const addresses = await lookup(url.hostname, { all: true });
1001
-
1002
- if (
1003
- !addresses.length ||
1004
- addresses.some(({ address }) => !isPublicAddress(address))
1005
- ) {
1006
- throw new SourceRetrievalError(
1007
- 'unsafe_destination',
1008
- 'Source DNS must resolve exclusively to public addresses',
1009
- );
1010
- }
1011
-
1012
- const { chromium } = await import('playwright');
1013
- const browser = await chromium.launch();
1014
-
1015
- try {
1016
- const page = await browser.newPage({
1017
- userAgent: `${researchUserAgent}/1`,
1018
- });
1019
-
1020
- await page.route('**/*', (route) => {
1021
- const target = new URL(route.request().url());
1022
- const host = target.hostname.replace(/^\[|\]$/g, '');
1023
-
1024
- if (
1025
- target.protocol !== 'https:' ||
1026
- (isIP(host) && !isPublicAddress(host)) ||
1027
- host === 'localhost' ||
1028
- host.endsWith('.local') ||
1029
- host.endsWith('.internal')
1030
- ) {
1031
- return route.abort();
1032
- }
1033
-
1034
- return route.continue();
1035
- });
1036
-
1037
- // Closing the page ends the navigation; its own failure changes nothing.
1038
- const abort = () => {
1039
- void page.close().catch(() => undefined);
1040
- };
1041
-
1042
- signal.addEventListener('abort', abort, { once: true });
1043
-
1044
- try {
1045
- await page.goto(url.href, { waitUntil: 'networkidle', timeout: 45_000 });
1004
+ await resolvePublicAddress(url.hostname, signal);
1005
+
1006
+ const { result } = await withGuardedChromium(
1007
+ (context) => {
1008
+ return withBoundedPage(context, 60_000, async (page) => {
1009
+ // Closing the page ends the navigation; its own failure changes
1010
+ // nothing.
1011
+ const abort = () => {
1012
+ void page.close().catch(() => undefined);
1013
+ };
1014
+
1015
+ signal.addEventListener('abort', abort, { once: true });
1016
+
1017
+ try {
1018
+ await page.goto(url.href, {
1019
+ waitUntil: 'networkidle',
1020
+ timeout: 45_000,
1021
+ });
1022
+
1023
+ return await page.content();
1024
+ } finally {
1025
+ signal.removeEventListener('abort', abort);
1026
+ }
1027
+ });
1028
+ },
1029
+ { userAgent: `${researchUserAgent}/1` },
1030
+ );
1046
1031
 
1047
- return await page.content();
1048
- } finally {
1049
- signal.removeEventListener('abort', abort);
1050
- }
1051
- } finally {
1052
- await browser.close();
1053
- }
1032
+ return result;
1054
1033
  };
1055
1034
 
1056
1035
  /** Every research journal entry, in order; an absent journal is empty. */
@@ -83,6 +83,7 @@ const sectionArgs = (
83
83
  language: deps.config.language,
84
84
  surfaces: deps.plan.surfaces,
85
85
  agentProbes: deps.config.agentProbes,
86
+ chatProbes: deps.config.chatProbes,
86
87
  agentCliVersions: deps.agentCliVersions,
87
88
  runId: deps.request.runId,
88
89
  probeStore: deps.stores.probeStore,
@@ -79,9 +79,9 @@ export const copyEditCall = (args: {
79
79
  // facts, in the order it is given up when the whole does not fit the
80
80
  // role's input limit: every previous edit carries a full draft, the
81
81
  // review history grows a review per block per round, and the rule
82
- // documents are voice, not evidence. Botpress's copy pass (2026-09-15)
83
- // refused the edit before any model call because all of it together was
84
- // over the limit, and the report shipped without a narrative.
82
+ // documents are voice, not evidence. One run's copy pass refused the
83
+ // edit before any model call because all of it together was over the
84
+ // limit, and the report shipped without a narrative.
85
85
  const trims: { name: string; apply: () => void }[] = [
86
86
  {
87
87
  name: 'older_edits',
@@ -775,8 +775,8 @@ export const writeReportCopy = async (
775
775
  throw error;
776
776
  }
777
777
 
778
- // The verifier stayed unusable through its tries (Botpress, 2026-09-15:
779
- // six invalid reviews failed the pipeline). The report ships on its
778
+ // The verifier stayed unusable through its tries (one run's six
779
+ // invalid reviews failed the pipeline). The report ships on its
780
780
  // verified facts with the improvement note; the saved draft is kept.
781
781
  ctx.log(
782
782
  `copy verifier stayed ${error.outcome} after its tries; delivering the verified facts without the narrative`,
@@ -1,5 +1,14 @@
1
1
  import { readFile } from 'node:fs/promises';
2
2
  import { z } from 'zod';
3
+ import {
4
+ maxMoneyPages,
5
+ moneyPageProblem,
6
+ type MoneyPageProblem,
7
+ } from '../checks/money-pages';
8
+ import {
9
+ SourceRetrievalError,
10
+ validateResearchUrl,
11
+ } from '../grounding/guarded-request';
3
12
  import type { ModelBudgetLimits } from '../models/accounting';
4
13
  import { localModelProfile } from '../models/local-profile';
5
14
  import { resolveSupportedModel } from '../models/supported-models';
@@ -11,6 +20,7 @@ import {
11
20
  agentProbeConfigSchema,
12
21
  allSurfaces,
13
22
  brandSchema,
23
+ chatProbeConfigSchema,
14
24
  coverageThresholdsSchema,
15
25
  defaultMaxPlannedUnits,
16
26
  isAgentSurface,
@@ -84,9 +94,44 @@ export const runPolicySchema = z
84
94
  // Caps every paid call of the run: probes, Codex stage sessions, host
85
95
  // model calls and searches (see BudgetPolicy).
86
96
  budget: budgetPolicySchema.prefault({}),
97
+ // Hosts off the brand's site whose pages the site checks may fetch (a
98
+ // docs site on another domain). A permission, not a measurement input:
99
+ // granting one never moves a baseline.
100
+ checkHosts: z.array(z.string().trim().min(1)).max(20).default([]),
87
101
  })
88
102
  .strict();
89
103
 
104
+ /** Why a checkHosts entry is refused: it must be a bare public host name. */
105
+ const checkHostProblem = (host: string): string | undefined => {
106
+ try {
107
+ const url = validateResearchUrl(`https://${host}/`);
108
+
109
+ if (url.hostname === host.toLowerCase()) {
110
+ return undefined;
111
+ }
112
+ } catch (err) {
113
+ if (!(err instanceof SourceRetrievalError)) {
114
+ throw err;
115
+ }
116
+ }
117
+
118
+ return `Use a bare public host name such as docs.acme.example, not ${JSON.stringify(host)}.`;
119
+ };
120
+
121
+ /** A refused money page in audit.json's terms: checkHosts is the remedy
122
+ * for a page on another site. */
123
+ const describeMoneyPageProblem = (
124
+ page: string,
125
+ domain: string,
126
+ problem: MoneyPageProblem,
127
+ ): string => {
128
+ if (problem.kind === 'unsafe_url') {
129
+ return `A money page must be a public https URL with no port or credentials: ${problem.message}`;
130
+ }
131
+
132
+ return `${page} is not on ${domain} or its subdomains. Name its host in runPolicy.checkHosts to let the site checks fetch it.`;
133
+ };
134
+
90
135
  export const auditFileSchema = z
91
136
  .object({
92
137
  version: z.literal(auditFileVersion),
@@ -102,10 +147,14 @@ export const auditFileSchema = z
102
147
  .array(aeoSurfaceSchema)
103
148
  .min(1)
104
149
  .default([...allSurfaces]),
105
- agentProbes: agentProbeConfigSchema.prefault({}),
150
+ // Strict here, unlike the internal config that bundles keep: a
151
+ // misspelled key is refused, never dropped for the default depth.
152
+ agentProbes: agentProbeConfigSchema.strict().prefault({}),
153
+ // Absent = the standard depth (2 runs per prompt, 1 on AI Overview).
154
+ chatProbes: chatProbeConfigSchema.optional(),
106
155
  geography: z.string().default('us'),
107
156
  language: z.string().default('en'),
108
- moneyPages: z.array(z.url()).default([]),
157
+ moneyPages: z.array(z.url()).max(maxMoneyPages).default([]),
109
158
  productBrief: z.string().trim().min(1),
110
159
  // `full` researches and adjudicates the claims answers make about the
111
160
  // product; `extraction_only` keeps the claim inventory and skips both.
@@ -126,6 +175,33 @@ export const auditFileSchema = z
126
175
  });
127
176
  }
128
177
 
178
+ for (const [index, host] of file.runPolicy.checkHosts.entries()) {
179
+ const problem = checkHostProblem(host);
180
+
181
+ if (problem !== undefined) {
182
+ context.addIssue({
183
+ code: 'custom',
184
+ message: problem,
185
+ path: ['runPolicy', 'checkHosts', index],
186
+ });
187
+ }
188
+ }
189
+
190
+ for (const [index, page] of file.moneyPages.entries()) {
191
+ const problem = moneyPageProblem(page, {
192
+ domain: file.brand.domain,
193
+ checkHosts: file.runPolicy.checkHosts,
194
+ });
195
+
196
+ if (problem !== undefined) {
197
+ context.addIssue({
198
+ code: 'custom',
199
+ message: describeMoneyPageProblem(page, file.brand.domain, problem),
200
+ path: ['moneyPages', index],
201
+ });
202
+ }
203
+ }
204
+
129
205
  const keys = file.sections.map((section) => section.key);
130
206
 
131
207
  if (new Set(keys).size !== keys.length) {
@@ -213,6 +289,7 @@ export const toAuditConfig = (file: AuditFile): AeoAuditConfig => {
213
289
  }),
214
290
  sections: file.sections,
215
291
  agentProbes: file.agentProbes,
292
+ ...(file.chatProbes !== undefined && { chatProbes: file.chatProbes }),
216
293
  moneyPages: file.moneyPages,
217
294
  productBrief: file.productBrief,
218
295
  surfaces: {
@@ -114,9 +114,17 @@ sections, the buyer questions in each, the competitors, and the surfaces
114
114
  (the assistants that will be asked). Apply the user's edits to
115
115
  `draft/audit.json` yourself. The optional `model` field names the model
116
116
  that judges and writes the report; leave it out to use the recommended
117
- one, which `literally-aeo doctor` lists with every supported model. Run
117
+ one, which `literally-aeo doctor` lists with every supported model. If the
118
+ user would rather measure fewer questions more deeply, set
119
+ `chatProbes.runsPerPrompt` and `agentProbes.runsPerPrompt` (1 to 25 runs
120
+ of each question per assistant); left out, each question is asked twice
121
+ (once on AI Overviews). Run
118
122
  `literally-aeo doctor --config draft/audit.json --env-file .env --json`
119
- after editing.
123
+ after editing. Money pages must be on the company's site or its
124
+ subdomains; for a page on another host the user owns (a docs site, say),
125
+ add that host to `runPolicy.checkHosts`. With money pages, doctor also
126
+ checks that Chromium launches and, if not, names the command that
127
+ installs it.
120
128
 
121
129
  ## Checkpoint 6: approve the audit cost
122
130
 
@@ -174,7 +182,8 @@ Quote the report; do not add claims it does not make.
174
182
 
175
183
  Offer `literally-aeo export run`: a `.aeo.zip` bundle with the captured
176
184
  answers, every judgment, the metrics, the report and the journal of every
177
- operation, which anyone can check offline with `literally-aeo verify`.
185
+ operation, which anyone can check offline with `literally-aeo verify` from
186
+ this release or a newer one.
178
187
  Credentials found in it block the export. Tell the user the bundle shows
179
188
  the questions and the answers, so they should share it only where those can
180
189
  be read.
@@ -1,4 +1,5 @@
1
1
  import { mkdir, rm, writeFile } from 'node:fs/promises';
2
+ import { createRequire } from 'node:module';
2
3
  import path from 'node:path';
3
4
  import {
4
5
  agentAuthEnv,
@@ -109,6 +110,49 @@ const directoryCheck = async (dir: string): Promise<PreflightCheck> => {
109
110
  }
110
111
  };
111
112
 
113
+ /** The command that installs the Chromium this package's Playwright drives;
114
+ * an unversioned `npx playwright` may fetch another release's browser. */
115
+ const chromiumInstallCommand = (): string => {
116
+ const manifest: unknown = createRequire(import.meta.url)(
117
+ 'playwright/package.json',
118
+ );
119
+ const version =
120
+ typeof manifest === 'object' &&
121
+ manifest !== null &&
122
+ 'version' in manifest &&
123
+ typeof manifest.version === 'string'
124
+ ? `@${manifest.version}`
125
+ : '';
126
+
127
+ return `npx playwright${version} install chromium`;
128
+ };
129
+
130
+ /** The renderability check renders every money page in Chromium: a
131
+ * missing browser stops the run here, not after the probes were paid for. */
132
+ const chromiumCheck = async (): Promise<PreflightCheck> => {
133
+ try {
134
+ const { chromium } = await import('playwright');
135
+ const browser = await chromium.launch();
136
+ const version = browser.version();
137
+
138
+ await browser.close();
139
+
140
+ return {
141
+ name: 'chromium (money pages)',
142
+ ok: true,
143
+ detail: `Chromium ${version} launches`,
144
+ };
145
+ } catch (err) {
146
+ const message = err instanceof Error ? err.message.split('\n')[0] : '';
147
+
148
+ return {
149
+ name: 'chromium (money pages)',
150
+ ok: false,
151
+ detail: `does not launch (${message}); run \`${chromiumInstallCommand()}\`, or remove moneyPages from audit.json`,
152
+ };
153
+ }
154
+ };
155
+
112
156
  /** The model audit.json names, or the recommended one: refused when it is
113
157
  * not on the supported list, which the detail then prints. */
114
158
  export const modelCheck = (model: string | undefined): PreflightCheck => {
@@ -174,6 +218,8 @@ export const runPreflight = async (args: {
174
218
  model?: string;
175
219
  /** Full grounding researches through the pinned search provider. */
176
220
  groundingSearch?: boolean;
221
+ /** Money pages are rendered in Chromium by the renderability check. */
222
+ rendersPages?: boolean;
177
223
  }): Promise<PreflightCheck[]> => {
178
224
  const { surfaces, settings } = args;
179
225
  const nodeMajor = Number(process.versions.node.split('.')[0]);
@@ -233,6 +279,10 @@ export const runPreflight = async (args: {
233
279
  });
234
280
  }
235
281
 
282
+ if (args.rendersPages) {
283
+ checks.push(await chromiumCheck());
284
+ }
285
+
236
286
  checks.push(await directoryCheck(args.dir));
237
287
 
238
288
  return checks;