literally-aeo 0.3.0 → 0.4.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.
- package/README.md +183 -14
- package/dist/author-tools.js +386 -283
- package/dist/cli.mjs +19727 -17050
- package/dist/lib/access/schema.js +6 -6
- package/dist/lib/agents/author-schema.js +10 -10
- package/dist/lib/agents/author-validation.js +13 -13
- package/dist/lib/agents/copy-validation.js +16 -15
- package/dist/lib/agents/copywriter-input.js +15 -14
- package/dist/lib/agents/credentials.js +1 -1
- package/dist/lib/agents/facts.js +13 -12
- package/dist/lib/agents/methodology.js +56 -0
- package/dist/lib/agents/narrative-facts.js +11 -11
- package/dist/lib/agents/verifier.js +19 -17
- package/dist/lib/analysis/domain-classifier.js +17 -17
- package/dist/lib/analysis/domain-labels.js +10 -10
- package/dist/lib/analysis/progress-schema.js +6 -2
- package/dist/lib/analysis/progress.js +15 -14
- package/dist/lib/analysis/rate-evidence.js +6 -0
- package/dist/lib/analysis/retrieval.js +10 -10
- package/dist/lib/analysis/scoring.js +10 -10
- package/dist/lib/analysis/search-analyzer.js +10 -10
- package/dist/lib/analysis/sentiment.js +17 -17
- package/dist/lib/author/examples.js +11 -11
- package/dist/lib/bundle/contracts.js +17 -11
- package/dist/lib/bundle/export.js +84 -29
- package/dist/lib/bundle/isolation.js +2 -2
- package/dist/lib/bundle/journal.js +12 -12
- package/dist/lib/bundle/project-journal.js +16 -16
- package/dist/lib/bundle/project.js +85 -28
- package/dist/lib/bundle/read.js +85 -30
- package/dist/lib/bundle/recorder.js +14 -14
- package/dist/lib/bundle/redact.js +12 -12
- package/dist/lib/bundle/trace-coverage.js +12 -12
- package/dist/lib/bundle/verify-integrity.js +15 -15
- package/dist/lib/bundle/verify-measurement.js +24 -24
- package/dist/lib/bundle/verify-report.js +30 -28
- package/dist/lib/bundle/verify.js +39 -37
- package/dist/lib/capture-manifest.js +11 -11
- package/dist/lib/checks/run-checks.js +15 -15
- package/dist/lib/chunks/{chunk-4XIAXX7K.js → chunk-2A327DMI.js} +1 -1
- package/dist/lib/chunks/{chunk-FPPHYGIO.js → chunk-2CG7ZDWJ.js} +4 -4
- package/dist/lib/chunks/{chunk-6RED3G6K.js → chunk-2WS6RC35.js} +2 -2
- package/dist/lib/chunks/{chunk-JJFOILZK.js → chunk-2XMVEGQG.js} +26 -6
- package/dist/lib/chunks/{chunk-LNYQMWJO.js → chunk-32HYNVPR.js} +10 -9
- package/dist/lib/chunks/{chunk-JW7DTYSI.js → chunk-32LZRJ3P.js} +4 -4
- package/dist/lib/chunks/{chunk-WIBMVNIH.js → chunk-3F5ZP2EO.js} +4 -4
- package/dist/lib/chunks/{chunk-TKOQMB6A.js → chunk-3G6COT6E.js} +17 -17
- package/dist/lib/chunks/{chunk-JGIX427K.js → chunk-3GDCPD5P.js} +54 -13
- package/dist/lib/chunks/{chunk-Z3BZRBQF.js → chunk-3RGUIUKU.js} +16 -15
- package/dist/lib/chunks/{chunk-ZXQPD4OC.js → chunk-3TF4JGQA.js} +126 -5
- package/dist/lib/chunks/{chunk-CXZIHHLJ.js → chunk-3USKGGFT.js} +4 -4
- package/dist/lib/chunks/{chunk-JXLCKACO.js → chunk-3YPAIXFG.js} +6 -6
- package/dist/lib/chunks/{chunk-F4EQULFR.js → chunk-42QARLUQ.js} +13 -8
- package/dist/lib/chunks/chunk-4KF5EVLI.js +160 -0
- package/dist/lib/chunks/{chunk-FONFW67K.js → chunk-4MOZ3DVS.js} +5 -4
- package/dist/lib/chunks/{chunk-7KLTOVIY.js → chunk-4RB3AOPT.js} +16 -15
- package/dist/lib/chunks/{chunk-KRWDELRS.js → chunk-4UN3YD5Z.js} +10 -4
- package/dist/lib/chunks/{chunk-P6LHGBYU.js → chunk-4WPG2O2S.js} +13 -6
- package/dist/lib/chunks/{chunk-HXXFRZTJ.js → chunk-4ZR2LPUD.js} +2 -2
- package/dist/lib/chunks/{chunk-FHV4PBYG.js → chunk-55KFAM4X.js} +36 -5
- package/dist/lib/chunks/{chunk-4Q2WFZ5J.js → chunk-5OL67GMN.js} +12 -10
- package/dist/lib/chunks/{chunk-5JU2Y2I6.js → chunk-66BTHIL3.js} +9 -6
- package/dist/lib/chunks/{chunk-HEWHNSDP.js → chunk-6FGVCN4H.js} +19 -19
- package/dist/lib/chunks/{chunk-B5L2KMTU.js → chunk-6FHT2AHR.js} +24 -4
- package/dist/lib/chunks/{chunk-4QQJXCD2.js → chunk-6FRZN5SA.js} +13 -28
- package/dist/lib/chunks/chunk-6WMI5UOC.js +120 -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-LPOIMPJK.js → chunk-77EQ3RT6.js} +4 -4
- package/dist/lib/chunks/{chunk-MPQXB7HN.js → chunk-7D7EOET3.js} +16 -13
- package/dist/lib/chunks/{chunk-LJCWZ5SZ.js → chunk-7DR2X7SF.js} +14 -14
- package/dist/lib/chunks/{chunk-N62G4EWT.js → chunk-7HPB6LAA.js} +3 -3
- package/dist/lib/chunks/{chunk-44NSZBCP.js → chunk-ABS5TK73.js} +9 -9
- package/dist/lib/chunks/{chunk-66UE4TT2.js → chunk-AKOU4MTS.js} +84 -17
- package/dist/lib/chunks/{chunk-CH7OCYDL.js → chunk-B5ZAFK6T.js} +1 -1
- package/dist/lib/chunks/{chunk-Q22FCF4A.js → chunk-BECSPYFC.js} +1 -1
- package/dist/lib/chunks/{chunk-OVF27NAO.js → chunk-BLDOQAEW.js} +32 -14
- package/dist/lib/chunks/{chunk-UECQONVZ.js → chunk-BNPWAQQG.js} +24 -12
- package/dist/lib/chunks/{chunk-RK57YZKM.js → chunk-BPGL4IEZ.js} +81 -26
- package/dist/lib/chunks/{chunk-K5NQDJLE.js → chunk-BTRBLG6S.js} +3 -3
- package/dist/lib/chunks/{chunk-S24JGY7B.js → chunk-BWI4M36B.js} +5 -5
- package/dist/lib/chunks/{chunk-AB7DUTX5.js → chunk-BWUOUP4J.js} +1 -1
- package/dist/lib/chunks/{chunk-RYB77E7O.js → chunk-BYPCNCN3.js} +6 -7
- package/dist/lib/chunks/{chunk-ASIFUJG2.js → chunk-CBOETT4C.js} +9 -7
- package/dist/lib/chunks/{chunk-NZFMOQHU.js → chunk-CWEVVIZI.js} +11 -1
- package/dist/lib/chunks/chunk-CZMQ2DVJ.js +118 -0
- package/dist/lib/chunks/{chunk-LUKP64NX.js → chunk-CZRHH5HF.js} +85 -5
- package/dist/lib/chunks/{chunk-64JFN2Q5.js → chunk-DGOFCRZM.js} +1 -1
- package/dist/lib/chunks/{chunk-ODIXZHHX.js → chunk-DHQKAIOP.js} +2 -2
- package/dist/lib/chunks/{chunk-JDU3ZCKO.js → chunk-DX74K4JX.js} +2 -2
- package/dist/lib/chunks/{chunk-2U5QSA6Q.js → chunk-E2ALRH6Y.js} +9 -9
- package/dist/lib/chunks/{chunk-HXHFMFQU.js → chunk-E5COBP7A.js} +13 -2
- package/dist/lib/chunks/chunk-EFW6Q7Z3.js +67 -0
- package/dist/lib/chunks/chunk-EGQZVCLE.js +90 -0
- package/dist/lib/chunks/{chunk-JS3GBU3R.js → chunk-ENTQ35US.js} +1 -1
- package/dist/lib/chunks/{chunk-SQ55KGHO.js → chunk-EUHVUF7I.js} +1 -1
- package/dist/lib/chunks/{chunk-CVEXMYPW.js → chunk-F6CC4WLO.js} +8 -3
- package/dist/lib/chunks/{chunk-H2DOBJZC.js → chunk-FDCM7554.js} +2 -2
- package/dist/lib/chunks/{chunk-XTBCXEH7.js → chunk-FJAZEGU6.js} +133 -22
- package/dist/lib/chunks/{chunk-ZHGABG7L.js → chunk-FWH3LYHG.js} +9 -4
- package/dist/lib/chunks/chunk-FXR6P7HY.js +14 -0
- package/dist/lib/chunks/{chunk-QUZYFAGP.js → chunk-G22MXBBM.js} +145 -21
- package/dist/lib/chunks/{chunk-JBGQFPTY.js → chunk-G4GAGKSG.js} +12 -6
- 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-ZZCRYG36.js → chunk-H4LZ3U26.js} +1 -1
- package/dist/lib/chunks/{chunk-ZBQU2VU3.js → chunk-HHGLGVOZ.js} +1 -1
- package/dist/lib/chunks/{chunk-52F5XYOW.js → chunk-I2KRWXXO.js} +15 -7
- package/dist/lib/chunks/{chunk-RMSH7RUG.js → chunk-I6QMBY7L.js} +11 -11
- package/dist/lib/chunks/chunk-IDNT2WBK.js +27 -0
- package/dist/lib/chunks/{chunk-2C723CW7.js → chunk-IJQEQL5Q.js} +1 -1
- package/dist/lib/chunks/{chunk-HYMWNGOK.js → chunk-IUQ6C4Y6.js} +6 -3
- package/dist/lib/chunks/{chunk-VTY53IFN.js → chunk-J3BZ3WPV.js} +1 -1
- package/dist/lib/chunks/{chunk-RM2VVR7Y.js → chunk-J63WQUKR.js} +10 -3
- package/dist/lib/chunks/{chunk-SJCUR4QX.js → chunk-JEAZREDN.js} +1 -1
- package/dist/lib/chunks/{chunk-2B5QF6UQ.js → chunk-JFUWSJZT.js} +46 -5
- package/dist/lib/chunks/{chunk-KRXOJJR7.js → chunk-JHOLYLI4.js} +4 -2
- package/dist/lib/chunks/{chunk-WRHGLRUK.js → chunk-JIUBLXR7.js} +115 -6
- package/dist/lib/chunks/chunk-JOLIDHZV.js +39 -0
- package/dist/lib/chunks/chunk-JVIOWZPG.js +446 -0
- package/dist/lib/chunks/chunk-LMUTZ6O2.js +335 -0
- package/dist/lib/chunks/chunk-LTPLZSXI.js +86 -0
- package/dist/lib/chunks/{chunk-7ZR3WDF2.js → chunk-LYOCWN3R.js} +6 -3
- package/dist/lib/chunks/{chunk-HLC6OHGO.js → chunk-M3WZCV65.js} +3 -3
- package/dist/lib/chunks/{chunk-YPVJAXPP.js → chunk-MSEGYN6W.js} +32 -14
- package/dist/lib/chunks/{chunk-WPCBE2NZ.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-PAL5SXIP.js → chunk-NZTOOSLX.js} +3 -3
- package/dist/lib/chunks/{chunk-AQCWKHTE.js → chunk-OBSW2WKF.js} +15 -10
- package/dist/lib/chunks/{chunk-CQNIPZH3.js → chunk-OJQ66533.js} +51 -31
- package/dist/lib/chunks/chunk-P7GHKL3V.js +101 -0
- package/dist/lib/chunks/{chunk-MZ2KN3IH.js → chunk-P7LGJGDL.js} +3 -3
- package/dist/lib/chunks/{chunk-A5PF7UE2.js → chunk-PBWFX4ED.js} +4 -4
- package/dist/lib/chunks/{chunk-KI2FB4Y3.js → chunk-PI7PZKHP.js} +12 -11
- package/dist/lib/chunks/{chunk-RGZY6YUQ.js → chunk-QT5GTQGD.js} +10 -10
- package/dist/lib/chunks/{chunk-VYUC772A.js → chunk-R2HFGAOO.js} +4 -4
- package/dist/lib/chunks/{chunk-SF4UJ2AY.js → chunk-R4BFYHLK.js} +1 -1
- package/dist/lib/chunks/{chunk-TAPVCSCR.js → chunk-SCZ7PA4T.js} +1 -1
- package/dist/lib/chunks/{chunk-QO5TPMWS.js → chunk-SFPPZGTA.js} +112 -26
- package/dist/lib/chunks/chunk-SN3DKEOY.js +11 -0
- package/dist/lib/chunks/{chunk-TWK6IA4P.js → chunk-ST6IVXHT.js} +1 -1
- package/dist/lib/chunks/{chunk-IH67TEGY.js → chunk-STNUFF7H.js} +4 -4
- package/dist/lib/chunks/{chunk-2FDSOZ6Q.js → chunk-SXVKFPC4.js} +2 -1
- package/dist/lib/chunks/{chunk-QKTKQSPS.js → chunk-T4Z3GAEH.js} +1 -1
- package/dist/lib/chunks/{chunk-FYE4R5TY.js → chunk-TNTTIT2R.js} +3 -3
- package/dist/lib/chunks/{chunk-LOIAGEKN.js → chunk-TPPBTN3E.js} +48 -19
- package/dist/lib/chunks/{chunk-WUIY7BXR.js → chunk-TXGVQ6CN.js} +85 -43
- package/dist/lib/chunks/chunk-U53GT2R7.js +109 -0
- package/dist/lib/chunks/{chunk-4AWFF53U.js → chunk-U6I2RU4Z.js} +52 -19
- package/dist/lib/chunks/chunk-UWXR24TV.js +38 -0
- package/dist/lib/chunks/{chunk-VL253W5C.js → chunk-VMDGYDZW.js} +3 -1
- package/dist/lib/chunks/chunk-VXO5RAR4.js +162 -0
- package/dist/lib/chunks/{chunk-OTVHGRCO.js → chunk-WBSJVDS2.js} +73 -62
- package/dist/lib/chunks/{chunk-ASHFEFCU.js → chunk-WHW3NOG5.js} +1 -1
- package/dist/lib/chunks/{chunk-JMIK2QN3.js → chunk-WQTDLVKV.js} +2 -2
- package/dist/lib/chunks/{chunk-YY4BH5XM.js → chunk-WSATQQJI.js} +73 -24
- package/dist/lib/chunks/{chunk-IMADI2YP.js → chunk-WSFXGX7S.js} +3 -3
- package/dist/lib/chunks/{chunk-4HPMLJKC.js → chunk-WUDXMAJS.js} +78 -19
- 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-QVMPTT7R.js → chunk-XX2TK6FI.js} +7 -7
- package/dist/lib/chunks/{chunk-6N3C6E3D.js → chunk-YLS4XX7B.js} +2 -2
- package/dist/lib/chunks/{chunk-JIE2ANVD.js → chunk-YPMRZX4U.js} +1 -1
- package/dist/lib/chunks/{chunk-LTI2YYU3.js → chunk-YTEUQEJE.js} +1 -1
- package/dist/lib/chunks/{chunk-U64NCRRR.js → chunk-ZI3BGXQI.js} +44 -14
- package/dist/lib/chunks/{chunk-3S2FAVRE.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 +132 -122
- package/dist/lib/cli/guide-command.js +1 -1
- package/dist/lib/cli/io.js +1 -1
- package/dist/lib/cli/run-commands.js +352 -203
- package/dist/lib/cli/status-command.js +109 -98
- package/dist/lib/codex-workflow/aggregate.js +35 -26
- package/dist/lib/codex-workflow/author-search.js +1 -1
- package/dist/lib/codex-workflow/author-tools.js +12 -12
- package/dist/lib/codex-workflow/author.js +31 -29
- package/dist/lib/codex-workflow/capture.js +45 -41
- package/dist/lib/codex-workflow/checkpoint.js +12 -12
- package/dist/lib/codex-workflow/checks.js +14 -14
- package/dist/lib/codex-workflow/copy-editor.js +25 -23
- package/dist/lib/codex-workflow/copy-recovery.js +11 -11
- package/dist/lib/codex-workflow/copy.js +28 -20
- package/dist/lib/codex-workflow/finish.js +62 -36
- package/dist/lib/codex-workflow/loop.js +92 -72
- package/dist/lib/codex-workflow/prompts.js +1 -1
- package/dist/lib/codex-workflow/quality.js +11 -11
- package/dist/lib/codex-workflow/run-inputs.js +11 -11
- package/dist/lib/codex-workflow/run-source.js +19 -19
- package/dist/lib/codex-workflow/schemas.js +11 -11
- package/dist/lib/codex-workflow/session-gate.js +9 -0
- package/dist/lib/codex-workflow/session.js +13 -13
- package/dist/lib/codex-workflow/stage.js +46 -44
- package/dist/lib/codex-workflow/workdir.js +15 -15
- package/dist/lib/engine/audit-file.js +48 -14
- package/dist/lib/engine/author.js +74 -55
- package/dist/lib/engine/budget.js +3 -1
- package/dist/lib/engine/cost-estimate.js +36 -34
- package/dist/lib/engine/local-run.js +106 -94
- package/dist/lib/engine/preflight.js +35 -33
- package/dist/lib/engine/rejudge.js +114 -101
- package/dist/lib/engine/run-bindings.js +35 -31
- 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 +105 -94
- package/dist/lib/engine/templates.js +45 -15
- package/dist/lib/grounding/controller.js +6 -6
- package/dist/lib/grounding/extract.js +6 -6
- package/dist/lib/grounding/grounding-runtime.js +26 -26
- package/dist/lib/grounding/model.js +5 -5
- package/dist/lib/grounding/recorded-tools.js +15 -15
- package/dist/lib/grounding/tools.js +5 -1
- package/dist/lib/harness/criteria.js +3 -1
- package/dist/lib/harness/report/artifacts.js +10 -10
- package/dist/lib/harness/report/capture-coverage.js +4 -4
- package/dist/lib/lib/checkpoint.js +10 -10
- package/dist/lib/lib/compare.js +6 -0
- package/dist/lib/lib/progress-comparison.js +3 -2
- package/dist/lib/models/batching.js +4 -4
- package/dist/lib/models/catalog.js +16 -0
- package/dist/lib/models/cost-coefficients.js +12 -2
- package/dist/lib/models/coverage-rounds.js +1 -1
- 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 +3 -3
- package/dist/lib/models/supported-models.js +2 -2
- package/dist/lib/pipeline.js +43 -39
- package/dist/lib/probes/adapter.js +1 -1
- package/dist/lib/probes/adapters/cli-agents.js +18 -18
- package/dist/lib/probes/adapters/cli-claude-code.js +8 -7
- package/dist/lib/probes/adapters/cli-codex.js +8 -7
- package/dist/lib/probes/adapters/cli-cursor.js +8 -7
- package/dist/lib/probes/adapters/cli-process.js +5 -4
- package/dist/lib/probes/adapters/dataforseo-ai-mode.js +24 -0
- package/dist/lib/probes/adapters/dataforseo-ai-overview.js +8 -7
- package/dist/lib/probes/adapters/dataforseo-chatgpt-app.js +22 -0
- package/dist/lib/probes/adapters/gateway-chat.js +8 -5
- package/dist/lib/probes/adapters/gateway-perplexity.js +7 -6
- package/dist/lib/probes/agent-cli-parsers.js +3 -2
- package/dist/lib/probes/agent-clis.js +22 -22
- package/dist/lib/probes/answer-text.js +4 -3
- package/dist/lib/probes/attempt.js +5 -4
- package/dist/lib/probes/bindings.js +62 -30
- package/dist/lib/probes/charged-trace.js +31 -29
- package/dist/lib/probes/chat-retrieval.js +7 -2
- package/dist/lib/probes/dataforseo-locale.js +9 -3
- package/dist/lib/probes/dataforseo.js +9 -1
- package/dist/lib/probes/legacy-bindings.js +2 -2
- package/dist/lib/probes/probes.js +33 -31
- 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 +24 -24
- package/dist/lib/schema.js +35 -11
- package/dist/lib/section-result.js +13 -11
- package/dist/lib/stores/artifacts.js +13 -13
- package/dist/lib/stores/files.js +28 -26
- package/dist/lib/stores/local-versions.js +10 -10
- package/dist/lib/stores/memory.js +26 -25
- package/dist/lib/stores/publication.js +17 -16
- package/dist/lib/stores/unit-record.js +10 -10
- package/dist/lib/surfaces.js +23 -1
- package/dist/lib/viewer/page.js +1 -1
- package/dist/lib/viewer/server.js +41 -39
- package/dist/lib/workflow/schema.js +8 -8
- package/dist/types/agents/author-schema.d.ts +10 -10
- package/dist/types/agents/copy-validation.d.ts +1 -1
- 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 +2 -2
- 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 +8 -4
- package/dist/types/cli/run-commands.d.ts +14 -0
- package/dist/types/codex-workflow/aggregate.d.ts +90 -12
- 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/session-gate.d.ts +12 -0
- package/dist/types/codex-workflow/stage.d.ts +7 -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 +11 -2
- package/dist/types/engine/local-run.d.ts +12 -2
- package/dist/types/engine/preflight.d.ts +21 -5
- package/dist/types/engine/run-bindings.d.ts +34 -7
- 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/criteria.d.ts +9 -2
- package/dist/types/harness/report/artifacts.d.ts +48 -24
- package/dist/types/lib/compare.d.ts +3 -0
- package/dist/types/models/catalog.d.ts +52 -0
- package/dist/types/models/cost-coefficients.d.ts +74 -21
- 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 +1 -1
- package/dist/types/probes/adapter.d.ts +10 -1
- package/dist/types/probes/adapters/dataforseo-ai-mode.d.ts +16 -0
- package/dist/types/probes/adapters/dataforseo-ai-overview.d.ts +2 -2
- package/dist/types/probes/adapters/dataforseo-chatgpt-app.d.ts +12 -0
- package/dist/types/probes/adapters/gateway-chat.d.ts +33 -4
- package/dist/types/probes/adapters/gateway-perplexity.d.ts +2 -2
- package/dist/types/probes/bindings.d.ts +99 -10
- package/dist/types/probes/charged-trace.d.ts +7 -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 +43 -1
- package/dist/types/probes/probe-trace.d.ts +3 -0
- package/dist/types/probes/probes.d.ts +3 -3
- 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/workflow/schema.d.ts +121 -41
- package/package.json +1 -1
- package/resources/guide/OPERATOR.md +38 -9
- package/src/agents/author-schema.ts +7 -0
- package/src/agents/copy-validation.ts +4 -2
- 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 +9 -2
- package/src/analysis/progress.ts +4 -1
- 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 +3 -0
- 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/cli/io.ts +2 -0
- package/src/cli/literally-aeo.ts +10 -6
- package/src/cli/run-commands.ts +289 -68
- package/src/codex-workflow/aggregate.ts +108 -15
- package/src/codex-workflow/capture.ts +10 -13
- 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/session-gate.ts +115 -0
- package/src/codex-workflow/stage.ts +78 -48
- package/src/codex-workflow/workdir.ts +5 -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 +31 -7
- package/src/engine/guide/OPERATOR.md +38 -9
- package/src/engine/local-run.ts +98 -21
- package/src/engine/preflight.ts +59 -15
- package/src/engine/rejudge.ts +3 -2
- package/src/engine/run-bindings.ts +87 -40
- 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/tools.ts +18 -1
- package/src/harness/criteria.ts +35 -2
- package/src/lib/compare.ts +9 -0
- package/src/models/catalog.ts +500 -0
- package/src/models/cost-coefficients.ts +114 -17
- package/src/models/coverage-rounds.ts +10 -5
- package/src/models/local-profile.ts +69 -16
- package/src/models/open-model.ts +70 -0
- package/src/models/profiles.ts +17 -4
- package/src/models/supported-models.ts +7 -5
- package/src/pipeline.ts +14 -7
- package/src/probes/adapter.ts +17 -1
- package/src/probes/adapters/dataforseo-ai-mode.ts +146 -0
- package/src/probes/adapters/dataforseo-ai-overview.ts +2 -2
- package/src/probes/adapters/dataforseo-chatgpt-app.ts +115 -0
- package/src/probes/adapters/gateway-chat.ts +132 -18
- package/src/probes/adapters/gateway-perplexity.ts +2 -2
- package/src/probes/attempt.ts +1 -0
- package/src/probes/bindings.ts +484 -67
- package/src/probes/charged-trace.ts +19 -4
- package/src/probes/chat-retrieval.ts +67 -0
- package/src/probes/dataforseo-locale.ts +140 -20
- package/src/probes/dataforseo.ts +245 -26
- package/src/probes/legacy-bindings.ts +5 -4
- package/src/probes/probe-trace.ts +3 -0
- package/src/probes/probes.ts +30 -20
- 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 +65 -10
- package/src/schema.ts +78 -17
- package/src/section-result.ts +141 -23
- package/src/viewer/page.ts +126 -5
- package/dist/lib/chunks/chunk-AASWJR7Q.js +0 -42
- package/dist/lib/chunks/chunk-KSUI4DAY.js +0 -15
- package/dist/lib/chunks/chunk-KXFZ3CH3.js +0 -98
- package/dist/lib/chunks/chunk-MNG5TZRW.js +0 -208
- package/dist/lib/chunks/chunk-U42I3SBR.js +0 -78
- package/dist/lib/chunks/chunk-XBSA7MNJ.js +0 -66
package/dist/author-tools.js
CHANGED
|
@@ -746,6 +746,7 @@ var readBoundedBody = async (body) => {
|
|
|
746
746
|
}
|
|
747
747
|
return Buffer.concat(chunks);
|
|
748
748
|
};
|
|
749
|
+
var searchTimeoutMs = 6e4;
|
|
749
750
|
var createDataForSeoSearchAdapter = (args) => {
|
|
750
751
|
if (!args.login || !args.password || !Number.isInteger(args.locationCode) || !args.languageCode) {
|
|
751
752
|
throw new Error("Search credentials and locale are required.");
|
|
@@ -755,7 +756,7 @@ var createDataForSeoSearchAdapter = (args) => {
|
|
|
755
756
|
search: async (query, signal) => {
|
|
756
757
|
const boundedSignal = AbortSignal.any([
|
|
757
758
|
signal,
|
|
758
|
-
AbortSignal.timeout(
|
|
759
|
+
AbortSignal.timeout(searchTimeoutMs)
|
|
759
760
|
]);
|
|
760
761
|
const response = await fetch(
|
|
761
762
|
"https://api.dataforseo.com/v3/serp/google/organic/live/advanced",
|
|
@@ -1190,7 +1191,7 @@ import { z as z15 } from "zod";
|
|
|
1190
1191
|
import { z as z14 } from "zod";
|
|
1191
1192
|
|
|
1192
1193
|
// src/report/core/progress-schema.ts
|
|
1193
|
-
import { z as
|
|
1194
|
+
import { z as z6 } from "zod";
|
|
1194
1195
|
|
|
1195
1196
|
// src/report/core/progress-slot-key.ts
|
|
1196
1197
|
var progressSlotKey = (slot) => {
|
|
@@ -1202,6 +1203,9 @@ var progressSlotKey = (slot) => {
|
|
|
1202
1203
|
]);
|
|
1203
1204
|
};
|
|
1204
1205
|
|
|
1206
|
+
// src/report/core/schema.ts
|
|
1207
|
+
import { z as z5 } from "zod";
|
|
1208
|
+
|
|
1205
1209
|
// src/report/core/surfaces.ts
|
|
1206
1210
|
var chatSurfaces = [
|
|
1207
1211
|
"chatgpt",
|
|
@@ -1211,102 +1215,17 @@ var chatSurfaces = [
|
|
|
1211
1215
|
"google_ai_overview"
|
|
1212
1216
|
];
|
|
1213
1217
|
var agentSurfaces = ["claude_code", "codex", "cursor"];
|
|
1214
|
-
var
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
var
|
|
1218
|
-
var
|
|
1219
|
-
var
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
"plan_config_mismatch",
|
|
1226
|
-
"duplicate_planned_slots",
|
|
1227
|
-
"matrix_question_missing",
|
|
1228
|
-
"historical_run_index_unknown",
|
|
1229
|
-
"matrix_plan_mismatch",
|
|
1230
|
-
"collection_metadata_unknown",
|
|
1231
|
-
"includes_reused_captures",
|
|
1232
|
-
"reused_measurement",
|
|
1233
|
-
"analysis_replay"
|
|
1234
|
-
]);
|
|
1235
|
-
var progressSlotSchema = z5.object({
|
|
1236
|
-
sectionKey: z5.string().min(1).max(180),
|
|
1237
|
-
questionKey: digest,
|
|
1238
|
-
surface: z5.enum(allSurfaces),
|
|
1239
|
-
runIndex: z5.number().int().positive(),
|
|
1240
|
-
captured: z5.boolean(),
|
|
1241
|
-
analyzed: z5.boolean(),
|
|
1242
|
-
citationObserved: z5.boolean(),
|
|
1243
|
-
captureId: digest.nullable(),
|
|
1244
|
-
mentioned: z5.boolean(),
|
|
1245
|
-
cited: z5.boolean(),
|
|
1246
|
-
requestedModel: z5.string().min(1).max(256).nullable(),
|
|
1247
|
-
cliVersion: z5.string().min(1).max(256).nullable(),
|
|
1248
|
-
collectionMethodDigest: digest.nullable(),
|
|
1249
|
-
collectionMetadataKnown: z5.boolean()
|
|
1250
|
-
}).strict().superRefine((slot, context) => {
|
|
1251
|
-
if (!slot.captured && (slot.analyzed || slot.citationObserved || slot.captureId !== null) || slot.mentioned && !slot.analyzed || slot.cited && !slot.citationObserved) {
|
|
1252
|
-
context.addIssue({
|
|
1253
|
-
code: "custom",
|
|
1254
|
-
message: "Progress outcomes require their captured and analyzed evidence"
|
|
1255
|
-
});
|
|
1256
|
-
}
|
|
1257
|
-
if (slot.collectionMetadataKnown !== (slot.collectionMethodDigest !== null) || !slot.collectionMetadataKnown && (slot.requestedModel !== null || slot.cliVersion !== null)) {
|
|
1258
|
-
context.addIssue({
|
|
1259
|
-
code: "custom",
|
|
1260
|
-
message: "Progress collection metadata identity is inconsistent"
|
|
1261
|
-
});
|
|
1262
|
-
}
|
|
1263
|
-
});
|
|
1264
|
-
var progressMeasurementSchema = z5.object({
|
|
1265
|
-
version: z5.literal(1),
|
|
1266
|
-
runId,
|
|
1267
|
-
// Presentation only, and only for consumers before 0.5.0, which label
|
|
1268
|
-
// their question-set selector with it. Stored history keeps it.
|
|
1269
|
-
questionSetName: questionSetNameSchema.optional(),
|
|
1270
|
-
publishedAt: instant.nullable(),
|
|
1271
|
-
captureWindow: z5.object({ start: instant.nullable(), end: instant.nullable() }).strict(),
|
|
1272
|
-
measurementId: digest.nullable(),
|
|
1273
|
-
state: z5.enum([
|
|
1274
|
-
"independent",
|
|
1275
|
-
"mixed",
|
|
1276
|
-
"reused",
|
|
1277
|
-
"derived",
|
|
1278
|
-
"legacy",
|
|
1279
|
-
"invalid"
|
|
1280
|
-
]),
|
|
1281
|
-
warnings: z5.array(warning).max(50),
|
|
1282
|
-
reusedCaptures: z5.number().int().nonnegative(),
|
|
1283
|
-
brandIdentity: digest,
|
|
1284
|
-
geography: z5.string().min(1).max(100),
|
|
1285
|
-
language: z5.string().min(1).max(100),
|
|
1286
|
-
analyzer: z5.object({
|
|
1287
|
-
version: z5.number().int().positive().nullable(),
|
|
1288
|
-
model: z5.string().min(1).max(256).nullable()
|
|
1289
|
-
}).strict(),
|
|
1290
|
-
slots: z5.array(progressSlotSchema).max(1e4)
|
|
1291
|
-
}).strict().superRefine((point, context) => {
|
|
1292
|
-
const { start, end } = point.captureWindow;
|
|
1293
|
-
if (start === null !== (end === null) || start !== null && end !== null && Date.parse(start) > Date.parse(end)) {
|
|
1294
|
-
context.addIssue({
|
|
1295
|
-
code: "custom",
|
|
1296
|
-
message: "Progress capture window is inconsistent"
|
|
1297
|
-
});
|
|
1298
|
-
}
|
|
1299
|
-
const slots = point.slots.map(progressSlotKey);
|
|
1300
|
-
if (new Set(slots).size !== slots.length || point.reusedCaptures > point.slots.length) {
|
|
1301
|
-
context.addIssue({
|
|
1302
|
-
code: "custom",
|
|
1303
|
-
message: "Progress planned slots or reuse count are inconsistent"
|
|
1304
|
-
});
|
|
1305
|
-
}
|
|
1306
|
-
});
|
|
1307
|
-
|
|
1308
|
-
// src/report/core/schema.ts
|
|
1309
|
-
import { z as z6 } from "zod";
|
|
1218
|
+
var consumerSurfaces = ["chatgpt_app", "google_ai_mode"];
|
|
1219
|
+
var defaultSurfaces = [...chatSurfaces, ...agentSurfaces];
|
|
1220
|
+
var allSurfaces = [...defaultSurfaces, ...consumerSurfaces];
|
|
1221
|
+
var customSurfacePrefix = "custom:";
|
|
1222
|
+
var customSurfaceKeyPattern = /^[a-z][a-z0-9_]{0,31}$/;
|
|
1223
|
+
var isCustomSurface = (surface) => {
|
|
1224
|
+
return surface.startsWith(customSurfacePrefix) && customSurfaceKeyPattern.test(surface.slice(customSurfacePrefix.length));
|
|
1225
|
+
};
|
|
1226
|
+
var isConsumerSurface = (surface) => {
|
|
1227
|
+
return consumerSurfaces.some((consumer) => consumer === surface);
|
|
1228
|
+
};
|
|
1310
1229
|
|
|
1311
1230
|
// src/report/core/retrieval.ts
|
|
1312
1231
|
var retrievalCallKinds = [
|
|
@@ -1325,55 +1244,62 @@ var retrievalExposures = [
|
|
|
1325
1244
|
// src/report/core/schema.ts
|
|
1326
1245
|
var aeoSnapshotVersion = 2;
|
|
1327
1246
|
var maxReviewRounds = 5;
|
|
1328
|
-
var aeoSurfaceSchema =
|
|
1329
|
-
|
|
1330
|
-
|
|
1247
|
+
var aeoSurfaceSchema = z5.union([
|
|
1248
|
+
z5.enum(allSurfaces),
|
|
1249
|
+
// The z.custom keeps the template type that z.string() would widen.
|
|
1250
|
+
z5.custom(
|
|
1251
|
+
(value) => typeof value === "string" && isCustomSurface(value),
|
|
1252
|
+
{ error: "Expected a built-in surface or a custom surface ID." }
|
|
1253
|
+
)
|
|
1254
|
+
]);
|
|
1255
|
+
var retrievalCallSchema = z5.object({
|
|
1256
|
+
kind: z5.enum(retrievalCallKinds),
|
|
1331
1257
|
// Search term for `search`; null for the URL-driven kinds.
|
|
1332
|
-
query:
|
|
1258
|
+
query: z5.string().nullable(),
|
|
1333
1259
|
// Target for fetch / open_page / find_in_page; null for `search`.
|
|
1334
|
-
url:
|
|
1260
|
+
url: z5.string().nullable(),
|
|
1335
1261
|
// URLs the call returned to the model. Null when the surface does not
|
|
1336
1262
|
// expose results for this call (Codex, Gemini queries) or the result
|
|
1337
1263
|
// never arrived / could not be parsed.
|
|
1338
|
-
resultUrls:
|
|
1264
|
+
resultUrls: z5.array(z5.string()).nullable(),
|
|
1339
1265
|
// False when resultUrls is a cited subset rather than the full result
|
|
1340
1266
|
// list (ChatGPT). Irrelevant when resultUrls is null.
|
|
1341
|
-
resultsComplete:
|
|
1267
|
+
resultsComplete: z5.boolean()
|
|
1342
1268
|
});
|
|
1343
|
-
var retrievalLogSchema =
|
|
1344
|
-
exposure:
|
|
1269
|
+
var retrievalLogSchema = z5.object({
|
|
1270
|
+
exposure: z5.enum(retrievalExposures),
|
|
1345
1271
|
// In stream order. Empty is legal: the surface exposes retrieval and the
|
|
1346
1272
|
// answer made no calls (an honest from-memory answer).
|
|
1347
|
-
calls:
|
|
1273
|
+
calls: z5.array(retrievalCallSchema)
|
|
1348
1274
|
});
|
|
1349
|
-
var retrievalCallSummarySchema =
|
|
1350
|
-
kind:
|
|
1351
|
-
query:
|
|
1275
|
+
var retrievalCallSummarySchema = z5.object({
|
|
1276
|
+
kind: z5.enum(retrievalCallKinds),
|
|
1277
|
+
query: z5.string().nullable(),
|
|
1352
1278
|
// search only
|
|
1353
|
-
url:
|
|
1279
|
+
url: z5.string().nullable(),
|
|
1354
1280
|
// fetch / open_page / find_in_page
|
|
1355
1281
|
// search: the brand's domain is in the result set (null when the surface
|
|
1356
1282
|
// exposes no result set, or when an incomplete result set cannot prove
|
|
1357
1283
|
// absence). Other kinds: the opened URL is on the brand's domain.
|
|
1358
|
-
brandFound:
|
|
1284
|
+
brandFound: z5.boolean().nullable(),
|
|
1359
1285
|
// Same rule per competitor; normalized domains.
|
|
1360
|
-
competitorsFound:
|
|
1286
|
+
competitorsFound: z5.array(z5.string()),
|
|
1361
1287
|
// search only; null when results are not exposed.
|
|
1362
|
-
resultCount:
|
|
1288
|
+
resultCount: z5.number().nullable()
|
|
1363
1289
|
});
|
|
1364
|
-
var citationAttributionSchema =
|
|
1365
|
-
|
|
1290
|
+
var citationAttributionSchema = z5.array(
|
|
1291
|
+
z5.object({ url: z5.string(), callIndices: z5.array(z5.number().int()) })
|
|
1366
1292
|
);
|
|
1367
|
-
var aeoPromptCategorySchema =
|
|
1293
|
+
var aeoPromptCategorySchema = z5.enum([
|
|
1368
1294
|
"product_recommendation",
|
|
1369
1295
|
"industry_expert",
|
|
1370
1296
|
"comparison",
|
|
1371
1297
|
"problem_solving",
|
|
1372
1298
|
"general_knowledge"
|
|
1373
1299
|
]);
|
|
1374
|
-
var aeoPromptSchema =
|
|
1375
|
-
id:
|
|
1376
|
-
text:
|
|
1300
|
+
var aeoPromptSchema = z5.object({
|
|
1301
|
+
id: z5.string().min(1),
|
|
1302
|
+
text: z5.string().min(1),
|
|
1377
1303
|
category: aeoPromptCategorySchema
|
|
1378
1304
|
});
|
|
1379
1305
|
var sourceCategories = [
|
|
@@ -1383,37 +1309,37 @@ var sourceCategories = [
|
|
|
1383
1309
|
"institutional",
|
|
1384
1310
|
"earned"
|
|
1385
1311
|
];
|
|
1386
|
-
var sourceCategorySchema =
|
|
1387
|
-
var sourceMixCountsSchema =
|
|
1388
|
-
owned:
|
|
1389
|
-
competitor:
|
|
1390
|
-
social:
|
|
1391
|
-
institutional:
|
|
1392
|
-
earned:
|
|
1312
|
+
var sourceCategorySchema = z5.enum(sourceCategories);
|
|
1313
|
+
var sourceMixCountsSchema = z5.object({
|
|
1314
|
+
owned: z5.number(),
|
|
1315
|
+
competitor: z5.number(),
|
|
1316
|
+
social: z5.number(),
|
|
1317
|
+
institutional: z5.number(),
|
|
1318
|
+
earned: z5.number()
|
|
1393
1319
|
});
|
|
1394
|
-
var brandSchema =
|
|
1395
|
-
name:
|
|
1396
|
-
domain:
|
|
1397
|
-
aliases:
|
|
1320
|
+
var brandSchema = z5.object({
|
|
1321
|
+
name: z5.string(),
|
|
1322
|
+
domain: z5.string(),
|
|
1323
|
+
aliases: z5.array(z5.string()).default([])
|
|
1398
1324
|
});
|
|
1399
|
-
var aeoMatrixRowSchema =
|
|
1400
|
-
promptIdx:
|
|
1325
|
+
var aeoMatrixRowSchema = z5.object({
|
|
1326
|
+
promptIdx: z5.number(),
|
|
1401
1327
|
surface: aeoSurfaceSchema,
|
|
1402
|
-
prospectMentioned:
|
|
1403
|
-
prospectPosition:
|
|
1404
|
-
contextSnippet:
|
|
1405
|
-
runIndex:
|
|
1406
|
-
citedUrls:
|
|
1407
|
-
mentionedBrands:
|
|
1328
|
+
prospectMentioned: z5.boolean(),
|
|
1329
|
+
prospectPosition: z5.enum(["primary", "secondary", "listed", "absent"]).nullable(),
|
|
1330
|
+
contextSnippet: z5.string().nullable(),
|
|
1331
|
+
runIndex: z5.number().optional(),
|
|
1332
|
+
citedUrls: z5.array(z5.string().url()).optional(),
|
|
1333
|
+
mentionedBrands: z5.array(z5.object({ name: z5.string(), domain: z5.string().nullable() })).optional(),
|
|
1408
1334
|
// Section-aware buyer alternatives, qualified from saved answer context.
|
|
1409
1335
|
// Absent = historical data; an empty array means none qualified. The raw
|
|
1410
1336
|
// mentionedBrands inventory remains intact for inspecting the actual answer.
|
|
1411
|
-
qualifiedCompetitors:
|
|
1412
|
-
competitors:
|
|
1413
|
-
|
|
1337
|
+
qualifiedCompetitors: z5.array(z5.object({ name: z5.string(), domain: z5.string().nullable() })).optional(),
|
|
1338
|
+
competitors: z5.array(
|
|
1339
|
+
z5.object({ domain: z5.string(), mentioned: z5.boolean() })
|
|
1414
1340
|
),
|
|
1415
1341
|
// Per-mention sentiment — the analyzer always extracted it; v2 persists it.
|
|
1416
|
-
sentiment:
|
|
1342
|
+
sentiment: z5.enum(["positive", "neutral", "negative"]).optional(),
|
|
1417
1343
|
// Agent surfaces only: whether the CLI actually used web tools, and which
|
|
1418
1344
|
// CLI version answered. Answers from model priors are honest data (§5).
|
|
1419
1345
|
// Tri-state (correctness spec §3.1): true = a web search/fetch completed,
|
|
@@ -1421,90 +1347,119 @@ var aeoMatrixRowSchema = z6.object({
|
|
|
1421
1347
|
// run's tool events could not be parsed (or were never captured — the
|
|
1422
1348
|
// migrated pre-fix baselines), so retrieval is unknown. Never guessed
|
|
1423
1349
|
// from the answer text.
|
|
1424
|
-
usedWebSearch:
|
|
1425
|
-
agentCliVersion:
|
|
1350
|
+
usedWebSearch: z5.boolean().nullable().optional(),
|
|
1351
|
+
agentCliVersion: z5.string().optional(),
|
|
1426
1352
|
// Retrieval log summary (retrieval-log spec §4). Both absent = the log was
|
|
1427
1353
|
// not captured for this run (a probe that predates the spec, or a parse
|
|
1428
1354
|
// miss) — never a from-memory claim. Present on every fresh probe,
|
|
1429
1355
|
// `exposure: 'none'` surfaces included (with an empty call list).
|
|
1430
1356
|
retrievalExposure: retrievalLogSchema.shape.exposure.optional(),
|
|
1431
|
-
retrievalCalls:
|
|
1357
|
+
retrievalCalls: z5.array(retrievalCallSummarySchema).optional(),
|
|
1432
1358
|
// Google AI Overview only (hardening spec §4.1): the SERP carried no AI
|
|
1433
1359
|
// Overview. A captured absence — counts against share of voice — with no
|
|
1434
1360
|
// answer text behind it. Absent on every other surface.
|
|
1435
|
-
noOverview:
|
|
1361
|
+
noOverview: z5.literal(true).optional(),
|
|
1436
1362
|
// Path of this run's evidence chunk, relative to the report directory
|
|
1437
1363
|
// (e.g. 'evidence/vector_search-0.json'). Null when no text was captured.
|
|
1438
|
-
evidenceFile:
|
|
1364
|
+
evidenceFile: z5.string().nullable().optional()
|
|
1439
1365
|
});
|
|
1440
|
-
var
|
|
1441
|
-
|
|
1442
|
-
|
|
1366
|
+
var aeoRateEvidenceSchema = z5.object({
|
|
1367
|
+
count: z5.number().int().nonnegative(),
|
|
1368
|
+
captured: z5.number().int().nonnegative(),
|
|
1369
|
+
planned: z5.number().int().positive(),
|
|
1370
|
+
low: z5.number().min(0).max(1),
|
|
1371
|
+
high: z5.number().min(0).max(1)
|
|
1372
|
+
});
|
|
1373
|
+
var aeoVisibilitySchema = z5.object({
|
|
1374
|
+
prompts: z5.array(
|
|
1375
|
+
z5.object({ text: z5.string(), category: aeoPromptCategorySchema })
|
|
1443
1376
|
),
|
|
1444
|
-
surfaces:
|
|
1445
|
-
matrix:
|
|
1446
|
-
summary:
|
|
1377
|
+
surfaces: z5.array(aeoSurfaceSchema),
|
|
1378
|
+
matrix: z5.array(aeoMatrixRowSchema),
|
|
1379
|
+
summary: z5.object({
|
|
1447
1380
|
// Headline scorecards — chat surfaces only, comparable with v1 baselines.
|
|
1448
1381
|
// Null when the run measured no chat surfaces (agents-only iteration
|
|
1449
1382
|
// runs): an unmeasured scope must never render as a measured 0%.
|
|
1450
|
-
prospectShareOfVoice:
|
|
1451
|
-
prospectCitationRate:
|
|
1383
|
+
prospectShareOfVoice: z5.number().min(0).max(1).nullable(),
|
|
1384
|
+
prospectCitationRate: z5.number().min(0).max(1).nullable(),
|
|
1452
1385
|
// Agent scorecard pair over the agent-surface runs (Claude Code, Codex,
|
|
1453
1386
|
// Cursor — §5). Null when the
|
|
1454
1387
|
// agent surfaces weren't run.
|
|
1455
|
-
agentShareOfVoice:
|
|
1456
|
-
agentCitationRate:
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1388
|
+
agentShareOfVoice: z5.number().min(0).max(1).nullable(),
|
|
1389
|
+
agentCitationRate: z5.number().min(0).max(1).nullable(),
|
|
1390
|
+
// Consumer-app pair over the scraped products (method release spec
|
|
1391
|
+
// §5.5), never part of the chat headline. Present only when the run
|
|
1392
|
+
// planned a consumer app; null when it had no prompt left to score.
|
|
1393
|
+
consumerShareOfVoice: z5.number().min(0).max(1).nullable().optional(),
|
|
1394
|
+
consumerCitationRate: z5.number().min(0).max(1).nullable().optional(),
|
|
1395
|
+
// Beside each measured rate from calculation version 2.
|
|
1396
|
+
prospectShareOfVoiceEvidence: aeoRateEvidenceSchema.optional(),
|
|
1397
|
+
prospectCitationRateEvidence: aeoRateEvidenceSchema.optional(),
|
|
1398
|
+
agentShareOfVoiceEvidence: aeoRateEvidenceSchema.optional(),
|
|
1399
|
+
agentCitationRateEvidence: aeoRateEvidenceSchema.optional(),
|
|
1400
|
+
consumerShareOfVoiceEvidence: aeoRateEvidenceSchema.optional(),
|
|
1401
|
+
consumerCitationRateEvidence: aeoRateEvidenceSchema.optional(),
|
|
1402
|
+
byModel: z5.record(
|
|
1403
|
+
z5.string(),
|
|
1404
|
+
z5.object({
|
|
1405
|
+
shareOfVoice: z5.number(),
|
|
1406
|
+
citationRate: z5.number(),
|
|
1407
|
+
shareOfVoiceEvidence: aeoRateEvidenceSchema.optional(),
|
|
1408
|
+
citationRateEvidence: aeoRateEvidenceSchema.optional()
|
|
1409
|
+
})
|
|
1460
1410
|
),
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1411
|
+
// A split of captured answers, not a visibility claim: counts from
|
|
1412
|
+
// calculation version 2, no interval.
|
|
1413
|
+
byCompetitor: z5.array(
|
|
1414
|
+
z5.object({
|
|
1415
|
+
domain: z5.string(),
|
|
1416
|
+
shareOfVoice: z5.number(),
|
|
1417
|
+
citationRate: z5.number(),
|
|
1418
|
+
mentionedAnswers: z5.number().int().nonnegative().optional(),
|
|
1419
|
+
citedAnswers: z5.number().int().nonnegative().optional(),
|
|
1420
|
+
capturedAnswers: z5.number().int().nonnegative().optional()
|
|
1466
1421
|
})
|
|
1467
1422
|
),
|
|
1468
|
-
topCompetitorDomain:
|
|
1423
|
+
topCompetitorDomain: z5.string().nullable()
|
|
1469
1424
|
})
|
|
1470
1425
|
});
|
|
1471
|
-
var aeoSourceMixSchema =
|
|
1472
|
-
sections:
|
|
1473
|
-
|
|
1474
|
-
key:
|
|
1475
|
-
perSurface:
|
|
1476
|
-
|
|
1426
|
+
var aeoSourceMixSchema = z5.object({
|
|
1427
|
+
sections: z5.array(
|
|
1428
|
+
z5.object({
|
|
1429
|
+
key: z5.string(),
|
|
1430
|
+
perSurface: z5.array(
|
|
1431
|
+
z5.object({ surface: aeoSurfaceSchema, counts: sourceMixCountsSchema })
|
|
1477
1432
|
),
|
|
1478
1433
|
total: sourceMixCountsSchema
|
|
1479
1434
|
})
|
|
1480
1435
|
)
|
|
1481
1436
|
});
|
|
1482
|
-
var aeoPerceptionSchema =
|
|
1483
|
-
sections:
|
|
1484
|
-
|
|
1485
|
-
key:
|
|
1437
|
+
var aeoPerceptionSchema = z5.object({
|
|
1438
|
+
sections: z5.array(
|
|
1439
|
+
z5.object({
|
|
1440
|
+
key: z5.string(),
|
|
1486
1441
|
// Tallies over captured answers that mention the brand.
|
|
1487
|
-
sentiment:
|
|
1488
|
-
positive:
|
|
1489
|
-
neutral:
|
|
1490
|
-
negative:
|
|
1442
|
+
sentiment: z5.object({
|
|
1443
|
+
positive: z5.number(),
|
|
1444
|
+
neutral: z5.number(),
|
|
1445
|
+
negative: z5.number()
|
|
1491
1446
|
}),
|
|
1492
1447
|
// Narrative phrases AI attaches to the brand ("open-source",
|
|
1493
1448
|
// "complex to set up"), with where they were said.
|
|
1494
|
-
narratives:
|
|
1495
|
-
|
|
1496
|
-
phrase:
|
|
1497
|
-
promptIdx:
|
|
1449
|
+
narratives: z5.array(
|
|
1450
|
+
z5.object({
|
|
1451
|
+
phrase: z5.string(),
|
|
1452
|
+
promptIdx: z5.number(),
|
|
1498
1453
|
surface: aeoSurfaceSchema
|
|
1499
1454
|
})
|
|
1500
1455
|
),
|
|
1501
1456
|
// Suspected factual errors vs the config's product brief — flagged for
|
|
1502
1457
|
// human verification, never auto-published as fact (§7.2).
|
|
1503
|
-
flaggedClaims:
|
|
1504
|
-
|
|
1505
|
-
claim:
|
|
1506
|
-
reason:
|
|
1507
|
-
promptIdx:
|
|
1458
|
+
flaggedClaims: z5.array(
|
|
1459
|
+
z5.object({
|
|
1460
|
+
claim: z5.string(),
|
|
1461
|
+
reason: z5.string(),
|
|
1462
|
+
promptIdx: z5.number(),
|
|
1508
1463
|
surface: aeoSurfaceSchema
|
|
1509
1464
|
})
|
|
1510
1465
|
)
|
|
@@ -1512,147 +1467,155 @@ var aeoPerceptionSchema = z6.object({
|
|
|
1512
1467
|
)
|
|
1513
1468
|
});
|
|
1514
1469
|
var aiBotKinds = ["training", "search", "user_fetch"];
|
|
1515
|
-
var aeoTechnicalChecksSchema =
|
|
1516
|
-
crawlerAccess:
|
|
1517
|
-
robotsUrl:
|
|
1518
|
-
fetchedAt:
|
|
1519
|
-
robotsFetchError:
|
|
1470
|
+
var aeoTechnicalChecksSchema = z5.object({
|
|
1471
|
+
crawlerAccess: z5.object({
|
|
1472
|
+
robotsUrl: z5.string(),
|
|
1473
|
+
fetchedAt: z5.string(),
|
|
1474
|
+
robotsFetchError: z5.string().nullable(),
|
|
1520
1475
|
// True when robots.txt ran past the 500 KiB RFC 9309 asks a reader to
|
|
1521
1476
|
// parse: the verdicts rest on that prefix. Absent on snapshots written
|
|
1522
1477
|
// before the bound existed.
|
|
1523
|
-
robotsTruncated:
|
|
1524
|
-
bots:
|
|
1525
|
-
|
|
1526
|
-
bot:
|
|
1527
|
-
kind:
|
|
1478
|
+
robotsTruncated: z5.boolean().optional(),
|
|
1479
|
+
bots: z5.array(
|
|
1480
|
+
z5.object({
|
|
1481
|
+
bot: z5.string(),
|
|
1482
|
+
kind: z5.enum(aiBotKinds),
|
|
1528
1483
|
// Null when robots.txt could not be fetched or parsed.
|
|
1529
|
-
robotsAllowed:
|
|
1484
|
+
robotsAllowed: z5.boolean().nullable(),
|
|
1530
1485
|
// Live GET with the bot's UA — search/user-fetch bots only; catches
|
|
1531
1486
|
// WAF-level blocks robots.txt doesn't show. Null when not probed.
|
|
1532
|
-
liveStatus:
|
|
1533
|
-
liveBlocked:
|
|
1487
|
+
liveStatus: z5.number().nullable(),
|
|
1488
|
+
liveBlocked: z5.boolean().nullable(),
|
|
1534
1489
|
// What the live probe can honestly say. A request presenting as a
|
|
1535
1490
|
// bot from the audit's own address is an impersonation to a site
|
|
1536
1491
|
// that verifies bots by IP, so a 403 the site does not also give
|
|
1537
1492
|
// a plain browser is `refused_as_bot`, never proof the real bot is
|
|
1538
1493
|
// blocked; a 403 to the browser too says nothing about bots.
|
|
1539
1494
|
// Absent on snapshots written before the control request existed.
|
|
1540
|
-
liveVerdict:
|
|
1495
|
+
liveVerdict: z5.enum(["ok", "refused_as_bot", "inconclusive"]).optional()
|
|
1541
1496
|
})
|
|
1542
1497
|
),
|
|
1543
1498
|
// The same page fetched with an ordinary browser agent from the same
|
|
1544
1499
|
// address, right after the bot probes: the control the verdicts rest on.
|
|
1545
|
-
controlStatus:
|
|
1500
|
+
controlStatus: z5.number().nullable().optional()
|
|
1546
1501
|
}).nullable(),
|
|
1547
|
-
renderability:
|
|
1548
|
-
|
|
1549
|
-
url:
|
|
1550
|
-
staticTextChars:
|
|
1551
|
-
renderedTextChars:
|
|
1502
|
+
renderability: z5.array(
|
|
1503
|
+
z5.object({
|
|
1504
|
+
url: z5.string(),
|
|
1505
|
+
staticTextChars: z5.number(),
|
|
1506
|
+
renderedTextChars: z5.number(),
|
|
1552
1507
|
// Fraction of rendered text missing from the no-JS fetch.
|
|
1553
|
-
missingRatio:
|
|
1554
|
-
flagged:
|
|
1555
|
-
error:
|
|
1508
|
+
missingRatio: z5.number(),
|
|
1509
|
+
flagged: z5.boolean(),
|
|
1510
|
+
error: z5.string().nullable()
|
|
1556
1511
|
})
|
|
1557
1512
|
).nullable(),
|
|
1558
|
-
llmsTxt:
|
|
1559
|
-
agentReadiness:
|
|
1513
|
+
llmsTxt: z5.object({ llmsTxt: z5.boolean(), llmsFullTxt: z5.boolean() }).nullable(),
|
|
1514
|
+
agentReadiness: z5.object({ mcpServer: z5.boolean(), llmDocs: z5.boolean() }).nullable()
|
|
1560
1515
|
});
|
|
1561
|
-
var aeoOutreachTargetsSchema =
|
|
1562
|
-
|
|
1563
|
-
domain:
|
|
1564
|
-
citations:
|
|
1516
|
+
var aeoOutreachTargetsSchema = z5.array(
|
|
1517
|
+
z5.object({
|
|
1518
|
+
domain: z5.string(),
|
|
1519
|
+
citations: z5.number(),
|
|
1565
1520
|
// Prompts this domain wins while the client is absent — resolved to text
|
|
1566
1521
|
// at render via sectionKey + promptIdx.
|
|
1567
|
-
prompts:
|
|
1568
|
-
|
|
1522
|
+
prompts: z5.array(
|
|
1523
|
+
z5.object({ sectionKey: z5.string(), promptIdx: z5.number() })
|
|
1569
1524
|
),
|
|
1570
|
-
sampleUrls:
|
|
1525
|
+
sampleUrls: z5.array(z5.string())
|
|
1571
1526
|
})
|
|
1572
1527
|
);
|
|
1573
|
-
var aeoSnapshotSchema =
|
|
1574
|
-
version:
|
|
1575
|
-
reportKey:
|
|
1528
|
+
var aeoSnapshotSchema = z5.object({
|
|
1529
|
+
version: z5.literal(aeoSnapshotVersion),
|
|
1530
|
+
reportKey: z5.string(),
|
|
1576
1531
|
brand: brandSchema,
|
|
1577
|
-
competitors:
|
|
1532
|
+
competitors: z5.array(brandSchema),
|
|
1578
1533
|
// Array, not fixed keys: a section that failed entirely is omitted while
|
|
1579
1534
|
// the others still render.
|
|
1580
|
-
sections:
|
|
1535
|
+
sections: z5.array(z5.object({ key: z5.string(), visibility: aeoVisibilitySchema })).min(1),
|
|
1581
1536
|
sourceMix: aeoSourceMixSchema.optional(),
|
|
1582
1537
|
perception: aeoPerceptionSchema.optional(),
|
|
1583
1538
|
technicalChecks: aeoTechnicalChecksSchema.optional(),
|
|
1584
1539
|
outreachTargets: aeoOutreachTargetsSchema.optional(),
|
|
1585
|
-
meta:
|
|
1540
|
+
meta: z5.object({
|
|
1586
1541
|
// Review is additive. Exhausting its rounds records remaining work;
|
|
1587
1542
|
// it never prevents delivery of the measured report.
|
|
1588
|
-
quality:
|
|
1589
|
-
needsImprovement:
|
|
1590
|
-
reviewRounds:
|
|
1591
|
-
issues:
|
|
1592
|
-
|
|
1593
|
-
stage:
|
|
1594
|
-
code:
|
|
1595
|
-
message:
|
|
1596
|
-
file:
|
|
1597
|
-
evidence:
|
|
1543
|
+
quality: z5.object({
|
|
1544
|
+
needsImprovement: z5.boolean(),
|
|
1545
|
+
reviewRounds: z5.number().int().min(0).max(maxReviewRounds),
|
|
1546
|
+
issues: z5.array(
|
|
1547
|
+
z5.object({
|
|
1548
|
+
stage: z5.string(),
|
|
1549
|
+
code: z5.string(),
|
|
1550
|
+
message: z5.string(),
|
|
1551
|
+
file: z5.string().nullable().optional(),
|
|
1552
|
+
evidence: z5.string().optional()
|
|
1598
1553
|
})
|
|
1599
1554
|
)
|
|
1600
1555
|
}).optional(),
|
|
1601
|
-
generatedAt:
|
|
1602
|
-
promptCount:
|
|
1556
|
+
generatedAt: z5.string(),
|
|
1557
|
+
promptCount: z5.number(),
|
|
1603
1558
|
// Successful probes across all sections.
|
|
1604
|
-
probeCount:
|
|
1559
|
+
probeCount: z5.number(),
|
|
1605
1560
|
// Present when the run reused checkpointed probes (resume / --redo):
|
|
1606
1561
|
// the snapshot then mixes capture ages, and generatedAt alone would
|
|
1607
1562
|
// overstate freshness. Absent = every probe was captured by this run.
|
|
1608
|
-
reusedProbes:
|
|
1609
|
-
count:
|
|
1610
|
-
oldestCapturedAt:
|
|
1563
|
+
reusedProbes: z5.object({
|
|
1564
|
+
count: z5.number(),
|
|
1565
|
+
oldestCapturedAt: z5.string().nullable()
|
|
1611
1566
|
}).optional(),
|
|
1612
|
-
partialFailures:
|
|
1567
|
+
partialFailures: z5.array(z5.object({ step: z5.string(), error: z5.string() })),
|
|
1613
1568
|
// The run's surface scope (correctness spec §3.6): with the pre-flight
|
|
1614
1569
|
// CLI check, `agentClis.<cli>: null` can only mean "not in scope", and
|
|
1615
1570
|
// this field says so explicitly. Optional: older snapshots lack it.
|
|
1616
|
-
surfaces:
|
|
1571
|
+
surfaces: z5.array(aeoSurfaceSchema).optional(),
|
|
1572
|
+
// The label of each surface that was not asked of its default model,
|
|
1573
|
+
// naming the model it was asked of. Absent on a run measured with the
|
|
1574
|
+
// defaults: readers fall back to the engine's own labels.
|
|
1575
|
+
surfaceLabels: z5.record(z5.string().min(1).max(60), z5.string().min(1).max(300)).optional(),
|
|
1576
|
+
// How the run measured, as fixed sentences the host built from what it
|
|
1577
|
+
// observed (method release spec §8): never written by a model. Absent
|
|
1578
|
+
// on a snapshot from before 0.4.0.
|
|
1579
|
+
methodology: z5.array(z5.string().min(1).max(1500)).max(20).optional(),
|
|
1617
1580
|
// Which agent CLIs answered, for the methodology note. Null = not run.
|
|
1618
|
-
agentClis:
|
|
1619
|
-
claudeCode:
|
|
1620
|
-
codex:
|
|
1581
|
+
agentClis: z5.object({
|
|
1582
|
+
claudeCode: z5.string().nullable(),
|
|
1583
|
+
codex: z5.string().nullable(),
|
|
1621
1584
|
// Optional: snapshots committed before the cursor surface existed
|
|
1622
1585
|
// lack this key and must keep parsing.
|
|
1623
|
-
cursor:
|
|
1586
|
+
cursor: z5.string().nullable().optional()
|
|
1624
1587
|
}).optional(),
|
|
1625
1588
|
// Answer-analyzer version that produced the matrix (correctness spec
|
|
1626
1589
|
// §3.7); a bump invalidates every cached analysis.
|
|
1627
|
-
analyzerVersion:
|
|
1590
|
+
analyzerVersion: z5.number().int().optional(),
|
|
1628
1591
|
// Domain-classifier version behind the source mix and outreach targets
|
|
1629
1592
|
// (§7.1 amendment, 2026-09-04). Absent = static rules only (baselines
|
|
1630
1593
|
// committed before the amendment).
|
|
1631
|
-
domainClassifierVersion:
|
|
1632
|
-
competitorClassifierVersion:
|
|
1594
|
+
domainClassifierVersion: z5.number().int().optional(),
|
|
1595
|
+
competitorClassifierVersion: z5.number().int().optional(),
|
|
1633
1596
|
// One-off data migrations applied to this committed file (correctness
|
|
1634
1597
|
// spec §3.8), so a rewritten value is visible in the file itself.
|
|
1635
|
-
migrations:
|
|
1598
|
+
migrations: z5.array(z5.object({ id: z5.string(), appliedAt: z5.string() })).optional(),
|
|
1636
1599
|
// The run that produced the snapshot (hardening spec §4.2); every unit
|
|
1637
1600
|
// record, analysis entry and log event of the run carries the same id.
|
|
1638
1601
|
// Optional: snapshots committed before run identity existed lack it.
|
|
1639
|
-
runId:
|
|
1640
|
-
derivedFromRunId:
|
|
1641
|
-
replayKind:
|
|
1642
|
-
groundingPolicyVersion:
|
|
1602
|
+
runId: z5.string().optional(),
|
|
1603
|
+
derivedFromRunId: z5.string().optional(),
|
|
1604
|
+
replayKind: z5.enum(["grounding", "analysis"]).optional(),
|
|
1605
|
+
groundingPolicyVersion: z5.number().int().positive().optional(),
|
|
1643
1606
|
// The model ids behind the analyzer and perception passes (§2.11).
|
|
1644
|
-
models:
|
|
1607
|
+
models: z5.object({ analyzer: z5.string(), perception: z5.string() }).optional()
|
|
1645
1608
|
})
|
|
1646
1609
|
});
|
|
1647
|
-
var aeoEvidenceChunkSchema =
|
|
1648
|
-
sectionKey:
|
|
1649
|
-
promptIdx:
|
|
1650
|
-
promptText:
|
|
1651
|
-
runs:
|
|
1652
|
-
|
|
1610
|
+
var aeoEvidenceChunkSchema = z5.object({
|
|
1611
|
+
sectionKey: z5.string(),
|
|
1612
|
+
promptIdx: z5.number(),
|
|
1613
|
+
promptText: z5.string(),
|
|
1614
|
+
runs: z5.array(
|
|
1615
|
+
z5.object({
|
|
1653
1616
|
surface: aeoSurfaceSchema,
|
|
1654
|
-
runIndex:
|
|
1655
|
-
responseText:
|
|
1617
|
+
runIndex: z5.number(),
|
|
1618
|
+
responseText: z5.string(),
|
|
1656
1619
|
// Raw retrieval log and the cited-URL → call attribution derived from
|
|
1657
1620
|
// it (retrieval-log spec §4, §6). Absent = not captured for this run.
|
|
1658
1621
|
retrieval: retrievalLogSchema.optional(),
|
|
@@ -1661,6 +1624,110 @@ var aeoEvidenceChunkSchema = z6.object({
|
|
|
1661
1624
|
)
|
|
1662
1625
|
});
|
|
1663
1626
|
|
|
1627
|
+
// src/report/core/progress-schema.ts
|
|
1628
|
+
var digest = z6.string().regex(/^[a-f0-9]{64}$/);
|
|
1629
|
+
var runId = z6.string().regex(/^[a-zA-Z0-9_-]{1,180}$/);
|
|
1630
|
+
var instant = z6.iso.datetime();
|
|
1631
|
+
var questionSetNameSchema = z6.string().trim().min(1).max(120);
|
|
1632
|
+
var warning = z6.enum([
|
|
1633
|
+
"invalid_capture_manifest",
|
|
1634
|
+
"historical_capture_metadata_unknown",
|
|
1635
|
+
"artifact_identity_mismatch",
|
|
1636
|
+
"plan_config_mismatch",
|
|
1637
|
+
"duplicate_planned_slots",
|
|
1638
|
+
"matrix_question_missing",
|
|
1639
|
+
"historical_run_index_unknown",
|
|
1640
|
+
"matrix_plan_mismatch",
|
|
1641
|
+
"collection_metadata_unknown",
|
|
1642
|
+
"includes_reused_captures",
|
|
1643
|
+
"reused_measurement",
|
|
1644
|
+
"analysis_replay"
|
|
1645
|
+
]);
|
|
1646
|
+
var progressSlotSchema = z6.object({
|
|
1647
|
+
sectionKey: z6.string().min(1).max(180),
|
|
1648
|
+
questionKey: digest,
|
|
1649
|
+
surface: aeoSurfaceSchema,
|
|
1650
|
+
runIndex: z6.number().int().positive(),
|
|
1651
|
+
captured: z6.boolean(),
|
|
1652
|
+
analyzed: z6.boolean(),
|
|
1653
|
+
citationObserved: z6.boolean(),
|
|
1654
|
+
captureId: digest.nullable(),
|
|
1655
|
+
mentioned: z6.boolean(),
|
|
1656
|
+
cited: z6.boolean(),
|
|
1657
|
+
requestedModel: z6.string().min(1).max(256).nullable(),
|
|
1658
|
+
cliVersion: z6.string().min(1).max(256).nullable(),
|
|
1659
|
+
collectionMethodDigest: digest.nullable(),
|
|
1660
|
+
collectionMetadataKnown: z6.boolean()
|
|
1661
|
+
}).strict().superRefine((slot, context) => {
|
|
1662
|
+
if (!slot.captured && (slot.analyzed || slot.citationObserved || slot.captureId !== null) || slot.mentioned && !slot.analyzed || slot.cited && !slot.citationObserved) {
|
|
1663
|
+
context.addIssue({
|
|
1664
|
+
code: "custom",
|
|
1665
|
+
message: "Progress outcomes require their captured and analyzed evidence"
|
|
1666
|
+
});
|
|
1667
|
+
}
|
|
1668
|
+
if (slot.collectionMetadataKnown !== (slot.collectionMethodDigest !== null) || !slot.collectionMetadataKnown && (slot.requestedModel !== null || slot.cliVersion !== null)) {
|
|
1669
|
+
context.addIssue({
|
|
1670
|
+
code: "custom",
|
|
1671
|
+
message: "Progress collection metadata identity is inconsistent"
|
|
1672
|
+
});
|
|
1673
|
+
}
|
|
1674
|
+
});
|
|
1675
|
+
var isSurfaceSinceProgressVersion1 = (surface) => {
|
|
1676
|
+
return isCustomSurface(surface) || isConsumerSurface(surface);
|
|
1677
|
+
};
|
|
1678
|
+
var progressMeasurementSchema = z6.object({
|
|
1679
|
+
// Version 2 may hold a consumer app (method release spec §3.2) or a
|
|
1680
|
+
// custom surface (open models spec §5.4). A measurement without one is
|
|
1681
|
+
// still written as version 1, byte for byte.
|
|
1682
|
+
version: z6.union([z6.literal(1), z6.literal(2)]),
|
|
1683
|
+
runId,
|
|
1684
|
+
// Presentation only, and only for consumers before 0.5.0, which label
|
|
1685
|
+
// their question-set selector with it. Stored history keeps it.
|
|
1686
|
+
questionSetName: questionSetNameSchema.optional(),
|
|
1687
|
+
publishedAt: instant.nullable(),
|
|
1688
|
+
captureWindow: z6.object({ start: instant.nullable(), end: instant.nullable() }).strict(),
|
|
1689
|
+
measurementId: digest.nullable(),
|
|
1690
|
+
state: z6.enum([
|
|
1691
|
+
"independent",
|
|
1692
|
+
"mixed",
|
|
1693
|
+
"reused",
|
|
1694
|
+
"derived",
|
|
1695
|
+
"legacy",
|
|
1696
|
+
"invalid"
|
|
1697
|
+
]),
|
|
1698
|
+
warnings: z6.array(warning).max(50),
|
|
1699
|
+
reusedCaptures: z6.number().int().nonnegative(),
|
|
1700
|
+
brandIdentity: digest,
|
|
1701
|
+
geography: z6.string().min(1).max(100),
|
|
1702
|
+
language: z6.string().min(1).max(100),
|
|
1703
|
+
analyzer: z6.object({
|
|
1704
|
+
version: z6.number().int().positive().nullable(),
|
|
1705
|
+
model: z6.string().min(1).max(256).nullable()
|
|
1706
|
+
}).strict(),
|
|
1707
|
+
slots: z6.array(progressSlotSchema).max(1e4)
|
|
1708
|
+
}).strict().superRefine((point, context) => {
|
|
1709
|
+
const { start, end } = point.captureWindow;
|
|
1710
|
+
if (start === null !== (end === null) || start !== null && end !== null && Date.parse(start) > Date.parse(end)) {
|
|
1711
|
+
context.addIssue({
|
|
1712
|
+
code: "custom",
|
|
1713
|
+
message: "Progress capture window is inconsistent"
|
|
1714
|
+
});
|
|
1715
|
+
}
|
|
1716
|
+
if (point.version === 1 && point.slots.some((slot) => isSurfaceSinceProgressVersion1(slot.surface))) {
|
|
1717
|
+
context.addIssue({
|
|
1718
|
+
code: "custom",
|
|
1719
|
+
message: "A version 1 progress measurement holds no consumer or custom surface"
|
|
1720
|
+
});
|
|
1721
|
+
}
|
|
1722
|
+
const slots = point.slots.map(progressSlotKey);
|
|
1723
|
+
if (new Set(slots).size !== slots.length || point.reusedCaptures > point.slots.length) {
|
|
1724
|
+
context.addIssue({
|
|
1725
|
+
code: "custom",
|
|
1726
|
+
message: "Progress planned slots or reuse count are inconsistent"
|
|
1727
|
+
});
|
|
1728
|
+
}
|
|
1729
|
+
});
|
|
1730
|
+
|
|
1664
1731
|
// src/coverage-schema.ts
|
|
1665
1732
|
import { z as z7 } from "zod";
|
|
1666
1733
|
var coverageThresholdsSchema = z7.object({
|
|
@@ -1677,10 +1744,17 @@ var generationBackendSchema = z8.enum([
|
|
|
1677
1744
|
"gateway"
|
|
1678
1745
|
]);
|
|
1679
1746
|
var modelPricingSchema = z8.object({
|
|
1680
|
-
input: z8.number().
|
|
1681
|
-
output: z8.number().
|
|
1747
|
+
input: z8.number().nonnegative(),
|
|
1748
|
+
output: z8.number().nonnegative(),
|
|
1682
1749
|
cachedInput: z8.number().nonnegative()
|
|
1683
1750
|
}).strict();
|
|
1751
|
+
var reasoningEffortSchema = z8.enum([
|
|
1752
|
+
"low",
|
|
1753
|
+
"medium",
|
|
1754
|
+
"high",
|
|
1755
|
+
"xhigh",
|
|
1756
|
+
"max"
|
|
1757
|
+
]);
|
|
1684
1758
|
var internalModelRoleSchema = z8.object({
|
|
1685
1759
|
/** The gateway model ID, such as `anthropic/claude-opus-5.5`. */
|
|
1686
1760
|
model: z8.string().min(1),
|
|
@@ -1690,7 +1764,7 @@ var internalModelRoleSchema = z8.object({
|
|
|
1690
1764
|
* sent: not every provider honours one. */
|
|
1691
1765
|
gateway: z8.object({
|
|
1692
1766
|
reasoning: z8.union([
|
|
1693
|
-
z8.object({ effort:
|
|
1767
|
+
z8.object({ effort: reasoningEffortSchema }).strict(),
|
|
1694
1768
|
/** Accepted so that a stored profile keeps parsing and
|
|
1695
1769
|
* dispatching exactly as admitted; never built any more. */
|
|
1696
1770
|
z8.object({ max_tokens: z8.number().int().positive() }).strict()
|
|
@@ -1714,7 +1788,7 @@ var internalModelRoleSchema = z8.object({
|
|
|
1714
1788
|
}).strict();
|
|
1715
1789
|
var codexStageModelSchema = z8.object({
|
|
1716
1790
|
model: z8.string().min(1),
|
|
1717
|
-
reasoningEffort:
|
|
1791
|
+
reasoningEffort: reasoningEffortSchema,
|
|
1718
1792
|
/** The context window Codex must be told: it has no metadata for
|
|
1719
1793
|
* gateway models and otherwise compacts a session at its own default. */
|
|
1720
1794
|
contextWindow: z8.number().int().positive(),
|
|
@@ -2061,6 +2135,16 @@ var ownedCompetitorDomainSchema = z14.string().trim().regex(
|
|
|
2061
2135
|
/^(?=.{1,253}$)(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\.)+[A-Za-z](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\.?$/,
|
|
2062
2136
|
"Expected a domain name without a URL, path or port"
|
|
2063
2137
|
);
|
|
2138
|
+
var maxCustomSurfaces = 8;
|
|
2139
|
+
var surfaceDecisionShape = {
|
|
2140
|
+
codingAgents: z14.enum(["measure", "skip"]),
|
|
2141
|
+
because: z14.string().trim().min(12).max(300)
|
|
2142
|
+
};
|
|
2143
|
+
var defaultSurfaceDecision = {
|
|
2144
|
+
codingAgents: "measure",
|
|
2145
|
+
because: "Default: every surface is measured until the author decides otherwise."
|
|
2146
|
+
};
|
|
2147
|
+
var authoredSurfacesSchema = z14.object(surfaceDecisionShape).strict().prefault(defaultSurfaceDecision);
|
|
2064
2148
|
var aeoAuditConfigSchema = z14.object({
|
|
2065
2149
|
reportKey: z14.string().min(1),
|
|
2066
2150
|
// Labels the console Dashboard's question-set selector until it adopts
|
|
@@ -2087,17 +2171,30 @@ var aeoAuditConfigSchema = z14.object({
|
|
|
2087
2171
|
// Grounds accuracy flagging (§7.2): claims contradicting this brief are
|
|
2088
2172
|
// flagged for human verification.
|
|
2089
2173
|
productBrief: z14.string().min(1),
|
|
2090
|
-
//
|
|
2091
|
-
//
|
|
2092
|
-
//
|
|
2093
|
-
//
|
|
2174
|
+
// The custom surfaces the audit declares (open models spec §5): the plan
|
|
2175
|
+
// needs their IDs and the facts their labels. Their models are bindings,
|
|
2176
|
+
// never configuration: a model is how a surface is asked, not what is
|
|
2177
|
+
// measured. Absent when none is declared, so a config without them
|
|
2178
|
+
// parses, and digests, exactly as before.
|
|
2179
|
+
customSurfaces: z14.array(
|
|
2180
|
+
z14.object({
|
|
2181
|
+
key: z14.string().regex(customSurfaceKeyPattern),
|
|
2182
|
+
label: z14.string().trim().min(1).max(60)
|
|
2183
|
+
}).strict()
|
|
2184
|
+
).min(1).max(maxCustomSurfaces).optional(),
|
|
2094
2185
|
surfaces: z14.object({
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2186
|
+
...surfaceDecisionShape,
|
|
2187
|
+
// The consumer apps measured as well (method release spec §5.4), each
|
|
2188
|
+
// listed once. The operator's choice, never the author's. Absent when
|
|
2189
|
+
// none is, so a config without them parses, and digests, exactly as
|
|
2190
|
+
// before.
|
|
2191
|
+
consumerApps: z14.array(z14.enum(consumerSurfaces)).min(1).refine(
|
|
2192
|
+
(listed) => listed.join() === consumerSurfaces.filter((app) => listed.includes(app)).join(),
|
|
2193
|
+
{
|
|
2194
|
+
error: `Each consumer app is listed once, in this order: ${consumerSurfaces.join(", ")}.`
|
|
2195
|
+
}
|
|
2196
|
+
).optional()
|
|
2197
|
+
}).strict().prefault(defaultSurfaceDecision),
|
|
2101
2198
|
productGrounding: groundingBundleSchema.optional(),
|
|
2102
2199
|
// Per-report domain classification overrides for §7.1.
|
|
2103
2200
|
sourceOverrides: z14.record(z14.string(), sourceCategorySchema).optional(),
|
|
@@ -2160,8 +2257,14 @@ var authorOutputSchema = aeoAuditConfigSchema.omit({
|
|
|
2160
2257
|
competitorQualification: true,
|
|
2161
2258
|
// Depth decides what a run costs, so the operator sets it in audit.json
|
|
2162
2259
|
// with the estimate in front of them, never the author.
|
|
2163
|
-
chatProbes: true
|
|
2260
|
+
chatProbes: true,
|
|
2261
|
+
// A custom surface is a model the operator chooses and binds; the
|
|
2262
|
+
// author could name one and bind nothing.
|
|
2263
|
+
customSurfaces: true
|
|
2164
2264
|
}).extend({
|
|
2265
|
+
// The author decides the coding agents. The consumer apps are opted
|
|
2266
|
+
// into by the operator, in audit.json or the hosted config.
|
|
2267
|
+
surfaces: authoredSurfacesSchema,
|
|
2165
2268
|
// The agent batch the author could always propose: 1 or 2 runs per
|
|
2166
2269
|
// prompt. A deeper one is the operator's call, as chat depth is.
|
|
2167
2270
|
agentProbes: agentProbeConfigSchema.extend({ runsPerPrompt: z15.number().int().min(1).max(2).default(2) }).prefault({}),
|