literally-aeo 0.1.1 → 0.2.1

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 (369) hide show
  1. package/README.md +71 -7
  2. package/dist/author-tools.js +512 -461
  3. package/dist/cli.mjs +3512 -2010
  4. package/dist/lib/access/schema.js +6 -6
  5. package/dist/lib/agents/author-schema.js +11 -12
  6. package/dist/lib/agents/author-validation.js +19 -20
  7. package/dist/lib/agents/copy-validation.js +22 -22
  8. package/dist/lib/agents/copywriter-input.js +22 -7
  9. package/dist/lib/agents/facts.js +21 -6
  10. package/dist/lib/agents/narrative-facts.js +20 -2
  11. package/dist/lib/agents/verifier.js +26 -25
  12. package/dist/lib/analysis/domain-classifier.js +21 -22
  13. package/dist/lib/analysis/domain-labels.js +11 -12
  14. package/dist/lib/analysis/progress-schema.js +2 -2
  15. package/dist/lib/analysis/progress.js +19 -21
  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 +18 -19
  20. package/dist/lib/author/examples.js +12 -13
  21. package/dist/lib/bundle/contracts.js +15 -14
  22. package/dist/lib/bundle/export.js +34 -31
  23. package/dist/lib/bundle/isolation.js +17 -0
  24. package/dist/lib/bundle/journal.js +14 -15
  25. package/dist/lib/bundle/project-journal.js +19 -18
  26. package/dist/lib/bundle/project.js +31 -28
  27. package/dist/lib/bundle/read.js +35 -32
  28. package/dist/lib/bundle/recorder.js +17 -16
  29. package/dist/lib/bundle/redact.js +14 -15
  30. package/dist/lib/bundle/trace-coverage.js +14 -15
  31. package/dist/lib/bundle/verify-integrity.js +16 -17
  32. package/dist/lib/bundle/verify-measurement.js +22 -23
  33. package/dist/lib/bundle/verify-report.js +29 -30
  34. package/dist/lib/bundle/verify.js +37 -38
  35. package/dist/lib/bundle/writer-lock.js +3 -1
  36. package/dist/lib/capture-manifest.js +13 -14
  37. package/dist/lib/checks/crawler-access.js +4 -1
  38. package/dist/lib/checks/renderability.js +5 -1
  39. package/dist/lib/checks/run-checks.js +23 -19
  40. package/dist/lib/chunks/chunk-2B5QF6UQ.js +159 -0
  41. package/dist/lib/chunks/chunk-2FOKEIIN.js +93 -0
  42. package/dist/lib/chunks/{chunk-KRFHQQS7.js → chunk-2KH7LNK7.js} +24 -24
  43. package/dist/lib/chunks/{chunk-NVBMIPXR.js → chunk-3GPUCXVA.js} +44 -26
  44. package/dist/lib/chunks/{chunk-3EBWDHPK.js → chunk-3OE4UQIB.js} +14 -16
  45. package/dist/lib/chunks/{chunk-FNDJUELJ.js → chunk-3OWJBGQE.js} +14 -14
  46. package/dist/lib/chunks/{chunk-Y4OGZ3Q5.js → chunk-46PVVQYR.js} +1 -1
  47. package/dist/lib/chunks/{chunk-EV4DRS5M.js → chunk-4XIAXX7K.js} +1 -1
  48. package/dist/lib/chunks/{chunk-IBOWGKN7.js → chunk-52F5XYOW.js} +1 -1
  49. package/dist/lib/chunks/{chunk-3DG7GHFA.js → chunk-66DVMLGR.js} +10 -10
  50. package/dist/lib/chunks/{chunk-FFOVLI3U.js → chunk-66T7JC57.js} +12 -10
  51. package/dist/lib/chunks/{chunk-KMRQSIZW.js → chunk-6GOBBNDU.js} +16 -1
  52. package/dist/lib/chunks/{chunk-WUELMJ22.js → chunk-6HMHXSCS.js} +2 -2
  53. package/dist/lib/chunks/{chunk-SWS3K62X.js → chunk-6JICXLDA.js} +3 -3
  54. package/dist/lib/chunks/{chunk-SBAZBOPI.js → chunk-6P7EZJI7.js} +4 -2
  55. package/dist/lib/chunks/chunk-75DMLOQ7.js +127 -0
  56. package/dist/lib/chunks/{chunk-RMFT4KKK.js → chunk-7CW6U5WJ.js} +1 -1
  57. package/dist/lib/chunks/{chunk-5VNYUCLL.js → chunk-7HM6IZ3L.js} +6 -9
  58. package/dist/lib/chunks/{chunk-X6E44EGV.js → chunk-7LBSNDRR.js} +10 -8
  59. package/dist/lib/chunks/{chunk-S2AM76LT.js → chunk-7WO3FFPS.js} +3 -3
  60. package/dist/lib/chunks/{chunk-ULRXHSJL.js → chunk-7YDXD4MD.js} +9 -6
  61. package/dist/lib/chunks/{chunk-HFOYASRQ.js → chunk-AAFHXNLU.js} +4 -4
  62. package/dist/lib/chunks/{chunk-OBXAHX3L.js → chunk-AASWJR7Q.js} +1 -5
  63. package/dist/lib/chunks/{chunk-MD4AVTK2.js → chunk-AJKV46SM.js} +3 -3
  64. package/dist/lib/chunks/{chunk-IEVAFDW7.js → chunk-AJO7XVXK.js} +12 -12
  65. package/dist/lib/chunks/{chunk-GMKF2FU4.js → chunk-AK6YNTCV.js} +1 -1
  66. package/dist/lib/chunks/{chunk-WKH6BJAZ.js → chunk-BFWK3TBN.js} +6 -6
  67. package/dist/lib/chunks/{chunk-FKLNEB2P.js → chunk-BGAHZIL3.js} +51 -17
  68. package/dist/lib/chunks/{chunk-ZCOI3HE2.js → chunk-BRENK356.js} +1 -1
  69. package/dist/lib/chunks/{chunk-S7KJZIUR.js → chunk-BXF4OC74.js} +18 -9
  70. package/dist/lib/chunks/{chunk-NCLFZOZU.js → chunk-CH7OCYDL.js} +1 -1
  71. package/dist/lib/chunks/{chunk-FPAN3VRW.js → chunk-DDS4G4DO.js} +27 -19
  72. package/dist/lib/chunks/{chunk-ZLOOC46D.js → chunk-DL6YQDTE.js} +34 -8
  73. package/dist/lib/chunks/chunk-DVFFYY5G.js +74 -0
  74. package/dist/lib/chunks/{chunk-PDS5KWO3.js → chunk-E2YTTB6Q.js} +56 -42
  75. package/dist/lib/chunks/{chunk-YR67JG2V.js → chunk-E3OGPTUY.js} +8 -3
  76. package/dist/lib/chunks/{chunk-SDWYZM64.js → chunk-EDQTINTL.js} +5 -1
  77. package/dist/lib/chunks/chunk-ESEMYWUH.js +257 -0
  78. package/dist/lib/chunks/{chunk-YHS5IEVZ.js → chunk-F2NSJ6PG.js} +12 -8
  79. package/dist/lib/chunks/{chunk-7GXRDAUY.js → chunk-F7DBTXKG.js} +6 -6
  80. package/dist/lib/chunks/chunk-FAUFE7MI.js +31 -0
  81. package/dist/lib/chunks/{chunk-4E4NDGOZ.js → chunk-FDM2YNQL.js} +1 -1
  82. package/dist/lib/chunks/{chunk-47IZBMP2.js → chunk-FIC7JSR4.js} +2 -2
  83. package/dist/lib/chunks/{chunk-CJ5YD3CU.js → chunk-FJL2V6P5.js} +6 -6
  84. package/dist/lib/chunks/{chunk-KHU5DRBE.js → chunk-FL6LN2K6.js} +9 -9
  85. package/dist/lib/chunks/{chunk-HSZ3DM74.js → chunk-GEFKDW7X.js} +15 -2
  86. package/dist/lib/chunks/{chunk-XNRSHATN.js → chunk-HI3PD3KR.js} +8 -8
  87. package/dist/lib/chunks/{chunk-AUB5THIS.js → chunk-I3UE52ZV.js} +2 -2
  88. package/dist/lib/chunks/{chunk-IAR6XGEW.js → chunk-J5NPHPXY.js} +5 -4
  89. package/dist/lib/chunks/{chunk-XJVXASDD.js → chunk-JBOOD6MU.js} +11 -10
  90. package/dist/lib/chunks/{chunk-5KKLUM7M.js → chunk-JKPBXPCW.js} +3 -3
  91. package/dist/lib/chunks/{chunk-5HT55QYX.js → chunk-JQDQVG3D.js} +1 -1
  92. package/dist/lib/chunks/{chunk-3KQFLOC7.js → chunk-JXBLGCXZ.js} +1 -1
  93. package/dist/lib/chunks/{chunk-D2INDP5W.js → chunk-JYFEXVWC.js} +7 -6
  94. package/dist/lib/chunks/{chunk-X2Y2ZNG3.js → chunk-K2FZFESR.js} +8 -8
  95. package/dist/lib/chunks/{chunk-DC6PN7QJ.js → chunk-K4Y5NT4M.js} +11 -7
  96. package/dist/lib/chunks/chunk-K7YFL5KB.js +182 -0
  97. package/dist/lib/chunks/{chunk-ZYSPTOKK.js → chunk-KQCRJIEG.js} +1 -1
  98. package/dist/lib/chunks/{chunk-LPND3VNQ.js → chunk-KSOHZKV5.js} +43 -35
  99. package/dist/lib/chunks/{chunk-FBFZBLTY.js → chunk-LR27H2HZ.js} +15 -16
  100. package/dist/lib/chunks/{chunk-KZR25REO.js → chunk-LTI2YYU3.js} +1 -1
  101. package/dist/lib/chunks/{chunk-EPQHVILQ.js → chunk-MA27TFEY.js} +5 -3
  102. package/dist/lib/chunks/{chunk-J46W3EMQ.js → chunk-MENTBQGB.js} +8 -7
  103. package/dist/lib/chunks/chunk-MPJCZN4G.js +155 -0
  104. package/dist/lib/chunks/{chunk-56VOFZ7T.js → chunk-MTDYBJXH.js} +92 -26
  105. package/dist/lib/chunks/{chunk-PCYNBDZ7.js → chunk-OD36HUXA.js} +17 -12
  106. package/dist/lib/chunks/{chunk-WDSCJEDG.js → chunk-OQFAMKLN.js} +11 -11
  107. package/dist/lib/chunks/{chunk-Z4LMDKBU.js → chunk-PWOYEIPF.js} +4 -4
  108. package/dist/lib/chunks/{chunk-XL4JIQ5X.js → chunk-PXB4PWJI.js} +7 -3
  109. package/dist/lib/chunks/{chunk-7ZOJE6BH.js → chunk-QGZ4QSUE.js} +8 -7
  110. package/dist/lib/chunks/chunk-QJZTDZMB.js +321 -0
  111. package/dist/lib/chunks/{chunk-MHAKYFDF.js → chunk-R2AJYV6A.js} +22 -22
  112. package/dist/lib/chunks/{chunk-5B3RNVZ6.js → chunk-RK57YZKM.js} +1 -1
  113. package/dist/lib/chunks/{chunk-ZXGATMMH.js → chunk-RPTADJXD.js} +1 -1
  114. package/dist/lib/chunks/{chunk-2NJEWPCV.js → chunk-RXSHKWZJ.js} +3 -3
  115. package/dist/lib/chunks/chunk-RYCRL3YA.js +106 -0
  116. package/dist/lib/chunks/{chunk-E3OEE5XN.js → chunk-SD7LR26G.js} +3 -3
  117. package/dist/lib/chunks/{chunk-GVC4LH2N.js → chunk-SIJOQRRK.js} +1 -1
  118. package/dist/lib/chunks/{chunk-ZBDUE3A5.js → chunk-SLAPBFRH.js} +12 -7
  119. package/dist/lib/chunks/{chunk-CKUTDJAB.js → chunk-SMPP7B7F.js} +45 -10
  120. package/dist/lib/chunks/{chunk-POUSX3T4.js → chunk-SQQ56UP2.js} +15 -6
  121. package/dist/lib/chunks/{chunk-I3TMFPK4.js → chunk-T5XQ6NXD.js} +6 -4
  122. package/dist/lib/chunks/{chunk-EYKINDNK.js → chunk-TAPVCSCR.js} +1 -1
  123. package/dist/lib/chunks/{chunk-ISN6MBNB.js → chunk-U5USH2HB.js} +7 -7
  124. package/dist/lib/chunks/chunk-U64NCRRR.js +97 -0
  125. package/dist/lib/chunks/{chunk-D2LPQO6Y.js → chunk-U6BW6LGX.js} +10 -3
  126. package/dist/lib/chunks/chunk-U772TN32.js +67 -0
  127. package/dist/lib/chunks/{chunk-XHWRSGX3.js → chunk-UYDQXXDQ.js} +4 -4
  128. package/dist/lib/chunks/{chunk-CPT2GKKW.js → chunk-V5JJEEBT.js} +1 -1
  129. package/dist/lib/chunks/{chunk-YWJPJI3W.js → chunk-VL253W5C.js} +3 -1
  130. package/dist/lib/chunks/{chunk-I7VNIW6Q.js → chunk-VPXYGN4I.js} +86 -15
  131. package/dist/lib/chunks/{chunk-Z7V63UZA.js → chunk-VXDMOB7O.js} +4 -4
  132. package/dist/lib/chunks/chunk-W5X7WJYL.js +91 -0
  133. package/dist/lib/chunks/{chunk-6AUEDSTU.js → chunk-WCLKIPJV.js} +1 -1
  134. package/dist/lib/chunks/{chunk-QFVRCSJ2.js → chunk-WDOA5JEH.js} +2 -0
  135. package/dist/lib/chunks/chunk-WDT2Y7D7.js +117 -0
  136. package/dist/lib/chunks/{chunk-OVUCZLH2.js → chunk-WIBMVNIH.js} +2 -2
  137. package/dist/lib/chunks/{chunk-5T3V6XJS.js → chunk-WNIXDMJL.js} +1 -1
  138. package/dist/lib/chunks/{chunk-OORO55OM.js → chunk-WZGI7UVM.js} +23 -8
  139. package/dist/lib/chunks/{chunk-2GY42RIJ.js → chunk-XAKME6NM.js} +1 -1
  140. package/dist/lib/chunks/{chunk-Q2PWES4B.js → chunk-XAN4CRFP.js} +33 -41
  141. package/dist/lib/chunks/{chunk-MIF5IYNR.js → chunk-XDG6NPJB.js} +26 -29
  142. package/dist/lib/chunks/{chunk-IPNK7FYT.js → chunk-XFUYEFQP.js} +1 -1
  143. package/dist/lib/chunks/{chunk-OQVIRYT5.js → chunk-XNTFOVCE.js} +2 -2
  144. package/dist/lib/chunks/chunk-Y2CZ6FZY.js +61 -0
  145. package/dist/lib/chunks/{chunk-D7GEQVLL.js → chunk-YKJHFD64.js} +1 -1
  146. package/dist/lib/chunks/chunk-YZEZRQIG.js +194 -0
  147. package/dist/lib/chunks/chunk-ZIGNJAPC.js +11 -0
  148. package/dist/lib/chunks/{chunk-5ZITQDVE.js → chunk-ZQ3ER7JD.js} +12 -13
  149. package/dist/lib/cli/bundle-commands.js +102 -94
  150. package/dist/lib/cli/guide-command.js +25 -0
  151. package/dist/lib/cli/io.js +1 -1
  152. package/dist/lib/cli/run-commands.js +310 -140
  153. package/dist/lib/cli/status-command.js +236 -0
  154. package/dist/lib/codex-workflow/aggregate.js +22 -24
  155. package/dist/lib/codex-workflow/author-search.js +4 -3
  156. package/dist/lib/codex-workflow/author-tools.js +18 -17
  157. package/dist/lib/codex-workflow/author.js +39 -36
  158. package/dist/lib/codex-workflow/capture.js +26 -25
  159. package/dist/lib/codex-workflow/checkpoint.js +14 -15
  160. package/dist/lib/codex-workflow/checks.js +16 -18
  161. package/dist/lib/codex-workflow/codex-binary.js +13 -0
  162. package/dist/lib/codex-workflow/codex-home.js +6 -3
  163. package/dist/lib/codex-workflow/copy-editor.js +33 -32
  164. package/dist/lib/codex-workflow/copy-recovery.js +12 -13
  165. package/dist/lib/codex-workflow/copy.js +30 -29
  166. package/dist/lib/codex-workflow/finish.js +37 -38
  167. package/dist/lib/codex-workflow/host-models.js +7 -7
  168. package/dist/lib/codex-workflow/loop.js +71 -65
  169. package/dist/lib/codex-workflow/quality.js +12 -13
  170. package/dist/lib/codex-workflow/run-inputs.js +13 -14
  171. package/dist/lib/codex-workflow/run-source.js +28 -24
  172. package/dist/lib/codex-workflow/schemas.js +12 -13
  173. package/dist/lib/codex-workflow/session.js +15 -16
  174. package/dist/lib/codex-workflow/stage.js +51 -45
  175. package/dist/lib/codex-workflow/workdir.js +14 -15
  176. package/dist/lib/engine/audit-file.js +18 -13
  177. package/dist/lib/engine/author.js +62 -53
  178. package/dist/lib/engine/budget.js +7 -1
  179. package/dist/lib/engine/cost-estimate.js +43 -0
  180. package/dist/lib/engine/local-run.js +79 -71
  181. package/dist/lib/engine/preflight.js +17 -13
  182. package/dist/lib/engine/rejudge.js +87 -79
  183. package/dist/lib/engine/resources.js +1 -1
  184. package/dist/lib/engine/run-configuration.js +2 -1
  185. package/dist/lib/engine/run-status.js +153 -0
  186. package/dist/lib/engine/templates.js +19 -14
  187. package/dist/lib/grounding/chromium-guard.js +13 -0
  188. package/dist/lib/grounding/controller.js +13 -12
  189. package/dist/lib/grounding/extract.js +12 -11
  190. package/dist/lib/grounding/fetch.js +4 -7
  191. package/dist/lib/grounding/file-store.js +5 -5
  192. package/dist/lib/grounding/grounding-runtime.js +34 -32
  193. package/dist/lib/grounding/guarded-request.js +18 -0
  194. package/dist/lib/grounding/model.js +11 -10
  195. package/dist/lib/grounding/profile.js +4 -4
  196. package/dist/lib/grounding/recorded-tools.js +18 -17
  197. package/dist/lib/grounding/session.js +3 -3
  198. package/dist/lib/grounding/tools.js +4 -3
  199. package/dist/lib/grounding/validation.js +2 -2
  200. package/dist/lib/harness/report/artifacts.js +12 -13
  201. package/dist/lib/harness/report/capture-coverage.js +4 -4
  202. package/dist/lib/lib/checkpoint.js +11 -12
  203. package/dist/lib/lib/progress-comparison.js +2 -2
  204. package/dist/lib/models/batching.js +5 -5
  205. package/dist/lib/models/cost-coefficients.js +20 -0
  206. package/dist/lib/models/local-profile.js +10 -0
  207. package/dist/lib/models/pricing.js +6 -0
  208. package/dist/lib/models/profiles.js +7 -14
  209. package/dist/lib/models/structured-images.js +1 -1
  210. package/dist/lib/models/structured.js +4 -4
  211. package/dist/lib/models/supported-models.js +20 -0
  212. package/dist/lib/pipeline.js +21 -21
  213. package/dist/lib/probes/agent-cli-parsers.js +1 -1
  214. package/dist/lib/probes/agent-clis.js +13 -12
  215. package/dist/lib/probes/charged-trace.js +10 -0
  216. package/dist/lib/probes/probes.js +12 -12
  217. package/dist/lib/probes/web-tool-guard.js +3 -3
  218. package/dist/lib/report/contracts.js +4 -4
  219. package/dist/lib/report/core/progress-comparison.js +2 -2
  220. package/dist/lib/report/core/progress-schema.js +2 -2
  221. package/dist/lib/report/core/schema.js +2 -4
  222. package/dist/lib/report/core/surfaces.js +1 -3
  223. package/dist/lib/runner.js +25 -26
  224. package/dist/lib/schema.js +20 -15
  225. package/dist/lib/section-result.js +15 -17
  226. package/dist/lib/stores/artifacts.js +18 -19
  227. package/dist/lib/stores/files.js +32 -32
  228. package/dist/lib/stores/local-versions.js +11 -12
  229. package/dist/lib/stores/memory.js +34 -35
  230. package/dist/lib/stores/publication.js +23 -23
  231. package/dist/lib/surfaces.js +1 -3
  232. package/dist/lib/viewer/server.js +38 -39
  233. package/dist/lib/workflow/schema.js +9 -10
  234. package/dist/types/agents/author-schema.d.ts +3 -3
  235. package/dist/types/agents/copy-validation.d.ts +4 -4
  236. package/dist/types/agents/verifier.d.ts +6 -6
  237. package/dist/types/analysis/scoring.d.ts +2 -2
  238. package/dist/types/bundle/contracts.d.ts +3 -2
  239. package/dist/types/bundle/isolation.d.ts +37 -0
  240. package/dist/types/bundle/project-journal.d.ts +2 -0
  241. package/dist/types/bundle/recorder.d.ts +4 -0
  242. package/dist/types/bundle/writer-lock.d.ts +9 -0
  243. package/dist/types/checks/crawler-access.d.ts +3 -2
  244. package/dist/types/checks/renderability.d.ts +8 -1
  245. package/dist/types/cli/guide-command.d.ts +4 -0
  246. package/dist/types/cli/status-command.d.ts +2 -0
  247. package/dist/types/codex-workflow/author-tools.d.ts +3 -3
  248. package/dist/types/codex-workflow/codex-binary.d.ts +26 -0
  249. package/dist/types/codex-workflow/codex-home.d.ts +24 -20
  250. package/dist/types/codex-workflow/copy-editor.d.ts +1 -1
  251. package/dist/types/codex-workflow/copy.d.ts +3 -4
  252. package/dist/types/codex-workflow/finish.d.ts +5 -3
  253. package/dist/types/codex-workflow/host-models.d.ts +7 -3
  254. package/dist/types/codex-workflow/loop.d.ts +10 -1
  255. package/dist/types/codex-workflow/run-inputs.d.ts +31 -113
  256. package/dist/types/codex-workflow/schemas.d.ts +6 -6
  257. package/dist/types/codex-workflow/stage.d.ts +16 -5
  258. package/dist/types/engine/audit-file.d.ts +9 -3
  259. package/dist/types/engine/author.d.ts +7 -1
  260. package/dist/types/engine/budget.d.ts +46 -15
  261. package/dist/types/engine/cost-estimate.d.ts +40 -0
  262. package/dist/types/engine/local-run.d.ts +6 -0
  263. package/dist/types/engine/preflight.d.ts +7 -0
  264. package/dist/types/engine/resources.d.ts +2 -0
  265. package/dist/types/engine/run-configuration.d.ts +4 -3
  266. package/dist/types/engine/run-status.d.ts +75 -0
  267. package/dist/types/engine/templates.d.ts +1 -2
  268. package/dist/types/grounding/chromium-guard.d.ts +41 -0
  269. package/dist/types/grounding/fetch.d.ts +0 -10
  270. package/dist/types/grounding/guarded-request.d.ts +76 -0
  271. package/dist/types/harness/report/artifacts.d.ts +1 -0
  272. package/dist/types/lib/checkpoint.d.ts +5 -6
  273. package/dist/types/models/cost-coefficients.d.ts +106 -0
  274. package/dist/types/models/local-profile.d.ts +12 -0
  275. package/dist/types/models/pricing.d.ts +8 -0
  276. package/dist/types/models/profiles.d.ts +55 -160
  277. package/dist/types/models/served-model.d.ts +2 -3
  278. package/dist/types/models/structured.d.ts +3 -3
  279. package/dist/types/models/supported-models.d.ts +48 -0
  280. package/dist/types/pipeline.d.ts +2 -1
  281. package/dist/types/probes/charged-trace.d.ts +8 -0
  282. package/dist/types/probes/probe-trace.d.ts +2 -0
  283. package/dist/types/probes/probes.d.ts +2 -1
  284. package/dist/types/report/contracts.d.ts +2 -0
  285. package/dist/types/report/core/schema.d.ts +3 -1
  286. package/dist/types/report/core/surfaces.d.ts +0 -1
  287. package/dist/types/schema.d.ts +50 -113
  288. package/dist/types/section-result.d.ts +1 -1
  289. package/dist/types/workflow/schema.d.ts +79 -152
  290. package/package.json +2 -1
  291. package/resources/guide/OPERATOR.md +189 -0
  292. package/src/agents/author-schema.ts +13 -1
  293. package/src/agents/author-validation.ts +2 -5
  294. package/src/agents/copy-validation.ts +8 -12
  295. package/src/agents/facts.ts +8 -8
  296. package/src/agents/narrative-facts.ts +9 -20
  297. package/src/agents/verifier.ts +12 -16
  298. package/src/analysis/progress.ts +1 -0
  299. package/src/analysis/scoring.ts +9 -13
  300. package/src/bundle/contracts.ts +9 -4
  301. package/src/bundle/isolation.ts +157 -0
  302. package/src/bundle/project-journal.ts +4 -0
  303. package/src/bundle/project.ts +20 -7
  304. package/src/bundle/recorder.ts +5 -0
  305. package/src/bundle/verify.ts +3 -3
  306. package/src/bundle/writer-lock.ts +27 -0
  307. package/src/capture-manifest.ts +4 -0
  308. package/src/checks/crawler-access.ts +70 -50
  309. package/src/checks/renderability.ts +113 -87
  310. package/src/checks/run-checks.ts +16 -3
  311. package/src/cli/guide-command.ts +28 -0
  312. package/src/cli/io.ts +2 -0
  313. package/src/cli/literally-aeo.ts +39 -19
  314. package/src/cli/run-commands.ts +238 -18
  315. package/src/cli/status-command.ts +113 -0
  316. package/src/codex-workflow/aggregate.ts +1 -0
  317. package/src/codex-workflow/author-tools.ts +39 -60
  318. package/src/codex-workflow/capture.ts +1 -0
  319. package/src/codex-workflow/codex-binary.ts +105 -0
  320. package/src/codex-workflow/codex-home.ts +50 -40
  321. package/src/codex-workflow/copy-editor.ts +3 -3
  322. package/src/codex-workflow/copy.ts +7 -10
  323. package/src/codex-workflow/finish.ts +13 -8
  324. package/src/codex-workflow/host-models.ts +33 -24
  325. package/src/codex-workflow/loop.ts +38 -11
  326. package/src/codex-workflow/stage.ts +126 -17
  327. package/src/engine/audit-file.ts +98 -9
  328. package/src/engine/author.ts +47 -2
  329. package/src/engine/budget.ts +138 -43
  330. package/src/engine/cost-estimate.ts +178 -0
  331. package/src/engine/guide/OPERATOR.md +189 -0
  332. package/src/engine/local-run.ts +38 -8
  333. package/src/engine/preflight.ts +140 -7
  334. package/src/engine/resources.ts +9 -4
  335. package/src/engine/run-configuration.ts +19 -1
  336. package/src/engine/run-status.ts +452 -0
  337. package/src/engine/templates.ts +5 -2
  338. package/src/grounding/chromium-guard.ts +273 -0
  339. package/src/grounding/controller.ts +1 -1
  340. package/src/grounding/fetch.ts +39 -276
  341. package/src/grounding/guarded-request.ts +428 -0
  342. package/src/grounding/tools.ts +2 -1
  343. package/src/grounding/validation.ts +1 -1
  344. package/src/lib/checkpoint.ts +15 -16
  345. package/src/models/cost-coefficients.ts +140 -0
  346. package/src/models/local-profile.ts +150 -0
  347. package/src/models/pricing.ts +31 -0
  348. package/src/models/profiles.ts +58 -419
  349. package/src/models/served-model.ts +2 -3
  350. package/src/models/structured-images.ts +5 -4
  351. package/src/models/structured.ts +20 -7
  352. package/src/models/supported-models.ts +112 -0
  353. package/src/pipeline.ts +13 -7
  354. package/src/probes/agent-clis.ts +26 -5
  355. package/src/probes/charged-trace.ts +87 -0
  356. package/src/probes/probe-trace.ts +2 -0
  357. package/src/probes/probes.ts +72 -12
  358. package/src/report/core/schema.ts +4 -1
  359. package/src/report/core/surfaces.ts +4 -8
  360. package/src/runner.ts +1 -0
  361. package/src/schema.ts +68 -4
  362. package/src/section-result.ts +6 -5
  363. package/dist/lib/chunks/chunk-6EH4N3EU.js +0 -113
  364. package/dist/lib/chunks/chunk-CFFPOTP4.js +0 -356
  365. package/dist/lib/chunks/chunk-LIZX4N3H.js +0 -110
  366. package/dist/lib/chunks/chunk-OYKV5NDM.js +0 -28
  367. package/dist/lib/chunks/chunk-SWJ7KQSL.js +0 -318
  368. package/dist/lib/chunks/chunk-WE2WPNG2.js +0 -104
  369. package/dist/lib/chunks/{chunk-XI5H46DF.js → chunk-SASE7U6E.js} +3 -3
