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,321 @@
|
|
|
1
|
+
import {
|
|
2
|
+
bankDir,
|
|
3
|
+
runDirectoryState
|
|
4
|
+
} from "./chunk-3GPUCXVA.js";
|
|
5
|
+
import {
|
|
6
|
+
FileProbeStore
|
|
7
|
+
} from "./chunk-R2AJYV6A.js";
|
|
8
|
+
import {
|
|
9
|
+
localReportKey,
|
|
10
|
+
readAuditFile,
|
|
11
|
+
toAuditConfig
|
|
12
|
+
} from "./chunk-VPXYGN4I.js";
|
|
13
|
+
import {
|
|
14
|
+
budgetFile
|
|
15
|
+
} from "./chunk-2B5QF6UQ.js";
|
|
16
|
+
import {
|
|
17
|
+
readWriterLock
|
|
18
|
+
} from "./chunk-6GOBBNDU.js";
|
|
19
|
+
import {
|
|
20
|
+
auditCopyFile
|
|
21
|
+
} from "./chunk-GEFKDW7X.js";
|
|
22
|
+
import {
|
|
23
|
+
readRunInputs
|
|
24
|
+
} from "./chunk-RXSHKWZJ.js";
|
|
25
|
+
import {
|
|
26
|
+
runJournalDir
|
|
27
|
+
} from "./chunk-PXB4PWJI.js";
|
|
28
|
+
import {
|
|
29
|
+
readJournal
|
|
30
|
+
} from "./chunk-JXBLGCXZ.js";
|
|
31
|
+
import {
|
|
32
|
+
hasErrorCode
|
|
33
|
+
} from "./chunk-2QLAFBCG.js";
|
|
34
|
+
import {
|
|
35
|
+
capturePlan
|
|
36
|
+
} from "./chunk-F2NSJ6PG.js";
|
|
37
|
+
import {
|
|
38
|
+
unitRecordKey
|
|
39
|
+
} from "./chunk-7YDXD4MD.js";
|
|
40
|
+
import {
|
|
41
|
+
chargedCall
|
|
42
|
+
} from "./chunk-TNL2GWYR.js";
|
|
43
|
+
|
|
44
|
+
// src/engine/run-status.ts
|
|
45
|
+
import { readFile, stat } from "node:fs/promises";
|
|
46
|
+
import path from "node:path";
|
|
47
|
+
import { z } from "zod";
|
|
48
|
+
var SpendCategory = {
|
|
49
|
+
PROBES: "probes",
|
|
50
|
+
STAGES: "stages",
|
|
51
|
+
HOST_CALLS: "hostCalls",
|
|
52
|
+
SEARCH: "search"
|
|
53
|
+
};
|
|
54
|
+
var spendCategoryOf = (role) => {
|
|
55
|
+
if (role.startsWith("stage:")) {
|
|
56
|
+
return SpendCategory.STAGES;
|
|
57
|
+
}
|
|
58
|
+
if (role.startsWith("probe:")) {
|
|
59
|
+
return SpendCategory.PROBES;
|
|
60
|
+
}
|
|
61
|
+
if (role.startsWith("search:") || role === "research_search") {
|
|
62
|
+
return SpendCategory.SEARCH;
|
|
63
|
+
}
|
|
64
|
+
return SpendCategory.HOST_CALLS;
|
|
65
|
+
};
|
|
66
|
+
var ledgerCallSchema = z.looseObject({
|
|
67
|
+
callId: z.string(),
|
|
68
|
+
role: z.string(),
|
|
69
|
+
reservedUsd: z.number(),
|
|
70
|
+
inputTokens: z.number(),
|
|
71
|
+
maxOutputTokens: z.number(),
|
|
72
|
+
usage: z.looseObject({
|
|
73
|
+
costUsd: z.number().optional(),
|
|
74
|
+
inputTokens: z.number().optional(),
|
|
75
|
+
outputTokens: z.number().optional()
|
|
76
|
+
}).optional()
|
|
77
|
+
});
|
|
78
|
+
var ledgerSchema = z.looseObject({
|
|
79
|
+
limits: z.looseObject({ maxUsd: z.number(), deadlineAt: z.string() }),
|
|
80
|
+
calls: z.record(z.string(), ledgerCallSchema)
|
|
81
|
+
});
|
|
82
|
+
var budgetStateSchema = z.looseObject({
|
|
83
|
+
current: z.looseObject({ maxUsd: z.number() }),
|
|
84
|
+
deadlineAt: z.string(),
|
|
85
|
+
model: z.string().optional()
|
|
86
|
+
});
|
|
87
|
+
var workflowStages = ["analyze", "qualify", "review", "write"];
|
|
88
|
+
var readText = async (file) => {
|
|
89
|
+
try {
|
|
90
|
+
return await readFile(file, "utf8");
|
|
91
|
+
} catch (err) {
|
|
92
|
+
if (hasErrorCode(err, "ENOENT")) {
|
|
93
|
+
return void 0;
|
|
94
|
+
}
|
|
95
|
+
throw err;
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
var exists = async (file) => {
|
|
99
|
+
try {
|
|
100
|
+
await stat(file);
|
|
101
|
+
return true;
|
|
102
|
+
} catch (err) {
|
|
103
|
+
if (hasErrorCode(err, "ENOENT")) {
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
throw err;
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
var parseJson = (text) => {
|
|
110
|
+
if (text === void 0) {
|
|
111
|
+
return void 0;
|
|
112
|
+
}
|
|
113
|
+
try {
|
|
114
|
+
return JSON.parse(text);
|
|
115
|
+
} catch {
|
|
116
|
+
return void 0;
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
var readEvents = async (dir) => {
|
|
120
|
+
const text = await readText(path.join(dir, runJournalDir, "events.jsonl"));
|
|
121
|
+
return text === void 0 ? [] : readJournal(text).events;
|
|
122
|
+
};
|
|
123
|
+
var stringField = (value) => {
|
|
124
|
+
return typeof value === "string" ? value : void 0;
|
|
125
|
+
};
|
|
126
|
+
var phaseOf = (activity) => {
|
|
127
|
+
switch (activity.kind) {
|
|
128
|
+
case "probe":
|
|
129
|
+
case "canary":
|
|
130
|
+
return "capture";
|
|
131
|
+
case "technical_check":
|
|
132
|
+
return "technical checks";
|
|
133
|
+
case "research_tool":
|
|
134
|
+
return "grounding";
|
|
135
|
+
case "codex_session":
|
|
136
|
+
return activity.stage ?? "codex session";
|
|
137
|
+
default:
|
|
138
|
+
return activity.role ?? activity.kind;
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
var lastActivityOf = (events) => {
|
|
142
|
+
const started = events.findLast(
|
|
143
|
+
(event) => event.type === "operation_started"
|
|
144
|
+
);
|
|
145
|
+
if (!started) {
|
|
146
|
+
return void 0;
|
|
147
|
+
}
|
|
148
|
+
const finished = events.some(
|
|
149
|
+
(event) => event.type === "operation_finished" && event.operationId === started.operationId
|
|
150
|
+
);
|
|
151
|
+
const activity = {
|
|
152
|
+
kind: stringField(started.payload.kind) ?? "unknown",
|
|
153
|
+
stage: stringField(started.payload.stage),
|
|
154
|
+
role: stringField(started.payload.role),
|
|
155
|
+
at: started.at,
|
|
156
|
+
open: !finished
|
|
157
|
+
};
|
|
158
|
+
return activity;
|
|
159
|
+
};
|
|
160
|
+
var endOf = (events) => {
|
|
161
|
+
const writerStart = events.findLastIndex(
|
|
162
|
+
(event) => event.type === "run_started" || event.type === "run_resumed"
|
|
163
|
+
);
|
|
164
|
+
const end = events.slice(Math.max(writerStart, 0)).findLast(
|
|
165
|
+
(event) => ["run_completed", "run_failed", "run_interrupted"].includes(event.type)
|
|
166
|
+
);
|
|
167
|
+
return end;
|
|
168
|
+
};
|
|
169
|
+
var lastErrorOf = (events) => {
|
|
170
|
+
const failure = events.findLast(
|
|
171
|
+
(event) => event.type === "run_failed" || event.type === "run_interrupted"
|
|
172
|
+
);
|
|
173
|
+
if (!failure) {
|
|
174
|
+
return void 0;
|
|
175
|
+
}
|
|
176
|
+
const lastError = {
|
|
177
|
+
type: failure.type,
|
|
178
|
+
error: stringField(failure.payload.error) ?? "unknown",
|
|
179
|
+
reason: stringField(failure.payload.reason) ?? "",
|
|
180
|
+
at: failure.at
|
|
181
|
+
};
|
|
182
|
+
return lastError;
|
|
183
|
+
};
|
|
184
|
+
var emptySpend = () => {
|
|
185
|
+
return {
|
|
186
|
+
probes: { usd: 0, calls: 0 },
|
|
187
|
+
stages: { usd: 0, calls: 0 },
|
|
188
|
+
hostCalls: { usd: 0, calls: 0 },
|
|
189
|
+
search: { usd: 0, calls: 0 }
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
var readSpend = async (dir) => {
|
|
193
|
+
const ledger = ledgerSchema.safeParse(
|
|
194
|
+
parseJson(await readText(path.join(dir, bankDir, "model-budget.json")))
|
|
195
|
+
);
|
|
196
|
+
const budget = budgetStateSchema.safeParse(
|
|
197
|
+
parseJson(await readText(path.join(dir, budgetFile)))
|
|
198
|
+
);
|
|
199
|
+
const limits = ledger.success ? ledger.data.limits : void 0;
|
|
200
|
+
const byCategory = emptySpend();
|
|
201
|
+
let settledUsd = 0;
|
|
202
|
+
let openUsd = 0;
|
|
203
|
+
for (const call of Object.values(ledger.success ? ledger.data.calls : {})) {
|
|
204
|
+
const charge = chargedCall(call);
|
|
205
|
+
const category = byCategory[spendCategoryOf(call.role)];
|
|
206
|
+
category.usd += charge.usd;
|
|
207
|
+
category.calls += 1;
|
|
208
|
+
if (call.usage === void 0) {
|
|
209
|
+
openUsd += charge.usd;
|
|
210
|
+
} else {
|
|
211
|
+
settledUsd += charge.usd;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
const capUsd = budget.success ? budget.data.current.maxUsd : limits?.maxUsd;
|
|
215
|
+
const chargedUsd = settledUsd + openUsd;
|
|
216
|
+
const spend = {
|
|
217
|
+
currency: "USD",
|
|
218
|
+
capUsd,
|
|
219
|
+
model: budget.success ? budget.data.model : void 0,
|
|
220
|
+
deadlineAt: budget.success ? budget.data.deadlineAt : limits?.deadlineAt,
|
|
221
|
+
chargedUsd,
|
|
222
|
+
settledUsd,
|
|
223
|
+
openUsd,
|
|
224
|
+
remainingUsd: capUsd === void 0 ? void 0 : Math.max(capUsd - chargedUsd, 0),
|
|
225
|
+
byCategory
|
|
226
|
+
};
|
|
227
|
+
return spend;
|
|
228
|
+
};
|
|
229
|
+
var plannedUnitsOf = async (dir) => {
|
|
230
|
+
const auditCopy = path.join(dir, auditCopyFile);
|
|
231
|
+
if (await exists(auditCopy)) {
|
|
232
|
+
try {
|
|
233
|
+
const file = await readAuditFile(auditCopy);
|
|
234
|
+
const plan = capturePlan(toAuditConfig(file), file.surfaces);
|
|
235
|
+
return {
|
|
236
|
+
reportKey: localReportKey(file),
|
|
237
|
+
keys: new Set(plan.units.map(unitRecordKey))
|
|
238
|
+
};
|
|
239
|
+
} catch {
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
const inputs = await readRunInputs(dir).catch(() => void 0);
|
|
243
|
+
if (!inputs) {
|
|
244
|
+
return void 0;
|
|
245
|
+
}
|
|
246
|
+
return { reportKey: inputs.reportKey, keys: void 0 };
|
|
247
|
+
};
|
|
248
|
+
var readAnswers = async (dir) => {
|
|
249
|
+
const planned = await plannedUnitsOf(dir);
|
|
250
|
+
if (!planned) {
|
|
251
|
+
return { planned: void 0, captured: 0, failed: 0 };
|
|
252
|
+
}
|
|
253
|
+
const bank = await FileProbeStore.open(planned.reportKey, {
|
|
254
|
+
dir: path.join(dir, bankDir)
|
|
255
|
+
});
|
|
256
|
+
const records = (await bank.list()).filter(
|
|
257
|
+
(record) => planned.keys === void 0 || planned.keys.has(unitRecordKey(record))
|
|
258
|
+
);
|
|
259
|
+
const inputs = planned.keys === void 0 ? await readRunInputs(dir).catch(() => void 0) : void 0;
|
|
260
|
+
const answers = {
|
|
261
|
+
planned: planned.keys?.size ?? inputs?.capture.plannedUnits,
|
|
262
|
+
captured: records.filter((record) => record.status === "captured").length,
|
|
263
|
+
failed: records.filter((record) => record.status !== "captured").length
|
|
264
|
+
};
|
|
265
|
+
return answers;
|
|
266
|
+
};
|
|
267
|
+
var readRunStatus = async (dir) => {
|
|
268
|
+
const [events, directoryState, hasBank, hasJournal] = await Promise.all([
|
|
269
|
+
readEvents(dir),
|
|
270
|
+
runDirectoryState(dir),
|
|
271
|
+
exists(path.join(dir, bankDir)),
|
|
272
|
+
exists(path.join(dir, runJournalDir, "events.jsonl"))
|
|
273
|
+
]);
|
|
274
|
+
if (directoryState === "new" && !hasBank && !hasJournal) {
|
|
275
|
+
return void 0;
|
|
276
|
+
}
|
|
277
|
+
const lock = await readWriterLock(dir);
|
|
278
|
+
const lastActivity = lastActivityOf(events);
|
|
279
|
+
const end = endOf(events);
|
|
280
|
+
const completedStages = [];
|
|
281
|
+
for (const stage of workflowStages) {
|
|
282
|
+
if (await exists(path.join(dir, "OUT", `${stage}.json`))) {
|
|
283
|
+
completedStages.push(stage);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
const lastError = lastErrorOf(events);
|
|
287
|
+
let phase = lastActivity && phaseOf(lastActivity);
|
|
288
|
+
if (directoryState === "completed") {
|
|
289
|
+
phase = "completed";
|
|
290
|
+
} else if (end?.type === "run_failed") {
|
|
291
|
+
phase = "stopped";
|
|
292
|
+
} else if (end?.type === "run_interrupted") {
|
|
293
|
+
phase = "interrupted";
|
|
294
|
+
}
|
|
295
|
+
const status = {
|
|
296
|
+
dir,
|
|
297
|
+
// Answers already banked make the next run a resume, not a start.
|
|
298
|
+
state: directoryState === "new" ? "resumable" : directoryState,
|
|
299
|
+
writer: lock && {
|
|
300
|
+
purpose: lock.owner.purpose,
|
|
301
|
+
pid: lock.owner.pid,
|
|
302
|
+
host: lock.owner.host,
|
|
303
|
+
since: lock.owner.acquiredAt,
|
|
304
|
+
state: lock.state
|
|
305
|
+
},
|
|
306
|
+
phase,
|
|
307
|
+
lastActivity,
|
|
308
|
+
completedStages,
|
|
309
|
+
answers: await readAnswers(dir),
|
|
310
|
+
spend: await readSpend(dir),
|
|
311
|
+
lastError,
|
|
312
|
+
stoppedAtBudget: end?.type === "run_failed" && end.payload.error === "ModelBudgetError"
|
|
313
|
+
};
|
|
314
|
+
return status;
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
export {
|
|
318
|
+
SpendCategory,
|
|
319
|
+
spendCategoryOf,
|
|
320
|
+
readRunStatus
|
|
321
|
+
};
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
openFileVersionStores
|
|
3
|
-
} from "./chunk-RMFT4KKK.js";
|
|
4
|
-
import {
|
|
5
|
-
assertPublishable,
|
|
6
|
-
sameTriple
|
|
7
|
-
} from "./chunk-S2AM76LT.js";
|
|
8
|
-
import {
|
|
9
|
-
validateReportArtifacts
|
|
10
|
-
} from "./chunk-ISN6MBNB.js";
|
|
11
1
|
import {
|
|
12
2
|
filePublicationHistory,
|
|
13
3
|
readFilePublication,
|
|
@@ -18,6 +8,16 @@ import {
|
|
|
18
8
|
import {
|
|
19
9
|
publicationTripleSchema
|
|
20
10
|
} from "./chunk-2URYGUMH.js";
|
|
11
|
+
import {
|
|
12
|
+
assertPublishable,
|
|
13
|
+
sameTriple
|
|
14
|
+
} from "./chunk-7WO3FFPS.js";
|
|
15
|
+
import {
|
|
16
|
+
validateReportArtifacts
|
|
17
|
+
} from "./chunk-U5USH2HB.js";
|
|
18
|
+
import {
|
|
19
|
+
openFileVersionStores
|
|
20
|
+
} from "./chunk-7CW6U5WJ.js";
|
|
21
21
|
import {
|
|
22
22
|
aeoCheckpointDir,
|
|
23
23
|
aeoContentDir
|
|
@@ -33,21 +33,24 @@ import {
|
|
|
33
33
|
} from "./chunk-2QLAFBCG.js";
|
|
34
34
|
import {
|
|
35
35
|
projectProgressMeasurement
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import {
|
|
38
|
-
entryMatches,
|
|
39
|
-
unitRecordKey
|
|
40
|
-
} from "./chunk-ULRXHSJL.js";
|
|
36
|
+
} from "./chunk-JYFEXVWC.js";
|
|
41
37
|
import {
|
|
42
38
|
createLog
|
|
43
39
|
} from "./chunk-ZSEY7AHQ.js";
|
|
44
40
|
import {
|
|
45
41
|
domainLabelsFile,
|
|
46
42
|
domainLabelsFileSchema
|
|
47
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-BRENK356.js";
|
|
44
|
+
import {
|
|
45
|
+
entryMatches,
|
|
46
|
+
unitRecordKey
|
|
47
|
+
} from "./chunk-7YDXD4MD.js";
|
|
48
|
+
import {
|
|
49
|
+
contentHash
|
|
50
|
+
} from "./chunk-H2KDLDK6.js";
|
|
48
51
|
import {
|
|
49
52
|
aeoAuditConfigSchema
|
|
50
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-DL6YQDTE.js";
|
|
51
54
|
import {
|
|
52
55
|
evaluateRunClaim,
|
|
53
56
|
isTerminalRun,
|
|
@@ -57,13 +60,10 @@ import {
|
|
|
57
60
|
aeoEvidenceChunkSchema,
|
|
58
61
|
aeoSnapshotSchema,
|
|
59
62
|
evidenceChunkFileName
|
|
60
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-EDQTINTL.js";
|
|
61
64
|
import {
|
|
62
65
|
parseProgressMeasurement
|
|
63
|
-
} from "./chunk-
|
|
64
|
-
import {
|
|
65
|
-
contentHash
|
|
66
|
-
} from "./chunk-H2KDLDK6.js";
|
|
66
|
+
} from "./chunk-YKJHFD64.js";
|
|
67
67
|
|
|
68
68
|
// src/stores/files.ts
|
|
69
69
|
import { existsSync } from "node:fs";
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
} from "./chunk-2QLAFBCG.js";
|
|
4
4
|
import {
|
|
5
5
|
captureArtifactSchema
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JKPBXPCW.js";
|
|
7
7
|
import {
|
|
8
8
|
aeoAuditConfigSchema,
|
|
9
9
|
runRequestSchema
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-DL6YQDTE.js";
|
|
11
11
|
import {
|
|
12
12
|
aeoSurfaceSchema
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EDQTINTL.js";
|
|
14
14
|
|
|
15
15
|
// src/codex-workflow/run-inputs.ts
|
|
16
16
|
import { readFile, writeFile } from "node:fs/promises";
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import {
|
|
2
|
+
canonicalJson
|
|
3
|
+
} from "./chunk-D5B4ZOW6.js";
|
|
4
|
+
|
|
5
|
+
// src/models/profiles.ts
|
|
6
|
+
import { createHash } from "node:crypto";
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
var internalModelProfileIdSchema = z.string().min(1);
|
|
9
|
+
var generationBackendSchema = z.enum([
|
|
10
|
+
"claude_code",
|
|
11
|
+
"codex",
|
|
12
|
+
"gateway"
|
|
13
|
+
]);
|
|
14
|
+
var modelPricingSchema = z.object({
|
|
15
|
+
input: z.number().positive(),
|
|
16
|
+
output: z.number().positive(),
|
|
17
|
+
cachedInput: z.number().nonnegative()
|
|
18
|
+
}).strict();
|
|
19
|
+
var internalModelRoleSchema = z.object({
|
|
20
|
+
/** The gateway model ID, such as `anthropic/claude-opus-5.5`. */
|
|
21
|
+
model: z.string().min(1),
|
|
22
|
+
providerOptions: z.object({
|
|
23
|
+
openai: z.object({ reasoningEffort: z.literal("high") }).strict().optional(),
|
|
24
|
+
/** Ask a reasoning model to think hard. A token budget is not
|
|
25
|
+
* sent: not every provider honours one. */
|
|
26
|
+
gateway: z.object({
|
|
27
|
+
reasoning: z.union([
|
|
28
|
+
z.object({ effort: z.literal("high") }).strict(),
|
|
29
|
+
/** Accepted so that a stored profile keeps parsing and
|
|
30
|
+
* dispatching exactly as admitted; never built any more. */
|
|
31
|
+
z.object({ max_tokens: z.number().int().positive() }).strict()
|
|
32
|
+
]),
|
|
33
|
+
/** The gateway upstream routes a role is restricted to, when
|
|
34
|
+
* not every route of an open-weight model returns structured
|
|
35
|
+
* output. Absent leaves routing to the gateway. */
|
|
36
|
+
only: z.array(z.string().min(1)).min(1).max(12).optional()
|
|
37
|
+
}).strict().optional()
|
|
38
|
+
}).strict(),
|
|
39
|
+
promptVersion: z.string().min(1),
|
|
40
|
+
schemaVersion: z.string().min(1),
|
|
41
|
+
deadlineMs: z.number().int().positive(),
|
|
42
|
+
maxInputTokens: z.number().int().positive().max(1e5),
|
|
43
|
+
maxOutputTokens: z.number().int().positive(),
|
|
44
|
+
/** How many items one batched call may carry, when the model wants a
|
|
45
|
+
* narrower batch than the call site's own default. Absent leaves that
|
|
46
|
+
* default. */
|
|
47
|
+
maxItemsPerCall: z.number().int().positive().optional(),
|
|
48
|
+
pricingUsdPerMillion: modelPricingSchema
|
|
49
|
+
}).strict();
|
|
50
|
+
var codexStageModelSchema = z.object({
|
|
51
|
+
model: z.string().min(1),
|
|
52
|
+
reasoningEffort: z.enum(["medium", "high", "xhigh"]),
|
|
53
|
+
/** The context window Codex must be told: it has no metadata for
|
|
54
|
+
* gateway models and otherwise compacts a session at its own default. */
|
|
55
|
+
contextWindow: z.number().int().positive(),
|
|
56
|
+
pricingUsdPerMillion: modelPricingSchema
|
|
57
|
+
}).strict();
|
|
58
|
+
var researchSearchProviderSchema = z.enum([
|
|
59
|
+
"disabled",
|
|
60
|
+
"dataforseo-google-organic-v1"
|
|
61
|
+
]);
|
|
62
|
+
var internalModelProfileSchema = z.object({
|
|
63
|
+
id: internalModelProfileIdSchema,
|
|
64
|
+
version: z.literal(1),
|
|
65
|
+
pricingCheckedAt: z.iso.date(),
|
|
66
|
+
searchProvider: researchSearchProviderSchema,
|
|
67
|
+
roles: z.object({
|
|
68
|
+
analyzer: internalModelRoleSchema,
|
|
69
|
+
perception: internalModelRoleSchema,
|
|
70
|
+
research: internalModelRoleSchema,
|
|
71
|
+
adjudication: internalModelRoleSchema,
|
|
72
|
+
premiseVerifier: internalModelRoleSchema,
|
|
73
|
+
author: internalModelRoleSchema,
|
|
74
|
+
copy: internalModelRoleSchema,
|
|
75
|
+
domainClassifier: internalModelRoleSchema,
|
|
76
|
+
// Missing on stored profiles: optional enrichment never rewrites pins.
|
|
77
|
+
logoDiscovery: internalModelRoleSchema.optional(),
|
|
78
|
+
competitorClassifier: internalModelRoleSchema.optional(),
|
|
79
|
+
/** Retired roles, still accepted so stored profiles parse unchanged
|
|
80
|
+
* on resume. No new profile resolves them. */
|
|
81
|
+
scrutiny: internalModelRoleSchema.optional(),
|
|
82
|
+
repairPlanner: internalModelRoleSchema.optional(),
|
|
83
|
+
visualReviewer: internalModelRoleSchema.optional()
|
|
84
|
+
}).strict(),
|
|
85
|
+
/** The Codex stages' model. Absent on profiles pinned before the stage
|
|
86
|
+
* model became part of the profile; their host supplies it. */
|
|
87
|
+
stages: codexStageModelSchema.optional()
|
|
88
|
+
}).strict();
|
|
89
|
+
var internalModelProfileDigest = (profile) => {
|
|
90
|
+
return createHash("sha256").update(canonicalJson(internalModelProfileSchema.parse(profile))).digest("hex");
|
|
91
|
+
};
|
|
92
|
+
var internalModelRoleDigest = (roleConfig) => {
|
|
93
|
+
return createHash("sha256").update(canonicalJson(internalModelRoleSchema.parse(roleConfig))).digest("hex");
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export {
|
|
97
|
+
internalModelProfileIdSchema,
|
|
98
|
+
generationBackendSchema,
|
|
99
|
+
modelPricingSchema,
|
|
100
|
+
internalModelRoleSchema,
|
|
101
|
+
codexStageModelSchema,
|
|
102
|
+
researchSearchProviderSchema,
|
|
103
|
+
internalModelProfileSchema,
|
|
104
|
+
internalModelProfileDigest,
|
|
105
|
+
internalModelRoleDigest
|
|
106
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
aggregateJudgments,
|
|
3
3
|
metricsView
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MENTBQGB.js";
|
|
5
5
|
import {
|
|
6
6
|
CheckOutcome,
|
|
7
7
|
checkFrom,
|
|
@@ -11,13 +11,13 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
bundlePaths,
|
|
13
13
|
calculationVersion
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-T5XQ6NXD.js";
|
|
15
15
|
import {
|
|
16
16
|
canonicalDigest
|
|
17
17
|
} from "./chunk-E6NQQU6V.js";
|
|
18
18
|
import {
|
|
19
19
|
validateGroundingBundle
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-KQCRJIEG.js";
|
|
21
21
|
|
|
22
22
|
// src/bundle/verify-report.ts
|
|
23
23
|
import { z } from "zod";
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
runJournalDir
|
|
3
|
+
} from "./chunk-PXB4PWJI.js";
|
|
1
4
|
import {
|
|
2
5
|
assessTraceCoverage
|
|
3
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AK6YNTCV.js";
|
|
4
7
|
import {
|
|
5
|
-
|
|
6
|
-
} from "./chunk-
|
|
8
|
+
summarizeIsolation
|
|
9
|
+
} from "./chunk-2FOKEIIN.js";
|
|
7
10
|
import {
|
|
8
11
|
readJournal
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JXBLGCXZ.js";
|
|
10
13
|
import {
|
|
11
14
|
hasErrorCode
|
|
12
15
|
} from "./chunk-2QLAFBCG.js";
|
|
@@ -14,7 +17,7 @@ import {
|
|
|
14
17
|
RunOrigin,
|
|
15
18
|
bundlePaths,
|
|
16
19
|
objectPathPrefix
|
|
17
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-T5XQ6NXD.js";
|
|
18
21
|
import {
|
|
19
22
|
sha256Hex
|
|
20
23
|
} from "./chunk-E6NQQU6V.js";
|
|
@@ -68,7 +71,8 @@ var projectJournal = async (dir, {
|
|
|
68
71
|
journalLength: 0,
|
|
69
72
|
origin: RunOrigin.LEGACY_IMPORT,
|
|
70
73
|
trace: { coverage: "none", limitations: legacyTraceLimitations },
|
|
71
|
-
writers: []
|
|
74
|
+
writers: [],
|
|
75
|
+
isolation: summarizeIsolation([])
|
|
72
76
|
};
|
|
73
77
|
}
|
|
74
78
|
const reading = readJournal(text);
|
|
@@ -126,7 +130,8 @@ var projectJournal = async (dir, {
|
|
|
126
130
|
journalLength: reading.events.length,
|
|
127
131
|
origin: origin.success ? origin.data : RunOrigin.LEGACY_IMPORT,
|
|
128
132
|
trace,
|
|
129
|
-
writers
|
|
133
|
+
writers,
|
|
134
|
+
isolation: summarizeIsolation(events)
|
|
130
135
|
};
|
|
131
136
|
return projection;
|
|
132
137
|
};
|