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
package/src/engine/local-run.ts
CHANGED
|
@@ -28,7 +28,12 @@ import {
|
|
|
28
28
|
} from '../probes/agent-clis';
|
|
29
29
|
import { createFileResearchSessionStore } from '../grounding/file-store';
|
|
30
30
|
import { openGroundingRuntime } from '../grounding/grounding-runtime';
|
|
31
|
-
import {
|
|
31
|
+
import {
|
|
32
|
+
createFileModelAccounting,
|
|
33
|
+
type ModelCallAccounting,
|
|
34
|
+
} from '../models/accounting';
|
|
35
|
+
import { resolveSupportedModel } from '../models/supported-models';
|
|
36
|
+
import { chargedProbeTrace } from '../probes/charged-trace';
|
|
32
37
|
import type { InternalModelContext } from '../models/context';
|
|
33
38
|
import { ProbeLimiter } from '../probes/limits';
|
|
34
39
|
import { planRun, type RunPlan } from '../runner';
|
|
@@ -134,6 +139,9 @@ export type LocalRun = {
|
|
|
134
139
|
/** The run's pinned model context: every host call charges its ledger
|
|
135
140
|
* and is recorded in the run journal. */
|
|
136
141
|
internalModels: InternalModelContext;
|
|
142
|
+
/** The same ledger unwrapped, for the Codex sessions, which the journal
|
|
143
|
+
* records as operations of their own. */
|
|
144
|
+
ledger: ModelCallAccounting;
|
|
137
145
|
ground: GroundRun;
|
|
138
146
|
/** The directory's writer lock and its run journal, held from before the
|
|
139
147
|
* first canary: the workflow continues under both (prepareWorkdir held). */
|
|
@@ -154,6 +162,8 @@ export const openLocalRun = async (
|
|
|
154
162
|
dir: string,
|
|
155
163
|
options: {
|
|
156
164
|
signal?: AbortSignal;
|
|
165
|
+
/** The cap approved on the command line (`run --max-usd`). */
|
|
166
|
+
maxUsd?: number;
|
|
157
167
|
amendment?: BudgetAmendment;
|
|
158
168
|
derivedFromRunId?: string;
|
|
159
169
|
} = {},
|
|
@@ -203,12 +213,14 @@ const openLockedLocalRun = async (
|
|
|
203
213
|
dir: string,
|
|
204
214
|
{
|
|
205
215
|
signal,
|
|
216
|
+
maxUsd,
|
|
206
217
|
amendment,
|
|
207
218
|
derivedFromRunId,
|
|
208
219
|
runId,
|
|
209
220
|
held,
|
|
210
221
|
}: {
|
|
211
222
|
signal?: AbortSignal;
|
|
223
|
+
maxUsd?: number;
|
|
212
224
|
amendment?: BudgetAmendment;
|
|
213
225
|
derivedFromRunId?: string;
|
|
214
226
|
runId: string;
|
|
@@ -217,7 +229,9 @@ const openLockedLocalRun = async (
|
|
|
217
229
|
): Promise<LocalRun> => {
|
|
218
230
|
const { recorder } = held;
|
|
219
231
|
const budget = await resolveRunBudget(dir, file.runPolicy.budget, {
|
|
220
|
-
|
|
232
|
+
model: resolveSupportedModel(file.model).id,
|
|
233
|
+
...(maxUsd !== undefined && { maxUsd }),
|
|
234
|
+
...(amendment && { amendment }),
|
|
221
235
|
});
|
|
222
236
|
const config = toAuditConfig(file);
|
|
223
237
|
const request = {
|
|
@@ -237,17 +251,20 @@ const openLockedLocalRun = async (
|
|
|
237
251
|
|
|
238
252
|
return Promise.resolve();
|
|
239
253
|
};
|
|
254
|
+
// One ledger for every paid call of the run: probes, Codex sessions,
|
|
255
|
+
// host model calls and searches (specs/aeo-claude-operator-spec.md §4.2).
|
|
256
|
+
const ledger = createFileModelAccounting({
|
|
257
|
+
filename: path.join(bank, 'model-budget.json'),
|
|
258
|
+
limits: budget.limits,
|
|
259
|
+
assertOwned,
|
|
260
|
+
});
|
|
240
261
|
const grounding = openGroundingRuntime({
|
|
241
262
|
request,
|
|
242
263
|
config,
|
|
243
264
|
analysisStore: stores.analysisStore,
|
|
244
265
|
env: getEnvironment(),
|
|
245
266
|
signal,
|
|
246
|
-
rawAccounting:
|
|
247
|
-
filename: path.join(bank, 'model-budget.json'),
|
|
248
|
-
limits: budget.limits,
|
|
249
|
-
assertOwned,
|
|
250
|
-
}),
|
|
267
|
+
rawAccounting: ledger,
|
|
251
268
|
store: createFileResearchSessionStore(
|
|
252
269
|
path.join(bank, 'research'),
|
|
253
270
|
assertOwned,
|
|
@@ -280,6 +297,7 @@ const openLockedLocalRun = async (
|
|
|
280
297
|
);
|
|
281
298
|
}
|
|
282
299
|
|
|
300
|
+
const probes = chargedProbeTrace(probeTraceOf(recorder, 'probe'), ledger);
|
|
283
301
|
const capture = await captureForRun({
|
|
284
302
|
config,
|
|
285
303
|
request,
|
|
@@ -288,10 +306,21 @@ const openLockedLocalRun = async (
|
|
|
288
306
|
agentCliVersions,
|
|
289
307
|
limiter: new ProbeLimiter(request.limits),
|
|
290
308
|
internalModels,
|
|
291
|
-
trace:
|
|
309
|
+
trace: probes.trace,
|
|
292
310
|
signal,
|
|
293
311
|
logContext: { reportKey: config.reportKey, runId, local: true },
|
|
312
|
+
}).catch((err: unknown) => {
|
|
313
|
+
// A unit the cap refused fails as unrecorded, and the capture may
|
|
314
|
+
// report only the shortfall: the cap is the reason, and the run stops
|
|
315
|
+
// resumable with everything captured so far banked.
|
|
316
|
+
throw probes.exhausted() ?? err;
|
|
294
317
|
});
|
|
318
|
+
const exhausted = probes.exhausted();
|
|
319
|
+
|
|
320
|
+
if (exhausted) {
|
|
321
|
+
throw exhausted;
|
|
322
|
+
}
|
|
323
|
+
|
|
295
324
|
const captured = (await stores.probeStore.list()).filter(
|
|
296
325
|
(entry): entry is CapturedUnitRecord => entry.status === 'captured',
|
|
297
326
|
);
|
|
@@ -315,6 +344,7 @@ const openLockedLocalRun = async (
|
|
|
315
344
|
source,
|
|
316
345
|
budget,
|
|
317
346
|
internalModels,
|
|
347
|
+
ledger,
|
|
318
348
|
ground: (manifest, options) => grounding.ground(manifest, options),
|
|
319
349
|
held,
|
|
320
350
|
};
|
package/src/engine/preflight.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { mkdir, rm, writeFile } from 'node:fs/promises';
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
2
3
|
import path from 'node:path';
|
|
3
4
|
import {
|
|
4
5
|
agentAuthEnv,
|
|
@@ -7,10 +8,20 @@ import {
|
|
|
7
8
|
versionForSurface,
|
|
8
9
|
} from '../probes/agent-clis';
|
|
9
10
|
import {
|
|
11
|
+
agentSurfaces,
|
|
10
12
|
isAgentSurface,
|
|
11
13
|
type AeoAgentSurface,
|
|
12
14
|
type AeoSurface,
|
|
13
15
|
} from '../schema';
|
|
16
|
+
import {
|
|
17
|
+
codexBinaryVersion,
|
|
18
|
+
resolveCodexBinary,
|
|
19
|
+
} from '../codex-workflow/codex-binary';
|
|
20
|
+
import {
|
|
21
|
+
describeSupportedModels,
|
|
22
|
+
findSupportedModel,
|
|
23
|
+
recommendedModelId,
|
|
24
|
+
} from '../models/supported-models';
|
|
14
25
|
import type { Settings } from './env-file';
|
|
15
26
|
|
|
16
27
|
// ============================================================================
|
|
@@ -99,13 +110,116 @@ const directoryCheck = async (dir: string): Promise<PreflightCheck> => {
|
|
|
99
110
|
}
|
|
100
111
|
};
|
|
101
112
|
|
|
113
|
+
/** The command that installs the Chromium this package's Playwright drives;
|
|
114
|
+
* an unversioned `npx playwright` may fetch another release's browser. */
|
|
115
|
+
const chromiumInstallCommand = (): string => {
|
|
116
|
+
const manifest: unknown = createRequire(import.meta.url)(
|
|
117
|
+
'playwright/package.json',
|
|
118
|
+
);
|
|
119
|
+
const version =
|
|
120
|
+
typeof manifest === 'object' &&
|
|
121
|
+
manifest !== null &&
|
|
122
|
+
'version' in manifest &&
|
|
123
|
+
typeof manifest.version === 'string'
|
|
124
|
+
? `@${manifest.version}`
|
|
125
|
+
: '';
|
|
126
|
+
|
|
127
|
+
return `npx playwright${version} install chromium`;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
/** The renderability check renders every money page in Chromium: a
|
|
131
|
+
* missing browser stops the run here, not after the probes were paid for. */
|
|
132
|
+
const chromiumCheck = async (): Promise<PreflightCheck> => {
|
|
133
|
+
try {
|
|
134
|
+
const { chromium } = await import('playwright');
|
|
135
|
+
const browser = await chromium.launch();
|
|
136
|
+
const version = browser.version();
|
|
137
|
+
|
|
138
|
+
await browser.close();
|
|
139
|
+
|
|
140
|
+
return {
|
|
141
|
+
name: 'chromium (money pages)',
|
|
142
|
+
ok: true,
|
|
143
|
+
detail: `Chromium ${version} launches`,
|
|
144
|
+
};
|
|
145
|
+
} catch (err) {
|
|
146
|
+
const message = err instanceof Error ? err.message.split('\n')[0] : '';
|
|
147
|
+
|
|
148
|
+
return {
|
|
149
|
+
name: 'chromium (money pages)',
|
|
150
|
+
ok: false,
|
|
151
|
+
detail: `does not launch (${message}); run \`${chromiumInstallCommand()}\`, or remove moneyPages from audit.json`,
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
/** The model audit.json names, or the recommended one: refused when it is
|
|
157
|
+
* not on the supported list, which the detail then prints. */
|
|
158
|
+
export const modelCheck = (model: string | undefined): PreflightCheck => {
|
|
159
|
+
const id = model ?? recommendedModelId;
|
|
160
|
+
const supported = findSupportedModel(id);
|
|
161
|
+
|
|
162
|
+
if (!supported) {
|
|
163
|
+
return {
|
|
164
|
+
name: 'model',
|
|
165
|
+
ok: false,
|
|
166
|
+
detail: [
|
|
167
|
+
`${id} is not supported; use one of:`,
|
|
168
|
+
...describeSupportedModels(),
|
|
169
|
+
].join('\n '),
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
return {
|
|
174
|
+
name: 'model',
|
|
175
|
+
ok: true,
|
|
176
|
+
detail: [
|
|
177
|
+
`${supported.id}${model === undefined ? ' (recommended; audit.json names none)' : ''}`,
|
|
178
|
+
supported.stageRuntimeVerifiedAt === null
|
|
179
|
+
? 'not yet verified on the Codex stage runtime through the gateway'
|
|
180
|
+
: `verified on the Codex stage runtime ${supported.stageRuntimeVerifiedAt}`,
|
|
181
|
+
].join('; '),
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
/** The Codex the stages run: this package's own, unless overridden. */
|
|
186
|
+
const codexCheck = async (): Promise<PreflightCheck> => {
|
|
187
|
+
try {
|
|
188
|
+
const binary = resolveCodexBinary();
|
|
189
|
+
const version = await codexBinaryVersion(binary);
|
|
190
|
+
const origin =
|
|
191
|
+
binary.source === 'dependency'
|
|
192
|
+
? "the package's own pinned dependency"
|
|
193
|
+
: `AEO_CODEX_BIN=${binary.path}`;
|
|
194
|
+
|
|
195
|
+
return {
|
|
196
|
+
name: 'codex (stage runtime)',
|
|
197
|
+
ok: version !== null,
|
|
198
|
+
detail:
|
|
199
|
+
version === null
|
|
200
|
+
? `${binary.path} did not start; reinstall literally-aeo`
|
|
201
|
+
: `${version}, from ${origin}`,
|
|
202
|
+
};
|
|
203
|
+
} catch (err) {
|
|
204
|
+
return {
|
|
205
|
+
name: 'codex (stage runtime)',
|
|
206
|
+
ok: false,
|
|
207
|
+
detail: `not installed with the package (${err instanceof Error ? err.message : String(err)}); reinstall literally-aeo`,
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
|
|
102
212
|
/** runPreflight checks what a run over these surfaces needs locally. */
|
|
103
213
|
export const runPreflight = async (args: {
|
|
104
214
|
surfaces: readonly AeoSurface[];
|
|
105
215
|
settings: Settings;
|
|
106
216
|
dir: string;
|
|
217
|
+
/** audit.json's `model`; absent means the recommended model. */
|
|
218
|
+
model?: string;
|
|
107
219
|
/** Full grounding researches through the pinned search provider. */
|
|
108
220
|
groundingSearch?: boolean;
|
|
221
|
+
/** Money pages are rendered in Chromium by the renderability check. */
|
|
222
|
+
rendersPages?: boolean;
|
|
109
223
|
}): Promise<PreflightCheck[]> => {
|
|
110
224
|
const { surfaces, settings } = args;
|
|
111
225
|
const nodeMajor = Number(process.versions.node.split('.')[0]);
|
|
@@ -118,13 +232,9 @@ export const runPreflight = async (args: {
|
|
|
118
232
|
ok: nodeMajor >= minimumNodeMajor,
|
|
119
233
|
detail: `${process.version} (${minimumNodeMajor} or newer required)`,
|
|
120
234
|
},
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
ok: versions.codex !== null,
|
|
125
|
-
detail:
|
|
126
|
-
versions.codex ?? 'not found on PATH; the workflow stages need it',
|
|
127
|
-
},
|
|
235
|
+
modelCheck(args.model),
|
|
236
|
+
// Every stage session runs on Codex, whatever is measured.
|
|
237
|
+
await codexCheck(),
|
|
128
238
|
settingCheck(gatewaySetting, settings),
|
|
129
239
|
];
|
|
130
240
|
|
|
@@ -150,6 +260,29 @@ export const runPreflight = async (args: {
|
|
|
150
260
|
});
|
|
151
261
|
}
|
|
152
262
|
|
|
263
|
+
// Which coding-agent CLIs this machine has, for a config that would
|
|
264
|
+
// measure them: what to install or log in to, or what to leave out.
|
|
265
|
+
for (const surface of agentSurfaces) {
|
|
266
|
+
if (agents.includes(surface)) {
|
|
267
|
+
continue;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
const version = versionForSurface(surface, versions);
|
|
271
|
+
|
|
272
|
+
checks.push({
|
|
273
|
+
name: `${surface} CLI`,
|
|
274
|
+
ok: true,
|
|
275
|
+
detail:
|
|
276
|
+
version === null
|
|
277
|
+
? `\`${cliNameForSurface(surface)}\` not installed; needed only when the config measures coding agents`
|
|
278
|
+
: `${cliNameForSurface(surface)} ${version} installed; this config does not measure it`,
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
if (args.rendersPages) {
|
|
283
|
+
checks.push(await chromiumCheck());
|
|
284
|
+
}
|
|
285
|
+
|
|
153
286
|
checks.push(await directoryCheck(args.dir));
|
|
154
287
|
|
|
155
288
|
return checks;
|
package/src/engine/resources.ts
CHANGED
|
@@ -4,10 +4,11 @@ import { enginePackageRoot } from './package-root';
|
|
|
4
4
|
|
|
5
5
|
// ============================================================================
|
|
6
6
|
// The engine's own files (specs/aeo-open-source-cli-spec.md §4.1): the copy
|
|
7
|
-
// and author rules, the banlist
|
|
8
|
-
// install carries them in resources/; a checkout
|
|
9
|
-
// src/. Never the caller's working directory, and
|
|
10
|
-
// private editorial files unless AEO_EDITORIAL_DIR names
|
|
7
|
+
// and author rules, the banlist, the neutral editorial context and the
|
|
8
|
+
// operator guide. A packed install carries them in resources/; a checkout
|
|
9
|
+
// reads them in place under src/. Never the caller's working directory, and
|
|
10
|
+
// never a publisher's private editorial files unless AEO_EDITORIAL_DIR names
|
|
11
|
+
// them.
|
|
11
12
|
// ============================================================================
|
|
12
13
|
|
|
13
14
|
export type EngineResources = {
|
|
@@ -15,6 +16,8 @@ export type EngineResources = {
|
|
|
15
16
|
root: string;
|
|
16
17
|
author: string;
|
|
17
18
|
editorial: string;
|
|
19
|
+
/** The operator guide `literally-aeo guide` prints. */
|
|
20
|
+
guide: string;
|
|
18
21
|
};
|
|
19
22
|
|
|
20
23
|
const exists = async (file: string) => {
|
|
@@ -34,6 +37,7 @@ export const engineResources = async (): Promise<EngineResources> => {
|
|
|
34
37
|
root,
|
|
35
38
|
author: path.join(packed, 'author'),
|
|
36
39
|
editorial: path.join(packed, 'editorial'),
|
|
40
|
+
guide: path.join(packed, 'guide', 'OPERATOR.md'),
|
|
37
41
|
};
|
|
38
42
|
}
|
|
39
43
|
|
|
@@ -41,5 +45,6 @@ export const engineResources = async (): Promise<EngineResources> => {
|
|
|
41
45
|
root,
|
|
42
46
|
author: path.join(root, 'src', 'author'),
|
|
43
47
|
editorial: path.join(root, 'src', 'engine', 'editorial'),
|
|
48
|
+
guide: path.join(root, 'src', 'engine', 'guide', 'OPERATOR.md'),
|
|
44
49
|
};
|
|
45
50
|
};
|
|
@@ -2,6 +2,7 @@ import { readFile } from 'node:fs/promises';
|
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { writeFileAtomically } from '../codex-workflow/pending';
|
|
5
|
+
import { isRecord } from '../lib/type-guards';
|
|
5
6
|
|
|
6
7
|
// ============================================================================
|
|
7
8
|
// What a local run keeps about its own configuration
|
|
@@ -50,18 +51,35 @@ export const readRecordedAuthorEvidence = async (
|
|
|
50
51
|
|
|
51
52
|
/** recordRunConfiguration writes the run's audit.json and author evidence
|
|
52
53
|
* into its directory, replacing what an earlier invocation wrote. */
|
|
54
|
+
/** The operator's configuration with the model the run actually used. */
|
|
55
|
+
const configWithModel = (text: string, model: string): string => {
|
|
56
|
+
const config: unknown = JSON.parse(text);
|
|
57
|
+
|
|
58
|
+
if (!isRecord(config)) {
|
|
59
|
+
throw new Error('The configuration to record is not a JSON object.');
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return `${JSON.stringify({ ...config, model }, null, 2)}\n`;
|
|
63
|
+
};
|
|
64
|
+
|
|
53
65
|
export const recordRunConfiguration = async ({
|
|
54
66
|
dir,
|
|
55
67
|
configFile,
|
|
56
68
|
evidence,
|
|
69
|
+
model,
|
|
57
70
|
}: {
|
|
58
71
|
dir: string;
|
|
59
72
|
configFile: string;
|
|
60
73
|
evidence: RecordedAuthorEvidence;
|
|
74
|
+
/** A model named outside the file (`rejudge --model`): the recorded
|
|
75
|
+
* configuration is the one the run ran with, not the file's. */
|
|
76
|
+
model?: string;
|
|
61
77
|
}): Promise<void> => {
|
|
78
|
+
const text = await readFile(configFile, 'utf8');
|
|
79
|
+
|
|
62
80
|
await writeFileAtomically(
|
|
63
81
|
path.join(dir, auditCopyFile),
|
|
64
|
-
|
|
82
|
+
model === undefined ? text : configWithModel(text, model),
|
|
65
83
|
);
|
|
66
84
|
await writeFileAtomically(
|
|
67
85
|
path.join(dir, authorEvidenceFile),
|