@@ -1,67 +1,66 @@
1
1
  import {
2
2
  startViewer
3
- } from "../chunks/chunk-OQVIRYT5.js";
3
+ } from "../chunks/chunk-XNTFOVCE.js";
4
4
  import "../chunks/chunk-ZXQPD4OC.js";
5
- import "../chunks/chunk-XNRSHATN.js";
6
- import "../chunks/chunk-MD4AVTK2.js";
7
- import "../chunks/chunk-3DG7GHFA.js";
8
- import "../chunks/chunk-E3OEE5XN.js";
9
- import "../chunks/chunk-J46W3EMQ.js";
10
- import "../chunks/chunk-DC6PN7QJ.js";
11
- import "../chunks/chunk-AUB5THIS.js";
12
- import "../chunks/chunk-CPT2GKKW.js";
5
+ import "../chunks/chunk-HI3PD3KR.js";
6
+ import "../chunks/chunk-AJKV46SM.js";
7
+ import "../chunks/chunk-66DVMLGR.js";
8
+ import "../chunks/chunk-SD7LR26G.js";
9
+ import "../chunks/chunk-MENTBQGB.js";
10
+ import "../chunks/chunk-I3UE52ZV.js";
11
+ import "../chunks/chunk-K4Y5NT4M.js";
12
+ import "../chunks/chunk-V5JJEEBT.js";
13
13
  import "../chunks/chunk-6KHQ7DXP.js";
