literally-aeo 0.1.1 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +71 -7
- package/dist/author-tools.js +512 -461
- package/dist/cli.mjs +3512 -2010
- package/dist/lib/access/schema.js +6 -6
- package/dist/lib/agents/author-schema.js +11 -12
- package/dist/lib/agents/author-validation.js +19 -20
- package/dist/lib/agents/copy-validation.js +22 -22
- package/dist/lib/agents/copywriter-input.js +22 -7
- package/dist/lib/agents/facts.js +21 -6
- package/dist/lib/agents/narrative-facts.js +20 -2
- package/dist/lib/agents/verifier.js +26 -25
- package/dist/lib/analysis/domain-classifier.js +21 -22
- package/dist/lib/analysis/domain-labels.js +11 -12
- package/dist/lib/analysis/progress-schema.js +2 -2
- package/dist/lib/analysis/progress.js +19 -21
- package/dist/lib/analysis/retrieval.js +20 -3
- package/dist/lib/analysis/scoring.js +20 -3
- package/dist/lib/analysis/search-analyzer.js +19 -5
- package/dist/lib/analysis/sentiment.js +18 -19
- package/dist/lib/author/examples.js +12 -13
- package/dist/lib/bundle/contracts.js +15 -14
- package/dist/lib/bundle/export.js +34 -31
- package/dist/lib/bundle/isolation.js +17 -0
- package/dist/lib/bundle/journal.js +14 -15
- package/dist/lib/bundle/project-journal.js +19 -18
- package/dist/lib/bundle/project.js +31 -28
- package/dist/lib/bundle/read.js +35 -32
- package/dist/lib/bundle/recorder.js +17 -16
- package/dist/lib/bundle/redact.js +14 -15
- package/dist/lib/bundle/trace-coverage.js +14 -15
- package/dist/lib/bundle/verify-integrity.js +16 -17
- package/dist/lib/bundle/verify-measurement.js +22 -23
- package/dist/lib/bundle/verify-report.js +29 -30
- package/dist/lib/bundle/verify.js +37 -38
- package/dist/lib/bundle/writer-lock.js +3 -1
- package/dist/lib/capture-manifest.js +13 -14
- package/dist/lib/checks/crawler-access.js +4 -1
- package/dist/lib/checks/renderability.js +5 -1
- package/dist/lib/checks/run-checks.js +23 -19
- package/dist/lib/chunks/chunk-2B5QF6UQ.js +159 -0
- package/dist/lib/chunks/chunk-2FOKEIIN.js +93 -0
- package/dist/lib/chunks/{chunk-KRFHQQS7.js → chunk-2KH7LNK7.js} +24 -24
- package/dist/lib/chunks/{chunk-NVBMIPXR.js → chunk-3GPUCXVA.js} +44 -26
- package/dist/lib/chunks/{chunk-3EBWDHPK.js → chunk-3OE4UQIB.js} +14 -16
- package/dist/lib/chunks/{chunk-FNDJUELJ.js → chunk-3OWJBGQE.js} +14 -14
- package/dist/lib/chunks/{chunk-Y4OGZ3Q5.js → chunk-46PVVQYR.js} +1 -1
- package/dist/lib/chunks/{chunk-EV4DRS5M.js → chunk-4XIAXX7K.js} +1 -1
- package/dist/lib/chunks/{chunk-IBOWGKN7.js → chunk-52F5XYOW.js} +1 -1
- package/dist/lib/chunks/{chunk-3DG7GHFA.js → chunk-66DVMLGR.js} +10 -10
- package/dist/lib/chunks/{chunk-FFOVLI3U.js → chunk-66T7JC57.js} +12 -10
- package/dist/lib/chunks/{chunk-KMRQSIZW.js → chunk-6GOBBNDU.js} +16 -1
- package/dist/lib/chunks/{chunk-WUELMJ22.js → chunk-6HMHXSCS.js} +2 -2
- package/dist/lib/chunks/{chunk-SWS3K62X.js → chunk-6JICXLDA.js} +3 -3
- package/dist/lib/chunks/{chunk-SBAZBOPI.js → chunk-6P7EZJI7.js} +4 -2
- package/dist/lib/chunks/chunk-75DMLOQ7.js +127 -0
- package/dist/lib/chunks/{chunk-RMFT4KKK.js → chunk-7CW6U5WJ.js} +1 -1
- package/dist/lib/chunks/{chunk-5VNYUCLL.js → chunk-7HM6IZ3L.js} +6 -9
- package/dist/lib/chunks/{chunk-X6E44EGV.js → chunk-7LBSNDRR.js} +10 -8
- package/dist/lib/chunks/{chunk-S2AM76LT.js → chunk-7WO3FFPS.js} +3 -3
- package/dist/lib/chunks/{chunk-ULRXHSJL.js → chunk-7YDXD4MD.js} +9 -6
- package/dist/lib/chunks/{chunk-HFOYASRQ.js → chunk-AAFHXNLU.js} +4 -4
- package/dist/lib/chunks/{chunk-OBXAHX3L.js → chunk-AASWJR7Q.js} +1 -5
- package/dist/lib/chunks/{chunk-MD4AVTK2.js → chunk-AJKV46SM.js} +3 -3
- package/dist/lib/chunks/{chunk-IEVAFDW7.js → chunk-AJO7XVXK.js} +12 -12
- package/dist/lib/chunks/{chunk-GMKF2FU4.js → chunk-AK6YNTCV.js} +1 -1
- package/dist/lib/chunks/{chunk-WKH6BJAZ.js → chunk-BFWK3TBN.js} +6 -6
- package/dist/lib/chunks/{chunk-FKLNEB2P.js → chunk-BGAHZIL3.js} +51 -17
- package/dist/lib/chunks/{chunk-ZCOI3HE2.js → chunk-BRENK356.js} +1 -1
- package/dist/lib/chunks/{chunk-S7KJZIUR.js → chunk-BXF4OC74.js} +18 -9
- package/dist/lib/chunks/{chunk-NCLFZOZU.js → chunk-CH7OCYDL.js} +1 -1
- package/dist/lib/chunks/{chunk-FPAN3VRW.js → chunk-DDS4G4DO.js} +27 -19
- package/dist/lib/chunks/{chunk-ZLOOC46D.js → chunk-DL6YQDTE.js} +34 -8
- package/dist/lib/chunks/chunk-DVFFYY5G.js +74 -0
- package/dist/lib/chunks/{chunk-PDS5KWO3.js → chunk-E2YTTB6Q.js} +56 -42
- package/dist/lib/chunks/{chunk-YR67JG2V.js → chunk-E3OGPTUY.js} +8 -3
- package/dist/lib/chunks/{chunk-SDWYZM64.js → chunk-EDQTINTL.js} +5 -1
- package/dist/lib/chunks/chunk-ESEMYWUH.js +257 -0
- package/dist/lib/chunks/{chunk-YHS5IEVZ.js → chunk-F2NSJ6PG.js} +12 -8
- package/dist/lib/chunks/{chunk-7GXRDAUY.js → chunk-F7DBTXKG.js} +6 -6
- package/dist/lib/chunks/chunk-FAUFE7MI.js +31 -0
- package/dist/lib/chunks/{chunk-4E4NDGOZ.js → chunk-FDM2YNQL.js} +1 -1
- package/dist/lib/chunks/{chunk-47IZBMP2.js → chunk-FIC7JSR4.js} +2 -2
- package/dist/lib/chunks/{chunk-CJ5YD3CU.js → chunk-FJL2V6P5.js} +6 -6
- package/dist/lib/chunks/{chunk-KHU5DRBE.js → chunk-FL6LN2K6.js} +9 -9
- package/dist/lib/chunks/{chunk-HSZ3DM74.js → chunk-GEFKDW7X.js} +15 -2
- package/dist/lib/chunks/{chunk-XNRSHATN.js → chunk-HI3PD3KR.js} +8 -8
- package/dist/lib/chunks/{chunk-AUB5THIS.js → chunk-I3UE52ZV.js} +2 -2
- package/dist/lib/chunks/{chunk-IAR6XGEW.js → chunk-J5NPHPXY.js} +5 -4
- package/dist/lib/chunks/{chunk-XJVXASDD.js → chunk-JBOOD6MU.js} +11 -10
- package/dist/lib/chunks/{chunk-5KKLUM7M.js → chunk-JKPBXPCW.js} +3 -3
- package/dist/lib/chunks/{chunk-5HT55QYX.js → chunk-JQDQVG3D.js} +1 -1
- package/dist/lib/chunks/{chunk-3KQFLOC7.js → chunk-JXBLGCXZ.js} +1 -1
- package/dist/lib/chunks/{chunk-D2INDP5W.js → chunk-JYFEXVWC.js} +7 -6
- package/dist/lib/chunks/{chunk-X2Y2ZNG3.js → chunk-K2FZFESR.js} +8 -8
- package/dist/lib/chunks/{chunk-DC6PN7QJ.js → chunk-K4Y5NT4M.js} +11 -7
- package/dist/lib/chunks/chunk-K7YFL5KB.js +182 -0
- package/dist/lib/chunks/{chunk-ZYSPTOKK.js → chunk-KQCRJIEG.js} +1 -1
- package/dist/lib/chunks/{chunk-LPND3VNQ.js → chunk-KSOHZKV5.js} +43 -35
- package/dist/lib/chunks/{chunk-FBFZBLTY.js → chunk-LR27H2HZ.js} +15 -16
- package/dist/lib/chunks/{chunk-KZR25REO.js → chunk-LTI2YYU3.js} +1 -1
- package/dist/lib/chunks/{chunk-EPQHVILQ.js → chunk-MA27TFEY.js} +5 -3
- package/dist/lib/chunks/{chunk-J46W3EMQ.js → chunk-MENTBQGB.js} +8 -7
- package/dist/lib/chunks/chunk-MPJCZN4G.js +155 -0
- package/dist/lib/chunks/{chunk-56VOFZ7T.js → chunk-MTDYBJXH.js} +92 -26
- package/dist/lib/chunks/{chunk-PCYNBDZ7.js → chunk-OD36HUXA.js} +17 -12
- package/dist/lib/chunks/{chunk-WDSCJEDG.js → chunk-OQFAMKLN.js} +11 -11
- package/dist/lib/chunks/{chunk-Z4LMDKBU.js → chunk-PWOYEIPF.js} +4 -4
- package/dist/lib/chunks/{chunk-XL4JIQ5X.js → chunk-PXB4PWJI.js} +7 -3
- package/dist/lib/chunks/{chunk-7ZOJE6BH.js → chunk-QGZ4QSUE.js} +8 -7
- package/dist/lib/chunks/chunk-QJZTDZMB.js +321 -0
- package/dist/lib/chunks/{chunk-MHAKYFDF.js → chunk-R2AJYV6A.js} +22 -22
- package/dist/lib/chunks/{chunk-5B3RNVZ6.js → chunk-RK57YZKM.js} +1 -1
- package/dist/lib/chunks/{chunk-ZXGATMMH.js → chunk-RPTADJXD.js} +1 -1
- package/dist/lib/chunks/{chunk-2NJEWPCV.js → chunk-RXSHKWZJ.js} +3 -3
- package/dist/lib/chunks/chunk-RYCRL3YA.js +106 -0
- package/dist/lib/chunks/{chunk-E3OEE5XN.js → chunk-SD7LR26G.js} +3 -3
- package/dist/lib/chunks/{chunk-GVC4LH2N.js → chunk-SIJOQRRK.js} +1 -1
- package/dist/lib/chunks/{chunk-ZBDUE3A5.js → chunk-SLAPBFRH.js} +12 -7
- package/dist/lib/chunks/{chunk-CKUTDJAB.js → chunk-SMPP7B7F.js} +45 -10
- package/dist/lib/chunks/{chunk-POUSX3T4.js → chunk-SQQ56UP2.js} +15 -6
- package/dist/lib/chunks/{chunk-I3TMFPK4.js → chunk-T5XQ6NXD.js} +6 -4
- package/dist/lib/chunks/{chunk-EYKINDNK.js → chunk-TAPVCSCR.js} +1 -1
- package/dist/lib/chunks/{chunk-ISN6MBNB.js → chunk-U5USH2HB.js} +7 -7
- package/dist/lib/chunks/chunk-U64NCRRR.js +97 -0
- package/dist/lib/chunks/{chunk-D2LPQO6Y.js → chunk-U6BW6LGX.js} +10 -3
- package/dist/lib/chunks/chunk-U772TN32.js +67 -0
- package/dist/lib/chunks/{chunk-XHWRSGX3.js → chunk-UYDQXXDQ.js} +4 -4
- package/dist/lib/chunks/{chunk-CPT2GKKW.js → chunk-V5JJEEBT.js} +1 -1
- package/dist/lib/chunks/{chunk-YWJPJI3W.js → chunk-VL253W5C.js} +3 -1
- package/dist/lib/chunks/{chunk-I7VNIW6Q.js → chunk-VPXYGN4I.js} +86 -15
- package/dist/lib/chunks/{chunk-Z7V63UZA.js → chunk-VXDMOB7O.js} +4 -4
- package/dist/lib/chunks/chunk-W5X7WJYL.js +91 -0
- package/dist/lib/chunks/{chunk-6AUEDSTU.js → chunk-WCLKIPJV.js} +1 -1
- package/dist/lib/chunks/{chunk-QFVRCSJ2.js → chunk-WDOA5JEH.js} +2 -0
- package/dist/lib/chunks/chunk-WDT2Y7D7.js +117 -0
- package/dist/lib/chunks/{chunk-OVUCZLH2.js → chunk-WIBMVNIH.js} +2 -2
- package/dist/lib/chunks/{chunk-5T3V6XJS.js → chunk-WNIXDMJL.js} +1 -1
- package/dist/lib/chunks/{chunk-OORO55OM.js → chunk-WZGI7UVM.js} +23 -8
- package/dist/lib/chunks/{chunk-2GY42RIJ.js → chunk-XAKME6NM.js} +1 -1
- package/dist/lib/chunks/{chunk-Q2PWES4B.js → chunk-XAN4CRFP.js} +33 -41
- package/dist/lib/chunks/{chunk-MIF5IYNR.js → chunk-XDG6NPJB.js} +26 -29
- package/dist/lib/chunks/{chunk-IPNK7FYT.js → chunk-XFUYEFQP.js} +1 -1
- package/dist/lib/chunks/{chunk-OQVIRYT5.js → chunk-XNTFOVCE.js} +2 -2
- package/dist/lib/chunks/chunk-Y2CZ6FZY.js +61 -0
- package/dist/lib/chunks/{chunk-D7GEQVLL.js → chunk-YKJHFD64.js} +1 -1
- package/dist/lib/chunks/chunk-YZEZRQIG.js +194 -0
- package/dist/lib/chunks/chunk-ZIGNJAPC.js +11 -0
- package/dist/lib/chunks/{chunk-5ZITQDVE.js → chunk-ZQ3ER7JD.js} +12 -13
- package/dist/lib/cli/bundle-commands.js +102 -94
- package/dist/lib/cli/guide-command.js +25 -0
- package/dist/lib/cli/io.js +1 -1
- package/dist/lib/cli/run-commands.js +310 -140
- package/dist/lib/cli/status-command.js +236 -0
- package/dist/lib/codex-workflow/aggregate.js +22 -24
- package/dist/lib/codex-workflow/author-search.js +4 -3
- package/dist/lib/codex-workflow/author-tools.js +18 -17
- package/dist/lib/codex-workflow/author.js +39 -36
- package/dist/lib/codex-workflow/capture.js +26 -25
- package/dist/lib/codex-workflow/checkpoint.js +14 -15
- package/dist/lib/codex-workflow/checks.js +16 -18
- package/dist/lib/codex-workflow/codex-binary.js +13 -0
- package/dist/lib/codex-workflow/codex-home.js +6 -3
- package/dist/lib/codex-workflow/copy-editor.js +33 -32
- package/dist/lib/codex-workflow/copy-recovery.js +12 -13
- package/dist/lib/codex-workflow/copy.js +30 -29
- package/dist/lib/codex-workflow/finish.js +37 -38
- package/dist/lib/codex-workflow/host-models.js +7 -7
- package/dist/lib/codex-workflow/loop.js +71 -65
- package/dist/lib/codex-workflow/quality.js +12 -13
- package/dist/lib/codex-workflow/run-inputs.js +13 -14
- package/dist/lib/codex-workflow/run-source.js +28 -24
- package/dist/lib/codex-workflow/schemas.js +12 -13
- package/dist/lib/codex-workflow/session.js +15 -16
- package/dist/lib/codex-workflow/stage.js +51 -45
- package/dist/lib/codex-workflow/workdir.js +14 -15
- package/dist/lib/engine/audit-file.js +18 -13
- package/dist/lib/engine/author.js +62 -53
- package/dist/lib/engine/budget.js +7 -1
- package/dist/lib/engine/cost-estimate.js +43 -0
- package/dist/lib/engine/local-run.js +79 -71
- package/dist/lib/engine/preflight.js +17 -13
- package/dist/lib/engine/rejudge.js +87 -79
- package/dist/lib/engine/resources.js +1 -1
- package/dist/lib/engine/run-configuration.js +2 -1
- package/dist/lib/engine/run-status.js +153 -0
- package/dist/lib/engine/templates.js +19 -14
- package/dist/lib/grounding/chromium-guard.js +13 -0
- package/dist/lib/grounding/controller.js +13 -12
- package/dist/lib/grounding/extract.js +12 -11
- package/dist/lib/grounding/fetch.js +4 -7
- package/dist/lib/grounding/file-store.js +5 -5
- package/dist/lib/grounding/grounding-runtime.js +34 -32
- package/dist/lib/grounding/guarded-request.js +18 -0
- package/dist/lib/grounding/model.js +11 -10
- package/dist/lib/grounding/profile.js +4 -4
- package/dist/lib/grounding/recorded-tools.js +18 -17
- package/dist/lib/grounding/session.js +3 -3
- package/dist/lib/grounding/tools.js +4 -3
- package/dist/lib/grounding/validation.js +2 -2
- package/dist/lib/harness/report/artifacts.js +12 -13
- package/dist/lib/harness/report/capture-coverage.js +4 -4
- package/dist/lib/lib/checkpoint.js +11 -12
- package/dist/lib/lib/progress-comparison.js +2 -2
- package/dist/lib/models/batching.js +5 -5
- package/dist/lib/models/cost-coefficients.js +20 -0
- package/dist/lib/models/local-profile.js +10 -0
- package/dist/lib/models/pricing.js +6 -0
- package/dist/lib/models/profiles.js +7 -14
- package/dist/lib/models/structured-images.js +1 -1
- package/dist/lib/models/structured.js +4 -4
- package/dist/lib/models/supported-models.js +20 -0
- package/dist/lib/pipeline.js +21 -21
- package/dist/lib/probes/agent-cli-parsers.js +1 -1
- package/dist/lib/probes/agent-clis.js +13 -12
- package/dist/lib/probes/charged-trace.js +10 -0
- package/dist/lib/probes/probes.js +12 -12
- package/dist/lib/probes/web-tool-guard.js +3 -3
- package/dist/lib/report/contracts.js +4 -4
- package/dist/lib/report/core/progress-comparison.js +2 -2
- package/dist/lib/report/core/progress-schema.js +2 -2
- package/dist/lib/report/core/schema.js +2 -4
- package/dist/lib/report/core/surfaces.js +1 -3
- package/dist/lib/runner.js +25 -26
- package/dist/lib/schema.js +20 -15
- package/dist/lib/section-result.js +15 -17
- package/dist/lib/stores/artifacts.js +18 -19
- package/dist/lib/stores/files.js +32 -32
- package/dist/lib/stores/local-versions.js +11 -12
- package/dist/lib/stores/memory.js +34 -35
- package/dist/lib/stores/publication.js +23 -23
- package/dist/lib/surfaces.js +1 -3
- package/dist/lib/viewer/server.js +38 -39
- package/dist/lib/workflow/schema.js +9 -10
- package/dist/types/agents/author-schema.d.ts +3 -3
- package/dist/types/agents/copy-validation.d.ts +4 -4
- package/dist/types/agents/verifier.d.ts +6 -6
- package/dist/types/analysis/scoring.d.ts +2 -2
- package/dist/types/bundle/contracts.d.ts +3 -2
- package/dist/types/bundle/isolation.d.ts +37 -0
- package/dist/types/bundle/project-journal.d.ts +2 -0
- package/dist/types/bundle/recorder.d.ts +4 -0
- package/dist/types/bundle/writer-lock.d.ts +9 -0
- package/dist/types/checks/crawler-access.d.ts +3 -2
- package/dist/types/checks/renderability.d.ts +8 -1
- package/dist/types/cli/guide-command.d.ts +4 -0
- package/dist/types/cli/status-command.d.ts +2 -0
- package/dist/types/codex-workflow/author-tools.d.ts +3 -3
- package/dist/types/codex-workflow/codex-binary.d.ts +26 -0
- package/dist/types/codex-workflow/codex-home.d.ts +24 -20
- package/dist/types/codex-workflow/copy-editor.d.ts +1 -1
- package/dist/types/codex-workflow/copy.d.ts +3 -4
- package/dist/types/codex-workflow/finish.d.ts +5 -3
- package/dist/types/codex-workflow/host-models.d.ts +7 -3
- package/dist/types/codex-workflow/loop.d.ts +10 -1
- package/dist/types/codex-workflow/run-inputs.d.ts +31 -113
- package/dist/types/codex-workflow/schemas.d.ts +6 -6
- package/dist/types/codex-workflow/stage.d.ts +16 -5
- package/dist/types/engine/audit-file.d.ts +9 -3
- package/dist/types/engine/author.d.ts +7 -1
- package/dist/types/engine/budget.d.ts +46 -15
- package/dist/types/engine/cost-estimate.d.ts +40 -0
- package/dist/types/engine/local-run.d.ts +6 -0
- package/dist/types/engine/preflight.d.ts +7 -0
- package/dist/types/engine/resources.d.ts +2 -0
- package/dist/types/engine/run-configuration.d.ts +4 -3
- package/dist/types/engine/run-status.d.ts +75 -0
- package/dist/types/engine/templates.d.ts +1 -2
- package/dist/types/grounding/chromium-guard.d.ts +41 -0
- package/dist/types/grounding/fetch.d.ts +0 -10
- package/dist/types/grounding/guarded-request.d.ts +76 -0
- package/dist/types/harness/report/artifacts.d.ts +1 -0
- package/dist/types/lib/checkpoint.d.ts +5 -6
- package/dist/types/models/cost-coefficients.d.ts +106 -0
- package/dist/types/models/local-profile.d.ts +12 -0
- package/dist/types/models/pricing.d.ts +8 -0
- package/dist/types/models/profiles.d.ts +55 -160
- package/dist/types/models/served-model.d.ts +2 -3
- package/dist/types/models/structured.d.ts +3 -3
- package/dist/types/models/supported-models.d.ts +48 -0
- package/dist/types/pipeline.d.ts +2 -1
- package/dist/types/probes/charged-trace.d.ts +8 -0
- package/dist/types/probes/probe-trace.d.ts +2 -0
- package/dist/types/probes/probes.d.ts +2 -1
- package/dist/types/report/contracts.d.ts +2 -0
- package/dist/types/report/core/schema.d.ts +3 -1
- package/dist/types/report/core/surfaces.d.ts +0 -1
- package/dist/types/schema.d.ts +50 -113
- package/dist/types/section-result.d.ts +1 -1
- package/dist/types/workflow/schema.d.ts +79 -152
- package/package.json +2 -1
- package/resources/guide/OPERATOR.md +189 -0
- package/src/agents/author-schema.ts +13 -1
- package/src/agents/author-validation.ts +2 -5
- package/src/agents/copy-validation.ts +8 -12
- package/src/agents/facts.ts +8 -8
- package/src/agents/narrative-facts.ts +9 -20
- package/src/agents/verifier.ts +12 -16
- package/src/analysis/progress.ts +1 -0
- package/src/analysis/scoring.ts +9 -13
- package/src/bundle/contracts.ts +9 -4
- package/src/bundle/isolation.ts +157 -0
- package/src/bundle/project-journal.ts +4 -0
- package/src/bundle/project.ts +20 -7
- package/src/bundle/recorder.ts +5 -0
- package/src/bundle/verify.ts +3 -3
- package/src/bundle/writer-lock.ts +27 -0
- package/src/capture-manifest.ts +4 -0
- package/src/checks/crawler-access.ts +70 -50
- package/src/checks/renderability.ts +113 -87
- package/src/checks/run-checks.ts +16 -3
- package/src/cli/guide-command.ts +28 -0
- package/src/cli/io.ts +2 -0
- package/src/cli/literally-aeo.ts +39 -19
- package/src/cli/run-commands.ts +238 -18
- package/src/cli/status-command.ts +113 -0
- package/src/codex-workflow/aggregate.ts +1 -0
- package/src/codex-workflow/author-tools.ts +39 -60
- package/src/codex-workflow/capture.ts +1 -0
- package/src/codex-workflow/codex-binary.ts +105 -0
- package/src/codex-workflow/codex-home.ts +50 -40
- package/src/codex-workflow/copy-editor.ts +3 -3
- package/src/codex-workflow/copy.ts +7 -10
- package/src/codex-workflow/finish.ts +13 -8
- package/src/codex-workflow/host-models.ts +33 -24
- package/src/codex-workflow/loop.ts +38 -11
- package/src/codex-workflow/stage.ts +126 -17
- package/src/engine/audit-file.ts +98 -9
- package/src/engine/author.ts +47 -2
- package/src/engine/budget.ts +138 -43
- package/src/engine/cost-estimate.ts +178 -0
- package/src/engine/guide/OPERATOR.md +189 -0
- package/src/engine/local-run.ts +38 -8
- package/src/engine/preflight.ts +140 -7
- package/src/engine/resources.ts +9 -4
- package/src/engine/run-configuration.ts +19 -1
- package/src/engine/run-status.ts +452 -0
- package/src/engine/templates.ts +5 -2
- package/src/grounding/chromium-guard.ts +273 -0
- package/src/grounding/controller.ts +1 -1
- package/src/grounding/fetch.ts +39 -276
- package/src/grounding/guarded-request.ts +428 -0
- package/src/grounding/tools.ts +2 -1
- package/src/grounding/validation.ts +1 -1
- package/src/lib/checkpoint.ts +15 -16
- package/src/models/cost-coefficients.ts +140 -0
- package/src/models/local-profile.ts +150 -0
- package/src/models/pricing.ts +31 -0
- package/src/models/profiles.ts +58 -419
- package/src/models/served-model.ts +2 -3
- package/src/models/structured-images.ts +5 -4
- package/src/models/structured.ts +20 -7
- package/src/models/supported-models.ts +112 -0
- package/src/pipeline.ts +13 -7
- package/src/probes/agent-clis.ts +26 -5
- package/src/probes/charged-trace.ts +87 -0
- package/src/probes/probe-trace.ts +2 -0
- package/src/probes/probes.ts +72 -12
- package/src/report/core/schema.ts +4 -1
- package/src/report/core/surfaces.ts +4 -8
- package/src/runner.ts +1 -0
- package/src/schema.ts +68 -4
- package/src/section-result.ts +6 -5
- package/dist/lib/chunks/chunk-6EH4N3EU.js +0 -113
- package/dist/lib/chunks/chunk-CFFPOTP4.js +0 -356
- package/dist/lib/chunks/chunk-LIZX4N3H.js +0 -110
- package/dist/lib/chunks/chunk-OYKV5NDM.js +0 -28
- package/dist/lib/chunks/chunk-SWJ7KQSL.js +0 -318
- package/dist/lib/chunks/chunk-WE2WPNG2.js +0 -104
- package/dist/lib/chunks/{chunk-XI5H46DF.js → chunk-SASE7U6E.js} +3 -3
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createLog
|
|
3
3
|
} from "./chunk-ZSEY7AHQ.js";
|
|
4
|
+
import {
|
|
5
|
+
describeSiteError
|
|
6
|
+
} from "./chunk-ESEMYWUH.js";
|
|
4
7
|
|
|
5
8
|
// src/checks/crawler-access.ts
|
|
6
9
|
var log = createLog("CrawlerAccess");
|
|
@@ -42,14 +45,12 @@ var aiBotRoster = [
|
|
|
42
45
|
{ bot: "Bytespider", kind: "training" },
|
|
43
46
|
{ bot: "CCBot", kind: "training" }
|
|
44
47
|
];
|
|
45
|
-
var
|
|
46
|
-
var
|
|
48
|
+
var requestTimeoutInMs = 15e3;
|
|
49
|
+
var auditUserAgent = "literally-aeo-audit/1.0";
|
|
47
50
|
var controlUserAgent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36";
|
|
48
|
-
var
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
});
|
|
52
|
-
};
|
|
51
|
+
var robotsRedirects = 5;
|
|
52
|
+
var robotsMaxBytes = 500 * 1024;
|
|
53
|
+
var pageRedirects = 5;
|
|
53
54
|
var isRefused = (code) => {
|
|
54
55
|
return code === 403 || code === 429;
|
|
55
56
|
};
|
|
@@ -59,40 +60,55 @@ var getLiveVerdict = (liveStatus, controlStatus) => {
|
|
|
59
60
|
}
|
|
60
61
|
return isRefused(liveStatus) ? "refused_as_bot" : "ok";
|
|
61
62
|
};
|
|
62
|
-
var
|
|
63
|
-
return
|
|
63
|
+
var getOrigin = (brandDomain) => {
|
|
64
|
+
return `https://${brandDomain.replace(/^https?:\/\//, "").replace(/\/.*$/, "")}`;
|
|
64
65
|
};
|
|
65
|
-
var runCrawlerAccessCheck = async (brandDomain) => {
|
|
66
|
-
const origin =
|
|
66
|
+
var runCrawlerAccessCheck = async (brandDomain, request) => {
|
|
67
|
+
const origin = getOrigin(brandDomain);
|
|
67
68
|
const robotsUrl = `${origin}/robots.txt`;
|
|
68
69
|
let robotsBody = null;
|
|
69
70
|
let robotsFetchError = null;
|
|
71
|
+
let robotsTruncated = false;
|
|
70
72
|
try {
|
|
71
|
-
const response = await
|
|
72
|
-
|
|
73
|
-
|
|
73
|
+
const response = await request({
|
|
74
|
+
url: robotsUrl,
|
|
75
|
+
timeoutInMs: requestTimeoutInMs,
|
|
76
|
+
userAgent: auditUserAgent,
|
|
77
|
+
accept: "*/*",
|
|
78
|
+
redirects: robotsRedirects,
|
|
79
|
+
body: {
|
|
80
|
+
contentTypes: "any",
|
|
81
|
+
maxBytes: robotsMaxBytes,
|
|
82
|
+
oversize: "truncate"
|
|
83
|
+
}
|
|
74
84
|
});
|
|
75
|
-
if (response.
|
|
76
|
-
robotsBody =
|
|
85
|
+
if (response.status >= 200 && response.status < 300) {
|
|
86
|
+
robotsBody = response.body?.toString("utf8") ?? "";
|
|
87
|
+
robotsTruncated = response.isTruncated;
|
|
77
88
|
} else if (response.status === 404) {
|
|
78
89
|
robotsBody = "";
|
|
79
90
|
} else {
|
|
80
91
|
robotsFetchError = `HTTP ${response.status}`;
|
|
81
92
|
}
|
|
82
93
|
} catch (error) {
|
|
83
|
-
robotsFetchError =
|
|
94
|
+
robotsFetchError = describeSiteError(error);
|
|
84
95
|
}
|
|
85
96
|
const groups = robotsBody !== null ? parseRobotsTxt(robotsBody) : null;
|
|
86
|
-
const
|
|
97
|
+
const getStatus = async (userAgent) => {
|
|
87
98
|
try {
|
|
88
|
-
const response = await
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
99
|
+
const response = await request({
|
|
100
|
+
url: origin,
|
|
101
|
+
timeoutInMs: requestTimeoutInMs,
|
|
102
|
+
userAgent,
|
|
103
|
+
accept: "*/*",
|
|
104
|
+
redirects: pageRedirects
|
|
92
105
|
});
|
|
93
106
|
return response.status;
|
|
94
107
|
} catch (error) {
|
|
95
|
-
log.warn("Live UA probe failed", {
|
|
108
|
+
log.warn("Live UA probe failed", {
|
|
109
|
+
userAgent,
|
|
110
|
+
error: describeSiteError(error)
|
|
111
|
+
});
|
|
96
112
|
return null;
|
|
97
113
|
}
|
|
98
114
|
};
|
|
@@ -101,15 +117,9 @@ var runCrawlerAccessCheck = async (brandDomain) => {
|
|
|
101
117
|
if (!bot.liveProbeUa) {
|
|
102
118
|
continue;
|
|
103
119
|
}
|
|
104
|
-
|
|
105
|
-
await sleep(probeIntervalMs);
|
|
106
|
-
}
|
|
107
|
-
probed.push({ bot, liveStatus: await status(bot.liveProbeUa) });
|
|
108
|
-
}
|
|
109
|
-
if (probed.length > 0) {
|
|
110
|
-
await sleep(probeIntervalMs);
|
|
120
|
+
probed.push({ bot, liveStatus: await getStatus(bot.liveProbeUa) });
|
|
111
121
|
}
|
|
112
|
-
const controlStatus = probed.length > 0 ? await
|
|
122
|
+
const controlStatus = probed.length > 0 ? await getStatus(controlUserAgent) : null;
|
|
113
123
|
const bots = aiBotRoster.map((bot) => {
|
|
114
124
|
const robotsAllowed = groups ? isRootAllowed(groups, bot.bot) : null;
|
|
115
125
|
const probe = probed.find((entry) => entry.bot === bot);
|
|
@@ -139,6 +149,7 @@ var runCrawlerAccessCheck = async (brandDomain) => {
|
|
|
139
149
|
log.info("Crawler access check completed", {
|
|
140
150
|
robotsUrl,
|
|
141
151
|
robotsFetchError,
|
|
152
|
+
robotsTruncated,
|
|
142
153
|
controlStatus,
|
|
143
154
|
bots: bots.length,
|
|
144
155
|
robotsBlocked: bots.filter((b) => b.robotsAllowed === false).length,
|
|
@@ -149,30 +160,33 @@ var runCrawlerAccessCheck = async (brandDomain) => {
|
|
|
149
160
|
robotsUrl,
|
|
150
161
|
fetchedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
151
162
|
robotsFetchError,
|
|
163
|
+
robotsTruncated,
|
|
152
164
|
controlStatus,
|
|
153
165
|
bots
|
|
154
166
|
};
|
|
155
167
|
};
|
|
156
|
-
var checkLlmsTxt = async (brandDomain) => {
|
|
157
|
-
const origin =
|
|
168
|
+
var checkLlmsTxt = async (brandDomain, request) => {
|
|
169
|
+
const origin = getOrigin(brandDomain);
|
|
158
170
|
const [llmsTxt, llmsFullTxt] = await Promise.all([
|
|
159
|
-
|
|
160
|
-
|
|
171
|
+
isTextFileServed(`${origin}/llms.txt`, request),
|
|
172
|
+
isTextFileServed(`${origin}/llms-full.txt`, request)
|
|
161
173
|
]);
|
|
162
174
|
log.debug("llms.txt check completed", { origin, llmsTxt, llmsFullTxt });
|
|
163
175
|
return { llmsTxt, llmsFullTxt };
|
|
164
176
|
};
|
|
165
|
-
var
|
|
177
|
+
var isTextFileServed = async (url, request) => {
|
|
166
178
|
try {
|
|
167
|
-
const response = await
|
|
168
|
-
|
|
169
|
-
|
|
179
|
+
const response = await request({
|
|
180
|
+
url,
|
|
181
|
+
timeoutInMs: requestTimeoutInMs,
|
|
182
|
+
userAgent: auditUserAgent,
|
|
183
|
+
accept: "text/plain,text/markdown,*/*",
|
|
184
|
+
redirects: pageRedirects
|
|
170
185
|
});
|
|
171
|
-
if (
|
|
186
|
+
if (response.status < 200 || response.status >= 300) {
|
|
172
187
|
return false;
|
|
173
188
|
}
|
|
174
|
-
|
|
175
|
-
return !contentType.includes("text/html");
|
|
189
|
+
return !response.contentType.includes("text/html");
|
|
176
190
|
} catch {
|
|
177
191
|
return false;
|
|
178
192
|
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
auditFileVersion
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VPXYGN4I.js";
|
|
4
|
+
import {
|
|
5
|
+
recommendedModelId
|
|
6
|
+
} from "./chunk-W5X7WJYL.js";
|
|
4
7
|
|
|
5
8
|
// src/engine/templates.ts
|
|
6
9
|
var exampleAuditFile = {
|
|
7
10
|
version: auditFileVersion,
|
|
11
|
+
model: recommendedModelId,
|
|
8
12
|
brand: {
|
|
9
13
|
name: "Northwind Data",
|
|
10
14
|
domain: "northwind.example",
|
|
@@ -37,8 +41,9 @@ var exampleAuditFile = {
|
|
|
37
41
|
grounding: "full",
|
|
38
42
|
runPolicy: {
|
|
39
43
|
maxPlannedUnits: 100,
|
|
40
|
-
//
|
|
41
|
-
|
|
44
|
+
// No dollar cap here: approve one per run with `run --max-usd`, after
|
|
45
|
+
// `literally-aeo plan` shows the estimate. It caps every paid call.
|
|
46
|
+
budget: { maxHours: 12 }
|
|
42
47
|
}
|
|
43
48
|
};
|
|
44
49
|
var exampleEnvFile = `# Settings literally-aeo reads. Keep this file out of source control.
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-HXHFMFQU.js";
|
|
5
5
|
import {
|
|
6
6
|
allSurfaces
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AASWJR7Q.js";
|
|
8
8
|
|
|
9
9
|
// src/report/core/schema.ts
|
|
10
10
|
import { z } from "zod";
|
|
@@ -202,6 +202,10 @@ var aeoTechnicalChecksSchema = z.object({
|
|
|
202
202
|
robotsUrl: z.string(),
|
|
203
203
|
fetchedAt: z.string(),
|
|
204
204
|
robotsFetchError: z.string().nullable(),
|
|
205
|
+
// True when robots.txt ran past the 500 KiB RFC 9309 asks a reader to
|
|
206
|
+
// parse: the verdicts rest on that prefix. Absent on snapshots written
|
|
207
|
+
// before the bound existed.
|
|
208
|
+
robotsTruncated: z.boolean().optional(),
|
|
205
209
|
bots: z.array(
|
|
206
210
|
z.object({
|
|
207
211
|
bot: z.string(),
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isPublicAddress
|
|
3
|
+
} from "./chunk-NL2LDKXX.js";
|
|
4
|
+
|
|
5
|
+
// src/grounding/guarded-request.ts
|
|
6
|
+
import { lookup } from "node:dns/promises";
|
|
7
|
+
import { request } from "node:https";
|
|
8
|
+
import { isIP } from "node:net";
|
|
9
|
+
import { setTimeout as delay } from "node:timers/promises";
|
|
10
|
+
var SourceRetrievalError = class extends Error {
|
|
11
|
+
reason;
|
|
12
|
+
status;
|
|
13
|
+
constructor(reason, message, { status, cause } = {}) {
|
|
14
|
+
super(message, cause === void 0 ? void 0 : { cause });
|
|
15
|
+
this.name = "SourceRetrievalError";
|
|
16
|
+
this.reason = reason;
|
|
17
|
+
this.status = status;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
var validateResearchUrl = (value) => {
|
|
21
|
+
let url;
|
|
22
|
+
try {
|
|
23
|
+
url = new URL(value);
|
|
24
|
+
} catch {
|
|
25
|
+
throw new SourceRetrievalError(
|
|
26
|
+
"unsafe_destination",
|
|
27
|
+
`Invalid source URL: ${value}.`
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
if (url.protocol !== "https:" || url.username || url.password || url.port || url.hostname === "localhost" || url.hostname.endsWith(".localhost") || url.hostname.endsWith(".local") || url.hostname.endsWith(".internal") || url.hostname === "metadata.google.internal") {
|
|
31
|
+
throw new SourceRetrievalError(
|
|
32
|
+
"unsafe_destination",
|
|
33
|
+
`Source must use public HTTPS with no credentials: ${url.hostname}.`
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
const host = url.hostname.replace(/^\[|\]$/g, "");
|
|
37
|
+
if (isIP(host) && !isPublicAddress(host)) {
|
|
38
|
+
throw new SourceRetrievalError(
|
|
39
|
+
"unsafe_destination",
|
|
40
|
+
`Private source destination: ${host}.`
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
url.hash = "";
|
|
44
|
+
return url;
|
|
45
|
+
};
|
|
46
|
+
var withAbort = (promise, signal) => {
|
|
47
|
+
signal.throwIfAborted();
|
|
48
|
+
return new Promise((resolve, reject) => {
|
|
49
|
+
const aborted = () => {
|
|
50
|
+
reject(signal.reason);
|
|
51
|
+
};
|
|
52
|
+
signal.addEventListener("abort", aborted, { once: true });
|
|
53
|
+
promise.then(resolve, reject).finally(() => {
|
|
54
|
+
signal.removeEventListener("abort", aborted);
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
var lookupAll = (host) => {
|
|
59
|
+
return lookup(host, { all: true });
|
|
60
|
+
};
|
|
61
|
+
var resolvePublicAddress = async (hostname, signal, lookupHost = lookupAll) => {
|
|
62
|
+
const host = hostname.replace(/^\[|\]$/g, "");
|
|
63
|
+
const addresses = await withAbort(lookupHost(host), signal);
|
|
64
|
+
if (addresses.length === 0 || addresses.some(({ address }) => !isPublicAddress(address))) {
|
|
65
|
+
throw new SourceRetrievalError(
|
|
66
|
+
"unsafe_destination",
|
|
67
|
+
`Source DNS must resolve exclusively to public addresses: ${host}.`
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
const [firstAddress] = addresses;
|
|
71
|
+
if (!firstAddress) {
|
|
72
|
+
throw new SourceRetrievalError(
|
|
73
|
+
"unsafe_destination",
|
|
74
|
+
`Source DNS returned no address: ${host}.`
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
return firstAddress;
|
|
78
|
+
};
|
|
79
|
+
var createHostPacer = (intervalInMs, wait = delay) => {
|
|
80
|
+
const lastRequestByHost = /* @__PURE__ */ new Map();
|
|
81
|
+
return (url, send) => {
|
|
82
|
+
const previous = lastRequestByHost.get(url.hostname);
|
|
83
|
+
const current = (async () => {
|
|
84
|
+
if (previous) {
|
|
85
|
+
await previous;
|
|
86
|
+
await wait(intervalInMs);
|
|
87
|
+
}
|
|
88
|
+
return send();
|
|
89
|
+
})();
|
|
90
|
+
lastRequestByHost.set(
|
|
91
|
+
url.hostname,
|
|
92
|
+
current.catch(() => void 0)
|
|
93
|
+
);
|
|
94
|
+
return current;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
var describeSiteError = (error) => {
|
|
98
|
+
if (error instanceof SourceRetrievalError) {
|
|
99
|
+
return `${error.reason}: ${error.message}`;
|
|
100
|
+
}
|
|
101
|
+
return error instanceof Error ? error.message : String(error);
|
|
102
|
+
};
|
|
103
|
+
var isRedirect = (status) => {
|
|
104
|
+
return status >= 300 && status < 400;
|
|
105
|
+
};
|
|
106
|
+
var isSuccess = (status) => {
|
|
107
|
+
return status >= 200 && status < 300;
|
|
108
|
+
};
|
|
109
|
+
var requestHop = async (url, options, signal) => {
|
|
110
|
+
const address = await resolvePublicAddress(url.hostname, signal);
|
|
111
|
+
signal.throwIfAborted();
|
|
112
|
+
return new Promise((resolve, reject) => {
|
|
113
|
+
const req = request(
|
|
114
|
+
url,
|
|
115
|
+
{
|
|
116
|
+
method: "GET",
|
|
117
|
+
signal,
|
|
118
|
+
headers: {
|
|
119
|
+
"accept": options.accept,
|
|
120
|
+
// Never a compressed body: nothing to decompress, so no bomb to
|
|
121
|
+
// bound. An encoded body despite this is refused below.
|
|
122
|
+
"accept-encoding": "identity",
|
|
123
|
+
"user-agent": options.userAgent
|
|
124
|
+
},
|
|
125
|
+
lookup: (_host, lookupOptions, callback) => {
|
|
126
|
+
if (lookupOptions.all) {
|
|
127
|
+
callback(null, [address]);
|
|
128
|
+
} else {
|
|
129
|
+
callback(null, address.address, address.family);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
(response) => {
|
|
134
|
+
const status = response.statusCode ?? 0;
|
|
135
|
+
const contentType = response.headers["content-type"] ?? "";
|
|
136
|
+
const encoding = response.headers["content-encoding"];
|
|
137
|
+
const policy = options.body;
|
|
138
|
+
const settle = (body, isTruncated) => {
|
|
139
|
+
resolve({
|
|
140
|
+
status,
|
|
141
|
+
location: response.headers.location,
|
|
142
|
+
contentType,
|
|
143
|
+
body,
|
|
144
|
+
isTruncated
|
|
145
|
+
});
|
|
146
|
+
};
|
|
147
|
+
if (!policy || !isSuccess(status)) {
|
|
148
|
+
response.destroy();
|
|
149
|
+
settle(void 0, false);
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
if (policy.contentTypes !== "any" && !policy.contentTypes.test(contentType) || encoding && encoding !== "identity") {
|
|
153
|
+
response.destroy();
|
|
154
|
+
reject(
|
|
155
|
+
new SourceRetrievalError(
|
|
156
|
+
"unsupported_content",
|
|
157
|
+
`Unsupported source content: ${contentType}.`
|
|
158
|
+
)
|
|
159
|
+
);
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
const chunks = [];
|
|
163
|
+
let bytes = 0;
|
|
164
|
+
response.on("data", (chunk) => {
|
|
165
|
+
bytes += chunk.length;
|
|
166
|
+
if (bytes <= policy.maxBytes) {
|
|
167
|
+
chunks.push(chunk);
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
response.destroy();
|
|
171
|
+
if (policy.oversize === "refuse") {
|
|
172
|
+
reject(
|
|
173
|
+
new SourceRetrievalError(
|
|
174
|
+
"too_large",
|
|
175
|
+
`Source response exceeds byte limit: ${bytes} bytes.`
|
|
176
|
+
)
|
|
177
|
+
);
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
const kept = Buffer.concat(chunks);
|
|
181
|
+
settle(
|
|
182
|
+
Buffer.concat([
|
|
183
|
+
kept,
|
|
184
|
+
chunk.subarray(0, policy.maxBytes - kept.length)
|
|
185
|
+
]),
|
|
186
|
+
true
|
|
187
|
+
);
|
|
188
|
+
});
|
|
189
|
+
response.once("error", reject);
|
|
190
|
+
response.once("end", () => {
|
|
191
|
+
settle(Buffer.concat(chunks), false);
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
);
|
|
195
|
+
req.once("error", reject);
|
|
196
|
+
req.end();
|
|
197
|
+
});
|
|
198
|
+
};
|
|
199
|
+
var guardedRequest = async (options) => {
|
|
200
|
+
const pace = options.pace ?? ((_url, send) => send());
|
|
201
|
+
const hops = [];
|
|
202
|
+
let url = validateResearchUrl(options.url);
|
|
203
|
+
let hopSignal;
|
|
204
|
+
try {
|
|
205
|
+
for (let redirects = 0; ; redirects += 1) {
|
|
206
|
+
const target = url;
|
|
207
|
+
const response = await pace(target, () => {
|
|
208
|
+
options.signal?.throwIfAborted();
|
|
209
|
+
const signal = AbortSignal.any([
|
|
210
|
+
AbortSignal.timeout(options.timeoutInMs),
|
|
211
|
+
...options.signal ? [options.signal] : []
|
|
212
|
+
]);
|
|
213
|
+
hopSignal = signal;
|
|
214
|
+
return requestHop(target, options, signal);
|
|
215
|
+
});
|
|
216
|
+
hops.push({ url: target.href, status: response.status });
|
|
217
|
+
if (!isRedirect(response.status)) {
|
|
218
|
+
const { location: _location, ...final } = response;
|
|
219
|
+
return { ...final, url: target.href, hops };
|
|
220
|
+
}
|
|
221
|
+
if (!response.location) {
|
|
222
|
+
throw new SourceRetrievalError(
|
|
223
|
+
"http_error",
|
|
224
|
+
`Source redirect without a location: ${target.href}.`
|
|
225
|
+
);
|
|
226
|
+
}
|
|
227
|
+
if (redirects === options.redirects) {
|
|
228
|
+
throw new SourceRetrievalError(
|
|
229
|
+
"http_error",
|
|
230
|
+
`Source redirect limit exceeded: ${target.href}.`
|
|
231
|
+
);
|
|
232
|
+
}
|
|
233
|
+
url = validateResearchUrl(new URL(response.location, target).href);
|
|
234
|
+
}
|
|
235
|
+
} catch (error) {
|
|
236
|
+
if (options.signal?.aborted) {
|
|
237
|
+
throw options.signal.reason;
|
|
238
|
+
}
|
|
239
|
+
if (error instanceof SourceRetrievalError) {
|
|
240
|
+
throw error;
|
|
241
|
+
}
|
|
242
|
+
throw new SourceRetrievalError(
|
|
243
|
+
hopSignal?.aborted ? "timeout" : "network_error",
|
|
244
|
+
`Source retrieval failed: ${url.href}.`,
|
|
245
|
+
{ cause: error }
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
export {
|
|
251
|
+
SourceRetrievalError,
|
|
252
|
+
validateResearchUrl,
|
|
253
|
+
resolvePublicAddress,
|
|
254
|
+
createHostPacer,
|
|
255
|
+
describeSiteError,
|
|
256
|
+
guardedRequest
|
|
257
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
normalizeResponseText
|
|
3
|
+
} from "./chunk-TGTM5ZFR.js";
|
|
1
4
|
import {
|
|
2
5
|
plannedProbeUnitsForSection,
|
|
3
6
|
unitRecordKey
|
|
4
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7YDXD4MD.js";
|
|
5
8
|
import {
|
|
6
|
-
|
|
7
|
-
} from "./chunk-
|
|
9
|
+
contentHash
|
|
10
|
+
} from "./chunk-H2KDLDK6.js";
|
|
8
11
|
import {
|
|
9
12
|
aeoSurfaceSchema,
|
|
10
13
|
citationAttributionSchema,
|
|
11
14
|
retrievalLogSchema
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import {
|
|
14
|
-
contentHash
|
|
15
|
-
} from "./chunk-H2KDLDK6.js";
|
|
15
|
+
} from "./chunk-EDQTINTL.js";
|
|
16
16
|
|
|
17
17
|
// src/capture-manifest.ts
|
|
18
18
|
import { z } from "zod";
|
|
@@ -81,6 +81,9 @@ var capturePlan = (config, surfaces, sections) => {
|
|
|
81
81
|
geography: config.geography,
|
|
82
82
|
language: config.language,
|
|
83
83
|
agentProbes: config.agentProbes,
|
|
84
|
+
// Undefined members are dropped, so a config without chat depth keeps
|
|
85
|
+
// the digest earlier releases gave it.
|
|
86
|
+
chatProbes: config.chatProbes,
|
|
84
87
|
surfaces
|
|
85
88
|
});
|
|
86
89
|
const plan = {
|
|
@@ -90,7 +93,8 @@ var capturePlan = (config, surfaces, sections) => {
|
|
|
90
93
|
sectionKey: section.key,
|
|
91
94
|
prompts: section.prompts,
|
|
92
95
|
surfaces,
|
|
93
|
-
agentProbes: config.agentProbes
|
|
96
|
+
agentProbes: config.agentProbes,
|
|
97
|
+
chatProbes: config.chatProbes
|
|
94
98
|
})
|
|
95
99
|
)
|
|
96
100
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
groundingRules
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6HMHXSCS.js";
|
|
4
4
|
import {
|
|
5
5
|
locateVerbatimPassage
|
|
6
6
|
} from "./chunk-3UFZ2XPE.js";
|
|
7
7
|
import {
|
|
8
8
|
generateStructured
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import {
|
|
11
|
-
ModelBudgetError
|
|
12
|
-
} from "./chunk-TNL2GWYR.js";
|
|
9
|
+
} from "./chunk-OD36HUXA.js";
|
|
13
10
|
import {
|
|
14
11
|
GroundingIntegrityError,
|
|
15
12
|
validateCandidateOccurrences
|
|
16
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KQCRJIEG.js";
|
|
17
14
|
import {
|
|
18
15
|
contentHash
|
|
19
16
|
} from "./chunk-H2KDLDK6.js";
|
|
17
|
+
import {
|
|
18
|
+
ModelBudgetError
|
|
19
|
+
} from "./chunk-TNL2GWYR.js";
|
|
20
20
|
import {
|
|
21
21
|
productScopeSchema
|
|
22
22
|
} from "./chunk-6RAKXYSR.js";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createMemoryModelAccounting
|
|
3
|
+
} from "./chunk-TNL2GWYR.js";
|
|
4
|
+
|
|
5
|
+
// src/codex-workflow/host-models.ts
|
|
6
|
+
var hostStepMaxUsd = 5;
|
|
7
|
+
var hostStepAccounting = () => {
|
|
8
|
+
return createMemoryModelAccounting({
|
|
9
|
+
maxUsd: hostStepMaxUsd,
|
|
10
|
+
maxTokens: 5e6,
|
|
11
|
+
deadlineAt: new Date(Date.now() + 30 * 6e4).toISOString()
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
var hostModels = (profile) => {
|
|
15
|
+
return { profile, accounting: hostStepAccounting() };
|
|
16
|
+
};
|
|
17
|
+
var pinnedProfileOf = (profile) => {
|
|
18
|
+
if (!profile) {
|
|
19
|
+
throw new Error(
|
|
20
|
+
"The run request pins no model profile; the host model steps need one."
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
return profile;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export {
|
|
27
|
+
hostStepMaxUsd,
|
|
28
|
+
hostStepAccounting,
|
|
29
|
+
hostModels,
|
|
30
|
+
pinnedProfileOf
|
|
31
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readFinalizedRevisions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FL6LN2K6.js";
|
|
4
4
|
import {
|
|
5
5
|
BundleRefusedError,
|
|
6
6
|
archiveLimits,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "./chunk-2QLAFBCG.js";
|
|
15
15
|
import {
|
|
16
16
|
bundlePaths
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-T5XQ6NXD.js";
|
|
18
18
|
|
|
19
19
|
// src/bundle/read.ts
|
|
20
20
|
import { lstat, readdir, readFile } from "node:fs/promises";
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
2
|
copywriterFiles
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3OE4UQIB.js";
|
|
4
4
|
import {
|
|
5
5
|
writePendingJson
|
|
6
6
|
} from "./chunk-MX6Y4RD2.js";
|
|
7
7
|
import {
|
|
8
8
|
writeOutputSchema
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SIJOQRRK.js";
|
|
10
10
|
import {
|
|
11
11
|
premiseVerifierInstructions
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7HM6IZ3L.js";
|
|
13
13
|
import {
|
|
14
14
|
generateStructured,
|
|
15
15
|
structuredCallReservation
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-OD36HUXA.js";
|
|
17
17
|
import {
|
|
18
18
|
narrativeContextFactIds
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-LR27H2HZ.js";
|
|
20
20
|
import {
|
|
21
21
|
buildFactCatalog,
|
|
22
22
|
projectWriterFactCatalog
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-66T7JC57.js";
|
|
24
24
|
import {
|
|
25
25
|
contentHash
|
|
26
26
|
} from "./chunk-H2KDLDK6.js";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
writeArchive
|
|
3
|
+
} from "./chunk-PYLJISDZ.js";
|
|
1
4
|
import {
|
|
2
5
|
redactBundle
|
|
3
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RPTADJXD.js";
|
|
4
7
|
import {
|
|
5
8
|
acquireWriterLock
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import {
|
|
8
|
-
writeArchive
|
|
9
|
-
} from "./chunk-PYLJISDZ.js";
|
|
9
|
+
} from "./chunk-6GOBBNDU.js";
|
|
10
10
|
import {
|
|
11
11
|
projectWorkdir
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-DDS4G4DO.js";
|
|
13
13
|
import {
|
|
14
14
|
runJournalDir
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-PXB4PWJI.js";
|
|
16
16
|
import {
|
|
17
17
|
openJournal,
|
|
18
18
|
readJournal
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-JXBLGCXZ.js";
|
|
20
20
|
import {
|
|
21
21
|
mintRunId
|
|
22
22
|
} from "./chunk-W46Y7KBR.js";
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
toolId,
|
|
34
34
|
toolVersion,
|
|
35
35
|
traceSchemaVersion
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-T5XQ6NXD.js";
|
|
37
37
|
import {
|
|
38
38
|
encodeBundleJson,
|
|
39
39
|
parseBundleJson,
|