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,159 @@
|
|
|
1
|
+
import {
|
|
2
|
+
writeFileAtomically
|
|
3
|
+
} from "./chunk-MX6Y4RD2.js";
|
|
4
|
+
import {
|
|
5
|
+
hasErrorCode
|
|
6
|
+
} from "./chunk-2QLAFBCG.js";
|
|
7
|
+
|
|
8
|
+
// src/engine/budget.ts
|
|
9
|
+
import { readFile } from "node:fs/promises";
|
|
10
|
+
import path from "node:path";
|
|
11
|
+
import { z } from "zod";
|
|
12
|
+
var budgetFile = "BUDGET.json";
|
|
13
|
+
var maxUsdSchema = z.number().finite().positive();
|
|
14
|
+
var budgetPolicySchema = z.object({
|
|
15
|
+
maxUsd: maxUsdSchema.optional(),
|
|
16
|
+
// A backstop against a runaway loop; the dollar cap is the approval.
|
|
17
|
+
maxTokens: z.number().int().positive().default(1e8),
|
|
18
|
+
maxHours: z.number().finite().positive().max(72).default(12)
|
|
19
|
+
}).strict();
|
|
20
|
+
var frozenPolicySchema = budgetPolicySchema.extend({ maxUsd: maxUsdSchema });
|
|
21
|
+
var budgetAmendmentSchema = frozenPolicySchema.partial().strict();
|
|
22
|
+
var budgetStateSchema = z.object({
|
|
23
|
+
version: z.literal(1),
|
|
24
|
+
original: frozenPolicySchema,
|
|
25
|
+
current: frozenPolicySchema,
|
|
26
|
+
deadlineAt: z.iso.datetime(),
|
|
27
|
+
/** The gateway model the run judges and writes with, frozen with the
|
|
28
|
+
* budget. Absent on a directory from before model selection: the first
|
|
29
|
+
* resume records the model it continues with. */
|
|
30
|
+
model: z.string().min(1).optional(),
|
|
31
|
+
amendments: z.array(
|
|
32
|
+
z.object({
|
|
33
|
+
at: z.iso.datetime(),
|
|
34
|
+
from: frozenPolicySchema,
|
|
35
|
+
to: frozenPolicySchema,
|
|
36
|
+
deadlineFrom: z.iso.datetime(),
|
|
37
|
+
deadlineTo: z.iso.datetime()
|
|
38
|
+
}).strict()
|
|
39
|
+
)
|
|
40
|
+
}).strict();
|
|
41
|
+
var hoursFrom = (now, hours) => {
|
|
42
|
+
return new Date(now.getTime() + hours * 36e5).toISOString();
|
|
43
|
+
};
|
|
44
|
+
var readBudgetAmendment = async (file) => {
|
|
45
|
+
const text = await readFile(file, "utf8").catch((err) => {
|
|
46
|
+
throw new Error(`Please check --budget-file: ${file} cannot be read.`, {
|
|
47
|
+
cause: err
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
return budgetAmendmentSchema.parse(JSON.parse(text));
|
|
51
|
+
};
|
|
52
|
+
var BudgetCapMissingError = class extends Error {
|
|
53
|
+
constructor(message) {
|
|
54
|
+
super(message);
|
|
55
|
+
this.name = "BudgetCapMissingError";
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
var RunModelChangedError = class extends Error {
|
|
59
|
+
constructor(message) {
|
|
60
|
+
super(message);
|
|
61
|
+
this.name = "RunModelChangedError";
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
var readFrozenBudget = async (dir) => {
|
|
65
|
+
const text = await readFile(path.join(dir, budgetFile), "utf8").catch(
|
|
66
|
+
(err) => {
|
|
67
|
+
if (hasErrorCode(err, "ENOENT")) {
|
|
68
|
+
return void 0;
|
|
69
|
+
}
|
|
70
|
+
throw err;
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
return text === void 0 ? void 0 : budgetStateSchema.parse(JSON.parse(text));
|
|
74
|
+
};
|
|
75
|
+
var resolveRunBudget = async (dir, policy, { model, maxUsd, amendment, now = () => /* @__PURE__ */ new Date() }) => {
|
|
76
|
+
const file = path.join(dir, budgetFile);
|
|
77
|
+
const existing = await readFrozenBudget(dir);
|
|
78
|
+
const at = now();
|
|
79
|
+
if (existing?.model !== void 0 && existing.model !== model) {
|
|
80
|
+
throw new RunModelChangedError(
|
|
81
|
+
`This run directory judges with ${existing.model}; audit.json now names ${model}. A run never changes its model. To judge the same answers with ${model}, use: literally-aeo rejudge ${dir} --output <new-dir> --model ${model}`
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
const cap = maxUsd ?? policy.maxUsd;
|
|
85
|
+
const startState = () => {
|
|
86
|
+
if (cap === void 0) {
|
|
87
|
+
throw new BudgetCapMissingError(
|
|
88
|
+
"No spending cap: approve one with --max-usd <amount> or runPolicy.budget.maxUsd in audit.json."
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
const frozen = { ...policy, maxUsd: cap };
|
|
92
|
+
return {
|
|
93
|
+
version: 1,
|
|
94
|
+
original: frozen,
|
|
95
|
+
current: frozen,
|
|
96
|
+
deadlineAt: hoursFrom(at, policy.maxHours),
|
|
97
|
+
model,
|
|
98
|
+
amendments: []
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
let state = existing ?? startState();
|
|
102
|
+
let amended;
|
|
103
|
+
const modelAdopted = state.model === void 0;
|
|
104
|
+
state = { ...state, model };
|
|
105
|
+
const change = {
|
|
106
|
+
...amendment,
|
|
107
|
+
...existing && maxUsd !== void 0 && maxUsd !== existing.current.maxUsd ? { maxUsd } : {}
|
|
108
|
+
};
|
|
109
|
+
if (Object.keys(change).length > 0) {
|
|
110
|
+
const to = { ...state.current, ...change };
|
|
111
|
+
if (to.maxUsd < state.current.maxUsd || to.maxTokens < state.current.maxTokens) {
|
|
112
|
+
throw new Error(
|
|
113
|
+
`A cap can only be raised; this run already allows $${state.current.maxUsd} and ${state.current.maxTokens} tokens.`
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
const deadlineTo = change.maxHours === void 0 ? state.deadlineAt : hoursFrom(at, change.maxHours);
|
|
117
|
+
amended = {
|
|
118
|
+
at: at.toISOString(),
|
|
119
|
+
from: state.current,
|
|
120
|
+
to,
|
|
121
|
+
deadlineFrom: state.deadlineAt,
|
|
122
|
+
deadlineTo
|
|
123
|
+
};
|
|
124
|
+
state = {
|
|
125
|
+
...state,
|
|
126
|
+
current: to,
|
|
127
|
+
deadlineAt: deadlineTo,
|
|
128
|
+
amendments: [...state.amendments, amended]
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
if (!existing || amended || modelAdopted) {
|
|
132
|
+
await writeFileAtomically(file, JSON.stringify(state, null, 2));
|
|
133
|
+
}
|
|
134
|
+
const budget = {
|
|
135
|
+
limits: {
|
|
136
|
+
maxUsd: state.current.maxUsd,
|
|
137
|
+
maxTokens: state.current.maxTokens,
|
|
138
|
+
deadlineAt: state.deadlineAt
|
|
139
|
+
},
|
|
140
|
+
policy: state.current,
|
|
141
|
+
model,
|
|
142
|
+
amended,
|
|
143
|
+
// Only what audit.json itself asks for: a cap approved on the command
|
|
144
|
+
// line is not audit.json's, and a recorded raise is not a difference.
|
|
145
|
+
policyDiffers: policy.maxTokens !== state.original.maxTokens || policy.maxHours !== state.original.maxHours || policy.maxUsd !== void 0 && policy.maxUsd !== state.original.maxUsd
|
|
146
|
+
};
|
|
147
|
+
return budget;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export {
|
|
151
|
+
budgetFile,
|
|
152
|
+
budgetPolicySchema,
|
|
153
|
+
budgetAmendmentSchema,
|
|
154
|
+
readBudgetAmendment,
|
|
155
|
+
BudgetCapMissingError,
|
|
156
|
+
RunModelChangedError,
|
|
157
|
+
readFrozenBudget,
|
|
158
|
+
resolveRunBudget
|
|
159
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import {
|
|
2
|
+
readEnv
|
|
3
|
+
} from "./chunk-PO2J5OQ3.js";
|
|
4
|
+
import {
|
|
5
|
+
isAgentSurface
|
|
6
|
+
} from "./chunk-AASWJR7Q.js";
|
|
7
|
+
|
|
8
|
+
// src/bundle/isolation.ts
|
|
9
|
+
import { z } from "zod";
|
|
10
|
+
var IsolationBoundary = {
|
|
11
|
+
NATIVE: "native",
|
|
12
|
+
CONTAINER: "container"
|
|
13
|
+
};
|
|
14
|
+
var writerIsolationSchema = z.looseObject({
|
|
15
|
+
boundary: z.enum([IsolationBoundary.NATIVE, IsolationBoundary.CONTAINER]),
|
|
16
|
+
/** The sandbox the Codex probe surface runs in, should it run. */
|
|
17
|
+
codexProbeSandbox: z.string()
|
|
18
|
+
});
|
|
19
|
+
var observedIsolation = () => {
|
|
20
|
+
const isolation = {
|
|
21
|
+
boundary: readEnv("AEO_ISOLATED_ADAPTER") === "1" ? IsolationBoundary.CONTAINER : IsolationBoundary.NATIVE,
|
|
22
|
+
codexProbeSandbox: readEnv("AEO_CODEX_SANDBOX") === "danger-full-access" ? "danger-full-access" : "read-only"
|
|
23
|
+
};
|
|
24
|
+
return isolation;
|
|
25
|
+
};
|
|
26
|
+
var runtimeIsolationOf = (event) => {
|
|
27
|
+
const runtime = z.looseObject({ isolation: writerIsolationSchema }).safeParse(event.payload.runtime);
|
|
28
|
+
return runtime.success ? runtime.data.isolation.boundary : "unknown";
|
|
29
|
+
};
|
|
30
|
+
var stringOf = (value) => {
|
|
31
|
+
return typeof value === "string" ? value : void 0;
|
|
32
|
+
};
|
|
33
|
+
var sandboxOf = (event) => {
|
|
34
|
+
const details = z.looseObject({ sandbox: z.string() }).safeParse(event.payload.details);
|
|
35
|
+
return details.success ? details.data.sandbox : void 0;
|
|
36
|
+
};
|
|
37
|
+
var summarizeIsolation = (events) => {
|
|
38
|
+
const writers = [];
|
|
39
|
+
const stageSandboxes = /* @__PURE__ */ new Set();
|
|
40
|
+
const agentCliAccounts = /* @__PURE__ */ new Set();
|
|
41
|
+
for (const event of events) {
|
|
42
|
+
if (event.type === "run_started" || event.type === "run_resumed") {
|
|
43
|
+
writers.push(runtimeIsolationOf(event));
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
if (event.type !== "operation_started") {
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
const kind = stringOf(event.payload.kind);
|
|
50
|
+
const role = stringOf(event.payload.role);
|
|
51
|
+
const sandbox = sandboxOf(event);
|
|
52
|
+
if (kind === "codex_session" && sandbox !== void 0) {
|
|
53
|
+
stageSandboxes.add(sandbox);
|
|
54
|
+
}
|
|
55
|
+
const writer = writers.at(-1);
|
|
56
|
+
if ((kind === "probe" || kind === "canary") && role !== void 0 && isAgentSurface(role) && writer !== IsolationBoundary.CONTAINER) {
|
|
57
|
+
agentCliAccounts.add(role);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
const isolation = {
|
|
61
|
+
writers,
|
|
62
|
+
stageSandboxes: [...stageSandboxes].sort(),
|
|
63
|
+
agentCliAccounts: [...agentCliAccounts].sort()
|
|
64
|
+
};
|
|
65
|
+
return isolation;
|
|
66
|
+
};
|
|
67
|
+
var isolationLimitations = (isolation) => {
|
|
68
|
+
const limitations = [];
|
|
69
|
+
if (isolation.writers.includes("unknown")) {
|
|
70
|
+
limitations.push(
|
|
71
|
+
"A writer of this run predates isolation recording; its boundary is unknown."
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
if (isolation.writers.includes(IsolationBoundary.NATIVE)) {
|
|
75
|
+
limitations.push(
|
|
76
|
+
"Part or all of this run executed natively, without a container boundary. Codex sandboxes restrict writes and network access, not reads: a Codex session could read any file the operator's account can, while it processed untrusted answers and pages."
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
if (isolation.agentCliAccounts.length > 0) {
|
|
80
|
+
limitations.push(
|
|
81
|
+
`The coding-agent CLIs ${isolation.agentCliAccounts.join(", ")} ran as the operator's own account. Account-level settings outside the tool's control (user rules, approved MCP servers) applied and are not recorded.`
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
return limitations;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export {
|
|
88
|
+
IsolationBoundary,
|
|
89
|
+
writerIsolationSchema,
|
|
90
|
+
observedIsolation,
|
|
91
|
+
summarizeIsolation,
|
|
92
|
+
isolationLimitations
|
|
93
|
+
};
|
|
@@ -1,60 +1,60 @@
|
|
|
1
1
|
import {
|
|
2
|
-
hostModels
|
|
3
|
-
|
|
2
|
+
hostModels,
|
|
3
|
+
pinnedProfileOf
|
|
4
|
+
} from "./chunk-FAUFE7MI.js";
|
|
5
|
+
import {
|
|
6
|
+
StoreConflictError
|
|
7
|
+
} from "./chunk-FWBVTM7F.js";
|
|
4
8
|
import {
|
|
5
9
|
assembleSnapshot,
|
|
6
10
|
enrichSourceMix,
|
|
7
11
|
runPerceptionPass
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import {
|
|
10
|
-
StoreConflictError
|
|
11
|
-
} from "./chunk-FWBVTM7F.js";
|
|
12
|
+
} from "./chunk-JBOOD6MU.js";
|
|
12
13
|
import {
|
|
13
14
|
checkRetrievalCapture,
|
|
14
15
|
checkWebToolDetection,
|
|
15
16
|
checkWebToolParse
|
|
16
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-52F5XYOW.js";
|
|
17
18
|
import {
|
|
18
19
|
parseAggregateOutput
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import {
|
|
21
|
-
codexModel
|
|
22
|
-
} from "./chunk-MIF5IYNR.js";
|
|
20
|
+
} from "./chunk-MENTBQGB.js";
|
|
23
21
|
import {
|
|
24
22
|
stageVersions,
|
|
25
23
|
workflowVersion
|
|
26
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-SIJOQRRK.js";
|
|
27
25
|
import {
|
|
28
26
|
buildCaptureManifest,
|
|
29
27
|
captureManifestSchema
|
|
30
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-F2NSJ6PG.js";
|
|
31
29
|
import {
|
|
32
30
|
domainLabelsFileSchema
|
|
33
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-BRENK356.js";
|
|
34
32
|
import {
|
|
35
33
|
partialFailureSchema
|
|
36
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-DL6YQDTE.js";
|
|
37
35
|
import {
|
|
38
36
|
ProbeLimiter
|
|
39
37
|
} from "./chunk-W5XYW6ZM.js";
|
|
40
|
-
import {
|
|
41
|
-
aeoSnapshotSchema
|
|
42
|
-
} from "./chunk-SDWYZM64.js";
|
|
43
38
|
import {
|
|
44
39
|
groundingBundleSchema
|
|
45
40
|
} from "./chunk-6RAKXYSR.js";
|
|
41
|
+
import {
|
|
42
|
+
aeoSnapshotSchema
|
|
43
|
+
} from "./chunk-EDQTINTL.js";
|
|
46
44
|
import {
|
|
47
45
|
isAgentSurface
|
|
48
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-AASWJR7Q.js";
|
|
49
47
|
|
|
50
48
|
// src/codex-workflow/finish.ts
|
|
51
49
|
import { createHash } from "node:crypto";
|
|
52
50
|
import { readFile, writeFile } from "node:fs/promises";
|
|
53
51
|
import path from "node:path";
|
|
54
52
|
import { z } from "zod";
|
|
55
|
-
var codexAnalyzer = {
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
var codexAnalyzer = (model) => {
|
|
54
|
+
return {
|
|
55
|
+
version: workflowVersion * 100 + stageVersions.analyze,
|
|
56
|
+
model
|
|
57
|
+
};
|
|
58
58
|
};
|
|
59
59
|
var finishRun = async (args) => {
|
|
60
60
|
const { source, dir, signal } = args;
|
|
@@ -103,7 +103,7 @@ var finishRun = async (args) => {
|
|
|
103
103
|
error: `${file}: left out of the matrix`
|
|
104
104
|
}))
|
|
105
105
|
];
|
|
106
|
-
const internalModels = args.internalModels ?? hostModels();
|
|
106
|
+
const internalModels = args.internalModels ?? hostModels(pinnedProfileOf(source.request.modelProfile));
|
|
107
107
|
const logContext = {
|
|
108
108
|
reportKey: config.reportKey,
|
|
109
109
|
runId: request.runId,
|
|
@@ -178,7 +178,7 @@ var finishRun = async (args) => {
|
|
|
178
178
|
),
|
|
179
179
|
partialFailures,
|
|
180
180
|
generatedAt: createdAt,
|
|
181
|
-
analyzer: codexAnalyzer
|
|
181
|
+
analyzer: codexAnalyzer(args.stageModelId)
|
|
182
182
|
});
|
|
183
183
|
const snapshotFile = path.join(dir, "OUT", "snapshot.json");
|
|
184
184
|
if (args.quality) {
|
|
@@ -1,63 +1,69 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openFileStores
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-R2AJYV6A.js";
|
|
4
|
+
import {
|
|
5
|
+
chargedProbeTrace
|
|
6
|
+
} from "./chunk-Y2CZ6FZY.js";
|
|
4
7
|
import {
|
|
5
8
|
createFileResearchSessionStore
|
|
6
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-VXDMOB7O.js";
|
|
7
10
|
import {
|
|
8
11
|
openGroundingRuntime
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3OWJBGQE.js";
|
|
10
13
|
import {
|
|
11
14
|
toAuditConfig,
|
|
12
15
|
toRunRequest
|
|
13
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-VPXYGN4I.js";
|
|
14
17
|
import {
|
|
15
18
|
resolveRunBudget
|
|
16
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-2B5QF6UQ.js";
|
|
17
20
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} from "./chunk-SWS3K62X.js";
|
|
21
|
+
resolveSupportedModel
|
|
22
|
+
} from "./chunk-W5X7WJYL.js";
|
|
21
23
|
import {
|
|
22
24
|
planRun
|
|
23
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-JBOOD6MU.js";
|
|
26
|
+
import {
|
|
27
|
+
localTechnicalChecks,
|
|
28
|
+
persistedRunId
|
|
29
|
+
} from "./chunk-6JICXLDA.js";
|
|
24
30
|
import {
|
|
25
31
|
agentSurfacesToCapture,
|
|
26
32
|
captureForRun
|
|
27
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-J5NPHPXY.js";
|
|
28
34
|
import {
|
|
29
35
|
assertAgentClis,
|
|
30
36
|
detectAgentClis,
|
|
31
37
|
runCanaryProbes
|
|
32
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-WZGI7UVM.js";
|
|
33
39
|
import {
|
|
34
40
|
acquireWriterLock
|
|
35
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-6GOBBNDU.js";
|
|
36
42
|
import {
|
|
37
43
|
runInputsFile
|
|
38
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-RXSHKWZJ.js";
|
|
39
45
|
import {
|
|
40
46
|
openRecorder,
|
|
41
47
|
probeTraceOf,
|
|
42
48
|
recordedOperationKinds,
|
|
43
49
|
recordingAccounting
|
|
44
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-PXB4PWJI.js";
|
|
45
51
|
import {
|
|
46
52
|
hasErrorCode
|
|
47
53
|
} from "./chunk-2QLAFBCG.js";
|
|
48
54
|
import {
|
|
49
55
|
RunOrigin,
|
|
50
56
|
measurementDigest
|
|
51
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-T5XQ6NXD.js";
|
|
52
58
|
import {
|
|
53
59
|
capturePlan
|
|
54
|
-
} from "./chunk-
|
|
55
|
-
import {
|
|
56
|
-
ProbeLimiter
|
|
57
|
-
} from "./chunk-W5XYW6ZM.js";
|
|
60
|
+
} from "./chunk-F2NSJ6PG.js";
|
|
58
61
|
import {
|
|
59
62
|
getEnvironment
|
|
60
63
|
} from "./chunk-PO2J5OQ3.js";
|
|
64
|
+
import {
|
|
65
|
+
ProbeLimiter
|
|
66
|
+
} from "./chunk-W5XYW6ZM.js";
|
|
61
67
|
import {
|
|
62
68
|
createFileModelAccounting
|
|
63
69
|
} from "./chunk-TNL2GWYR.js";
|
|
@@ -145,6 +151,7 @@ var openLocalRun = async (file, dir, options = {}) => {
|
|
|
145
151
|
};
|
|
146
152
|
var openLockedLocalRun = async (file, dir, {
|
|
147
153
|
signal,
|
|
154
|
+
maxUsd,
|
|
148
155
|
amendment,
|
|
149
156
|
derivedFromRunId,
|
|
150
157
|
runId,
|
|
@@ -152,7 +159,9 @@ var openLockedLocalRun = async (file, dir, {
|
|
|
152
159
|
}) => {
|
|
153
160
|
const { recorder } = held;
|
|
154
161
|
const budget = await resolveRunBudget(dir, file.runPolicy.budget, {
|
|
155
|
-
|
|
162
|
+
model: resolveSupportedModel(file.model).id,
|
|
163
|
+
...maxUsd !== void 0 && { maxUsd },
|
|
164
|
+
...amendment && { amendment }
|
|
156
165
|
});
|
|
157
166
|
const config = toAuditConfig(file);
|
|
158
167
|
const request = {
|
|
@@ -169,17 +178,18 @@ var openLockedLocalRun = async (file, dir, {
|
|
|
169
178
|
signal?.throwIfAborted();
|
|
170
179
|
return Promise.resolve();
|
|
171
180
|
};
|
|
181
|
+
const ledger = createFileModelAccounting({
|
|
182
|
+
filename: path.join(bank, "model-budget.json"),
|
|
183
|
+
limits: budget.limits,
|
|
184
|
+
assertOwned
|
|
185
|
+
});
|
|
172
186
|
const grounding = openGroundingRuntime({
|
|
173
187
|
request,
|
|
174
188
|
config,
|
|
175
189
|
analysisStore: stores.analysisStore,
|
|
176
190
|
env: getEnvironment(),
|
|
177
191
|
signal,
|
|
178
|
-
rawAccounting:
|
|
179
|
-
filename: path.join(bank, "model-budget.json"),
|
|
180
|
-
limits: budget.limits,
|
|
181
|
-
assertOwned
|
|
182
|
-
}),
|
|
192
|
+
rawAccounting: ledger,
|
|
183
193
|
store: createFileResearchSessionStore(
|
|
184
194
|
path.join(bank, "research"),
|
|
185
195
|
assertOwned
|
|
@@ -210,6 +220,7 @@ var openLockedLocalRun = async (file, dir, {
|
|
|
210
220
|
{ cause: err }
|
|
211
221
|
);
|
|
212
222
|
}
|
|
223
|
+
const probes = chargedProbeTrace(probeTraceOf(recorder, "probe"), ledger);
|
|
213
224
|
const capture = await captureForRun({
|
|
214
225
|
config,
|
|
215
226
|
request,
|
|
@@ -218,10 +229,16 @@ var openLockedLocalRun = async (file, dir, {
|
|
|
218
229
|
agentCliVersions,
|
|
219
230
|
limiter: new ProbeLimiter(request.limits),
|
|
220
231
|
internalModels,
|
|
221
|
-
trace:
|
|
232
|
+
trace: probes.trace,
|
|
222
233
|
signal,
|
|
223
234
|
logContext: { reportKey: config.reportKey, runId, local: true }
|
|
235
|
+
}).catch((err) => {
|
|
236
|
+
throw probes.exhausted() ?? err;
|
|
224
237
|
});
|
|
238
|
+
const exhausted = probes.exhausted();
|
|
239
|
+
if (exhausted) {
|
|
240
|
+
throw exhausted;
|
|
241
|
+
}
|
|
225
242
|
const captured = (await stores.probeStore.list()).filter(
|
|
226
243
|
(entry) => entry.status === "captured"
|
|
227
244
|
);
|
|
@@ -243,6 +260,7 @@ var openLockedLocalRun = async (file, dir, {
|
|
|
243
260
|
source,
|
|
244
261
|
budget,
|
|
245
262
|
internalModels,
|
|
263
|
+
ledger,
|
|
246
264
|
ground: (manifest, options) => grounding.ground(manifest, options),
|
|
247
265
|
held
|
|
248
266
|
};
|
|
@@ -1,28 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
hostStepAccounting
|
|
3
|
+
} from "./chunk-FAUFE7MI.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} from "./chunk-OYKV5NDM.js";
|
|
5
|
+
engineResources
|
|
6
|
+
} from "./chunk-6P7EZJI7.js";
|
|
8
7
|
import {
|
|
9
8
|
createRecommendationVerifier
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import {
|
|
12
|
-
validateAgentCopy
|
|
13
|
-
} from "./chunk-FBFZBLTY.js";
|
|
9
|
+
} from "./chunk-7HM6IZ3L.js";
|
|
14
10
|
import {
|
|
15
11
|
getEnvironment
|
|
16
12
|
} from "./chunk-PO2J5OQ3.js";
|
|
17
13
|
import {
|
|
18
|
-
|
|
19
|
-
} from "./chunk-
|
|
14
|
+
validateAgentCopy
|
|
15
|
+
} from "./chunk-LR27H2HZ.js";
|
|
20
16
|
import {
|
|
21
17
|
copywriterDocuments
|
|
22
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-JQDQVG3D.js";
|
|
23
19
|
import {
|
|
24
20
|
buildFactCatalog
|
|
25
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-66T7JC57.js";
|
|
22
|
+
import {
|
|
23
|
+
aeoSnapshotSchema
|
|
24
|
+
} from "./chunk-EDQTINTL.js";
|
|
26
25
|
|
|
27
26
|
// src/codex-workflow/copy.ts
|
|
28
27
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
@@ -100,9 +99,8 @@ var materializeCopyInputs = async (args) => {
|
|
|
100
99
|
return written.sort();
|
|
101
100
|
};
|
|
102
101
|
var validateCopyDraft = async (args) => {
|
|
103
|
-
const
|
|
104
|
-
const
|
|
105
|
-
const accounting = args.accounting ?? models.accounting;
|
|
102
|
+
const verifierProfile = args.verifierRole;
|
|
103
|
+
const accounting = args.accounting ?? hostStepAccounting();
|
|
106
104
|
return validateAgentCopy({
|
|
107
105
|
draft: args.draft,
|
|
108
106
|
config: args.config,
|
|
@@ -3,47 +3,47 @@ import {
|
|
|
3
3
|
} from "./chunk-V5B6UZ3E.js";
|
|
4
4
|
import {
|
|
5
5
|
researchProfileFromModels
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WNIXDMJL.js";
|
|
7
7
|
import {
|
|
8
8
|
recordedGroundingTools
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XAKME6NM.js";
|
|
10
10
|
import {
|
|
11
11
|
runGroundingResearch
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-K2FZFESR.js";
|
|
13
13
|
import {
|
|
14
14
|
candidateInventoryPolicyVersion,
|
|
15
15
|
claimExtractionIdentity,
|
|
16
16
|
extractClaimCandidates,
|
|
17
17
|
validatedExtractionBatchSchema
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-F7DBTXKG.js";
|
|
19
19
|
import {
|
|
20
20
|
createGatewayGroundingModel
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import {
|
|
23
|
-
createDataForSeoSearchAdapter,
|
|
24
|
-
createGroundingTools
|
|
25
|
-
} from "./chunk-EPQHVILQ.js";
|
|
21
|
+
} from "./chunk-6HMHXSCS.js";
|
|
26
22
|
import {
|
|
27
23
|
resolveDataForSeoLocale
|
|
28
24
|
} from "./chunk-NH4QGBJV.js";
|
|
25
|
+
import {
|
|
26
|
+
createDataForSeoSearchAdapter,
|
|
27
|
+
createGroundingTools
|
|
28
|
+
} from "./chunk-MA27TFEY.js";
|
|
29
29
|
import {
|
|
30
30
|
extractionCacheRunIdsFromManifest,
|
|
31
31
|
savedAnswersFromManifest,
|
|
32
32
|
validateCaptureManifest
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-F2NSJ6PG.js";
|
|
34
34
|
import {
|
|
35
35
|
createLog
|
|
36
36
|
} from "./chunk-ZSEY7AHQ.js";
|
|
37
|
-
import {
|
|
38
|
-
ModelBudgetError
|
|
39
|
-
} from "./chunk-TNL2GWYR.js";
|
|
40
37
|
import {
|
|
41
38
|
createGroundingBundle,
|
|
42
39
|
validateCandidateOccurrences
|
|
43
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-KQCRJIEG.js";
|
|
44
41
|
import {
|
|
45
42
|
contentHash
|
|
46
43
|
} from "./chunk-H2KDLDK6.js";
|
|
44
|
+
import {
|
|
45
|
+
ModelBudgetError
|
|
46
|
+
} from "./chunk-TNL2GWYR.js";
|
|
47
47
|
import {
|
|
48
48
|
claimCandidateSchema,
|
|
49
49
|
groundingCoverageSchema,
|