14
- import "../chunks/chunk-2NJEWPCV.js";
15
- import "../chunks/chunk-GVC4LH2N.js";
14
+ import "../chunks/chunk-RXSHKWZJ.js";
15
+ import "../chunks/chunk-SIJOQRRK.js";
16
16
  import "../chunks/chunk-SREGO3PU.js";
17
- import "../chunks/chunk-GMKF2FU4.js";
18
- import "../chunks/chunk-3KQFLOC7.js";
17
+ import "../chunks/chunk-AK6YNTCV.js";
18
+ import "../chunks/chunk-JXBLGCXZ.js";
19
19
  import "../chunks/chunk-W46Y7KBR.js";
20
20
  import "../chunks/chunk-2QLAFBCG.js";
21
- import "../chunks/chunk-I3TMFPK4.js";
22
- import "../chunks/chunk-5KKLUM7M.js";
21
+ import "../chunks/chunk-T5XQ6NXD.js";
22
+ import "../chunks/chunk-JKPBXPCW.js";
23
23
  import "../chunks/chunk-7O3M6I2X.js";
24
24
  import "../chunks/chunk-E6NQQU6V.js";
25
- import "../chunks/chunk-YHS5IEVZ.js";
26
- import "../chunks/chunk-ULRXHSJL.js";
25
+ import "../chunks/chunk-F2NSJ6PG.js";
27
26
  import "../chunks/chunk-TCOH3FGE.js";
