literally-aeo 0.2.1 → 0.3.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/dist/cli.mjs +6075 -5175
- package/dist/lib/agents/author-schema.js +5 -5
- package/dist/lib/agents/author-validation.js +9 -7
- package/dist/lib/agents/copy-validation.js +10 -10
- package/dist/lib/agents/copywriter-input.js +9 -9
- package/dist/lib/agents/facts.js +8 -8
- package/dist/lib/agents/narrative-facts.js +6 -6
- package/dist/lib/agents/verifier.js +14 -13
- package/dist/lib/analysis/domain-classifier.js +12 -10
- package/dist/lib/analysis/domain-labels.js +4 -4
- package/dist/lib/analysis/outreach.js +2 -2
- package/dist/lib/analysis/progress.js +9 -9
- package/dist/lib/analysis/retrieval.js +5 -5
- package/dist/lib/analysis/scoring.js +5 -5
- package/dist/lib/analysis/search-analyzer.js +6 -6
- package/dist/lib/analysis/sentiment.js +12 -10
- package/dist/lib/analysis/source-mix.js +2 -2
- package/dist/lib/author/examples.js +6 -6
- package/dist/lib/bundle/contracts.js +6 -6
- package/dist/lib/bundle/export.js +18 -18
- package/dist/lib/bundle/journal.js +7 -7
- package/dist/lib/bundle/project-journal.js +10 -10
- package/dist/lib/bundle/project.js +16 -16
- package/dist/lib/bundle/read.js +19 -19
- package/dist/lib/bundle/recorder.js +8 -8
- package/dist/lib/bundle/redact.js +7 -7
- package/dist/lib/bundle/trace-coverage.js +7 -7
- package/dist/lib/bundle/verify-integrity.js +9 -9
- package/dist/lib/bundle/verify-measurement.js +22 -13
- package/dist/lib/bundle/verify-report.js +24 -16
- package/dist/lib/bundle/verify.js +32 -24
- package/dist/lib/capture-manifest.js +6 -6
- package/dist/lib/checks/crawler-access.js +2 -2
- package/dist/lib/checks/money-pages.js +13 -0
- package/dist/lib/checks/renderability.js +2 -2
- package/dist/lib/checks/run-checks.js +12 -12
- package/dist/lib/chunks/{chunk-XAKME6NM.js → chunk-2C723CW7.js} +1 -1
- package/dist/lib/chunks/chunk-2FDSOZ6Q.js +287 -0
- package/dist/lib/chunks/{chunk-PWOYEIPF.js → chunk-2U5QSA6Q.js} +7 -7
- package/dist/lib/chunks/{chunk-6EI4CVRW.js → chunk-3ESH5NDR.js} +5 -1
- package/dist/lib/chunks/{chunk-7LBSNDRR.js → chunk-3S2FAVRE.js} +22 -3
- package/dist/lib/chunks/{chunk-LR27H2HZ.js → chunk-44NSZBCP.js} +6 -6
- package/dist/lib/chunks/{chunk-JBOOD6MU.js → chunk-4AWFF53U.js} +12 -4
- package/dist/lib/chunks/{chunk-MENTBQGB.js → chunk-4HPMLJKC.js} +4 -4
- package/dist/lib/chunks/{chunk-AAFHXNLU.js → chunk-4Q2WFZ5J.js} +11 -4
- package/dist/lib/chunks/{chunk-SD7LR26G.js → chunk-5JU2Y2I6.js} +2 -2
- package/dist/lib/chunks/{chunk-RPTADJXD.js → chunk-64JFN2Q5.js} +1 -1
- package/dist/lib/chunks/chunk-66UE4TT2.js +245 -0
- package/dist/lib/chunks/chunk-6N3C6E3D.js +105 -0
- package/dist/lib/chunks/{chunk-F2NSJ6PG.js → chunk-6RED3G6K.js} +7 -3
- package/dist/lib/chunks/{chunk-QJZTDZMB.js → chunk-7KLTOVIY.js} +9 -9
- package/dist/lib/chunks/{chunk-PXB4PWJI.js → chunk-7ZR3WDF2.js} +38 -5
- package/dist/lib/chunks/chunk-A5PF7UE2.js +86 -0
- package/dist/lib/chunks/{chunk-JXBLGCXZ.js → chunk-AB7DUTX5.js} +1 -1
- package/dist/lib/chunks/{chunk-WDT2Y7D7.js → chunk-AQCWKHTE.js} +11 -7
- package/dist/lib/chunks/{chunk-SQQ56UP2.js → chunk-ASHFEFCU.js} +3 -3
- package/dist/lib/chunks/{chunk-AK6YNTCV.js → chunk-ASIFUJG2.js} +1 -1
- package/dist/lib/chunks/{chunk-ZSEY7AHQ.js → chunk-BBK54RVK.js} +14 -11
- package/dist/lib/chunks/chunk-BQMUZLHO.js +17 -0
- package/dist/lib/chunks/{chunk-KSOHZKV5.js → chunk-CQNIPZH3.js} +21 -21
- package/dist/lib/chunks/{chunk-7HM6IZ3L.js → chunk-CVEXMYPW.js} +2 -2
- package/dist/lib/chunks/chunk-CXZIHHLJ.js +95 -0
- package/dist/lib/chunks/{chunk-75DMLOQ7.js → chunk-CYJNBVQB.js} +1 -1
- package/dist/lib/chunks/{chunk-FAUFE7MI.js → chunk-D7N5OLYL.js} +1 -1
- package/dist/lib/chunks/{chunk-E2YTTB6Q.js → chunk-DSK3PM4Z.js} +1 -1
- package/dist/lib/chunks/{chunk-TNL2GWYR.js → chunk-EUXNCXCR.js} +22 -0
- package/dist/lib/chunks/{chunk-FJL2V6P5.js → chunk-F4EQULFR.js} +6 -6
- package/dist/lib/chunks/{chunk-QGZ4QSUE.js → chunk-FHV4PBYG.js} +1 -1
- package/dist/lib/chunks/chunk-FK2JQHAX.js +30 -0
- package/dist/lib/chunks/{chunk-K2FZFESR.js → chunk-FONFW67K.js} +4 -4
- package/dist/lib/chunks/{chunk-W5X7WJYL.js → chunk-FPPHYGIO.js} +3 -3
- package/dist/lib/chunks/{chunk-XNTFOVCE.js → chunk-FYE4R5TY.js} +2 -2
- package/dist/lib/chunks/{chunk-FIC7JSR4.js → chunk-H2DOBJZC.js} +2 -2
- package/dist/lib/chunks/{chunk-R2AJYV6A.js → chunk-HEWHNSDP.js} +68 -36
- package/dist/lib/chunks/{chunk-RXSHKWZJ.js → chunk-HLC6OHGO.js} +2 -2
- package/dist/lib/chunks/{chunk-6HMHXSCS.js → chunk-HXXFRZTJ.js} +2 -2
- package/dist/lib/chunks/{chunk-JYFEXVWC.js → chunk-HYMWNGOK.js} +13 -6
- package/dist/lib/chunks/chunk-IH67TEGY.js +73 -0
- package/dist/lib/chunks/{chunk-JKPBXPCW.js → chunk-IMADI2YP.js} +1 -1
- package/dist/lib/chunks/{chunk-SLAPBFRH.js → chunk-JBGQFPTY.js} +4 -4
- package/dist/lib/chunks/{chunk-JQDQVG3D.js → chunk-JDU3ZCKO.js} +1 -1
- package/dist/lib/chunks/{chunk-2KH7LNK7.js → chunk-JGIX427K.js} +7 -7
- package/dist/lib/chunks/{chunk-7CW6U5WJ.js → chunk-JIE2ANVD.js} +1 -1
- package/dist/lib/chunks/{chunk-T5XQ6NXD.js → chunk-JJFOILZK.js} +2 -2
- package/dist/lib/chunks/{chunk-F7DBTXKG.js → chunk-JMIK2QN3.js} +4 -3
- package/dist/lib/chunks/chunk-JW7DTYSI.js +116 -0
- package/dist/lib/chunks/{chunk-BFWK3TBN.js → chunk-JXLCKACO.js} +2 -2
- package/dist/lib/chunks/{chunk-7WO3FFPS.js → chunk-K5NQDJLE.js} +1 -1
- package/dist/lib/chunks/{chunk-BXF4OC74.js → chunk-KI2FB4Y3.js} +30 -16
- package/dist/lib/chunks/{chunk-Y2CZ6FZY.js → chunk-KRWDELRS.js} +30 -7
- package/dist/lib/chunks/{chunk-SIJOQRRK.js → chunk-KRXOJJR7.js} +1 -1
- package/dist/lib/chunks/chunk-KSUI4DAY.js +15 -0
- package/dist/lib/chunks/chunk-KXFZ3CH3.js +98 -0
- package/dist/lib/chunks/{chunk-3OWJBGQE.js → chunk-LJCWZ5SZ.js} +14 -14
- package/dist/lib/chunks/{chunk-AJKV46SM.js → chunk-LNYQMWJO.js} +3 -3
- package/dist/lib/chunks/{chunk-DL6YQDTE.js → chunk-LOIAGEKN.js} +2 -2
- package/dist/lib/chunks/{chunk-I3UE52ZV.js → chunk-LPOIMPJK.js} +2 -2
- package/dist/lib/chunks/{chunk-66T7JC57.js → chunk-LUKP64NX.js} +2 -2
- package/dist/lib/chunks/chunk-MNG5TZRW.js +208 -0
- package/dist/lib/chunks/{chunk-SMPP7B7F.js → chunk-MPQXB7HN.js} +7 -7
- package/dist/lib/chunks/{chunk-6JICXLDA.js → chunk-MZ2KN3IH.js} +3 -3
- package/dist/lib/chunks/chunk-N62G4EWT.js +91 -0
- package/dist/lib/chunks/{chunk-7YDXD4MD.js → chunk-ODIXZHHX.js} +1 -1
- package/dist/lib/chunks/{chunk-MTDYBJXH.js → chunk-OTVHGRCO.js} +8 -8
- package/dist/lib/chunks/{chunk-YZEZRQIG.js → chunk-OVF27NAO.js} +69 -17
- package/dist/lib/chunks/chunk-P6LHGBYU.js +90 -0
- package/dist/lib/chunks/{chunk-U5USH2HB.js → chunk-PAL5SXIP.js} +1 -1
- package/dist/lib/chunks/{chunk-W5XYW6ZM.js → chunk-PT6PK2MJ.js} +26 -19
- package/dist/lib/chunks/{chunk-OD36HUXA.js → chunk-Q22FCF4A.js} +6 -7
- package/dist/lib/chunks/chunk-QKTKQSPS.js +292 -0
- package/dist/lib/chunks/{chunk-K4Y5NT4M.js → chunk-QO5TPMWS.js} +2 -2
- package/dist/lib/chunks/{chunk-VPXYGN4I.js → chunk-QUZYFAGP.js} +17 -22
- package/dist/lib/chunks/{chunk-HI3PD3KR.js → chunk-QVMPTT7R.js} +5 -5
- package/dist/lib/chunks/{chunk-OQFAMKLN.js → chunk-RGZY6YUQ.js} +5 -5
- package/dist/lib/chunks/{chunk-U6BW6LGX.js → chunk-RM2VVR7Y.js} +1 -1
- package/dist/lib/chunks/{chunk-AJO7XVXK.js → chunk-RMSH7RUG.js} +6 -6
- package/dist/lib/chunks/{chunk-V5B6UZ3E.js → chunk-RQGEPR6V.js} +1 -0
- package/dist/lib/chunks/{chunk-V5JJEEBT.js → chunk-RYB77E7O.js} +6 -5
- package/dist/lib/chunks/chunk-S24JGY7B.js +97 -0
- package/dist/lib/chunks/{chunk-6GKKALCI.js → chunk-SF4UJ2AY.js} +1 -1
- package/dist/lib/chunks/chunk-SJCUR4QX.js +94 -0
- package/dist/lib/chunks/{chunk-XAN4CRFP.js → chunk-SQ55KGHO.js} +1 -1
- package/dist/lib/chunks/{chunk-66DVMLGR.js → chunk-TKOQMB6A.js} +7 -7
- package/dist/lib/chunks/{chunk-UYDQXXDQ.js → chunk-TWK6IA4P.js} +1 -1
- package/dist/lib/chunks/{chunk-DVFFYY5G.js → chunk-U42I3SBR.js} +13 -9
- package/dist/lib/chunks/{chunk-FL6LN2K6.js → chunk-UECQONVZ.js} +5 -5
- package/dist/lib/chunks/{chunk-FDM2YNQL.js → chunk-VTY53IFN.js} +1 -1
- package/dist/lib/chunks/chunk-VYUC772A.js +338 -0
- package/dist/lib/chunks/{chunk-WCLKIPJV.js → chunk-WPCBE2NZ.js} +1 -1
- package/dist/lib/chunks/{chunk-3OE4UQIB.js → chunk-WRHGLRUK.js} +5 -5
- package/dist/lib/chunks/{chunk-3GPUCXVA.js → chunk-WUIY7BXR.js} +36 -19
- package/dist/lib/chunks/{chunk-7YYDUHJG.js → chunk-WZA4H4TG.js} +39 -13
- package/dist/lib/chunks/{chunk-NH4QGBJV.js → chunk-XBSA7MNJ.js} +7 -2
- package/dist/lib/chunks/chunk-XTBCXEH7.js +243 -0
- package/dist/lib/chunks/{chunk-ZQ3ER7JD.js → chunk-YPVJAXPP.js} +1 -1
- package/dist/lib/chunks/{chunk-SASE7U6E.js → chunk-YQD5ITKI.js} +1 -1
- package/dist/lib/chunks/{chunk-DDS4G4DO.js → chunk-YY4BH5XM.js} +6 -6
- package/dist/lib/chunks/{chunk-J5NPHPXY.js → chunk-Z3BZRBQF.js} +36 -2
- package/dist/lib/chunks/{chunk-XFUYEFQP.js → chunk-ZBQU2VU3.js} +1 -1
- package/dist/lib/chunks/{chunk-E3OGPTUY.js → chunk-ZHGABG7L.js} +2 -2
- package/dist/lib/chunks/chunk-ZZCRYG36.js +31 -0
- package/dist/lib/cli/bundle-commands.js +91 -74
- package/dist/lib/cli/run-commands.js +141 -96
- package/dist/lib/cli/status-command.js +77 -60
- package/dist/lib/codex-workflow/aggregate.js +20 -12
- package/dist/lib/codex-workflow/author-tools.js +7 -7
- package/dist/lib/codex-workflow/author.js +25 -23
- package/dist/lib/codex-workflow/capture.js +39 -18
- package/dist/lib/codex-workflow/checkpoint.js +7 -7
- package/dist/lib/codex-workflow/checks.js +9 -9
- package/dist/lib/codex-workflow/copy-editor.js +20 -19
- package/dist/lib/codex-workflow/copy-recovery.js +4 -4
- package/dist/lib/codex-workflow/copy.js +17 -16
- package/dist/lib/codex-workflow/finish.js +29 -25
- package/dist/lib/codex-workflow/host-models.js +2 -2
- package/dist/lib/codex-workflow/loop.js +54 -48
- package/dist/lib/codex-workflow/quality.js +4 -4
- package/dist/lib/codex-workflow/run-inputs.js +6 -6
- package/dist/lib/codex-workflow/run-source.js +16 -16
- package/dist/lib/codex-workflow/schemas.js +6 -6
- package/dist/lib/codex-workflow/session.js +8 -8
- package/dist/lib/codex-workflow/stage.js +32 -29
- package/dist/lib/codex-workflow/workdir.js +18 -11
- package/dist/lib/engine/audit-file.js +9 -8
- package/dist/lib/engine/author.js +40 -37
- package/dist/lib/engine/cost-estimate.js +37 -9
- package/dist/lib/engine/local-run.js +76 -59
- package/dist/lib/engine/preflight.js +37 -9
- package/dist/lib/engine/rejudge.js +82 -65
- package/dist/lib/engine/run-bindings.js +62 -0
- package/dist/lib/engine/run-status.js +77 -60
- package/dist/lib/engine/templates.js +10 -9
- package/dist/lib/grounding/controller.js +8 -7
- package/dist/lib/grounding/extract.js +8 -6
- package/dist/lib/grounding/grounding-runtime.js +22 -21
- package/dist/lib/grounding/model-usage.js +2 -2
- package/dist/lib/grounding/model.js +7 -5
- package/dist/lib/grounding/recorded-tools.js +9 -9
- package/dist/lib/harness/report/artifacts.js +5 -5
- package/dist/lib/lib/checkpoint.js +5 -5
- package/dist/lib/lib/log.js +1 -1
- package/dist/lib/models/accounting.js +1 -1
- package/dist/lib/models/batching.js +6 -4
- package/dist/lib/models/budget-protection.js +1 -1
- package/dist/lib/models/cost-coefficients.js +2 -1
- package/dist/lib/models/gateway-cost.js +7 -0
- package/dist/lib/models/structured.js +5 -3
- package/dist/lib/models/supported-models.js +1 -1
- package/dist/lib/pipeline.js +36 -17
- 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 +21 -0
- package/dist/lib/probes/adapters/cli-codex.js +23 -0
- package/dist/lib/probes/adapters/cli-cursor.js +21 -0
- package/dist/lib/probes/adapters/cli-process.js +34 -0
- package/dist/lib/probes/adapters/dataforseo-ai-overview.js +20 -0
- package/dist/lib/probes/adapters/gateway-chat.js +30 -0
- package/dist/lib/probes/adapters/gateway-perplexity.js +19 -0
- package/dist/lib/probes/agent-cli-parsers.js +2 -2
- package/dist/lib/probes/agent-clis.js +26 -11
- package/dist/lib/probes/answer-text.js +21 -0
- package/dist/lib/probes/attempt.js +28 -0
- package/dist/lib/probes/bindings.js +69 -0
- package/dist/lib/probes/charged-trace.js +47 -3
- package/dist/lib/probes/dataforseo-locale.js +1 -1
- package/dist/lib/probes/dataforseo.js +8 -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 +33 -12
- package/dist/lib/runner.js +17 -14
- package/dist/lib/schema.js +4 -4
- package/dist/lib/section-result.js +6 -6
- package/dist/lib/stores/artifacts.js +7 -7
- package/dist/lib/stores/files.js +20 -18
- package/dist/lib/stores/local-versions.js +5 -5
- package/dist/lib/stores/memory.js +20 -15
- package/dist/lib/stores/publication.js +11 -11
- package/dist/lib/stores/unit-record.js +28 -0
- package/dist/lib/viewer/server.js +33 -25
- package/dist/lib/workflow/schema.js +3 -3
- package/dist/types/bundle/contracts.d.ts +1 -1
- package/dist/types/capture-manifest.d.ts +1 -0
- package/dist/types/checks/money-pages.d.ts +19 -0
- package/dist/types/codex-workflow/capture.d.ts +13 -0
- package/dist/types/codex-workflow/workdir.d.ts +0 -1
- package/dist/types/engine/cost-estimate.d.ts +5 -1
- package/dist/types/engine/preflight.d.ts +6 -1
- package/dist/types/engine/run-bindings.d.ts +25 -0
- package/dist/types/models/accounting.d.ts +7 -0
- package/dist/types/models/cost-coefficients.d.ts +5 -5
- package/dist/types/models/gateway-cost.d.ts +3 -0
- package/dist/types/pipeline.d.ts +2 -0
- package/dist/types/probes/adapter.d.ts +112 -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-overview.d.ts +12 -0
- package/dist/types/probes/adapters/gateway-chat.d.ts +32 -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 +79 -0
- package/dist/types/probes/charged-trace.d.ts +2 -1
- package/dist/types/probes/dataforseo.d.ts +24 -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 +10 -0
- package/dist/types/probes/probes.d.ts +5 -3
- package/dist/types/stores/ports.d.ts +1 -0
- package/dist/types/stores/unit-record.d.ts +11 -0
- package/package.json +6 -6
- package/src/agents/author-validation.ts +22 -1
- package/src/analysis/progress.ts +10 -1
- package/src/bundle/contracts.ts +1 -1
- package/src/bundle/recorder.ts +47 -1
- package/src/capture-manifest.ts +6 -0
- package/src/checks/money-pages.ts +48 -0
- package/src/cli/run-commands.ts +37 -1
- package/src/codex-workflow/capture.ts +60 -0
- package/src/codex-workflow/workdir.ts +3 -4
- package/src/engine/audit-file.ts +20 -30
- package/src/engine/cost-estimate.ts +10 -4
- package/src/engine/local-run.ts +21 -2
- package/src/engine/preflight.ts +113 -17
- package/src/engine/rejudge.ts +5 -0
- package/src/engine/run-bindings.ts +142 -0
- package/src/grounding/extract.ts +1 -0
- package/src/grounding/model-usage.ts +4 -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/cost-coefficients.ts +17 -13
- package/src/models/gateway-cost.ts +32 -0
- package/src/models/structured.ts +2 -10
- package/src/models/supported-models.ts +3 -3
- package/src/pipeline.ts +36 -17
- package/src/probes/adapter.ts +122 -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-overview.ts +106 -0
- package/src/probes/adapters/gateway-chat.ts +339 -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 +462 -0
- package/src/probes/bindings.ts +344 -0
- package/src/probes/charged-trace.ts +54 -13
- package/src/probes/dataforseo-locale.ts +13 -2
- package/src/probes/dataforseo.ts +265 -188
- package/src/probes/grounding-urls.ts +68 -19
- package/src/probes/legacy-bindings.ts +40 -0
- package/src/probes/limits.ts +31 -18
- package/src/probes/probe-trace.ts +10 -0
- package/src/probes/probes.ts +64 -736
- package/src/runner.ts +13 -0
- 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/dist/lib/chunks/chunk-BGAHZIL3.js +0 -563
- package/dist/lib/chunks/chunk-IB6RROHE.js +0 -204
- package/dist/lib/chunks/chunk-WZGI7UVM.js +0 -937
|
@@ -2,39 +2,45 @@ import {
|
|
|
2
2
|
UnitConflictError
|
|
3
3
|
} from "./chunk-C6CMSW5J.js";
|
|
4
4
|
import {
|
|
5
|
-
aiSearchProbeModels,
|
|
6
5
|
runProbesForPrompts
|
|
7
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-P6LHGBYU.js";
|
|
8
7
|
import {
|
|
9
8
|
runAgentProbesForPrompts
|
|
10
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-VYUC772A.js";
|
|
10
|
+
import {
|
|
11
|
+
requestedModelOf
|
|
12
|
+
} from "./chunk-2FDSOZ6Q.js";
|
|
11
13
|
import {
|
|
12
14
|
withSection
|
|
13
15
|
} from "./chunk-GVOF5ZUG.js";
|
|
16
|
+
import {
|
|
17
|
+
legacyProbeBindings
|
|
18
|
+
} from "./chunk-ZZCRYG36.js";
|
|
14
19
|
import {
|
|
15
20
|
createLog
|
|
16
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-BBK54RVK.js";
|
|
17
22
|
import {
|
|
18
23
|
plannedProbeUnitsForSection,
|
|
19
24
|
probeUnitKey
|
|
20
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-ODIXZHHX.js";
|
|
21
26
|
import {
|
|
22
27
|
agentProbedPrompts
|
|
23
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-LOIAGEKN.js";
|
|
24
29
|
import {
|
|
25
30
|
isAgentSurface
|
|
26
31
|
} from "./chunk-AASWJR7Q.js";
|
|
27
32
|
|
|
28
33
|
// src/pipeline.ts
|
|
29
34
|
var log = createLog("AeoPipeline");
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
var capturedRequestedModel = (probe, bindings) => {
|
|
36
|
+
return requestedModelOf(
|
|
37
|
+
bindings[probe.modelName],
|
|
38
|
+
"requestedModel" in probe ? probe.requestedModel : void 0
|
|
39
|
+
);
|
|
35
40
|
};
|
|
36
|
-
var
|
|
37
|
-
|
|
41
|
+
var recordedAdapterOf = (surface, bindings) => {
|
|
42
|
+
const { adapter } = bindings[surface];
|
|
43
|
+
return adapter === legacyProbeBindings[surface].adapter ? {} : { adapter };
|
|
38
44
|
};
|
|
39
45
|
var isAgentProbe = (probe) => {
|
|
40
46
|
return isAgentSurface(probe.modelName);
|
|
@@ -108,7 +114,10 @@ var captureSectionProbes = async (args) => {
|
|
|
108
114
|
runId: args.runId,
|
|
109
115
|
capturedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
110
116
|
captureMetadata: {
|
|
111
|
-
requestedModel:
|
|
117
|
+
requestedModel: capturedRequestedModel(
|
|
118
|
+
probe,
|
|
119
|
+
args.probeDependencies.bindings
|
|
120
|
+
),
|
|
112
121
|
reportedModel: probe.reportedModel ?? null,
|
|
113
122
|
// Progress comparisons hash these into each answer's collection
|
|
114
123
|
// method, so they stay as earlier releases recorded them. Chat
|
|
@@ -119,7 +128,11 @@ var captureSectionProbes = async (args) => {
|
|
|
119
128
|
geography: args.geography,
|
|
120
129
|
language: args.language,
|
|
121
130
|
agentProbes: args.agentProbes
|
|
122
|
-
}
|
|
131
|
+
},
|
|
132
|
+
...recordedAdapterOf(
|
|
133
|
+
probe.modelName,
|
|
134
|
+
args.probeDependencies.bindings
|
|
135
|
+
)
|
|
123
136
|
},
|
|
124
137
|
probe
|
|
125
138
|
});
|
|
@@ -148,7 +161,8 @@ var captureSectionProbes = async (args) => {
|
|
|
148
161
|
onResult: bank,
|
|
149
162
|
trace,
|
|
150
163
|
limiter: args.limiter,
|
|
151
|
-
signal: args.signal
|
|
164
|
+
signal: args.signal,
|
|
165
|
+
dependencies: args.probeDependencies
|
|
152
166
|
},
|
|
153
167
|
{ logContext: args.logContext }
|
|
154
168
|
) : Promise.resolve([]),
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
profileOf
|
|
3
|
+
} from "./chunk-MNG5TZRW.js";
|
|
4
|
+
import {
|
|
5
|
+
createLog
|
|
6
|
+
} from "./chunk-BBK54RVK.js";
|
|
4
7
|
import {
|
|
5
8
|
ModelBudgetError
|
|
6
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-EUXNCXCR.js";
|
|
7
10
|
|
|
8
11
|
// src/probes/charged-trace.ts
|
|
9
12
|
import { randomUUID } from "node:crypto";
|
|
10
|
-
var
|
|
13
|
+
var log = createLog("ChargedProbeTrace");
|
|
14
|
+
var chargedProbeTrace = (trace, ledger, bindings) => {
|
|
11
15
|
let refused;
|
|
12
16
|
const charged = {
|
|
13
17
|
start: async (attempt) => {
|
|
14
|
-
const
|
|
18
|
+
const profile = profileOf(bindings[attempt.surface]);
|
|
19
|
+
const estimateUsd = profile.estimateUsd.high;
|
|
15
20
|
const callId = `probe:${attempt.surface}:${attempt.promptId}:${attempt.runIndex}:${attempt.attempt}:${randomUUID()}`;
|
|
16
|
-
const isPaid =
|
|
21
|
+
const isPaid = profile.billing === "metered";
|
|
17
22
|
if (isPaid) {
|
|
18
23
|
try {
|
|
19
24
|
await ledger.reserve({
|
|
@@ -33,7 +38,20 @@ var chargedProbeTrace = (trace, ledger) => {
|
|
|
33
38
|
throw error;
|
|
34
39
|
}
|
|
35
40
|
}
|
|
36
|
-
|
|
41
|
+
let handle;
|
|
42
|
+
try {
|
|
43
|
+
handle = await trace.start(attempt);
|
|
44
|
+
} catch (error) {
|
|
45
|
+
if (isPaid) {
|
|
46
|
+
await ledger.release(callId).catch((releaseError) => {
|
|
47
|
+
log.warn("Probe reservation could not be released", {
|
|
48
|
+
callId,
|
|
49
|
+
error: releaseError instanceof Error ? releaseError.message : String(releaseError)
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
throw error;
|
|
54
|
+
}
|
|
37
55
|
return {
|
|
38
56
|
id: handle.id,
|
|
39
57
|
end: async (result) => {
|
|
@@ -48,6 +66,11 @@ var chargedProbeTrace = (trace, ledger) => {
|
|
|
48
66
|
},
|
|
49
67
|
...reportedUsd !== void 0 && { costUsd: reportedUsd },
|
|
50
68
|
...result.outcome !== "succeeded" && { valid: false }
|
|
69
|
+
}).catch((settleError) => {
|
|
70
|
+
log.warn("Probe cost could not be settled", {
|
|
71
|
+
callId,
|
|
72
|
+
error: settleError instanceof Error ? settleError.message : String(settleError)
|
|
73
|
+
});
|
|
51
74
|
});
|
|
52
75
|
}
|
|
53
76
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/probes/adapter.ts
|
|
2
|
+
var ProbeAdapterId = {
|
|
3
|
+
GATEWAY_OPENAI: "gateway.openai@1",
|
|
4
|
+
GATEWAY_GOOGLE: "gateway.google@1",
|
|
5
|
+
GATEWAY_ANTHROPIC: "gateway.anthropic@1",
|
|
6
|
+
GATEWAY_PERPLEXITY: "gateway.perplexity@1",
|
|
7
|
+
DATAFORSEO_AI_OVERVIEW: "dataforseo.ai_overview@1",
|
|
8
|
+
CLI_CLAUDE_CODE: "cli.claude_code@1",
|
|
9
|
+
CLI_CODEX: "cli.codex@1",
|
|
10
|
+
CLI_CURSOR: "cli.cursor@1"
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
ProbeAdapterId
|
|
15
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import {
|
|
2
|
+
RunBindingsError,
|
|
3
|
+
availableBindings,
|
|
4
|
+
defaultProbeBindings
|
|
5
|
+
} from "./chunk-MNG5TZRW.js";
|
|
6
|
+
import {
|
|
7
|
+
legacyProbeBindings
|
|
8
|
+
} from "./chunk-ZZCRYG36.js";
|
|
9
|
+
import {
|
|
10
|
+
writeFileAtomically
|
|
11
|
+
} from "./chunk-MX6Y4RD2.js";
|
|
12
|
+
import {
|
|
13
|
+
hasErrorCode
|
|
14
|
+
} from "./chunk-2QLAFBCG.js";
|
|
15
|
+
|
|
16
|
+
// src/engine/run-bindings.ts
|
|
17
|
+
import { copyFile, readFile } from "node:fs/promises";
|
|
18
|
+
import path from "node:path";
|
|
19
|
+
import { z } from "zod";
|
|
20
|
+
var bindingsFile = "bindings.json";
|
|
21
|
+
var frozenBindingsSchema = z.object({
|
|
22
|
+
version: z.literal(1),
|
|
23
|
+
bindings: z.record(
|
|
24
|
+
z.string(),
|
|
25
|
+
z.object({
|
|
26
|
+
adapter: z.string().min(1),
|
|
27
|
+
model: z.string().min(1).optional()
|
|
28
|
+
}).strict()
|
|
29
|
+
)
|
|
30
|
+
}).strict();
|
|
31
|
+
var estimateBindingsOf = async (bankPath) => {
|
|
32
|
+
const text = await readFile(path.join(bankPath, bindingsFile), "utf8").catch(
|
|
33
|
+
(err) => {
|
|
34
|
+
if (hasErrorCode(err, "ENOENT")) {
|
|
35
|
+
return void 0;
|
|
36
|
+
}
|
|
37
|
+
throw err;
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
if (text === void 0) {
|
|
41
|
+
return defaultProbeBindings;
|
|
42
|
+
}
|
|
43
|
+
try {
|
|
44
|
+
return availableBindings(
|
|
45
|
+
frozenBindingsSchema.parse(JSON.parse(text)).bindings
|
|
46
|
+
);
|
|
47
|
+
} catch {
|
|
48
|
+
return defaultProbeBindings;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
var resolveRunBindings = async (bankPath, { startedBefore }) => {
|
|
52
|
+
const file = path.join(bankPath, bindingsFile);
|
|
53
|
+
const text = await readFile(file, "utf8").catch((err) => {
|
|
54
|
+
if (hasErrorCode(err, "ENOENT")) {
|
|
55
|
+
return void 0;
|
|
56
|
+
}
|
|
57
|
+
throw err;
|
|
58
|
+
});
|
|
59
|
+
if (text !== void 0) {
|
|
60
|
+
let frozen;
|
|
61
|
+
try {
|
|
62
|
+
frozen = frozenBindingsSchema.parse(JSON.parse(text));
|
|
63
|
+
} catch (error) {
|
|
64
|
+
throw new RunBindingsError(
|
|
65
|
+
`${file} is not a frozen bindings file (${error instanceof Error ? error.message.slice(0, 200) : String(error)}). Please restore it; a run never re-chooses how it measures.`
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
return availableBindings(frozen.bindings);
|
|
69
|
+
}
|
|
70
|
+
const bindings = startedBefore ? legacyProbeBindings : defaultProbeBindings;
|
|
71
|
+
await freezeBindings(bankPath, bindings);
|
|
72
|
+
return bindings;
|
|
73
|
+
};
|
|
74
|
+
var carryFrozenBindings = async (sourceBank, targetBank) => {
|
|
75
|
+
await copyFile(
|
|
76
|
+
path.join(sourceBank, bindingsFile),
|
|
77
|
+
path.join(targetBank, bindingsFile)
|
|
78
|
+
).catch(async (err) => {
|
|
79
|
+
if (!hasErrorCode(err, "ENOENT")) {
|
|
80
|
+
throw err;
|
|
81
|
+
}
|
|
82
|
+
await freezeBindings(targetBank, legacyProbeBindings);
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
var freezeBindings = async (bankPath, bindings) => {
|
|
86
|
+
await writeFileAtomically(
|
|
87
|
+
path.join(bankPath, bindingsFile),
|
|
88
|
+
`${JSON.stringify({ version: 1, bindings }, null, 2)}
|
|
89
|
+
`
|
|
90
|
+
);
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export {
|
|
94
|
+
bindingsFile,
|
|
95
|
+
estimateBindingsOf,
|
|
96
|
+
resolveRunBindings,
|
|
97
|
+
carryFrozenBindings
|
|
98
|
+
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
withModelBudgetProtection
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
researchProfileFromModels
|
|
6
|
-
} from "./chunk-WNIXDMJL.js";
|
|
3
|
+
} from "./chunk-RQGEPR6V.js";
|
|
7
4
|
import {
|
|
8
5
|
recordedGroundingTools
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import {
|
|
11
|
-
runGroundingResearch
|
|
12
|
-
} from "./chunk-K2FZFESR.js";
|
|
6
|
+
} from "./chunk-2C723CW7.js";
|
|
13
7
|
import {
|
|
14
8
|
candidateInventoryPolicyVersion,
|
|
15
9
|
claimExtractionIdentity,
|
|
16
10
|
extractClaimCandidates,
|
|
17
11
|
validatedExtractionBatchSchema
|
|
18
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JMIK2QN3.js";
|
|
13
|
+
import {
|
|
14
|
+
researchProfileFromModels
|
|
15
|
+
} from "./chunk-WNIXDMJL.js";
|
|
16
|
+
import {
|
|
17
|
+
runGroundingResearch
|
|
18
|
+
} from "./chunk-FONFW67K.js";
|
|
19
19
|
import {
|
|
20
20
|
createGatewayGroundingModel
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-HXXFRZTJ.js";
|
|
22
22
|
import {
|
|
23
23
|
resolveDataForSeoLocale
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-XBSA7MNJ.js";
|
|
25
25
|
import {
|
|
26
26
|
createDataForSeoSearchAdapter,
|
|
27
27
|
createGroundingTools
|
|
@@ -30,10 +30,10 @@ import {
|
|
|
30
30
|
extractionCacheRunIdsFromManifest,
|
|
31
31
|
savedAnswersFromManifest,
|
|
32
32
|
validateCaptureManifest
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-6RED3G6K.js";
|
|
34
34
|
import {
|
|
35
35
|
createLog
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-BBK54RVK.js";
|
|
37
37
|
import {
|
|
38
38
|
createGroundingBundle,
|
|
39
39
|
validateCandidateOccurrences
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
} from "./chunk-H2KDLDK6.js";
|
|
44
44
|
import {
|
|
45
45
|
ModelBudgetError
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-EUXNCXCR.js";
|
|
47
47
|
import {
|
|
48
48
|
claimCandidateSchema,
|
|
49
49
|
groundingCoverageSchema,
|
|
@@ -8,15 +8,15 @@ import {
|
|
|
8
8
|
} from "./chunk-SREGO3PU.js";
|
|
9
9
|
import {
|
|
10
10
|
assessTraceCoverage
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ASIFUJG2.js";
|
|
12
12
|
import {
|
|
13
13
|
readJournal
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-AB7DUTX5.js";
|
|
15
15
|
import {
|
|
16
16
|
bundlePaths,
|
|
17
17
|
digestManifest,
|
|
18
18
|
objectPathPrefix
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-JJFOILZK.js";
|
|
20
20
|
import {
|
|
21
21
|
sha256Hex
|
|
22
22
|
} from "./chunk-E6NQQU6V.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
probeLimitsSchema
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PT6PK2MJ.js";
|
|
4
4
|
import {
|
|
5
5
|
internalModelProfileSchema
|
|
6
6
|
} from "./chunk-RYCRL3YA.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-EZD2C7QS.js";
|
|
10
10
|
import {
|
|
11
11
|
modelBudgetLimitsSchema
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-EUXNCXCR.js";
|
|
13
13
|
import {
|
|
14
14
|
groundingBundleSchema
|
|
15
15
|
} from "./chunk-6RAKXYSR.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
qualificationQuoteMaxLength,
|
|
3
3
|
stageSchemas
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KRXOJJR7.js";
|
|
5
5
|
import {
|
|
6
6
|
locateVerbatimPassage
|
|
7
7
|
} from "./chunk-3UFZ2XPE.js";
|
|
8
8
|
import {
|
|
9
9
|
reconcileProspectMentions
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-YQD5ITKI.js";
|
|
11
11
|
import {
|
|
12
12
|
isShortFormOf,
|
|
13
13
|
normalizedBrandName
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-KQCRJIEG.js";
|
|
4
4
|
import {
|
|
5
5
|
buildNarrativeFacts
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YPVJAXPP.js";
|
|
7
7
|
import {
|
|
8
8
|
plannedProbeUnitsForSection
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ODIXZHHX.js";
|
|
10
10
|
import {
|
|
11
11
|
isDomainCited
|
|
12
12
|
} from "./chunk-HOJXKHPX.js";
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import {
|
|
2
|
+
legacyProbeBindings
|
|
3
|
+
} from "./chunk-ZZCRYG36.js";
|
|
4
|
+
import {
|
|
5
|
+
createGatewayPerplexityAdapter,
|
|
6
|
+
gatewayPerplexityProfile
|
|
7
|
+
} from "./chunk-N62G4EWT.js";
|
|
8
|
+
import {
|
|
9
|
+
cliAdapterProfiles
|
|
10
|
+
} from "./chunk-S24JGY7B.js";
|
|
11
|
+
import {
|
|
12
|
+
createDataForSeoAiOverviewAdapter,
|
|
13
|
+
dataForSeoAiOverviewProfile
|
|
14
|
+
} from "./chunk-A5PF7UE2.js";
|
|
15
|
+
import {
|
|
16
|
+
createDataForSeoProbeClient
|
|
17
|
+
} from "./chunk-XTBCXEH7.js";
|
|
18
|
+
import {
|
|
19
|
+
createGatewayChatAdapter,
|
|
20
|
+
gatewayChatProfiles
|
|
21
|
+
} from "./chunk-66UE4TT2.js";
|
|
22
|
+
import {
|
|
23
|
+
ProbeAdapterId
|
|
24
|
+
} from "./chunk-KSUI4DAY.js";
|
|
25
|
+
import {
|
|
26
|
+
resolveDataForSeoLocale
|
|
27
|
+
} from "./chunk-XBSA7MNJ.js";
|
|
28
|
+
import {
|
|
29
|
+
toolVersion
|
|
30
|
+
} from "./chunk-JJFOILZK.js";
|
|
31
|
+
import {
|
|
32
|
+
allSurfaces
|
|
33
|
+
} from "./chunk-AASWJR7Q.js";
|
|
34
|
+
|
|
35
|
+
// src/probes/bindings.ts
|
|
36
|
+
import { createGateway } from "@ai-sdk/gateway";
|
|
37
|
+
var RunBindingsError = class extends Error {
|
|
38
|
+
constructor(message) {
|
|
39
|
+
super(message);
|
|
40
|
+
this.name = "RunBindingsError";
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
var probeDependenciesOf = (env, bindings) => {
|
|
44
|
+
const apiKey = env.AI_GATEWAY_API_KEY;
|
|
45
|
+
const login = env.DATAFORSEO_LOGIN;
|
|
46
|
+
const password = env.DATAFORSEO_PASSWORD;
|
|
47
|
+
if (!apiKey) {
|
|
48
|
+
throw new Error(
|
|
49
|
+
"AI_GATEWAY_API_KEY is not set in the settings the probe clients are created from. Please set it; every run calls the gateway."
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
const dependencies = {
|
|
53
|
+
bindings,
|
|
54
|
+
gateway: createGateway({ apiKey }),
|
|
55
|
+
...login && password ? { dataForSeo: createDataForSeoProbeClient({ login, password }) } : {}
|
|
56
|
+
};
|
|
57
|
+
return dependencies;
|
|
58
|
+
};
|
|
59
|
+
var defaultProbeBindings = legacyProbeBindings;
|
|
60
|
+
var probeAdapterProfiles = {
|
|
61
|
+
[ProbeAdapterId.GATEWAY_OPENAI]: gatewayChatProfiles[ProbeAdapterId.GATEWAY_OPENAI],
|
|
62
|
+
[ProbeAdapterId.GATEWAY_GOOGLE]: gatewayChatProfiles[ProbeAdapterId.GATEWAY_GOOGLE],
|
|
63
|
+
[ProbeAdapterId.GATEWAY_ANTHROPIC]: gatewayChatProfiles[ProbeAdapterId.GATEWAY_ANTHROPIC],
|
|
64
|
+
[ProbeAdapterId.GATEWAY_PERPLEXITY]: gatewayPerplexityProfile,
|
|
65
|
+
[ProbeAdapterId.DATAFORSEO_AI_OVERVIEW]: dataForSeoAiOverviewProfile,
|
|
66
|
+
[ProbeAdapterId.CLI_CLAUDE_CODE]: cliAdapterProfiles.claude_code,
|
|
67
|
+
[ProbeAdapterId.CLI_CODEX]: cliAdapterProfiles.codex,
|
|
68
|
+
[ProbeAdapterId.CLI_CURSOR]: cliAdapterProfiles.cursor
|
|
69
|
+
};
|
|
70
|
+
var profileOf = (binding) => {
|
|
71
|
+
return probeAdapterProfiles[binding.adapter];
|
|
72
|
+
};
|
|
73
|
+
var availableBinding = (surface, binding) => {
|
|
74
|
+
const known = [
|
|
75
|
+
defaultProbeBindings[surface],
|
|
76
|
+
legacyProbeBindings[surface]
|
|
77
|
+
];
|
|
78
|
+
return known.find(
|
|
79
|
+
(candidate) => candidate.adapter === binding.adapter && candidate.model === binding.model
|
|
80
|
+
);
|
|
81
|
+
};
|
|
82
|
+
var availableBindings = (frozen) => {
|
|
83
|
+
const unknown = Object.keys(frozen).filter(
|
|
84
|
+
(surface) => !allSurfaces.some((known) => known === surface)
|
|
85
|
+
);
|
|
86
|
+
if (unknown.length > 0) {
|
|
87
|
+
throw new RunBindingsError(
|
|
88
|
+
`This run directory binds surfaces literally-aeo ${toolVersion} does not measure: ${unknown.join(", ")}. Please resume it with the release that started it.`
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
const entries = allSurfaces.map((surface) => {
|
|
92
|
+
const binding = frozen[surface];
|
|
93
|
+
if (!binding) {
|
|
94
|
+
throw new RunBindingsError(
|
|
95
|
+
`This run directory's frozen bindings name no adapter for ${surface}. Please resume it with the release that started it.`
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
const available = availableBinding(surface, binding);
|
|
99
|
+
if (!available) {
|
|
100
|
+
const named = binding.model === void 0 ? binding.adapter : `${binding.adapter} with ${binding.model}`;
|
|
101
|
+
throw new RunBindingsError(
|
|
102
|
+
`This run directory measures ${surface} with ${named}, which literally-aeo ${toolVersion} cannot run. Please resume it with a release that has that binding; a run never changes how a surface is measured.`
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
return [surface, available];
|
|
106
|
+
});
|
|
107
|
+
const bindings = {
|
|
108
|
+
chatgpt: requireEntry(entries, "chatgpt"),
|
|
109
|
+
gemini: requireEntry(entries, "gemini"),
|
|
110
|
+
claude: requireEntry(entries, "claude"),
|
|
111
|
+
perplexity: requireEntry(entries, "perplexity"),
|
|
112
|
+
google_ai_overview: requireEntry(entries, "google_ai_overview"),
|
|
113
|
+
claude_code: requireEntry(entries, "claude_code"),
|
|
114
|
+
codex: requireEntry(entries, "codex"),
|
|
115
|
+
cursor: requireEntry(entries, "cursor")
|
|
116
|
+
};
|
|
117
|
+
return bindings;
|
|
118
|
+
};
|
|
119
|
+
var requireEntry = (entries, surface) => {
|
|
120
|
+
const entry = entries.find(([key]) => key === surface);
|
|
121
|
+
if (!entry) {
|
|
122
|
+
throw new Error(`No binding was resolved for ${surface}.`);
|
|
123
|
+
}
|
|
124
|
+
return entry[1];
|
|
125
|
+
};
|
|
126
|
+
var capturedAdapterOf = (record) => {
|
|
127
|
+
return record.captureMetadata?.adapter ?? legacyProbeBindings[record.surface].adapter;
|
|
128
|
+
};
|
|
129
|
+
var bankBindingMismatches = (records, bindings) => {
|
|
130
|
+
return records.filter(
|
|
131
|
+
(record) => capturedAdapterOf(record) !== bindings[record.surface].adapter
|
|
132
|
+
);
|
|
133
|
+
};
|
|
134
|
+
var createChatAdapter = (surface, {
|
|
135
|
+
geography,
|
|
136
|
+
language,
|
|
137
|
+
dependencies
|
|
138
|
+
}) => {
|
|
139
|
+
const binding = dependencies.bindings[surface];
|
|
140
|
+
const registered = dependencies.registry?.(surface, binding);
|
|
141
|
+
if (registered) {
|
|
142
|
+
if (registered.surface !== surface || registered.id !== binding.adapter || registered.model !== binding.model) {
|
|
143
|
+
throw new Error(
|
|
144
|
+
`The adapter registered for ${surface} is ${registered.surface} with ${registered.id} (${registered.model ?? "no model"}), not the run's binding of ${binding.adapter} (${binding.model ?? "no model"}). A registry implements the frozen binding it is handed.`
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
return registered;
|
|
148
|
+
}
|
|
149
|
+
switch (binding.adapter) {
|
|
150
|
+
case ProbeAdapterId.GATEWAY_OPENAI:
|
|
151
|
+
case ProbeAdapterId.GATEWAY_GOOGLE:
|
|
152
|
+
case ProbeAdapterId.GATEWAY_ANTHROPIC:
|
|
153
|
+
return createGatewayChatAdapter(binding.adapter, {
|
|
154
|
+
surface,
|
|
155
|
+
gateway: dependencies.gateway,
|
|
156
|
+
model: requireModel(binding, surface)
|
|
157
|
+
});
|
|
158
|
+
case ProbeAdapterId.GATEWAY_PERPLEXITY:
|
|
159
|
+
return createGatewayPerplexityAdapter({
|
|
160
|
+
surface,
|
|
161
|
+
gateway: dependencies.gateway,
|
|
162
|
+
model: requireModel(binding, surface)
|
|
163
|
+
});
|
|
164
|
+
case ProbeAdapterId.DATAFORSEO_AI_OVERVIEW: {
|
|
165
|
+
const locale = resolveDataForSeoLocale(geography, language);
|
|
166
|
+
if (!locale) {
|
|
167
|
+
throw new Error(
|
|
168
|
+
`No DataForSEO market for geography ${geography} and language ${language}; the plan should have refused this run.`
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
return createDataForSeoAiOverviewAdapter({
|
|
172
|
+
surface,
|
|
173
|
+
client: dependencies.dataForSeo,
|
|
174
|
+
locale
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
case ProbeAdapterId.CLI_CLAUDE_CODE:
|
|
178
|
+
case ProbeAdapterId.CLI_CODEX:
|
|
179
|
+
case ProbeAdapterId.CLI_CURSOR:
|
|
180
|
+
throw new Error(
|
|
181
|
+
`Chat surface ${surface} is bound to a coding-agent adapter: ${binding.adapter}.`
|
|
182
|
+
);
|
|
183
|
+
default: {
|
|
184
|
+
const unhandled = binding.adapter;
|
|
185
|
+
throw new Error(`Unhandled probe adapter: ${String(unhandled)}.`);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
var requireModel = (binding, surface) => {
|
|
190
|
+
if (binding.model === void 0) {
|
|
191
|
+
throw new Error(
|
|
192
|
+
`The binding of ${surface} names no model for ${binding.adapter}.`
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
return binding.model;
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
export {
|
|
199
|
+
RunBindingsError,
|
|
200
|
+
probeDependenciesOf,
|
|
201
|
+
defaultProbeBindings,
|
|
202
|
+
probeAdapterProfiles,
|
|
203
|
+
profileOf,
|
|
204
|
+
availableBindings,
|
|
205
|
+
capturedAdapterOf,
|
|
206
|
+
bankBindingMismatches,
|
|
207
|
+
createChatAdapter
|
|
208
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runStage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OTVHGRCO.js";
|
|
4
4
|
import {
|
|
5
5
|
authorBrand,
|
|
6
6
|
materializeAuthorWorkdir,
|
|
@@ -8,15 +8,15 @@ import {
|
|
|
8
8
|
readAuthorResearch,
|
|
9
9
|
researchServerConfig,
|
|
10
10
|
validateAuthorStage
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RGZY6YUQ.js";
|
|
12
12
|
import {
|
|
13
13
|
authorToolCaps
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-SQ55KGHO.js";
|
|
15
15
|
import {
|
|
16
16
|
auditFileSchema,
|
|
17
17
|
auditFileVersion,
|
|
18
18
|
authorRecordFile
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-QUZYFAGP.js";
|
|
20
20
|
import {
|
|
21
21
|
localStageModel
|
|
22
22
|
} from "./chunk-U64NCRRR.js";
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
} from "./chunk-6GOBBNDU.js";
|
|
26
26
|
import {
|
|
27
27
|
openRecorder
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-7ZR3WDF2.js";
|
|
29
29
|
import {
|
|
30
30
|
mintRunId
|
|
31
31
|
} from "./chunk-W46Y7KBR.js";
|
|
@@ -40,10 +40,10 @@ import {
|
|
|
40
40
|
} from "./chunk-QTXOW5XC.js";
|
|
41
41
|
import {
|
|
42
42
|
briefSchema
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-JXLCKACO.js";
|
|
44
44
|
import {
|
|
45
45
|
createFileModelAccounting
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-EUXNCXCR.js";
|
|
47
47
|
import {
|
|
48
48
|
allSurfaces,
|
|
49
49
|
chatSurfaces
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
checkpointScope
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TWK6IA4P.js";
|
|
4
4
|
import {
|
|
5
5
|
runTechnicalChecks
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ASHFEFCU.js";
|
|
7
7
|
import {
|
|
8
8
|
writeFileAtomically
|
|
9
9
|
} from "./chunk-MX6Y4RD2.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-2QLAFBCG.js";
|
|
16
16
|
import {
|
|
17
17
|
technicalChecksArtifactSchema
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-IMADI2YP.js";
|
|
19
19
|
|
|
20
20
|
// src/codex-workflow/run-source.ts
|
|
21
21
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|