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
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { type WriterLockState } from '../bundle/writer-lock';
|
|
2
|
+
export declare const SpendCategory: {
|
|
3
|
+
readonly PROBES: "probes";
|
|
4
|
+
readonly STAGES: "stages";
|
|
5
|
+
readonly HOST_CALLS: "hostCalls";
|
|
6
|
+
readonly SEARCH: "search";
|
|
7
|
+
};
|
|
8
|
+
export type SpendCategory = (typeof SpendCategory)[keyof typeof SpendCategory];
|
|
9
|
+
/** spendCategoryOf names the kind of paid work a ledger role charges:
|
|
10
|
+
* `stage:` Codex sessions, `probe:` assistant answers, `search:` and
|
|
11
|
+
* grounding's research searches, everything else the host's model calls. */
|
|
12
|
+
export declare const spendCategoryOf: (role: string) => SpendCategory;
|
|
13
|
+
export type CategorySpend = {
|
|
14
|
+
usd: number;
|
|
15
|
+
calls: number;
|
|
16
|
+
};
|
|
17
|
+
export type RunSpend = {
|
|
18
|
+
currency: 'USD';
|
|
19
|
+
/** The run's frozen cap; undefined before the first run froze one. */
|
|
20
|
+
capUsd: number | undefined;
|
|
21
|
+
/** The model the run froze with its cap. */
|
|
22
|
+
model: string | undefined;
|
|
23
|
+
deadlineAt: string | undefined;
|
|
24
|
+
/** What every call charges: settled cost, else its reservation. */
|
|
25
|
+
chargedUsd: number;
|
|
26
|
+
/** Settled calls: at their reported cost, or at their reservation when
|
|
27
|
+
* the provider reported none. */
|
|
28
|
+
settledUsd: number;
|
|
29
|
+
/** Calls reserved and not settled: dispatched, or lost with a process. */
|
|
30
|
+
openUsd: number;
|
|
31
|
+
remainingUsd: number | undefined;
|
|
32
|
+
byCategory: Record<SpendCategory, CategorySpend>;
|
|
33
|
+
};
|
|
34
|
+
export type RunActivity = {
|
|
35
|
+
kind: string;
|
|
36
|
+
/** The Codex stage, for a session. */
|
|
37
|
+
stage: string | undefined;
|
|
38
|
+
/** The model role or surface, for a host call or probe. */
|
|
39
|
+
role: string | undefined;
|
|
40
|
+
at: string;
|
|
41
|
+
/** Started and not yet finished. */
|
|
42
|
+
open: boolean;
|
|
43
|
+
};
|
|
44
|
+
export type RunStatus = {
|
|
45
|
+
dir: string;
|
|
46
|
+
state: 'new' | 'resumable' | 'completed';
|
|
47
|
+
writer: {
|
|
48
|
+
purpose: string;
|
|
49
|
+
pid: number;
|
|
50
|
+
host: string;
|
|
51
|
+
since: string;
|
|
52
|
+
state: WriterLockState;
|
|
53
|
+
} | undefined;
|
|
54
|
+
/** The run's phase as its journal shows it last. */
|
|
55
|
+
phase: string | undefined;
|
|
56
|
+
lastActivity: RunActivity | undefined;
|
|
57
|
+
/** The Codex stage outputs present in OUT/. */
|
|
58
|
+
completedStages: string[];
|
|
59
|
+
answers: {
|
|
60
|
+
planned: number | undefined;
|
|
61
|
+
captured: number;
|
|
62
|
+
failed: number;
|
|
63
|
+
};
|
|
64
|
+
spend: RunSpend;
|
|
65
|
+
lastError: {
|
|
66
|
+
type: string;
|
|
67
|
+
error: string;
|
|
68
|
+
reason: string;
|
|
69
|
+
at: string;
|
|
70
|
+
} | undefined;
|
|
71
|
+
stoppedAtBudget: boolean;
|
|
72
|
+
};
|
|
73
|
+
/** readRunStatus reads a run directory's state; undefined when it holds no
|
|
74
|
+
* run (no journal, no bank, no prepared inputs). */
|
|
75
|
+
export declare const readRunStatus: (dir: string) => Promise<RunStatus | undefined>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const exampleAuditFile: {
|
|
2
2
|
version: 1;
|
|
3
|
+
model: string;
|
|
3
4
|
brand: {
|
|
4
5
|
name: string;
|
|
5
6
|
domain: string;
|
|
@@ -29,8 +30,6 @@ export declare const exampleAuditFile: {
|
|
|
29
30
|
runPolicy: {
|
|
30
31
|
maxPlannedUnits: number;
|
|
31
32
|
budget: {
|
|
32
|
-
maxUsd: number;
|
|
33
|
-
maxTokens: number;
|
|
34
33
|
maxHours: number;
|
|
35
34
|
};
|
|
36
35
|
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { LookupAddress } from 'node:dns';
|
|
2
|
+
import { type Socket } from 'node:net';
|
|
3
|
+
import type { BrowserContext, Page } from 'playwright';
|
|
4
|
+
import { type LookupAll } from './guarded-request';
|
|
5
|
+
export type ConnectionCounts = {
|
|
6
|
+
allowed: number;
|
|
7
|
+
refused: number;
|
|
8
|
+
};
|
|
9
|
+
export type GuardingProxyOptions = {
|
|
10
|
+
/** Test seam: the DNS answers for a host. */
|
|
11
|
+
lookupHost?: LookupAll;
|
|
12
|
+
/** Test seam: where an allowed connection is dialled. */
|
|
13
|
+
dial?: (address: LookupAddress) => Socket;
|
|
14
|
+
};
|
|
15
|
+
export type GuardingProxy = {
|
|
16
|
+
server: string;
|
|
17
|
+
counts: () => ConnectionCounts;
|
|
18
|
+
close: () => Promise<void>;
|
|
19
|
+
};
|
|
20
|
+
/** startGuardingProxy listens on a free loopback port until closed. */
|
|
21
|
+
export declare const startGuardingProxy: (options?: GuardingProxyOptions) => Promise<GuardingProxy>;
|
|
22
|
+
/**
|
|
23
|
+
* withBoundedPage runs `use` on a new page of the context, then closes it.
|
|
24
|
+
* A page that freezes its main thread never answers evaluate() or content(),
|
|
25
|
+
* and no Playwright timeout covers those calls; closing the page makes them
|
|
26
|
+
* fail. So past the deadline the page is closed and the render refused,
|
|
27
|
+
* instead of holding the run, and the host's turn in the pacer, forever.
|
|
28
|
+
*/
|
|
29
|
+
export declare const withBoundedPage: <T>(context: Pick<BrowserContext, "newPage">, deadlineInMs: number, use: (page: Page) => Promise<T>) => Promise<T>;
|
|
30
|
+
/**
|
|
31
|
+
* withGuardedChromium runs `use` in a fresh browser context whose every
|
|
32
|
+
* connection passes the guarding proxy, then closes both. Downloads are
|
|
33
|
+
* refused, service workers blocked and media never loaded.
|
|
34
|
+
*/
|
|
35
|
+
export declare const withGuardedChromium: <T>(use: (context: BrowserContext) => Promise<T>, options?: {
|
|
36
|
+
userAgent?: string;
|
|
37
|
+
proxy?: GuardingProxyOptions;
|
|
38
|
+
}) => Promise<{
|
|
39
|
+
result: T;
|
|
40
|
+
connections: ConnectionCounts;
|
|
41
|
+
}>;
|
|
@@ -5,16 +5,6 @@ export declare const sourceLimits: {
|
|
|
5
5
|
readonly retainedBytes: 16384;
|
|
6
6
|
readonly redirects: 3;
|
|
7
7
|
};
|
|
8
|
-
export type SourceRetrievalReason = 'unsafe_destination' | 'timeout' | 'too_large' | 'unsupported_content' | 'http_error' | 'empty_content' | 'network_error';
|
|
9
|
-
export declare class SourceRetrievalError extends Error {
|
|
10
|
-
readonly reason: SourceRetrievalReason;
|
|
11
|
-
readonly status: number | undefined;
|
|
12
|
-
constructor(reason: SourceRetrievalReason, message: string, { status, cause }?: {
|
|
13
|
-
status?: number;
|
|
14
|
-
cause?: unknown;
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
export declare const validateResearchUrl: (value: string) => URL;
|
|
18
8
|
/**
|
|
19
9
|
* canonicalResearchUrl returns a URL as research receipts compare it: no
|
|
20
10
|
* hash, lowercase host, no trailing slash on a path. The author's journal, its
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { LookupAddress } from 'node:dns';
|
|
2
|
+
export type SourceRetrievalReason = 'unsafe_destination' | 'timeout' | 'too_large' | 'unsupported_content' | 'http_error' | 'empty_content' | 'network_error';
|
|
3
|
+
export declare class SourceRetrievalError extends Error {
|
|
4
|
+
readonly reason: SourceRetrievalReason;
|
|
5
|
+
readonly status: number | undefined;
|
|
6
|
+
constructor(reason: SourceRetrievalReason, message: string, { status, cause }?: {
|
|
7
|
+
status?: number;
|
|
8
|
+
cause?: unknown;
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
export declare const validateResearchUrl: (value: string) => URL;
|
|
12
|
+
export type LookupAll = (host: string) => Promise<LookupAddress[]>;
|
|
13
|
+
/**
|
|
14
|
+
* resolvePublicAddress returns the address a connection to the host is
|
|
15
|
+
* pinned to. Every DNS answer must be public, not only the first: a host
|
|
16
|
+
* that also answers with a private address could hand it to the next
|
|
17
|
+
* lookup, so the socket never looks the name up again.
|
|
18
|
+
*/
|
|
19
|
+
export declare const resolvePublicAddress: (hostname: string, signal: AbortSignal, lookupHost?: LookupAll) => Promise<LookupAddress>;
|
|
20
|
+
/**
|
|
21
|
+
* HostPacer runs one request at a time per host, each starting a fixed
|
|
22
|
+
* interval after the previous one ended. One pacer serves every request of
|
|
23
|
+
* a phase, so checks that run side by side still reach a site one by one.
|
|
24
|
+
*/
|
|
25
|
+
export type HostPacer = <T>(url: URL, send: () => Promise<T>) => Promise<T>;
|
|
26
|
+
export declare const createHostPacer: (intervalInMs: number, wait?: (ms: number) => Promise<unknown>) => HostPacer;
|
|
27
|
+
/** How a successful response's body is read. */
|
|
28
|
+
export type BodyPolicy = {
|
|
29
|
+
/** Content types the body may have; any other is refused unread. */
|
|
30
|
+
contentTypes: RegExp | 'any';
|
|
31
|
+
maxBytes: number;
|
|
32
|
+
/** Past maxBytes: keep the prefix and say so, or refuse the response. */
|
|
33
|
+
oversize: 'truncate' | 'refuse';
|
|
34
|
+
};
|
|
35
|
+
export type GuardedRequestOptions = {
|
|
36
|
+
url: string;
|
|
37
|
+
/** Bounds each hop from when it is sent; a wait for the host's turn in
|
|
38
|
+
* the pacer is not counted, or a request queued behind a slow render
|
|
39
|
+
* would time out without ever being sent. */
|
|
40
|
+
timeoutInMs: number;
|
|
41
|
+
signal?: AbortSignal;
|
|
42
|
+
userAgent: string;
|
|
43
|
+
accept: string;
|
|
44
|
+
/** Redirects followed before the request is refused. */
|
|
45
|
+
redirects: number;
|
|
46
|
+
/** Absent: only the status and headers are read, never the body. */
|
|
47
|
+
body?: BodyPolicy;
|
|
48
|
+
/** Wraps every hop's request: the caller's spacing per host. */
|
|
49
|
+
pace?: HostPacer;
|
|
50
|
+
};
|
|
51
|
+
export type GuardedHop = {
|
|
52
|
+
url: string;
|
|
53
|
+
status: number;
|
|
54
|
+
};
|
|
55
|
+
export type GuardedResponse = {
|
|
56
|
+
/** The URL of the final hop. */
|
|
57
|
+
url: string;
|
|
58
|
+
status: number;
|
|
59
|
+
contentType: string;
|
|
60
|
+
/** Read only for a 2xx under a body policy. */
|
|
61
|
+
body: Buffer | undefined;
|
|
62
|
+
isTruncated: boolean;
|
|
63
|
+
/** Every response received, the final one last. */
|
|
64
|
+
hops: GuardedHop[];
|
|
65
|
+
};
|
|
66
|
+
/** A failure as a site check records it: a refused destination or redirect
|
|
67
|
+
* names its reason (`unsafe_destination: …`). */
|
|
68
|
+
export declare const describeSiteError: (error: unknown) => string;
|
|
69
|
+
/** A request bound to a phase's pacer: what the site checks receive. */
|
|
70
|
+
export type SiteRequest = (options: Omit<GuardedRequestOptions, 'pace'>) => Promise<GuardedResponse>;
|
|
71
|
+
/**
|
|
72
|
+
* guardedRequest sends a GET under the guard and returns any status: the
|
|
73
|
+
* caller decides what a 403 or a 5xx means. A redirect it cannot follow
|
|
74
|
+
* (no Location, or past the limit) and an unsafe hop are refused.
|
|
75
|
+
*/
|
|
76
|
+
export declare const guardedRequest: (options: GuardedRequestOptions) => Promise<GuardedResponse>;
|
|
@@ -244,6 +244,7 @@ export declare const technicalChecksArtifactSchema: z.ZodObject<{
|
|
|
244
244
|
robotsUrl: z.ZodString;
|
|
245
245
|
fetchedAt: z.ZodString;
|
|
246
246
|
robotsFetchError: z.ZodNullable<z.ZodString>;
|
|
247
|
+
robotsTruncated: z.ZodOptional<z.ZodBoolean>;
|
|
247
248
|
bots: z.ZodArray<z.ZodObject<{
|
|
248
249
|
bot: z.ZodString;
|
|
249
250
|
kind: z.ZodEnum<{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AeoPrompt, AeoSurface,
|
|
1
|
+
import type { AeoPrompt, AeoSurface, ProbeDepth } from '../schema';
|
|
2
2
|
import type { CheckpointMatch, ProbeUnit } from '../stores/ports';
|
|
3
3
|
export type { CapturedUnitRecord, CheckpointMatch, CheckpointProbe, FailedUnitRecord, ProbeUnit, UnitRecord, } from '../stores/ports';
|
|
4
4
|
/** Key without the prompt text: section | surface | prompt id | run index. */
|
|
@@ -17,15 +17,14 @@ export declare const promptTextHash: (promptText: string) => string;
|
|
|
17
17
|
export declare const unitRecordKey: (unit: ProbeUnit) => string;
|
|
18
18
|
/**
|
|
19
19
|
* The probe units a run plans for one section: chat surfaces cover every
|
|
20
|
-
* prompt
|
|
21
|
-
*
|
|
22
|
-
* set is both the resume scope and the scoring denominator.
|
|
20
|
+
* prompt, agent surfaces the config's agentProbes subset, each at the depth
|
|
21
|
+
* runsPerPromptOn gives it. Mirrors the pipeline's fan-out exactly — the
|
|
22
|
+
* planned set is both the resume scope and the scoring denominator.
|
|
23
23
|
*/
|
|
24
|
-
export declare const plannedProbeUnitsForSection: (args: {
|
|
24
|
+
export declare const plannedProbeUnitsForSection: (args: ProbeDepth & {
|
|
25
25
|
sectionKey: string;
|
|
26
26
|
prompts: AeoPrompt[];
|
|
27
27
|
surfaces: readonly AeoSurface[];
|
|
28
|
-
agentProbes: AgentProbeConfig;
|
|
29
28
|
}) => ProbeUnit[];
|
|
30
29
|
export declare const entryMatches: (entry: {
|
|
31
30
|
sectionKey: string;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import type { AeoSurface } from '../surfaces';
|
|
2
|
+
import type { TokenUsage } from './pricing';
|
|
3
|
+
export declare const costCoefficientsVersion = 1;
|
|
4
|
+
export type TokenRange = {
|
|
5
|
+
input: number;
|
|
6
|
+
output: number;
|
|
7
|
+
};
|
|
8
|
+
export type Range<T> = {
|
|
9
|
+
low: T;
|
|
10
|
+
high: T;
|
|
11
|
+
};
|
|
12
|
+
/** Codex stage tokens. `perAnswer` covers every stage that reads answer
|
|
13
|
+
* files; `perRun` the write stage, which reads the whole report. */
|
|
14
|
+
export declare const stageTokens: {
|
|
15
|
+
readonly perAnswer: {
|
|
16
|
+
readonly low: {
|
|
17
|
+
readonly input: 30000;
|
|
18
|
+
readonly output: 4000;
|
|
19
|
+
};
|
|
20
|
+
readonly high: {
|
|
21
|
+
readonly input: 90000;
|
|
22
|
+
readonly output: 16000;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
readonly perRun: {
|
|
26
|
+
readonly low: {
|
|
27
|
+
readonly input: 250000;
|
|
28
|
+
readonly output: 10000;
|
|
29
|
+
};
|
|
30
|
+
readonly high: {
|
|
31
|
+
readonly input: 900000;
|
|
32
|
+
readonly output: 40000;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
/** The share of stage input served from cache: high is cheap. The
|
|
36
|
+
* supported models reported none through the gateway in the spike. */
|
|
37
|
+
readonly cachedShare: {
|
|
38
|
+
readonly low: 0;
|
|
39
|
+
readonly high: 0.8;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
/** The one author session. */
|
|
43
|
+
export declare const authorTokens: {
|
|
44
|
+
readonly session: {
|
|
45
|
+
readonly low: {
|
|
46
|
+
readonly input: 250000;
|
|
47
|
+
readonly output: 10000;
|
|
48
|
+
};
|
|
49
|
+
readonly high: {
|
|
50
|
+
readonly input: 800000;
|
|
51
|
+
readonly output: 45000;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
/** The author's research searches at the low end; the high end is the
|
|
56
|
+
* research tools' own spend cap (`authorToolCaps.searchSpendUsd`). */
|
|
57
|
+
export declare const authorSearchLowUsd = 0.05;
|
|
58
|
+
/** The host's own model calls per captured answer, by grounding:
|
|
59
|
+
* perception, source labels and the copy verifier always; claim research
|
|
60
|
+
* and adjudication under full grounding. */
|
|
61
|
+
export declare const hostTokensPerAnswer: {
|
|
62
|
+
readonly extraction_only: {
|
|
63
|
+
readonly low: {
|
|
64
|
+
readonly input: 1500;
|
|
65
|
+
readonly output: 3000;
|
|
66
|
+
};
|
|
67
|
+
readonly high: {
|
|
68
|
+
readonly input: 8000;
|
|
69
|
+
readonly output: 12000;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
readonly full: {
|
|
73
|
+
readonly low: {
|
|
74
|
+
readonly input: 6000;
|
|
75
|
+
readonly output: 6000;
|
|
76
|
+
};
|
|
77
|
+
readonly high: {
|
|
78
|
+
readonly input: 24000;
|
|
79
|
+
readonly output: 18000;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
/** Grounding search per captured answer under full grounding. */
|
|
84
|
+
export declare const searchUsdPerAnswer: {
|
|
85
|
+
readonly low: 0.001;
|
|
86
|
+
readonly high: 0.01;
|
|
87
|
+
};
|
|
88
|
+
/** One probe unit, by surface, in USD. The coding-agent surfaces run on
|
|
89
|
+
* the operator's own login and bill nothing to the run. */
|
|
90
|
+
export declare const probeUsd: Record<AeoSurface, Range<number>>;
|
|
91
|
+
/** The calibrated workload a Codex session is: a batch of answer files
|
|
92
|
+
* (analyze, qualify, review), the whole report (write) or a brief
|
|
93
|
+
* (author). Each stage's descriptor names its own. */
|
|
94
|
+
export type SessionCost = 'answers' | 'report' | 'brief';
|
|
95
|
+
/**
|
|
96
|
+
* sessionReservation is what one Codex session is reserved at before it
|
|
97
|
+
* starts: the same high figures, cache share included, that the estimate's
|
|
98
|
+
* high end assumes, so a run under the cap the estimate recommends is never
|
|
99
|
+
* refused for its reservations. The session settles at the tokens it
|
|
100
|
+
* reports; its reservation bounds how far one session can carry the run
|
|
101
|
+
* past its cap.
|
|
102
|
+
*/
|
|
103
|
+
export declare const sessionReservation: ({ cost, answers, }: {
|
|
104
|
+
cost: SessionCost;
|
|
105
|
+
answers: number;
|
|
106
|
+
}) => TokenUsage;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type CodexStageModel, type InternalModelProfile } from './profiles';
|
|
2
|
+
import type { SupportedModel } from './supported-models';
|
|
3
|
+
/** The Codex stages' settings for a supported model. */
|
|
4
|
+
export declare const localStageModel: (model: SupportedModel) => CodexStageModel;
|
|
5
|
+
type LocalModelProfileOptions = {
|
|
6
|
+
/** Full grounding researches through the pinned search provider; it is
|
|
7
|
+
* pinned by the audit, never inferred from which credentials are set. */
|
|
8
|
+
searchProvider: InternalModelProfile['searchProvider'];
|
|
9
|
+
};
|
|
10
|
+
/** localModelProfile builds the profile a local run pins for `model`. */
|
|
11
|
+
export declare const localModelProfile: (model: SupportedModel, { searchProvider }: LocalModelProfileOptions) => InternalModelProfile;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ModelPricing } from './profiles';
|
|
2
|
+
export type TokenUsage = {
|
|
3
|
+
inputTokens: number;
|
|
4
|
+
/** Part of inputTokens, served from the provider's cache. */
|
|
5
|
+
cachedInputTokens: number;
|
|
6
|
+
outputTokens: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const tokenCostUsd: (pricing: ModelPricing, usage: TokenUsage) => number;
|