28
27
  import "../chunks/chunk-3UFZ2XPE.js";
29
- import "../chunks/chunk-XI5H46DF.js";
28
+ import "../chunks/chunk-SASE7U6E.js";
30
29
  import "../chunks/chunk-3BJWRD4O.js";
31
30
  import "../chunks/chunk-TGTM5ZFR.js";
32
31
  import "../chunks/chunk-CQ62GN7P.js";
33
- import "../chunks/chunk-7ZOJE6BH.js";
34
- import "../chunks/chunk-D2LPQO6Y.js";
32
+ import "../chunks/chunk-QGZ4QSUE.js";
33
+ import "../chunks/chunk-U6BW6LGX.js";
35
34
  import "../chunks/chunk-7PLK6VGC.js";
36
35
  import "../chunks/chunk-55U7PRRM.js";
37
- import "../chunks/chunk-ZLOOC46D.js";
38
- import "../chunks/chunk-WKH6BJAZ.js";
39
- import "../chunks/chunk-E4HADK7C.js";
40
- import "../chunks/chunk-W5XYW6ZM.js";
41
- import "../chunks/chunk-EZD2C7QS.js";
42
- import "../chunks/chunk-CFFPOTP4.js";
43
- import "../chunks/chunk-PO2J5OQ3.js";
44
- import "../chunks/chunk-TNL2GWYR.js";
45
- import "../chunks/chunk-WJUHRJVW.js";
46
- import "../chunks/chunk-EV4DRS5M.js";
47
- import "../chunks/chunk-OVUCZLH2.js";
48
- import "../chunks/chunk-SDWYZM64.js";
49
- import "../chunks/chunk-HXHFMFQU.js";
50
- import "../chunks/chunk-D7GEQVLL.js";
51
- import "../chunks/chunk-SZ2UBZKG.js";
52
36
  import "../chunks/chunk-B5L2KMTU.js";
