literally-aeo 0.2.2 → 0.4.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.
- package/README.md +183 -14
- package/dist/author-tools.js +386 -283
- package/dist/cli.mjs +19943 -16532
- package/dist/lib/access/schema.js +6 -6
- package/dist/lib/agents/author-schema.js +12 -12
- package/dist/lib/agents/author-validation.js +15 -15
- package/dist/lib/agents/copy-validation.js +18 -17
- package/dist/lib/agents/copywriter-input.js +16 -15
- package/dist/lib/agents/credentials.js +1 -1
- package/dist/lib/agents/facts.js +15 -14
- package/dist/lib/agents/methodology.js +56 -0
- package/dist/lib/agents/narrative-facts.js +13 -13
- package/dist/lib/agents/verifier.js +22 -20
- package/dist/lib/analysis/domain-classifier.js +21 -19
- package/dist/lib/analysis/domain-labels.js +12 -12
- package/dist/lib/analysis/outreach.js +2 -2
- package/dist/lib/analysis/progress-schema.js +6 -2
- package/dist/lib/analysis/progress.js +17 -16
- package/dist/lib/analysis/rate-evidence.js +6 -0
- package/dist/lib/analysis/retrieval.js +12 -12
- package/dist/lib/analysis/scoring.js +12 -12
- package/dist/lib/analysis/search-analyzer.js +13 -13
- package/dist/lib/analysis/sentiment.js +20 -18
- package/dist/lib/analysis/source-mix.js +2 -2
- package/dist/lib/author/examples.js +13 -13
- package/dist/lib/bundle/contracts.js +19 -13
- package/dist/lib/bundle/export.js +86 -31
- package/dist/lib/bundle/isolation.js +2 -2
- package/dist/lib/bundle/journal.js +14 -14
- package/dist/lib/bundle/project-journal.js +18 -18
- package/dist/lib/bundle/project.js +87 -30
- package/dist/lib/bundle/read.js +87 -32
- package/dist/lib/bundle/recorder.js +16 -16
- package/dist/lib/bundle/redact.js +14 -14
- package/dist/lib/bundle/trace-coverage.js +14 -14
- package/dist/lib/bundle/verify-integrity.js +17 -17
- package/dist/lib/bundle/verify-measurement.js +31 -22
- package/dist/lib/bundle/verify-report.js +36 -26
- package/dist/lib/bundle/verify.js +45 -35
- package/dist/lib/capture-manifest.js +13 -13
- package/dist/lib/checks/crawler-access.js +2 -2
- package/dist/lib/checks/renderability.js +2 -2
- package/dist/lib/checks/run-checks.js +20 -20
- package/dist/lib/chunks/{chunk-4XIAXX7K.js → chunk-2A327DMI.js} +1 -1
- package/dist/lib/chunks/{chunk-7WO3FFPS.js → chunk-2FK6QVU6.js} +3 -3
- package/dist/lib/chunks/{chunk-F2NSJ6PG.js → chunk-2WS6RC35.js} +8 -4
- package/dist/lib/chunks/{chunk-6EI4CVRW.js → chunk-3ESH5NDR.js} +5 -1
- package/dist/lib/chunks/{chunk-WIBMVNIH.js → chunk-3F5ZP2EO.js} +4 -4
- package/dist/lib/chunks/{chunk-ZXQPD4OC.js → chunk-3TF4JGQA.js} +126 -5
- package/dist/lib/chunks/{chunk-BFWK3TBN.js → chunk-3YPAIXFG.js} +8 -8
- package/dist/lib/chunks/{chunk-PIFTG6YW.js → chunk-4332MUTU.js} +4 -4
- package/dist/lib/chunks/{chunk-K2FZFESR.js → chunk-4MOZ3DVS.js} +8 -7
- package/dist/lib/chunks/{chunk-KFAT65P7.js → chunk-4SCPKDJV.js} +1 -1
- package/dist/lib/chunks/{chunk-6HMHXSCS.js → chunk-4ZR2LPUD.js} +3 -3
- package/dist/lib/chunks/{chunk-QGZ4QSUE.js → chunk-55KFAM4X.js} +36 -5
- package/dist/lib/chunks/{chunk-FJL2V6P5.js → chunk-66OL2XA6.js} +13 -8
- package/dist/lib/chunks/{chunk-4QQJXCD2.js → chunk-6FRZN5SA.js} +13 -28
- package/dist/lib/chunks/{chunk-3OE4UQIB.js → chunk-6FXNXXY7.js} +116 -7
- package/dist/lib/chunks/chunk-6TJXJZUL.js +97 -0
- package/dist/lib/chunks/{chunk-YKJHFD64.js → chunk-72ZLXWD4.js} +21 -4
- package/dist/lib/chunks/{chunk-2FOKEIIN.js → chunk-744YWRX7.js} +1 -1
- package/dist/lib/chunks/{chunk-I3UE52ZV.js → chunk-77EQ3RT6.js} +4 -4
- package/dist/lib/chunks/{chunk-AJO7XVXK.js → chunk-7GHR6MOG.js} +12 -12
- package/dist/lib/chunks/{chunk-JYCVBFH5.js → chunk-7GJTWUI4.js} +2 -2
- package/dist/lib/chunks/{chunk-UNCUG2YS.js → chunk-7NQOQNE7.js} +3 -3
- package/dist/lib/chunks/chunk-7Y3S7LD5.js +160 -0
- package/dist/lib/chunks/{chunk-U64NCRRR.js → chunk-7ZQAAEOK.js} +7 -6
- package/dist/lib/chunks/{chunk-MENTBQGB.js → chunk-A4QTI7FN.js} +78 -19
- package/dist/lib/chunks/{chunk-Y2CZ6FZY.js → chunk-ADNYALFZ.js} +36 -7
- package/dist/lib/chunks/{chunk-CH7OCYDL.js → chunk-B5ZAFK6T.js} +1 -1
- package/dist/lib/chunks/{chunk-WDT2Y7D7.js → chunk-B6YKBZXD.js} +20 -11
- package/dist/lib/chunks/{chunk-ZSEY7AHQ.js → chunk-BBK54RVK.js} +14 -11
- package/dist/lib/chunks/{chunk-YGLWQFKL.js → chunk-BE7EDOJY.js} +3 -3
- package/dist/lib/chunks/{chunk-OD36HUXA.js → chunk-BECSPYFC.js} +7 -8
- package/dist/lib/chunks/{chunk-HGGOGCPX.js → chunk-BNKNZTYH.js} +17 -14
- package/dist/lib/chunks/{chunk-2KH7LNK7.js → chunk-BOLZJBPS.js} +56 -15
- package/dist/lib/chunks/chunk-BQMUZLHO.js +17 -0
- package/dist/lib/chunks/chunk-C22Q3TKU.js +90 -0
- package/dist/lib/chunks/chunk-C3AZMWQJ.js +109 -0
- package/dist/lib/chunks/{chunk-T6XZQOXS.js → chunk-CCSF7LP5.js} +7 -7
- package/dist/lib/chunks/{chunk-JBOOD6MU.js → chunk-CHDK5EQK.js} +57 -16
- package/dist/lib/chunks/{chunk-NZFMOQHU.js → chunk-CWEVVIZI.js} +11 -1
- package/dist/lib/chunks/{chunk-75DMLOQ7.js → chunk-CYJNBVQB.js} +1 -1
- package/dist/lib/chunks/{chunk-66T7JC57.js → chunk-CZRHH5HF.js} +85 -5
- package/dist/lib/chunks/{chunk-FAUFE7MI.js → chunk-D7N5OLYL.js} +1 -1
- package/dist/lib/chunks/chunk-DBQ3HVPX.js +73 -0
- package/dist/lib/chunks/{chunk-PKNODC6Y.js → chunk-DC6CS6GC.js} +1 -1
- package/dist/lib/chunks/{chunk-7YDXD4MD.js → chunk-DHQKAIOP.js} +2 -2
- package/dist/lib/chunks/{chunk-LTCDLURT.js → chunk-DIR4UIRF.js} +73 -24
- package/dist/lib/chunks/{chunk-E2YTTB6Q.js → chunk-DSK3PM4Z.js} +1 -1
- package/dist/lib/chunks/chunk-DWOTAT7R.js +312 -0
- package/dist/lib/chunks/chunk-E2JICEL3.js +446 -0
- package/dist/lib/chunks/{chunk-HXHFMFQU.js → chunk-E5COBP7A.js} +13 -2
- package/dist/lib/chunks/{chunk-XAN4CRFP.js → chunk-EUHVUF7I.js} +1 -1
- package/dist/lib/chunks/{chunk-TNL2GWYR.js → chunk-EUXNCXCR.js} +22 -0
- package/dist/lib/chunks/chunk-F3MHGDZG.js +97 -0
- package/dist/lib/chunks/chunk-F7LCGM6W.js +120 -0
- package/dist/lib/chunks/chunk-FJAZEGU6.js +354 -0
- package/dist/lib/chunks/chunk-FOJVAGAD.js +91 -0
- package/dist/lib/chunks/chunk-FXR6P7HY.js +14 -0
- package/dist/lib/chunks/chunk-GC4XJYQW.js +145 -0
- package/dist/lib/chunks/chunk-GQZHZSAQ.js +108 -0
- package/dist/lib/chunks/{chunk-BRENK356.js → chunk-GZC3ASNL.js} +1 -1
- package/dist/lib/chunks/{chunk-3CMPR6ZZ.js → chunk-H2JJCIZW.js} +1 -1
- package/dist/lib/chunks/{chunk-XSER7WEB.js → chunk-H33MFLSH.js} +12 -12
- package/dist/lib/chunks/chunk-H4IE2JE6.js +118 -0
- package/dist/lib/chunks/chunk-H4LZ3U26.js +31 -0
- package/dist/lib/chunks/{chunk-XFUYEFQP.js → chunk-HHGLGVOZ.js} +1 -1
- package/dist/lib/chunks/{chunk-52F5XYOW.js → chunk-I2KRWXXO.js} +15 -7
- package/dist/lib/chunks/chunk-IDNT2WBK.js +27 -0
- package/dist/lib/chunks/{chunk-R5UPOEWE.js → chunk-IUQ6C4Y6.js} +14 -4
- package/dist/lib/chunks/chunk-IXYVHA7C.js +101 -0
- package/dist/lib/chunks/{chunk-FDM2YNQL.js → chunk-J3BZ3WPV.js} +1 -1
- package/dist/lib/chunks/{chunk-U6BW6LGX.js → chunk-J63WQUKR.js} +10 -3
- package/dist/lib/chunks/{chunk-OOLWU667.js → chunk-JBEKIT7Z.js} +10 -10
- package/dist/lib/chunks/chunk-JEAZREDN.js +94 -0
- package/dist/lib/chunks/{chunk-2B5QF6UQ.js → chunk-JFUWSJZT.js} +46 -5
- package/dist/lib/chunks/{chunk-SIJOQRRK.js → chunk-JHOLYLI4.js} +4 -2
- package/dist/lib/chunks/chunk-JOLIDHZV.js +39 -0
- package/dist/lib/chunks/{chunk-HCUJ2J7P.js → chunk-JWH33YCK.js} +17 -16
- package/dist/lib/chunks/{chunk-HGGRPOSA.js → chunk-K5K27WBZ.js} +10 -9
- package/dist/lib/chunks/{chunk-7HM6IZ3L.js → chunk-KU53HTUY.js} +2 -2
- package/dist/lib/chunks/{chunk-PIF3GL62.js → chunk-LJTFZ52Y.js} +24 -12
- package/dist/lib/chunks/chunk-LMUTZ6O2.js +335 -0
- package/dist/lib/chunks/chunk-LTPLZSXI.js +86 -0
- package/dist/lib/chunks/{chunk-RXSHKWZJ.js → chunk-M3WZCV65.js} +3 -3
- package/dist/lib/chunks/{chunk-ZOGIJGU3.js → chunk-MN3YGXJH.js} +17 -17
- package/dist/lib/chunks/{chunk-ZQ3ER7JD.js → chunk-MSEGYN6W.js} +32 -14
- package/dist/lib/chunks/{chunk-JQDQVG3D.js → chunk-MWZIVYMK.js} +1 -1
- package/dist/lib/chunks/{chunk-WCLKIPJV.js → chunk-MX6YA6YH.js} +1 -1
- package/dist/lib/chunks/{chunk-GEFKDW7X.js → chunk-N4PQ6RPQ.js} +14 -2
- package/dist/lib/chunks/{chunk-EDQTINTL.js → chunk-N5IAPSLM.js} +52 -6
- package/dist/lib/chunks/{chunk-V5JJEEBT.js → chunk-NAPYHYA5.js} +6 -5
- package/dist/lib/chunks/{chunk-LR27H2HZ.js → chunk-NWUZJUJX.js} +8 -8
- package/dist/lib/chunks/{chunk-U5USH2HB.js → chunk-NZTOOSLX.js} +3 -3
- package/dist/lib/chunks/{chunk-S6QOXJAL.js → chunk-OQVEYTVV.js} +16 -7
- package/dist/lib/chunks/{chunk-GLUGYZQO.js → chunk-OXPPUUIO.js} +48 -60
- package/dist/lib/chunks/chunk-PPTUCXWS.js +95 -0
- package/dist/lib/chunks/{chunk-W5XYW6ZM.js → chunk-PT6PK2MJ.js} +26 -19
- package/dist/lib/chunks/{chunk-7DNLRXEY.js → chunk-PUZBLM7E.js} +9 -6
- package/dist/lib/chunks/{chunk-7YZPEX3T.js → chunk-PVW5W2MX.js} +9 -4
- package/dist/lib/chunks/{chunk-YEUCAPKP.js → chunk-QFIJSLAR.js} +26 -6
- package/dist/lib/chunks/{chunk-J5NPHPXY.js → chunk-QTUWCZ3X.js} +43 -8
- package/dist/lib/chunks/{chunk-6GKKALCI.js → chunk-R4BFYHLK.js} +2 -2
- package/dist/lib/chunks/chunk-R75F4MKU.js +162 -0
- package/dist/lib/chunks/{chunk-V5B6UZ3E.js → chunk-RQGEPR6V.js} +1 -0
- package/dist/lib/chunks/{chunk-TAPVCSCR.js → chunk-SCZ7PA4T.js} +1 -1
- package/dist/lib/chunks/{chunk-K4Y5NT4M.js → chunk-SFPPZGTA.js} +112 -26
- package/dist/lib/chunks/chunk-SN3DKEOY.js +11 -0
- package/dist/lib/chunks/{chunk-UYDQXXDQ.js → chunk-ST6IVXHT.js} +1 -1
- package/dist/lib/chunks/chunk-SXCTAL6V.js +116 -0
- package/dist/lib/chunks/chunk-SXVKFPC4.js +288 -0
- package/dist/lib/chunks/chunk-T4Z3GAEH.js +292 -0
- package/dist/lib/chunks/{chunk-RK57YZKM.js → chunk-T7DNKNMG.js} +81 -26
- package/dist/lib/chunks/{chunk-DL6YQDTE.js → chunk-TPPBTN3E.js} +50 -21
- package/dist/lib/chunks/{chunk-J7QKT5E7.js → chunk-UBH2P5IR.js} +91 -32
- package/dist/lib/chunks/{chunk-BYHXNFWN.js → chunk-UIXTXI7P.js} +9 -7
- package/dist/lib/chunks/chunk-UWXR24TV.js +38 -0
- package/dist/lib/chunks/chunk-V57HW7T4.js +86 -0
- package/dist/lib/chunks/{chunk-XA27KAUV.js → chunk-VCFLUGLQ.js} +80 -48
- package/dist/lib/chunks/{chunk-VL253W5C.js → chunk-VMDGYDZW.js} +3 -1
- package/dist/lib/chunks/{chunk-RIJERFGU.js → chunk-W6TGEP5C.js} +96 -26
- package/dist/lib/chunks/chunk-WB4ZBRF6.js +338 -0
- package/dist/lib/chunks/{chunk-F7DBTXKG.js → chunk-WQTDLVKV.js} +4 -3
- package/dist/lib/chunks/{chunk-VXYQWE45.js → chunk-WRH4CIFQ.js} +3 -3
- package/dist/lib/chunks/{chunk-JKPBXPCW.js → chunk-WSFXGX7S.js} +3 -3
- package/dist/lib/chunks/{chunk-BXF4OC74.js → chunk-WSWQCHSW.js} +32 -17
- package/dist/lib/chunks/{chunk-EOO5RBUW.js → chunk-WTAIFAQV.js} +42 -6
- package/dist/lib/chunks/{chunk-7YYDUHJG.js → chunk-WZA4H4TG.js} +39 -13
- package/dist/lib/chunks/{chunk-RYCRL3YA.js → chunk-X3HRV5CF.js} +12 -4
- package/dist/lib/chunks/{chunk-S2SFHTJD.js → chunk-XPUCJQIB.js} +39 -1
- package/dist/lib/chunks/{chunk-PWOYEIPF.js → chunk-Y2NZTYKV.js} +8 -8
- package/dist/lib/chunks/chunk-YLS4XX7B.js +105 -0
- package/dist/lib/chunks/{chunk-7CW6U5WJ.js → chunk-YPMRZX4U.js} +1 -1
- package/dist/lib/chunks/{chunk-SASE7U6E.js → chunk-YQD5ITKI.js} +1 -1
- package/dist/lib/chunks/{chunk-LTI2YYU3.js → chunk-YTEUQEJE.js} +1 -1
- package/dist/lib/chunks/{chunk-4GLW3ZRO.js → chunk-YYP547FI.js} +146 -22
- package/dist/lib/chunks/{chunk-QD3JXA3Y.js → chunk-ZDCKZEDJ.js} +56 -36
- package/dist/lib/chunks/{chunk-AT3XMGES.js → chunk-ZWTNELCS.js} +12 -6
- package/dist/lib/chunks/{chunk-VHKHYAC5.js → chunk-ZWWIXFCV.js} +3 -3
- package/dist/lib/chunks/{chunk-MA27TFEY.js → chunk-ZXL6FZX4.js} +8 -1
- package/dist/lib/cli/bundle-commands.js +137 -111
- package/dist/lib/cli/guide-command.js +1 -1
- package/dist/lib/cli/io.js +1 -1
- package/dist/lib/cli/run-commands.js +349 -168
- package/dist/lib/cli/status-command.js +114 -87
- package/dist/lib/codex-workflow/aggregate.js +41 -24
- package/dist/lib/codex-workflow/author-search.js +1 -1
- package/dist/lib/codex-workflow/author-tools.js +14 -14
- package/dist/lib/codex-workflow/author.js +35 -32
- package/dist/lib/codex-workflow/capture.js +53 -28
- package/dist/lib/codex-workflow/checkpoint.js +14 -14
- package/dist/lib/codex-workflow/checks.js +16 -16
- package/dist/lib/codex-workflow/copy-editor.js +29 -26
- package/dist/lib/codex-workflow/copy-recovery.js +13 -13
- package/dist/lib/codex-workflow/copy.js +32 -23
- package/dist/lib/codex-workflow/finish.js +67 -37
- package/dist/lib/codex-workflow/host-models.js +2 -2
- package/dist/lib/codex-workflow/loop.js +96 -72
- package/dist/lib/codex-workflow/prompts.js +1 -1
- package/dist/lib/codex-workflow/quality.js +13 -13
- package/dist/lib/codex-workflow/run-inputs.js +13 -13
- package/dist/lib/codex-workflow/run-source.js +24 -24
- package/dist/lib/codex-workflow/schemas.js +13 -13
- package/dist/lib/codex-workflow/session.js +15 -15
- package/dist/lib/codex-workflow/stage.js +49 -46
- package/dist/lib/codex-workflow/workdir.js +25 -18
- package/dist/lib/engine/audit-file.js +50 -16
- package/dist/lib/engine/author.js +77 -57
- package/dist/lib/engine/budget.js +3 -1
- package/dist/lib/engine/cost-estimate.js +46 -16
- package/dist/lib/engine/local-run.js +113 -85
- package/dist/lib/engine/preflight.js +47 -17
- package/dist/lib/engine/rejudge.js +121 -92
- package/dist/lib/engine/run-bindings.js +66 -0
- package/dist/lib/engine/run-configuration.js +3 -1
- package/dist/lib/engine/run-method.js +67 -0
- package/dist/lib/engine/run-models.js +48 -0
- package/dist/lib/engine/run-status.js +112 -85
- package/dist/lib/engine/templates.js +47 -17
- package/dist/lib/grounding/controller.js +10 -9
- package/dist/lib/grounding/extract.js +10 -8
- package/dist/lib/grounding/grounding-runtime.js +32 -31
- package/dist/lib/grounding/model-usage.js +2 -2
- package/dist/lib/grounding/model.js +9 -7
- package/dist/lib/grounding/recorded-tools.js +17 -17
- package/dist/lib/grounding/tools.js +5 -1
- package/dist/lib/harness/report/artifacts.js +12 -12
- package/dist/lib/harness/report/capture-coverage.js +4 -4
- package/dist/lib/lib/checkpoint.js +12 -12
- package/dist/lib/lib/compare.js +6 -0
- package/dist/lib/lib/log.js +1 -1
- package/dist/lib/lib/progress-comparison.js +3 -2
- package/dist/lib/models/accounting.js +1 -1
- package/dist/lib/models/batching.js +7 -5
- package/dist/lib/models/budget-protection.js +1 -1
- package/dist/lib/models/catalog.js +16 -0
- package/dist/lib/models/cost-coefficients.js +12 -1
- package/dist/lib/models/gateway-cost.js +7 -0
- package/dist/lib/models/local-profile.js +2 -2
- package/dist/lib/models/open-model.js +7 -0
- package/dist/lib/models/profiles.js +3 -1
- package/dist/lib/models/structured.js +6 -4
- package/dist/lib/models/supported-models.js +2 -2
- package/dist/lib/pipeline.js +50 -27
- package/dist/lib/probes/adapter.js +6 -0
- package/dist/lib/probes/adapters/cli-agents.js +44 -0
- package/dist/lib/probes/adapters/cli-claude-code.js +22 -0
- package/dist/lib/probes/adapters/cli-codex.js +24 -0
- package/dist/lib/probes/adapters/cli-cursor.js +22 -0
- package/dist/lib/probes/adapters/cli-process.js +35 -0
- package/dist/lib/probes/adapters/dataforseo-ai-mode.js +24 -0
- package/dist/lib/probes/adapters/dataforseo-ai-overview.js +21 -0
- package/dist/lib/probes/adapters/dataforseo-chatgpt-app.js +22 -0
- package/dist/lib/probes/adapters/gateway-chat.js +33 -0
- package/dist/lib/probes/adapters/gateway-perplexity.js +20 -0
- package/dist/lib/probes/agent-cli-parsers.js +4 -3
- package/dist/lib/probes/agent-clis.js +34 -19
- package/dist/lib/probes/answer-text.js +22 -0
- package/dist/lib/probes/attempt.js +29 -0
- package/dist/lib/probes/bindings.js +101 -0
- package/dist/lib/probes/charged-trace.js +49 -3
- package/dist/lib/probes/chat-retrieval.js +7 -2
- package/dist/lib/probes/dataforseo-locale.js +9 -3
- package/dist/lib/probes/dataforseo.js +16 -5
- package/dist/lib/probes/grounding-urls.js +6 -4
- package/dist/lib/probes/legacy-bindings.js +7 -0
- package/dist/lib/probes/limits.js +1 -1
- package/dist/lib/probes/probes.js +42 -19
- package/dist/lib/probes/web-tool-guard.js +3 -3
- package/dist/lib/report/contracts.js +7 -7
- package/dist/lib/report/core/progress-comparison.js +3 -2
- package/dist/lib/report/core/progress-schema.js +6 -2
- package/dist/lib/report/core/progress-statistics.js +8 -0
- package/dist/lib/report/core/rate-interval.js +6 -0
- package/dist/lib/report/core/retrieval.js +4 -1
- package/dist/lib/report/core/schema.js +23 -3
- package/dist/lib/report/core/surfaces.js +23 -1
- package/dist/lib/retrieval.js +4 -1
- package/dist/lib/runner.js +28 -25
- package/dist/lib/schema.js +37 -13
- package/dist/lib/section-result.js +15 -13
- package/dist/lib/stores/artifacts.js +15 -15
- package/dist/lib/stores/files.js +31 -27
- package/dist/lib/stores/local-versions.js +12 -12
- package/dist/lib/stores/memory.js +33 -27
- package/dist/lib/stores/publication.js +19 -18
- package/dist/lib/stores/unit-record.js +28 -0
- package/dist/lib/surfaces.js +23 -1
- package/dist/lib/viewer/page.js +1 -1
- package/dist/lib/viewer/server.js +47 -37
- package/dist/lib/workflow/schema.js +10 -10
- package/dist/types/agents/author-schema.d.ts +10 -10
- package/dist/types/agents/facts.d.ts +1 -1
- package/dist/types/agents/methodology.d.ts +26 -0
- package/dist/types/agents/verifier.d.ts +1 -1
- package/dist/types/analysis/domain-labels.d.ts +1 -1
- package/dist/types/analysis/rate-evidence.d.ts +11 -0
- package/dist/types/analysis/scoring.d.ts +17 -0
- package/dist/types/analysis/sentiment.d.ts +8 -4
- package/dist/types/bundle/contracts.d.ts +42 -20
- package/dist/types/bundle/project.d.ts +6 -0
- package/dist/types/bundle/recorder.d.ts +1 -1
- package/dist/types/bundle/trace-coverage.d.ts +4 -2
- package/dist/types/capture-manifest.d.ts +9 -4
- package/dist/types/codex-workflow/aggregate.d.ts +90 -12
- package/dist/types/codex-workflow/capture.d.ts +13 -0
- package/dist/types/codex-workflow/copy-editor.d.ts +40 -1
- package/dist/types/codex-workflow/copy.d.ts +136 -1
- package/dist/types/codex-workflow/run-inputs.d.ts +138 -32
- package/dist/types/codex-workflow/schemas.d.ts +20 -20
- package/dist/types/codex-workflow/stage.d.ts +7 -1
- package/dist/types/codex-workflow/workdir.d.ts +0 -1
- package/dist/types/engine/audit-file.d.ts +96 -6
- package/dist/types/engine/budget.d.ts +19 -6
- package/dist/types/engine/cost-estimate.d.ts +15 -2
- package/dist/types/engine/local-run.d.ts +12 -2
- package/dist/types/engine/preflight.d.ts +27 -6
- package/dist/types/engine/run-bindings.d.ts +52 -0
- package/dist/types/engine/run-configuration.d.ts +15 -3
- package/dist/types/engine/run-method.d.ts +58 -0
- package/dist/types/engine/run-models.d.ts +89 -0
- package/dist/types/engine/templates.d.ts +3 -1
- package/dist/types/grounding/tools.d.ts +10 -0
- package/dist/types/harness/report/artifacts.d.ts +48 -24
- package/dist/types/lib/compare.d.ts +3 -0
- package/dist/types/models/accounting.d.ts +7 -0
- package/dist/types/models/catalog.d.ts +52 -0
- package/dist/types/models/cost-coefficients.d.ts +77 -24
- package/dist/types/models/gateway-cost.d.ts +3 -0
- package/dist/types/models/local-profile.d.ts +5 -1
- package/dist/types/models/open-model.d.ts +10 -0
- package/dist/types/models/profiles.d.ts +113 -14
- package/dist/types/models/supported-models.d.ts +13 -3
- package/dist/types/pipeline.d.ts +2 -0
- package/dist/types/probes/adapter.d.ts +121 -0
- package/dist/types/probes/adapters/cli-agents.d.ts +19 -0
- package/dist/types/probes/adapters/cli-claude-code.d.ts +4 -0
- package/dist/types/probes/adapters/cli-codex.d.ts +10 -0
- package/dist/types/probes/adapters/cli-cursor.d.ts +4 -0
- package/dist/types/probes/adapters/cli-process.d.ts +86 -0
- package/dist/types/probes/adapters/dataforseo-ai-mode.d.ts +16 -0
- package/dist/types/probes/adapters/dataforseo-ai-overview.d.ts +12 -0
- package/dist/types/probes/adapters/dataforseo-chatgpt-app.d.ts +12 -0
- package/dist/types/probes/adapters/gateway-chat.d.ts +61 -0
- package/dist/types/probes/adapters/gateway-perplexity.d.ts +10 -0
- package/dist/types/probes/agent-clis.d.ts +7 -49
- package/dist/types/probes/answer-text.d.ts +20 -0
- package/dist/types/probes/attempt.d.ts +113 -0
- package/dist/types/probes/bindings.d.ts +168 -0
- package/dist/types/probes/charged-trace.d.ts +8 -1
- package/dist/types/probes/chat-retrieval.d.ts +2 -0
- package/dist/types/probes/dataforseo-locale.d.ts +16 -0
- package/dist/types/probes/dataforseo.d.ts +66 -1
- package/dist/types/probes/grounding-urls.d.ts +18 -5
- package/dist/types/probes/legacy-bindings.d.ts +36 -0
- package/dist/types/probes/limits.d.ts +12 -6
- package/dist/types/probes/probe-trace.d.ts +13 -0
- package/dist/types/probes/probes.d.ts +7 -5
- package/dist/types/report/contracts.d.ts +184 -30
- package/dist/types/report/core/progress-comparison.d.ts +19 -2
- package/dist/types/report/core/progress-schema.d.ts +13 -5
- package/dist/types/report/core/progress-statistics.d.ts +28 -0
- package/dist/types/report/core/rate-interval.d.ts +10 -0
- package/dist/types/report/core/retrieval.d.ts +5 -2
- package/dist/types/report/core/schema.d.ts +190 -30
- package/dist/types/report/core/surfaces.d.ts +38 -4
- package/dist/types/runner.d.ts +5 -0
- package/dist/types/schema.d.ts +126 -21
- package/dist/types/section-result.d.ts +7 -2
- package/dist/types/stores/ports.d.ts +1 -0
- package/dist/types/stores/unit-record.d.ts +11 -0
- package/dist/types/workflow/schema.d.ts +121 -41
- package/package.json +6 -6
- package/resources/guide/OPERATOR.md +35 -7
- package/src/agents/author-schema.ts +7 -0
- package/src/agents/credentials.ts +18 -3
- package/src/agents/facts.ts +116 -3
- package/src/agents/methodology.ts +168 -0
- package/src/agents/narrative-facts.ts +50 -13
- package/src/agents/verifier.ts +2 -1
- package/src/analysis/progress.ts +14 -2
- package/src/analysis/rate-evidence.ts +74 -0
- package/src/analysis/scoring.ts +53 -10
- package/src/bundle/contracts.ts +42 -5
- package/src/bundle/export.ts +24 -4
- package/src/bundle/project-journal.ts +7 -1
- package/src/bundle/project.ts +76 -7
- package/src/bundle/recorder.ts +50 -1
- package/src/bundle/trace-coverage.ts +13 -6
- package/src/bundle/verify-integrity.ts +1 -0
- package/src/bundle/verify-report.ts +9 -3
- package/src/capture-manifest.ts +6 -0
- package/src/cli/io.ts +2 -0
- package/src/cli/literally-aeo.ts +10 -6
- package/src/cli/run-commands.ts +268 -39
- package/src/codex-workflow/aggregate.ts +108 -15
- package/src/codex-workflow/capture.ts +62 -5
- package/src/codex-workflow/copy-editor.ts +13 -2
- package/src/codex-workflow/copy.ts +171 -2
- package/src/codex-workflow/finish.ts +39 -0
- package/src/codex-workflow/loop.ts +23 -2
- package/src/codex-workflow/prompts.ts +32 -42
- package/src/codex-workflow/schemas.ts +3 -1
- package/src/codex-workflow/stage.ts +40 -45
- package/src/codex-workflow/workdir.ts +3 -4
- package/src/engine/audit-file.ts +186 -13
- package/src/engine/author.ts +5 -2
- package/src/engine/budget.ts +70 -10
- package/src/engine/cost-estimate.ts +39 -9
- package/src/engine/guide/OPERATOR.md +35 -7
- package/src/engine/local-run.ts +109 -13
- package/src/engine/preflight.ts +170 -30
- package/src/engine/rejudge.ts +8 -2
- package/src/engine/run-bindings.ts +189 -0
- package/src/engine/run-configuration.ts +36 -6
- package/src/engine/run-method.ts +230 -0
- package/src/engine/run-models.ts +276 -0
- package/src/engine/run-status.ts +9 -4
- package/src/engine/templates.ts +7 -2
- package/src/grounding/controller.ts +2 -1
- package/src/grounding/extract.ts +1 -0
- package/src/grounding/model-usage.ts +4 -0
- package/src/grounding/tools.ts +18 -1
- package/src/lib/compare.ts +9 -0
- package/src/lib/log.ts +17 -15
- package/src/models/accounting.ts +34 -0
- package/src/models/budget-protection.ts +1 -0
- package/src/models/catalog.ts +500 -0
- package/src/models/cost-coefficients.ts +116 -27
- package/src/models/gateway-cost.ts +32 -0
- package/src/models/local-profile.ts +14 -8
- package/src/models/open-model.ts +70 -0
- package/src/models/profiles.ts +17 -4
- package/src/models/structured.ts +2 -10
- package/src/models/supported-models.ts +7 -5
- package/src/pipeline.ts +45 -19
- package/src/probes/adapter.ts +138 -0
- package/src/probes/adapters/cli-agents.ts +123 -0
- package/src/probes/adapters/cli-claude-code.ts +119 -0
- package/src/probes/adapters/cli-codex.ts +145 -0
- package/src/probes/adapters/cli-cursor.ts +95 -0
- package/src/probes/adapters/cli-process.ts +522 -0
- package/src/probes/adapters/dataforseo-ai-mode.ts +146 -0
- package/src/probes/adapters/dataforseo-ai-overview.ts +106 -0
- package/src/probes/adapters/dataforseo-chatgpt-app.ts +115 -0
- package/src/probes/adapters/gateway-chat.ts +453 -0
- package/src/probes/adapters/gateway-perplexity.ts +104 -0
- package/src/probes/agent-clis.ts +151 -1088
- package/src/probes/answer-text.ts +153 -0
- package/src/probes/attempt.ts +463 -0
- package/src/probes/bindings.ts +761 -0
- package/src/probes/charged-trace.ts +69 -13
- package/src/probes/chat-retrieval.ts +67 -0
- package/src/probes/dataforseo-locale.ts +153 -22
- package/src/probes/dataforseo.ts +474 -178
- package/src/probes/grounding-urls.ts +68 -19
- package/src/probes/legacy-bindings.ts +41 -0
- package/src/probes/limits.ts +31 -18
- package/src/probes/probe-trace.ts +13 -0
- package/src/probes/probes.ts +76 -738
- package/src/probes/web-tool-guard.ts +18 -8
- package/src/report/core/progress-comparison.ts +158 -44
- package/src/report/core/progress-schema.ts +25 -3
- package/src/report/core/progress-statistics.ts +194 -0
- package/src/report/core/rate-interval.ts +24 -0
- package/src/report/core/retrieval.ts +18 -4
- package/src/report/core/schema.ts +79 -4
- package/src/report/core/surfaces.ts +100 -9
- package/src/runner.ts +72 -4
- package/src/schema.ts +78 -17
- package/src/section-result.ts +141 -23
- package/src/stores/files.ts +78 -54
- package/src/stores/memory.ts +4 -1
- package/src/stores/ports.ts +3 -0
- package/src/stores/unit-record.ts +151 -0
- package/src/viewer/page.ts +126 -5
- package/dist/lib/chunks/chunk-AASWJR7Q.js +0 -42
- package/dist/lib/chunks/chunk-BGAHZIL3.js +0 -563
- package/dist/lib/chunks/chunk-DVFFYY5G.js +0 -74
- package/dist/lib/chunks/chunk-IB6RROHE.js +0 -204
- package/dist/lib/chunks/chunk-NH4QGBJV.js +0 -61
- package/dist/lib/chunks/chunk-WZGI7UVM.js +0 -937
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { retrievalCallKinds, retrievalExposures } from './retrieval';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
allSurfaces,
|
|
5
|
+
isCustomSurface,
|
|
6
|
+
type AeoCustomSurface,
|
|
7
|
+
} from './surfaces';
|
|
4
8
|
|
|
5
9
|
export const aeoSnapshotVersion = 2;
|
|
6
10
|
|
|
@@ -19,12 +23,37 @@ export {
|
|
|
19
23
|
agentSurfaces,
|
|
20
24
|
allSurfaces,
|
|
21
25
|
chatSurfaces,
|
|
26
|
+
consumerSurfaces,
|
|
27
|
+
defaultSurfaces,
|
|
22
28
|
surfaceRunCounts,
|
|
23
29
|
isAgentSurface,
|
|
30
|
+
isBuiltInSurface,
|
|
31
|
+
isChatSurface,
|
|
32
|
+
isConsumerSurface,
|
|
33
|
+
isCustomSurface,
|
|
34
|
+
customSurfacePrefix,
|
|
35
|
+
customSurfaceKeyPattern,
|
|
36
|
+
customSurfaceRunCount,
|
|
37
|
+
} from './surfaces';
|
|
38
|
+
export type {
|
|
39
|
+
AeoAgentSurface,
|
|
40
|
+
AeoApiSurface,
|
|
41
|
+
AeoBuiltInSurface,
|
|
42
|
+
AeoChatSurface,
|
|
43
|
+
AeoConsumerSurface,
|
|
44
|
+
AeoCustomSurface,
|
|
45
|
+
AeoDefaultSurface,
|
|
46
|
+
AeoSurface,
|
|
24
47
|
} from './surfaces';
|
|
25
|
-
export type { AeoAgentSurface, AeoChatSurface, AeoSurface } from './surfaces';
|
|
26
48
|
|
|
27
|
-
export const aeoSurfaceSchema = z.
|
|
49
|
+
export const aeoSurfaceSchema = z.union([
|
|
50
|
+
z.enum(allSurfaces),
|
|
51
|
+
// The z.custom keeps the template type that z.string() would widen.
|
|
52
|
+
z.custom<AeoCustomSurface>(
|
|
53
|
+
(value) => typeof value === 'string' && isCustomSurface(value),
|
|
54
|
+
{ error: 'Expected a built-in surface or a custom surface ID.' },
|
|
55
|
+
),
|
|
56
|
+
]);
|
|
28
57
|
|
|
29
58
|
// ---------------------------------------------------------------------------
|
|
30
59
|
// Retrieval log (retrieval-log spec §4) — the searches and fetches behind one
|
|
@@ -201,6 +230,20 @@ export const aeoMatrixRowSchema = z.object({
|
|
|
201
230
|
|
|
202
231
|
export type AeoMatrixRow = z.infer<typeof aeoMatrixRowSchema>;
|
|
203
232
|
|
|
233
|
+
// Calculation version 2 (specs/aeo-method-release-spec.md §6.2): the counts
|
|
234
|
+
// behind a published rate and its approximate 95% interval over the planned
|
|
235
|
+
// answers. Every field that carries it is optional, so a snapshot made
|
|
236
|
+
// before it and an older reader keep working.
|
|
237
|
+
export const aeoRateEvidenceSchema = z.object({
|
|
238
|
+
count: z.number().int().nonnegative(),
|
|
239
|
+
captured: z.number().int().nonnegative(),
|
|
240
|
+
planned: z.number().int().positive(),
|
|
241
|
+
low: z.number().min(0).max(1),
|
|
242
|
+
high: z.number().min(0).max(1),
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
export type AeoRateEvidence = z.infer<typeof aeoRateEvidenceSchema>;
|
|
246
|
+
|
|
204
247
|
export const aeoVisibilitySchema = z.object({
|
|
205
248
|
prompts: z.array(
|
|
206
249
|
z.object({ text: z.string(), category: aeoPromptCategorySchema }),
|
|
@@ -218,15 +261,37 @@ export const aeoVisibilitySchema = z.object({
|
|
|
218
261
|
// agent surfaces weren't run.
|
|
219
262
|
agentShareOfVoice: z.number().min(0).max(1).nullable(),
|
|
220
263
|
agentCitationRate: z.number().min(0).max(1).nullable(),
|
|
264
|
+
// Consumer-app pair over the scraped products (method release spec
|
|
265
|
+
// §5.5), never part of the chat headline. Present only when the run
|
|
266
|
+
// planned a consumer app; null when it had no prompt left to score.
|
|
267
|
+
consumerShareOfVoice: z.number().min(0).max(1).nullable().optional(),
|
|
268
|
+
consumerCitationRate: z.number().min(0).max(1).nullable().optional(),
|
|
269
|
+
// Beside each measured rate from calculation version 2.
|
|
270
|
+
prospectShareOfVoiceEvidence: aeoRateEvidenceSchema.optional(),
|
|
271
|
+
prospectCitationRateEvidence: aeoRateEvidenceSchema.optional(),
|
|
272
|
+
agentShareOfVoiceEvidence: aeoRateEvidenceSchema.optional(),
|
|
273
|
+
agentCitationRateEvidence: aeoRateEvidenceSchema.optional(),
|
|
274
|
+
consumerShareOfVoiceEvidence: aeoRateEvidenceSchema.optional(),
|
|
275
|
+
consumerCitationRateEvidence: aeoRateEvidenceSchema.optional(),
|
|
221
276
|
byModel: z.record(
|
|
222
277
|
z.string(),
|
|
223
|
-
z.object({
|
|
278
|
+
z.object({
|
|
279
|
+
shareOfVoice: z.number(),
|
|
280
|
+
citationRate: z.number(),
|
|
281
|
+
shareOfVoiceEvidence: aeoRateEvidenceSchema.optional(),
|
|
282
|
+
citationRateEvidence: aeoRateEvidenceSchema.optional(),
|
|
283
|
+
}),
|
|
224
284
|
),
|
|
285
|
+
// A split of captured answers, not a visibility claim: counts from
|
|
286
|
+
// calculation version 2, no interval.
|
|
225
287
|
byCompetitor: z.array(
|
|
226
288
|
z.object({
|
|
227
289
|
domain: z.string(),
|
|
228
290
|
shareOfVoice: z.number(),
|
|
229
291
|
citationRate: z.number(),
|
|
292
|
+
mentionedAnswers: z.number().int().nonnegative().optional(),
|
|
293
|
+
citedAnswers: z.number().int().nonnegative().optional(),
|
|
294
|
+
capturedAnswers: z.number().int().nonnegative().optional(),
|
|
230
295
|
}),
|
|
231
296
|
),
|
|
232
297
|
topCompetitorDomain: z.string().nullable(),
|
|
@@ -419,6 +484,16 @@ export const aeoSnapshotSchema = z.object({
|
|
|
419
484
|
// CLI check, `agentClis.<cli>: null` can only mean "not in scope", and
|
|
420
485
|
// this field says so explicitly. Optional: older snapshots lack it.
|
|
421
486
|
surfaces: z.array(aeoSurfaceSchema).optional(),
|
|
487
|
+
// The label of each surface that was not asked of its default model,
|
|
488
|
+
// naming the model it was asked of. Absent on a run measured with the
|
|
489
|
+
// defaults: readers fall back to the engine's own labels.
|
|
490
|
+
surfaceLabels: z
|
|
491
|
+
.record(z.string().min(1).max(60), z.string().min(1).max(300))
|
|
492
|
+
.optional(),
|
|
493
|
+
// How the run measured, as fixed sentences the host built from what it
|
|
494
|
+
// observed (method release spec §8): never written by a model. Absent
|
|
495
|
+
// on a snapshot from before 0.4.0.
|
|
496
|
+
methodology: z.array(z.string().min(1).max(1500)).max(20).optional(),
|
|
422
497
|
// Which agent CLIs answered, for the methodology note. Null = not run.
|
|
423
498
|
agentClis: z
|
|
424
499
|
.object({
|
|
@@ -20,22 +20,110 @@ export const chatSurfaces = [
|
|
|
20
20
|
|
|
21
21
|
export const agentSurfaces = ['claude_code', 'codex', 'cursor'] as const;
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
// The consumer apps themselves, scraped by a vendor (method release spec
|
|
24
|
+
// §5): what a person sees in the product, where the chat surfaces ask each
|
|
25
|
+
// provider's API. Measured only when an audit asks for them, and scored as
|
|
26
|
+
// a family of their own, never in the chat headline.
|
|
27
|
+
export const consumerSurfaces = ['chatgpt_app', 'google_ai_mode'] as const;
|
|
28
|
+
|
|
29
|
+
/** The surfaces an audit measures unless it says otherwise. */
|
|
30
|
+
export const defaultSurfaces = [...chatSurfaces, ...agentSurfaces] as const;
|
|
31
|
+
|
|
32
|
+
/** The engine's own surfaces. A run may add custom ones (below). The
|
|
33
|
+
* consumer surfaces come last, so every earlier surface keeps its place in
|
|
34
|
+
* the canonical order. */
|
|
35
|
+
export const allSurfaces = [...defaultSurfaces, ...consumerSurfaces] as const;
|
|
24
36
|
|
|
25
37
|
export type AeoChatSurface = (typeof chatSurfaces)[number];
|
|
26
38
|
export type AeoAgentSurface = (typeof agentSurfaces)[number];
|
|
27
|
-
export type
|
|
39
|
+
export type AeoConsumerSurface = (typeof consumerSurfaces)[number];
|
|
40
|
+
export type AeoDefaultSurface = (typeof defaultSurfaces)[number];
|
|
41
|
+
export type AeoBuiltInSurface = (typeof allSurfaces)[number];
|
|
42
|
+
|
|
43
|
+
// A custom surface (open models spec §5): any gateway model an audit
|
|
44
|
+
// declares, measured as a surface of its own. The prefix keeps its ID apart
|
|
45
|
+
// from every built-in one, present and future.
|
|
46
|
+
export const customSurfacePrefix = 'custom:';
|
|
47
|
+
export const customSurfaceKeyPattern = /^[a-z][a-z0-9_]{0,31}$/;
|
|
48
|
+
|
|
49
|
+
export type AeoCustomSurface = `custom:${string}`;
|
|
50
|
+
export type AeoSurface = AeoBuiltInSurface | AeoCustomSurface;
|
|
51
|
+
/** A surface asked through a model API, a search API or a scrape: every
|
|
52
|
+
* surface that is not a coding agent's CLI. */
|
|
53
|
+
export type AeoApiSurface =
|
|
54
|
+
AeoChatSurface | AeoConsumerSurface | AeoCustomSurface;
|
|
55
|
+
|
|
56
|
+
/** How many times a custom surface is asked each prompt, like the chat
|
|
57
|
+
* surfaces, when the audit sets no chat depth. */
|
|
58
|
+
export const customSurfaceRunCount = 2;
|
|
59
|
+
|
|
60
|
+
export const isCustomSurface = (
|
|
61
|
+
surface: string,
|
|
62
|
+
): surface is AeoCustomSurface => {
|
|
63
|
+
return (
|
|
64
|
+
surface.startsWith(customSurfacePrefix) &&
|
|
65
|
+
customSurfaceKeyPattern.test(surface.slice(customSurfacePrefix.length))
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const isBuiltInSurface = (
|
|
70
|
+
surface: string,
|
|
71
|
+
): surface is AeoBuiltInSurface => {
|
|
72
|
+
return allSurfaces.some((builtIn) => builtIn === surface);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export const isConsumerSurface = (
|
|
76
|
+
surface: string,
|
|
77
|
+
): surface is AeoConsumerSurface => {
|
|
78
|
+
return consumerSurfaces.some((consumer) => consumer === surface);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
/** The scopes a surface is scored and compared in. */
|
|
82
|
+
export type SurfaceFamily = 'chat' | 'consumer' | 'agents' | 'custom';
|
|
83
|
+
|
|
84
|
+
export const surfaceFamilyOf = (surface: string): SurfaceFamily => {
|
|
85
|
+
if (isAgentSurface(surface)) {
|
|
86
|
+
return 'agents';
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (isConsumerSurface(surface)) {
|
|
90
|
+
return 'consumer';
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return isCustomSurface(surface) ? 'custom' : 'chat';
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
/** The built-in chat and search surfaces: the ones the chat headline pair
|
|
97
|
+
* is scored over. A custom surface is in neither pair. */
|
|
98
|
+
export const isChatSurface = (surface: string): surface is AeoChatSurface => {
|
|
99
|
+
return chatSurfaces.some((chatSurface) => chatSurface === surface);
|
|
100
|
+
};
|
|
28
101
|
|
|
29
|
-
/** Shared display names for audit facts and report evidence.
|
|
102
|
+
/** Shared display names for audit facts and report evidence. The four
|
|
103
|
+
* chat surfaces ask each provider's API with web search, not its consumer
|
|
104
|
+
* app, and say so (method release spec §4.3). Their IDs stay: every unit
|
|
105
|
+
* key, digest, bundle and stored snapshot names them. A report can measure
|
|
106
|
+
* ChatGPT both ways, so the scraped app says which it is too. */
|
|
30
107
|
export const surfaceLabels: Record<string, string> = {
|
|
31
|
-
chatgpt: 'ChatGPT',
|
|
32
|
-
gemini: 'Gemini',
|
|
33
|
-
claude: 'Claude',
|
|
34
|
-
perplexity: 'Perplexity',
|
|
108
|
+
chatgpt: 'ChatGPT (API)',
|
|
109
|
+
gemini: 'Gemini (API)',
|
|
110
|
+
claude: 'Claude (API)',
|
|
111
|
+
perplexity: 'Perplexity (API)',
|
|
35
112
|
google_ai_overview: 'AI Overview',
|
|
36
113
|
claude_code: 'Claude Code',
|
|
37
114
|
codex: 'Codex',
|
|
38
115
|
cursor: 'Cursor',
|
|
116
|
+
chatgpt_app: 'ChatGPT (app)',
|
|
117
|
+
google_ai_mode: 'AI Mode',
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
/** The name a report shows for a surface: the run's own label first (a
|
|
121
|
+
* custom surface, or one asked of another model), then the engine's. */
|
|
122
|
+
export const surfaceLabelOf = (
|
|
123
|
+
surface: string,
|
|
124
|
+
runLabels: Readonly<Record<string, string>> = {},
|
|
125
|
+
): string => {
|
|
126
|
+
return runLabels[surface] ?? surfaceLabels[surface] ?? surface;
|
|
39
127
|
};
|
|
40
128
|
|
|
41
129
|
export const isAgentSurface = (surface: string): surface is AeoAgentSurface => {
|
|
@@ -43,12 +131,13 @@ export const isAgentSurface = (surface: string): surface is AeoAgentSurface => {
|
|
|
43
131
|
};
|
|
44
132
|
|
|
45
133
|
// Runs per prompt per surface — canonical (2/2/2/2/1 for the chat surfaces,
|
|
46
|
-
// matching the console exactly; 2 each for the agent CLIs per spec §5
|
|
134
|
+
// matching the console exactly; 2 each for the agent CLIs per spec §5; 1
|
|
135
|
+
// for each consumer app, like AI Overview).
|
|
47
136
|
// The default depth: a config's chatProbes and agentProbes override it, and
|
|
48
137
|
// runsPerPromptOn (schema.ts) is the rule every planned-run denominator
|
|
49
138
|
// reads, so a captured-answer shortfall lowers share of voice instead of
|
|
50
139
|
// hiding.
|
|
51
|
-
export const surfaceRunCounts: Readonly<Record<
|
|
140
|
+
export const surfaceRunCounts: Readonly<Record<AeoBuiltInSurface, number>> = {
|
|
52
141
|
chatgpt: 2,
|
|
53
142
|
gemini: 2,
|
|
54
143
|
claude: 2,
|
|
@@ -57,4 +146,6 @@ export const surfaceRunCounts: Readonly<Record<AeoSurface, number>> = {
|
|
|
57
146
|
claude_code: 2,
|
|
58
147
|
codex: 2,
|
|
59
148
|
cursor: 2,
|
|
149
|
+
chatgpt_app: 1,
|
|
150
|
+
google_ai_mode: 1,
|
|
60
151
|
};
|
package/src/runner.ts
CHANGED
|
@@ -9,14 +9,22 @@ import type {
|
|
|
9
9
|
} from './schema';
|
|
10
10
|
import {
|
|
11
11
|
aeoSnapshotVersion,
|
|
12
|
-
allSurfaces,
|
|
13
12
|
chatSurfaces,
|
|
13
|
+
defaultSurfaces,
|
|
14
|
+
isConsumerSurface,
|
|
14
15
|
aeoSnapshotSchema,
|
|
16
|
+
customSurfacePrefix,
|
|
15
17
|
isAgentSurface,
|
|
18
|
+
isCustomSurface,
|
|
16
19
|
} from './schema';
|
|
17
20
|
import { createLog } from './lib/log';
|
|
18
21
|
import type { AgentCliVersions } from './probes/agent-clis';
|
|
19
22
|
import type { ProbeLimiter } from './probes/limits';
|
|
23
|
+
import {
|
|
24
|
+
consumerMarketProblem,
|
|
25
|
+
resolveDataForSeoLocale,
|
|
26
|
+
supportedMarkets,
|
|
27
|
+
} from './probes/dataforseo-locale';
|
|
20
28
|
import type { PartialFailure } from './probes/web-tool-guard';
|
|
21
29
|
import type { SectionRunResult } from './pipeline';
|
|
22
30
|
import {
|
|
@@ -117,9 +125,27 @@ export const planRun = (
|
|
|
117
125
|
// The request's surfaces are the operator's override (a narrowed
|
|
118
126
|
// re-probe); otherwise the config decides whether the coding agents are
|
|
119
127
|
// measured (specs/aeo-surface-selection-spec.md §3.2).
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
128
|
+
const declared = (config.customSurfaces ?? []).map(
|
|
129
|
+
({ key }): AeoSurface => `${customSurfacePrefix}${key}`,
|
|
130
|
+
);
|
|
131
|
+
const surfaces: readonly AeoSurface[] = request.surfaces ?? [
|
|
132
|
+
...(config.surfaces.codingAgents === 'skip'
|
|
133
|
+
? chatSurfaces
|
|
134
|
+
: defaultSurfaces),
|
|
135
|
+
...(config.surfaces.consumerApps ?? []),
|
|
136
|
+
...declared,
|
|
137
|
+
];
|
|
138
|
+
// A custom surface has a label and a binding only when the config
|
|
139
|
+
// declares it: one the plan merely names would be measured as nothing.
|
|
140
|
+
const undeclared = surfaces.filter(
|
|
141
|
+
(surface) => isCustomSurface(surface) && !declared.includes(surface),
|
|
142
|
+
);
|
|
143
|
+
|
|
144
|
+
if (undeclared.length > 0) {
|
|
145
|
+
throw new RunRequestError(
|
|
146
|
+
`The run names ${undeclared.join(', ')}, which the config's customSurfaces does not declare. Please declare each custom surface, or leave it out of the run.`,
|
|
147
|
+
);
|
|
148
|
+
}
|
|
123
149
|
|
|
124
150
|
const units = sections.flatMap((section) =>
|
|
125
151
|
plannedProbeUnitsForSection({
|
|
@@ -131,6 +157,39 @@ export const planRun = (
|
|
|
131
157
|
}),
|
|
132
158
|
);
|
|
133
159
|
|
|
160
|
+
// Google AI Overviews and the consumer apps are placed in a market by
|
|
161
|
+
// DataForSEO's location and language codes. A market the table cannot
|
|
162
|
+
// place is refused here, before anything is reserved, never measured as
|
|
163
|
+
// the United States.
|
|
164
|
+
const placed = surfaces.filter(
|
|
165
|
+
(surface) => surface === 'google_ai_overview' || isConsumerSurface(surface),
|
|
166
|
+
);
|
|
167
|
+
|
|
168
|
+
if (
|
|
169
|
+
placed.length > 0 &&
|
|
170
|
+
!resolveDataForSeoLocale(config.geography, config.language)
|
|
171
|
+
) {
|
|
172
|
+
throw new RunRequestError(
|
|
173
|
+
`No search market for geography ${JSON.stringify(config.geography)} and language ${JSON.stringify(config.language)}: ${placed.join(', ')} cannot be placed there. Please fix the config's geography and language, or leave ${placed.join(' and ')} out of the run. ${supportedMarkets}`,
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// A consumer scrape takes fewer markets than the table maps. One it does
|
|
178
|
+
// not list would fail every answer of that app at run time, each paid
|
|
179
|
+
// for nothing: it is refused here instead.
|
|
180
|
+
const unlisted = surfaces
|
|
181
|
+
.filter(isConsumerSurface)
|
|
182
|
+
.flatMap(
|
|
183
|
+
(surface) =>
|
|
184
|
+
consumerMarketProblem(surface, config.geography, config.language) ?? [],
|
|
185
|
+
);
|
|
186
|
+
|
|
187
|
+
if (unlisted.length > 0) {
|
|
188
|
+
throw new RunRequestError(
|
|
189
|
+
`${unlisted.join(' ')} Please leave ${unlisted.length === 1 ? 'it' : 'them'} out of the run.`,
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
|
|
134
193
|
if (units.length > request.maxPlannedUnits) {
|
|
135
194
|
throw new RunRequestError(
|
|
136
195
|
`Plan of ${units.length} probe units exceeds the cap of ${request.maxPlannedUnits} (maxPlannedUnits); narrow the run or raise the cap deliberately.`,
|
|
@@ -262,6 +321,11 @@ export const assembleSnapshot = (args: {
|
|
|
262
321
|
generatedAt: string;
|
|
263
322
|
/** What judged the answers: the Codex analyze stage's version and model. */
|
|
264
323
|
analyzer: { version: number; model: string };
|
|
324
|
+
/** Labels of the surfaces asked of another model than their default
|
|
325
|
+
* (surfaceLabelOverrides); empty on the defaults. */
|
|
326
|
+
surfaceLabels?: Record<string, string>;
|
|
327
|
+
/** The methodology section's sentences (buildMethodology). */
|
|
328
|
+
methodology?: readonly string[];
|
|
265
329
|
}): AeoSnapshot => {
|
|
266
330
|
const { config, request, plan, enriched, resumed } = args;
|
|
267
331
|
|
|
@@ -294,6 +358,10 @@ export const assembleSnapshot = (args: {
|
|
|
294
358
|
: {}),
|
|
295
359
|
partialFailures: args.partialFailures,
|
|
296
360
|
surfaces: [...plan.surfaces],
|
|
361
|
+
...(args.surfaceLabels && Object.keys(args.surfaceLabels).length > 0
|
|
362
|
+
? { surfaceLabels: args.surfaceLabels }
|
|
363
|
+
: {}),
|
|
364
|
+
...(args.methodology && { methodology: [...args.methodology] }),
|
|
297
365
|
agentClis: args.agentCliVersions,
|
|
298
366
|
analyzerVersion: args.analyzer.version,
|
|
299
367
|
domainClassifierVersion,
|
package/src/schema.ts
CHANGED
|
@@ -4,11 +4,15 @@ import {
|
|
|
4
4
|
brandSchema,
|
|
5
5
|
aeoPromptSchema,
|
|
6
6
|
aeoSurfaceSchema,
|
|
7
|
+
consumerSurfaces,
|
|
8
|
+
customSurfaceKeyPattern,
|
|
9
|
+
customSurfaceRunCount,
|
|
7
10
|
isAgentSurface,
|
|
11
|
+
isCustomSurface,
|
|
8
12
|
sourceCategorySchema,
|
|
9
13
|
surfaceRunCounts,
|
|
10
|
-
type AeoChatSurface,
|
|
11
14
|
type AeoSurface,
|
|
15
|
+
type AeoApiSurface,
|
|
12
16
|
} from './report/core/schema';
|
|
13
17
|
import { coverageThresholdsSchema } from './coverage-schema';
|
|
14
18
|
import { groundingBundleSchema } from './grounding/schema';
|
|
@@ -62,9 +66,10 @@ export const agentProbedPrompts = <Prompt>(
|
|
|
62
66
|
// Chat probe volume. Optional with no default, so a config without it parses,
|
|
63
67
|
// and digests, exactly as configs did before chat depth was configurable:
|
|
64
68
|
// bundles exported earlier still verify. Omitted = the canonical
|
|
65
|
-
// surfaceRunCounts (2 per surface, 1 for AI Overview
|
|
66
|
-
//
|
|
67
|
-
//
|
|
69
|
+
// surfaceRunCounts (2 per surface, 1 for AI Overview and for each consumer
|
|
70
|
+
// app); set = that many runs on every surface asked through an API or a
|
|
71
|
+
// scrape. AI Overview included: each of its runs is a live search, sampling
|
|
72
|
+
// whether an overview appears and what it says.
|
|
68
73
|
export const chatProbeConfigSchema = z
|
|
69
74
|
.object({ runsPerPrompt: runsPerPromptSchema })
|
|
70
75
|
.strict();
|
|
@@ -74,10 +79,15 @@ export type ChatProbeConfig = z.infer<typeof chatProbeConfigSchema>;
|
|
|
74
79
|
/** chatRunsPerPrompt is how many times each prompt is asked on a chat
|
|
75
80
|
* surface. */
|
|
76
81
|
export const chatRunsPerPrompt = (
|
|
77
|
-
surface:
|
|
82
|
+
surface: AeoApiSurface,
|
|
78
83
|
chatProbes: ChatProbeConfig | undefined,
|
|
79
84
|
): number => {
|
|
80
|
-
return
|
|
85
|
+
return (
|
|
86
|
+
chatProbes?.runsPerPrompt ??
|
|
87
|
+
(isCustomSurface(surface)
|
|
88
|
+
? customSurfaceRunCount
|
|
89
|
+
: surfaceRunCounts[surface])
|
|
90
|
+
);
|
|
81
91
|
};
|
|
82
92
|
|
|
83
93
|
export type ProbeDepth = {
|
|
@@ -107,6 +117,31 @@ const ownedCompetitorDomainSchema = z
|
|
|
107
117
|
'Expected a domain name without a URL, path or port',
|
|
108
118
|
);
|
|
109
119
|
|
|
120
|
+
/** How many custom surfaces one audit may declare. */
|
|
121
|
+
export const maxCustomSurfaces = 8;
|
|
122
|
+
|
|
123
|
+
// Whether the coding agents are measured (specs/aeo-surface-selection-spec
|
|
124
|
+
// §3.1): the author decides from who the buyers are, with the reason the
|
|
125
|
+
// config gate shows. The default keeps every stored config measuring all
|
|
126
|
+
// eight default surfaces.
|
|
127
|
+
const surfaceDecisionShape = {
|
|
128
|
+
codingAgents: z.enum(['measure', 'skip']),
|
|
129
|
+
because: z.string().trim().min(12).max(300),
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
const defaultSurfaceDecision = {
|
|
133
|
+
codingAgents: 'measure',
|
|
134
|
+
because:
|
|
135
|
+
'Default: every surface is measured until the author decides otherwise.',
|
|
136
|
+
} as const;
|
|
137
|
+
|
|
138
|
+
/** The surface decision the config author makes: the coding agents, and
|
|
139
|
+
* nothing else. */
|
|
140
|
+
export const authoredSurfacesSchema = z
|
|
141
|
+
.object(surfaceDecisionShape)
|
|
142
|
+
.strict()
|
|
143
|
+
.prefault(defaultSurfaceDecision);
|
|
144
|
+
|
|
110
145
|
export const aeoAuditConfigSchema = z.object({
|
|
111
146
|
reportKey: z.string().min(1),
|
|
112
147
|
// Labels the console Dashboard's question-set selector until it adopts
|
|
@@ -136,21 +171,47 @@ export const aeoAuditConfigSchema = z.object({
|
|
|
136
171
|
// Grounds accuracy flagging (§7.2): claims contradicting this brief are
|
|
137
172
|
// flagged for human verification.
|
|
138
173
|
productBrief: z.string().min(1),
|
|
139
|
-
//
|
|
140
|
-
//
|
|
141
|
-
//
|
|
142
|
-
//
|
|
174
|
+
// The custom surfaces the audit declares (open models spec §5): the plan
|
|
175
|
+
// needs their IDs and the facts their labels. Their models are bindings,
|
|
176
|
+
// never configuration: a model is how a surface is asked, not what is
|
|
177
|
+
// measured. Absent when none is declared, so a config without them
|
|
178
|
+
// parses, and digests, exactly as before.
|
|
179
|
+
customSurfaces: z
|
|
180
|
+
.array(
|
|
181
|
+
z
|
|
182
|
+
.object({
|
|
183
|
+
key: z.string().regex(customSurfaceKeyPattern),
|
|
184
|
+
label: z.string().trim().min(1).max(60),
|
|
185
|
+
})
|
|
186
|
+
.strict(),
|
|
187
|
+
)
|
|
188
|
+
.min(1)
|
|
189
|
+
.max(maxCustomSurfaces)
|
|
190
|
+
.optional(),
|
|
143
191
|
surfaces: z
|
|
144
192
|
.object({
|
|
145
|
-
|
|
146
|
-
|
|
193
|
+
...surfaceDecisionShape,
|
|
194
|
+
// The consumer apps measured as well (method release spec §5.4), each
|
|
195
|
+
// listed once. The operator's choice, never the author's. Absent when
|
|
196
|
+
// none is, so a config without them parses, and digests, exactly as
|
|
197
|
+
// before.
|
|
198
|
+
consumerApps: z
|
|
199
|
+
.array(z.enum(consumerSurfaces))
|
|
200
|
+
.min(1)
|
|
201
|
+
// One spelling per set of apps, so the same apps always digest
|
|
202
|
+
// the same.
|
|
203
|
+
.refine(
|
|
204
|
+
(listed) =>
|
|
205
|
+
listed.join() ===
|
|
206
|
+
consumerSurfaces.filter((app) => listed.includes(app)).join(),
|
|
207
|
+
{
|
|
208
|
+
error: `Each consumer app is listed once, in this order: ${consumerSurfaces.join(', ')}.`,
|
|
209
|
+
},
|
|
210
|
+
)
|
|
211
|
+
.optional(),
|
|
147
212
|
})
|
|
148
213
|
.strict()
|
|
149
|
-
.prefault(
|
|
150
|
-
codingAgents: 'measure',
|
|
151
|
-
because:
|
|
152
|
-
'Default: every surface is measured until the author decides otherwise.',
|
|
153
|
-
}),
|
|
214
|
+
.prefault(defaultSurfaceDecision),
|
|
154
215
|
productGrounding: groundingBundleSchema.optional(),
|
|
155
216
|
// Per-report domain classification overrides for §7.1.
|
|
156
217
|
sourceOverrides: z.record(z.string(), sourceCategorySchema).optional(),
|