53
- import "../chunks/chunk-ZYSPTOKK.js";
37
+ import "../chunks/chunk-KQCRJIEG.js";
38
+ import "../chunks/chunk-JQ3P552S.js";
39
+ import "../chunks/chunk-7YDXD4MD.js";
54
40
  import "../chunks/chunk-N2XIGMJ6.js";
55
41
  import "../chunks/chunk-HOJXKHPX.js";
56
- import "../chunks/chunk-SWJ7KQSL.js";
42
+ import "../chunks/chunk-ESEMYWUH.js";
57
43
  import "../chunks/chunk-NL2LDKXX.js";
58
44
  import "../chunks/chunk-H2KDLDK6.js";
59
- import "../chunks/chunk-JQ3P552S.js";
60
45
  import "../chunks/chunk-QTXOW5XC.js";
46
+ import "../chunks/chunk-DL6YQDTE.js";
47
+ import "../chunks/chunk-BFWK3TBN.js";
48
+ import "../chunks/chunk-E4HADK7C.js";
49
+ import "../chunks/chunk-W5XYW6ZM.js";
50
+ import "../chunks/chunk-RYCRL3YA.js";
51
+ import "../chunks/chunk-EZD2C7QS.js";
52
+ import "../chunks/chunk-TNL2GWYR.js";
53
+ import "../chunks/chunk-WJUHRJVW.js";
61
54
  import "../chunks/chunk-6RAKXYSR.js";
62
55
  import "../chunks/chunk-D5B4ZOW6.js";
56
+ import "../chunks/chunk-4XIAXX7K.js";
57
+ import "../chunks/chunk-WIBMVNIH.js";
58
+ import "../chunks/chunk-EDQTINTL.js";
59
+ import "../chunks/chunk-HXHFMFQU.js";
63
60
  import "../chunks/chunk-QBD24WTZ.js";
64
- import "../chunks/chunk-OBXAHX3L.js";
61
+ import "../chunks/chunk-YKJHFD64.js";
62
+ import "../chunks/chunk-SZ2UBZKG.js";
63
+ import "../chunks/chunk-AASWJR7Q.js";
65
64
  import "../chunks/chunk-2MGARWKY.js";
66
65
  import "../chunks/chunk-7MR6IJ7I.js";
67
66
  import "../chunks/chunk-H56DDRKE.js";
@@ -13,25 +13,24 @@ import {
13
13
  reviewRequestSchema,
14
14
  scopeSchema,
15
15
  tripleSchema
16
- } from "../chunks/chunk-WKH6BJAZ.js";
16
+ } from "../chunks/chunk-BFWK3TBN.js";
17
17
  import "../chunks/chunk-E4HADK7C.js";
18
18
  import "../chunks/chunk-W5XYW6ZM.js";
19
+ import "../chunks/chunk-RYCRL3YA.js";
19
20
  import "../chunks/chunk-EZD2C7QS.js";
20
- import "../chunks/chunk-CFFPOTP4.js";
21
- import "../chunks/chunk-PO2J5OQ3.js";
22
21
  import "../chunks/chunk-TNL2GWYR.js";
23
22
  import "../chunks/chunk-WJUHRJVW.js";
24
- import "../chunks/chunk-EV4DRS5M.js";
23
+ import "../chunks/chunk-D5B4ZOW6.js";
24
+ import "../chunks/chunk-4XIAXX7K.js";
25
25
  import {
26
26
  reportKeySchema
27
- } from "../chunks/chunk-OVUCZLH2.js";
28
- import "../chunks/chunk-SDWYZM64.js";
27
+ } from "../chunks/chunk-WIBMVNIH.js";
28
+ import "../chunks/chunk-EDQTINTL.js";
29
29
  import "../chunks/chunk-HXHFMFQU.js";
30
- import "../chunks/chunk-D7GEQVLL.js";
31
- import "../chunks/chunk-SZ2UBZKG.js";
32
- import "../chunks/chunk-D5B4ZOW6.js";
33
30
  import "../chunks/chunk-QBD24WTZ.js";
34
- import "../chunks/chunk-OBXAHX3L.js";
31
+ import "../chunks/chunk-YKJHFD64.js";
32
+ import "../chunks/chunk-SZ2UBZKG.js";
33
+ import "../chunks/chunk-AASWJR7Q.js";
35
34
  import "../chunks/chunk-PKB6JRJM.js";
36
35
  export {
37
36
  activeStatuses,
@@ -20,12 +20,12 @@ export declare const authorOutputSchema: z.ZodObject<{
20
20
  domain: z.ZodString;
21
21
  aliases: z.ZodDefault<z.ZodArray<z.ZodString>>;
22
22
  }, z.core.$strip>;
23
+ moneyPages: z.ZodArray<z.ZodString>;
24
+ productBrief: z.ZodString;
23
25
  agentProbes: z.ZodPrefault<z.ZodObject<{
24
- runsPerPrompt: z.ZodDefault<z.ZodNumber>;
25
26
  maxPromptsPerSection: z.ZodOptional<z.ZodNumber>;
27
+ runsPerPrompt: z.ZodDefault<z.ZodNumber>;
26
28
  }, z.core.$strip>>;
27
- moneyPages: z.ZodArray<z.ZodString>;
28
- productBrief: z.ZodString;
29
29
  sections: z.ZodArray<z.ZodObject<{
30
30
  prompts: z.ZodArray<z.ZodObject<{
31
31
  id: z.ZodString;
@@ -104,7 +104,7 @@ export declare const validateAgentCopy: (args: {
104
104
  runId: string;
105
105
  configVersion?: number;
106
106
  grounding?: GroundingBundle;
107
- verifierProfile?: InternalModelRoleConfig;
107
+ verifierProfile: InternalModelRoleConfig;
108
108
  verifier: RecommendationVerifier;
109
109
  previous?: AeoReportCopy | null;
110
110
  brandLogo?: AeoReportCopy["brandLogo"];
@@ -117,7 +117,7 @@ export type CopyFactsUnchangedOptions = {
117
117
  config: AeoAuditConfig;
118
118
  runId: string;
119
119
  grounding?: GroundingBundle;
120
- verifierProfile?: InternalModelRoleConfig;
120
+ verifierProfile: InternalModelRoleConfig;
121
121
  };
122
122
  export declare const copyFactsUnchanged: (provenance: CopyProvenance, { snapshot, config, runId, grounding, verifierProfile, }: CopyFactsUnchangedOptions) => boolean;
123
123
  /**
@@ -133,7 +133,7 @@ export declare const validateHumanCopy: (args: {
133
133
  configVersion: number;
134
134
  grounding: GroundingBundle;
135
135
  verifier: RecommendationVerifier;
136
- verifierProfile?: InternalModelRoleConfig;
136
+ verifierProfile: InternalModelRoleConfig;
137
137
  secrets?: readonly string[];
138
138
  signal?: AbortSignal;
139
139
  }) => Promise<Omit<CopyValidationResult, "provenance"> & {
@@ -153,6 +153,6 @@ export declare const assertCopyValidation: (args: {
153
153
  snapshot: AeoSnapshot;
154
154
  runId: string;
155
155
  grounding: unknown;
156
- verifierProfile?: InternalModelRoleConfig;
156
+ verifierProfile: InternalModelRoleConfig;
157
157
  }) => CopyValidationReceipt;
158
158
  export {};
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import type { ModelCallAccounting } from '../models/accounting';
3
- import { type InternalModelRoleConfig } from '../models/profiles';
3
+ import type { InternalModelRoleConfig } from '../models/profiles';
4
4
  import { type StructuredTransport } from '../models/structured';
5
5
  import { type RecommendationInput, type RecommendationVerifier } from './copy-validation';
6
6
  declare const verdictSchema: z.ZodObject<{
@@ -82,7 +82,7 @@ export declare const premiseVerifierCall: (chunk: readonly (RecommendationInput
82
82
  unreviewedPremiseIndexes?: number[];
83
83
  })[], profile: InternalModelRoleConfig, context?: VerifierCallContext) => {
84
84
  role: {
85
- model: "anthropic/claude-opus-4.6" | "openai/gpt-6-astra" | "zai/glm-5.3" | "moonshotai/kimi-k3" | "deepseek/deepseek-v4.1-flash" | "anthropic/claude-opus-5";
85
+ model: string;
86
86
  providerOptions: {
87
87
  openai?: {
88
88
  reasoningEffort: "high";
@@ -142,7 +142,7 @@ export type PremiseVerdictCheck = {
142
142
  export declare const checkPremiseVerdicts: (inputs: RecommendationInput[], output: z.infer<typeof verdictSchema>) => PremiseVerdictCheck;
143
143
  export declare const createRecommendationVerifier: (args: {
144
144
  accounting: ModelCallAccounting;
145
- profile?: InternalModelRoleConfig;
145
+ profile: InternalModelRoleConfig;
146
146
  transport?: StructuredTransport;
147
147
  memory?: VerifierMemory;
148
148
  }) => RecommendationVerifier;
@@ -153,9 +153,9 @@ export declare const createRecommendationVerifier: (args: {
153
153
  * the caller can classify it.
154
154
  *
155
155
  * Fitting the input limit is not enough on its own for a reasoning model.
156
- * Measured 2026-09-11: packing every block that fit into one call left GLM
157
- * thinking past 40,960 output tokens without returning a verdict, having been
158
- * billed for all of it. What bounds the call is how many judgements it
156
+ * Measured: packing every block that fit into one call left a reasoning
157
+ * model thinking past 40,960 output tokens without returning a verdict,
158
+ * having been billed for all of it. What bounds the call is how many judgements it
159
159
  * contains, not how many bytes.
160
160
  */
161
161
  export declare const verifierChunks: (recommendations: RecommendationInput[], profile: InternalModelRoleConfig, context?: VerifierCallContext) => RecommendationInput[][];
@@ -1,4 +1,4 @@
1
- import type { AeoSurface } from '../schema';
1
+ import { type AeoSurface, type ProbeDepth } from '../schema';
2
2
  export type AnalyzedProbeForScoring = {
3
3
  model: string;
4
4
  promptId: string;
@@ -51,5 +51,5 @@ export declare const computeAISearchSummary: (args: {
51
51
  prompts: PromptForScoring[];
52
52
  results: AnalyzedProbeForScoring[];
53
53
  surfaces: readonly AeoSurface[];
54
- runsPerSurface?: number;
54
+ depth: ProbeDepth;
55
55
  }) => ScoringSummary;
@@ -1,7 +1,8 @@
1
1
  import { z } from 'zod';
2
2
  export declare const toolId = "literally-aeo";
3
- export declare const toolVersion = "0.1.1";
4
- export declare const bundleSchemaVersion = 1;
3
+ export declare const toolVersion = "0.2.1";
4
+ export declare const bundleSchemaVersion = 2;
5
+ export declare const readableBundleSchemaVersions: readonly number[];
5
6
  export declare const traceSchemaVersion = 1;
6
7
  export declare const canonicalization = "literally-aeo-canonical-json-v1";
7
8
  export declare const calculationVersion = 1;
@@ -0,0 +1,37 @@
1
+ import { z } from 'zod';
2
+ import type { BundleEvent } from './contracts';
3
+ export declare const IsolationBoundary: {
4
+ readonly NATIVE: "native";
5
+ readonly CONTAINER: "container";
6
+ };
7
+ export type IsolationBoundary = (typeof IsolationBoundary)[keyof typeof IsolationBoundary];
8
+ export declare const writerIsolationSchema: z.ZodObject<{
9
+ boundary: z.ZodEnum<{
10
+ native: "native";
11
+ container: "container";
12
+ }>;
13
+ codexProbeSandbox: z.ZodString;
14
+ }, z.core.$loose>;
15
+ export type WriterIsolation = z.infer<typeof writerIsolationSchema>;
16
+ /**
17
+ * observedIsolation is this process's boundary: the hosted container runs
18
+ * every agent CLI through an isolated worker under its own UID
19
+ * (AEO_ISOLATED_ADAPTER); anything else runs on the operator's machine as
20
+ * the operator.
21
+ */
22
+ export declare const observedIsolation: () => WriterIsolation;
23
+ export type RunIsolation = {
24
+ /** One per writer, in journal order; unknown for a writer from before
25
+ * isolation was recorded. */
26
+ writers: (IsolationBoundary | 'unknown')[];
27
+ /** The Codex stage sessions' sandbox modes, as each session recorded. */
28
+ stageSandboxes: string[];
29
+ /** The agent CLIs probed by a native writer: they ran as the operator's
30
+ * own account, with its account-level settings. */
31
+ agentCliAccounts: string[];
32
+ };
33
+ /** summarizeIsolation reads a run's isolation from its journal events. */
34
+ export declare const summarizeIsolation: (events: readonly BundleEvent[]) => RunIsolation;
35
+ /** isolationLimitations states what the recorded isolation does not
36
+ * cover, in plain sentences for runtime.json. */
37
+ export declare const isolationLimitations: (isolation: RunIsolation) => string[];
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { RunOrigin, type BundleManifest } from './contracts';
3
+ import { type RunIsolation } from './isolation';
3
4
  import { type CapturedAnswer } from './trace-coverage';
4
5
  declare const runtimeSchema: z.ZodObject<{
5
6
  tool: z.ZodString;
@@ -16,6 +17,7 @@ export type JournalProjection = {
16
17
  origin: RunOrigin;
17
18
  trace: BundleManifest['trace'];
18
19
  writers: z.infer<typeof runtimeSchema>[];
20
+ isolation: RunIsolation;
19
21
  };
20
22
  /**
21
23
  * projectJournal reads the run journal of a work directory, up to
@@ -1,6 +1,7 @@
1
1
  import type { ModelCallAccounting } from '../models/accounting';
2
2
  import type { ProbeTrace } from '../probes/probe-trace';
3
3
  import { type EventType, type OperationKind, type RunOrigin } from './contracts';
4
+ import { type WriterIsolation } from './isolation';
4
5
  export declare const runJournalDir: string;
5
6
  /** Every kind of host-visible operation the recorder can observe. */
6
7
  export declare const recordedOperationKinds: readonly ["codex_session", "host_model_call", "probe", "canary", "research_tool", "technical_check"];
@@ -51,6 +52,9 @@ export type OpenRecorderOptions = {
51
52
  * run_resumed (spec §7.2): the export claims coverage only for kinds
52
53
  * every writer observed. Defaults to the workflow's own. */
53
54
  observes?: readonly OperationKind[];
55
+ /** The boundary this writer runs inside; observed from the process when
56
+ * the writer does not state it. */
57
+ isolation?: WriterIsolation;
54
58
  };
55
59
  /**
56
60
  * openRecorder opens the run journal of a work directory. A new journal
@@ -20,4 +20,13 @@ export type WriterLock = {
20
20
  /** acquireWriterLock takes the run directory for this process, or throws
21
21
  * WriterLockHeldError while a live writer holds it. */
22
22
  export declare const acquireWriterLock: (dir: string, purpose: string) => Promise<WriterLock>;
23
+ /** live: the process runs on this host; abandoned: it is gone from this
24
+ * host; unknown: it belongs to another host, which this one cannot ask. */
25
+ export type WriterLockState = 'live' | 'abandoned' | 'unknown';
26
+ /** readWriterLock reports who holds a run directory without taking it:
27
+ * undefined when no writer does. */
28
+ export declare const readWriterLock: (dir: string) => Promise<{
29
+ owner: WriterLockOwner;
30
+ state: WriterLockState;
31
+ } | undefined>;
23
32
  export {};
@@ -1,3 +1,4 @@
1
+ import { type SiteRequest } from '../grounding/guarded-request';
1
2
  import type { AeoTechnicalChecks } from '../schema';
2
3
  type BotKind = 'training' | 'search' | 'user_fetch';
3
4
  type AiBot = {
@@ -6,8 +7,8 @@ type AiBot = {
6
7
  liveProbeUa?: string;
7
8
  };
8
9
  export declare const aiBotRoster: readonly AiBot[];
9
- export declare const runCrawlerAccessCheck: (brandDomain: string) => Promise<NonNullable<AeoTechnicalChecks["crawlerAccess"]>>;
10
- export declare const checkLlmsTxt: (brandDomain: string) => Promise<NonNullable<AeoTechnicalChecks["llmsTxt"]>>;
10
+ export declare const runCrawlerAccessCheck: (brandDomain: string, request: SiteRequest) => Promise<NonNullable<AeoTechnicalChecks["crawlerAccess"]>>;
11
+ export declare const checkLlmsTxt: (brandDomain: string, request: SiteRequest) => Promise<NonNullable<AeoTechnicalChecks["llmsTxt"]>>;
11
12
  type RobotsGroup = {
12
13
  agents: string[];
13
14
  rules: {
@@ -1,4 +1,11 @@
1
+ import { type HostPacer, type SiteRequest } from '../grounding/guarded-request';
1
2
  import type { AeoTechnicalChecks } from '../schema';
2
3
  type RenderabilityResult = NonNullable<AeoTechnicalChecks['renderability']>[number];
3
- export declare const runRenderabilityCheck: (moneyPages: readonly string[]) => Promise<RenderabilityResult[]>;
4
+ /** The phase's guarded request and the pacer behind it: a page's static
5
+ * fetch and its render are spaced like any other request to its host. */
6
+ export type PagedSite = {
7
+ request: SiteRequest;
8
+ pace: HostPacer;
9
+ };
10
+ export declare const runRenderabilityCheck: (moneyPages: readonly string[], site: PagedSite) => Promise<RenderabilityResult[]>;
4
11
  export {};
@@ -0,0 +1,4 @@
1
+ import { type Flags } from './io';
2
+ /** readOperatorGuide returns the guide this engine ships. */
3
+ export declare const readOperatorGuide: () => Promise<string>;
4
+ export declare const runGuide: (flags: Flags) => Promise<number>;
@@ -0,0 +1,2 @@
1
+ import { type Flags } from './io';
2
+ export declare const runStatus: (flags: Flags, usage: string) => Promise<1 | 0>;
@@ -114,9 +114,9 @@ export declare const parseResearchDocument: (content: string) => {
114
114
  } | null;
115
115
  export declare const createAuthorTools: (options: AuthorToolsOptions) => AuthorTools;
116
116
  /** Rendered HTML for a public page through the Chromium the image already
117
- * carries for the renderability check. The URL was validated and resolves
118
- * to public addresses; subresource requests are held to HTTPS and public
119
- * hosts as well. */
117
+ * carries for the renderability check. Every connection the browser makes
118
+ * passes the guarding proxy; the page's own host is checked first so a
119
+ * private destination fails with its own reason, not a tunnel error. */
120
120
  export declare const renderWithChromium: (url: URL, signal: AbortSignal) => Promise<string>;
121
121
  /** Every research journal entry, in order; an absent journal is empty. */
122
122
  export declare const readResearchJournal: (dir: string, label: string) => Promise<ResearchJournalEntry[]>;
@@ -0,0 +1,26 @@
1
+ export type CodexBinarySource = 'dependency' | 'AEO_CODEX_BIN';
2
+ export type CodexBinary = {
3
+ /** What to spawn, and the arguments that come before Codex's own. */
4
+ command: string;
5
+ prefixArgs: readonly string[];
6
+ /** The file that was resolved, for doctor and the run record. */
7
+ path: string;
8
+ source: CodexBinarySource;
9
+ /** The installed dependency's version, from its manifest; null for a
10
+ * binary named from outside, whose version only running it can tell. */
11
+ version: string | null;
12
+ };
13
+ /**
14
+ * resolveCodexBinary returns the Codex the stages run: AEO_CODEX_BIN when
15
+ * set, else this package's own dependency, started with the running Node so
16
+ * no file mode or PATH entry is involved.
17
+ */
18
+ export declare const resolveCodexBinary: (env?: Record<string, string | undefined>) => CodexBinary;
19
+ /** codexBinaryAt names a Codex executable directly, for a host or a test
20
+ * that supplies its own, as AEO_CODEX_BIN does. */
21
+ export declare const codexBinaryAt: (command: string) => CodexBinary;
22
+ /** codexArgs puts the binary's own prefix in front of Codex's arguments. */
23
+ export declare const codexArgs: (binary: CodexBinary, args: readonly string[]) => string[];
24
+ /** The version the binary reports (`codex-cli 0.150.1`), or null when it
25
+ * cannot be started. */
26
+ export declare const codexBinaryVersion: (binary?: CodexBinary) => Promise<string | null>;
@@ -1,8 +1,7 @@
1
- /** The one model the workflow's stages run on: DeepSeek V4.1 Flash through
2
- * the Vercel AI Gateway, at the highest effort the family takes (the same
3
- * pin `src/models/profiles.ts` uses for the DeepSeek bulk roles). Part of
4
- * every stage's inputs digest. */
5
- export declare const codexModel: {
1
+ import type { CodexStageModel } from '../models/profiles';
2
+ import { type CodexBinary } from './codex-binary';
3
+ /** The gateway the Codex stages reach their model through. */
4
+ export declare const codexGateway: {
6
5
  readonly provider: "vercel";
7
6
  readonly providerName: "Vercel AI Gateway";
8
7
  readonly baseUrl: "https://ai-gateway.vercel.sh/v1";
@@ -10,15 +9,12 @@ export declare const codexModel: {
10
9
  * secret the child process sees. */
11
10
  readonly apiKeyEnv: "AI_GATEWAY_API_KEY";
12
11
  readonly wireApi: "responses";
13
- readonly model: "deepseek/deepseek-v4.1-flash";
14
- readonly reasoningEffort: "high";
15
- /** The model's context window as the gateway reports it (`/v1/models`,
16
- * 2026-09-13). Codex has no metadata for gateway models and otherwise
17
- * falls back to a default window, which decides when it compacts the
18
- * session history; a qualify or review batch that read ten answers and
19
- * their rows would be compacted for no reason. */
20
- readonly contextWindow: 1000000;
21
12
  };
13
+ /** Everything a stage's Codex configuration says about its model, in a
14
+ * fixed key order: part of every stage's inputs digest and session
15
+ * contract, so a resume reruns a batch only when the model changed. */
16
+ export type CodexStageConfig = typeof codexGateway & Pick<CodexStageModel, 'model' | 'reasoningEffort' | 'contextWindow'>;
17
+ export declare const codexStageConfig: (stageModel: CodexStageModel) => CodexStageConfig;
22
18
  export declare const codexHomeDir: (workdir: string) => string;
23
19
  /** The research tool server the author stage's home registers
24
20
  * (specs/aeo-codex-author-spec.md §3.1): the command Codex starts over
@@ -33,15 +29,23 @@ export type ResearchServerConfig = {
33
29
  * directory is the only writable root: a session must not touch /tmp (an
34
30
  * empty /tmp/.git appeared during a run, 2026-09-13), unless the work
35
31
  * directory itself lives there, as it does in the container. */
36
- export declare const codexConfigToml: (workdir: string, research?: ResearchServerConfig) => string;
32
+ type CodexConfigOptions = {
33
+ stageModel: CodexStageModel;
34
+ research?: ResearchServerConfig;
35
+ };
36
+ export declare const codexConfigToml: (workdir: string, { stageModel, research }: CodexConfigOptions) => string;
37
37
  /** Write the isolated home and return the environment a stage runs with:
38
38
  * the path, the home, and the gateway key. Nothing else from the host. */
39
- export declare const prepareCodexHome: (workdir: string, env?: Record<string, string | undefined>, research?: ResearchServerConfig) => Promise<Record<string, string>>;
40
- /** The version of the Codex binary the stages spawn, or null when it is not
41
- * on PATH. This is the binary itself, not a probe worker's login: the
42
- * stages and the author run it from the host process with an isolated home
43
- * and the gateway key, so no agent credential is involved. */
44
- export declare const codexCliVersion: (command?: string) => Promise<string | null>;
39
+ type PrepareCodexHomeOptions = CodexConfigOptions & {
40
+ env?: Record<string, string | undefined>;
41
+ };
42
+ export declare const prepareCodexHome: (workdir: string, { stageModel, research, env }: PrepareCodexHomeOptions) => Promise<Record<string, string>>;
43
+ /** The version of the Codex binary the stages spawn, or null when it
44
+ cannot be started. The stages and the author run it from the host process
45
+ with an isolated home and the gateway key, so no agent credential is
46
+ involved. */
47
+ export declare const codexCliVersion: (binary?: CodexBinary) => Promise<string | null>;
45
48
  /** The values the work directory's journals must never carry: the store
46
49
  * URL and the gateway key, from wherever the host holds them. */
47
50
  export declare const workflowSecrets: (env: NodeJS.ProcessEnv) => string[];
51
+ export {};
@@ -70,7 +70,7 @@ export declare const copyEditCall: (args: {
70
70
  }) => {
71
71
  trimmed: string[];
72
72
  role: {
73
- model: "anthropic/claude-opus-4.6" | "openai/gpt-6-astra" | "zai/glm-5.3" | "moonshotai/kimi-k3" | "deepseek/deepseek-v4.1-flash" | "anthropic/claude-opus-5";
73
+ model: string;
74
74
  providerOptions: {
75
75
  openai?: {
76
76
  reasoningEffort: "high";
@@ -34,7 +34,7 @@ export declare const materializeCopyInputs: (args: {
34
34
  notes?: readonly string[];
35
35
  }) => Promise<string[]>;
36
36
  /** The host's verdict on a draft: schema, facts, banlist, premises, and
37
- * the premise verifier on the DeepSeek role. `invalid_copy` is the only
37
+ * the premise verifier on the run's pinned role. `invalid_copy` is the only
38
38
  * outcome that requires a verifier edit; operational failures retain the draft. */
39
39
  export declare const validateCopyDraft: (args: {
40
40
  draft: unknown;
@@ -46,9 +46,8 @@ export declare const validateCopyDraft: (args: {
46
46
  secrets: readonly string[];
47
47
  /** The premise verifier role the run pinned: the publication gate
48
48
  * re-checks the receipt against exactly that role, so the draft must be
49
- * verified by it. Absent (a local run), the DeepSeek-only profile's
50
- * role. */
51
- verifierRole?: InternalModelRoleConfig;
49
+ * verified by it. */
50
+ verifierRole: InternalModelRoleConfig;
52
51
  /** A rewrite pass keeps what the reviewer did not question: the logo
53
52
  * and eyebrow of the draft they saw. */
54
53
  previous?: AeoReportCopy | null;
@@ -9,10 +9,10 @@ import type { RunSource } from './run-source';
9
9
  import type { ReportQuality } from './quality';
10
10
  /** The snapshot's analyzer provenance: the Codex analyze stage under the
11
11
  * workflow version, in a number space of its own (the retired in-process
12
- * analyzer counted 1 to 8), and the pinned stage model. */
13
- export declare const codexAnalyzer: {
12
+ * analyzer counted 1 to 8), and the run's stage model. */
13
+ export declare const codexAnalyzer: (model: string) => {
14
14
  version: number;
15
- model: "deepseek/deepseek-v4.1-flash";
15
+ model: string;
16
16
  };
17
17
  export type FinishResult = {
18
18
  /** True when the step reused what an earlier run assembled from the
@@ -41,6 +41,8 @@ export declare const finishRun: (args: {
41
41
  /** Files excluded by degraded batches, recorded as partial failures. */
42
42
  degraded: readonly string[];
43
43
  write: boolean;
44
+ /** The model ID the Codex stages ran on, the analyzer's provenance. */
45
+ stageModelId: string;
44
46
  /** Factual grounding over the run's manifest (the container job); a
45
47
  * source that already carries a bundle needs none. */
46
48
  ground?: GroundRun;
@@ -1,5 +1,9 @@
1
+ import { type ModelCallAccounting } from '../models/accounting';
1
2
  import type { InternalModelContext } from '../models/context';
2
- import { type InternalModelProfileId } from '../models/profiles';
3
+ import type { InternalModelProfile } from '../models/profiles';
3
4
  export declare const hostStepMaxUsd = 5;
4
- export declare const copyVerifierProfile: InternalModelProfileId;
5
- export declare const hostModels: (profileId?: InternalModelProfileId) => InternalModelContext;
5
+ /** A fresh memory budget for one host step. */
6
+ export declare const hostStepAccounting: () => ModelCallAccounting;
7
+ export declare const hostModels: (profile: InternalModelProfile) => InternalModelContext;
8
+ /** The profile a run pinned; a run without one cannot call a model. */
9
+ export declare const pinnedProfileOf: (profile: InternalModelProfile | undefined) => InternalModelProfile;
@@ -5,8 +5,9 @@ import { type WriterLock } from '../bundle/writer-lock';
5
5
  import type { GroundingBundle } from '../grounding/schema';
6
6
  import { type AeoReportCopy } from '../agents/copy-schema';
7
7
  import { type AeoAuditConfig } from '../schema';
8
- import type { InternalModelRoleConfig } from '../models/profiles';
8
+ import type { CodexStageModel, InternalModelRoleConfig } from '../models/profiles';
9
9
  import type { InternalModelContext } from '../models/context';
10
+ import { type ModelCallAccounting } from '../models/accounting';
10
11
  import { type AggregateInputs } from './aggregate';
11
12
  import { type FinishResult, type GroundRun } from './finish';
12
13
  import type { StageName } from './schemas';
@@ -125,6 +126,14 @@ export declare const prepareWorkdir: (source: RunSource, dir: string, options?:
125
126
  writer: WriterLock;
126
127
  recorder: ExecutionRecorder;
127
128
  };
129
+ /** The Codex stages' model for a run whose pinned profile carries none
130
+ * (one pinned before profiles did). A profile's own always wins. */
131
+ stageModel?: CodexStageModel;
132
+ /** The run's ledger, unwrapped: every Codex session is reserved and
133
+ * settled on it beside the host's model calls (specs/aeo-claude-
134
+ * operator-spec.md §4.2). A session is a codex_session operation of
135
+ * its own, so it never goes through the recording wrapper. */
136
+ ledger?: ModelCallAccounting;
128
137
  }) => Promise<WorkflowContext>;
129
138
  /** The copy stage's inputs from the finished snapshot, and the host's
130
139
  * verdict on what the writer produces. */