literally-aeo 0.1.1 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +71 -7
- package/dist/author-tools.js +512 -461
- package/dist/cli.mjs +3512 -2010
- package/dist/lib/access/schema.js +6 -6
- package/dist/lib/agents/author-schema.js +11 -12
- package/dist/lib/agents/author-validation.js +19 -20
- package/dist/lib/agents/copy-validation.js +22 -22
- package/dist/lib/agents/copywriter-input.js +22 -7
- package/dist/lib/agents/facts.js +21 -6
- package/dist/lib/agents/narrative-facts.js +20 -2
- package/dist/lib/agents/verifier.js +26 -25
- package/dist/lib/analysis/domain-classifier.js +21 -22
- package/dist/lib/analysis/domain-labels.js +11 -12
- package/dist/lib/analysis/progress-schema.js +2 -2
- package/dist/lib/analysis/progress.js +19 -21
- package/dist/lib/analysis/retrieval.js +20 -3
- package/dist/lib/analysis/scoring.js +20 -3
- package/dist/lib/analysis/search-analyzer.js +19 -5
- package/dist/lib/analysis/sentiment.js +18 -19
- package/dist/lib/author/examples.js +12 -13
- package/dist/lib/bundle/contracts.js +15 -14
- package/dist/lib/bundle/export.js +34 -31
- package/dist/lib/bundle/isolation.js +17 -0
- package/dist/lib/bundle/journal.js +14 -15
- package/dist/lib/bundle/project-journal.js +19 -18
- package/dist/lib/bundle/project.js +31 -28
- package/dist/lib/bundle/read.js +35 -32
- package/dist/lib/bundle/recorder.js +17 -16
- package/dist/lib/bundle/redact.js +14 -15
- package/dist/lib/bundle/trace-coverage.js +14 -15
- package/dist/lib/bundle/verify-integrity.js +16 -17
- package/dist/lib/bundle/verify-measurement.js +22 -23
- package/dist/lib/bundle/verify-report.js +29 -30
- package/dist/lib/bundle/verify.js +37 -38
- package/dist/lib/bundle/writer-lock.js +3 -1
- package/dist/lib/capture-manifest.js +13 -14
- package/dist/lib/checks/crawler-access.js +4 -1
- package/dist/lib/checks/renderability.js +5 -1
- package/dist/lib/checks/run-checks.js +23 -19
- package/dist/lib/chunks/chunk-2B5QF6UQ.js +159 -0
- package/dist/lib/chunks/chunk-2FOKEIIN.js +93 -0
- package/dist/lib/chunks/{chunk-KRFHQQS7.js → chunk-2KH7LNK7.js} +24 -24
- package/dist/lib/chunks/{chunk-NVBMIPXR.js → chunk-3GPUCXVA.js} +44 -26
- package/dist/lib/chunks/{chunk-3EBWDHPK.js → chunk-3OE4UQIB.js} +14 -16
- package/dist/lib/chunks/{chunk-FNDJUELJ.js → chunk-3OWJBGQE.js} +14 -14
- package/dist/lib/chunks/{chunk-Y4OGZ3Q5.js → chunk-46PVVQYR.js} +1 -1
- package/dist/lib/chunks/{chunk-EV4DRS5M.js → chunk-4XIAXX7K.js} +1 -1
- package/dist/lib/chunks/{chunk-IBOWGKN7.js → chunk-52F5XYOW.js} +1 -1
- package/dist/lib/chunks/{chunk-3DG7GHFA.js → chunk-66DVMLGR.js} +10 -10
- package/dist/lib/chunks/{chunk-FFOVLI3U.js → chunk-66T7JC57.js} +12 -10
- package/dist/lib/chunks/{chunk-KMRQSIZW.js → chunk-6GOBBNDU.js} +16 -1
- package/dist/lib/chunks/{chunk-WUELMJ22.js → chunk-6HMHXSCS.js} +2 -2
- package/dist/lib/chunks/{chunk-SWS3K62X.js → chunk-6JICXLDA.js} +3 -3
- package/dist/lib/chunks/{chunk-SBAZBOPI.js → chunk-6P7EZJI7.js} +4 -2
- package/dist/lib/chunks/chunk-75DMLOQ7.js +127 -0
- package/dist/lib/chunks/{chunk-RMFT4KKK.js → chunk-7CW6U5WJ.js} +1 -1
- package/dist/lib/chunks/{chunk-5VNYUCLL.js → chunk-7HM6IZ3L.js} +6 -9
- package/dist/lib/chunks/{chunk-X6E44EGV.js → chunk-7LBSNDRR.js} +10 -8
- package/dist/lib/chunks/{chunk-S2AM76LT.js → chunk-7WO3FFPS.js} +3 -3
- package/dist/lib/chunks/{chunk-ULRXHSJL.js → chunk-7YDXD4MD.js} +9 -6
- package/dist/lib/chunks/{chunk-HFOYASRQ.js → chunk-AAFHXNLU.js} +4 -4
- package/dist/lib/chunks/{chunk-OBXAHX3L.js → chunk-AASWJR7Q.js} +1 -5
- package/dist/lib/chunks/{chunk-MD4AVTK2.js → chunk-AJKV46SM.js} +3 -3
- package/dist/lib/chunks/{chunk-IEVAFDW7.js → chunk-AJO7XVXK.js} +12 -12
- package/dist/lib/chunks/{chunk-GMKF2FU4.js → chunk-AK6YNTCV.js} +1 -1
- package/dist/lib/chunks/{chunk-WKH6BJAZ.js → chunk-BFWK3TBN.js} +6 -6
- package/dist/lib/chunks/{chunk-FKLNEB2P.js → chunk-BGAHZIL3.js} +51 -17
- package/dist/lib/chunks/{chunk-ZCOI3HE2.js → chunk-BRENK356.js} +1 -1
- package/dist/lib/chunks/{chunk-S7KJZIUR.js → chunk-BXF4OC74.js} +18 -9
- package/dist/lib/chunks/{chunk-NCLFZOZU.js → chunk-CH7OCYDL.js} +1 -1
- package/dist/lib/chunks/{chunk-FPAN3VRW.js → chunk-DDS4G4DO.js} +27 -19
- package/dist/lib/chunks/{chunk-ZLOOC46D.js → chunk-DL6YQDTE.js} +34 -8
- package/dist/lib/chunks/chunk-DVFFYY5G.js +74 -0
- package/dist/lib/chunks/{chunk-PDS5KWO3.js → chunk-E2YTTB6Q.js} +56 -42
- package/dist/lib/chunks/{chunk-YR67JG2V.js → chunk-E3OGPTUY.js} +8 -3
- package/dist/lib/chunks/{chunk-SDWYZM64.js → chunk-EDQTINTL.js} +5 -1
- package/dist/lib/chunks/chunk-ESEMYWUH.js +257 -0
- package/dist/lib/chunks/{chunk-YHS5IEVZ.js → chunk-F2NSJ6PG.js} +12 -8
- package/dist/lib/chunks/{chunk-7GXRDAUY.js → chunk-F7DBTXKG.js} +6 -6
- package/dist/lib/chunks/chunk-FAUFE7MI.js +31 -0
- package/dist/lib/chunks/{chunk-4E4NDGOZ.js → chunk-FDM2YNQL.js} +1 -1
- package/dist/lib/chunks/{chunk-47IZBMP2.js → chunk-FIC7JSR4.js} +2 -2
- package/dist/lib/chunks/{chunk-CJ5YD3CU.js → chunk-FJL2V6P5.js} +6 -6
- package/dist/lib/chunks/{chunk-KHU5DRBE.js → chunk-FL6LN2K6.js} +9 -9
- package/dist/lib/chunks/{chunk-HSZ3DM74.js → chunk-GEFKDW7X.js} +15 -2
- package/dist/lib/chunks/{chunk-XNRSHATN.js → chunk-HI3PD3KR.js} +8 -8
- package/dist/lib/chunks/{chunk-AUB5THIS.js → chunk-I3UE52ZV.js} +2 -2
- package/dist/lib/chunks/{chunk-IAR6XGEW.js → chunk-J5NPHPXY.js} +5 -4
- package/dist/lib/chunks/{chunk-XJVXASDD.js → chunk-JBOOD6MU.js} +11 -10
- package/dist/lib/chunks/{chunk-5KKLUM7M.js → chunk-JKPBXPCW.js} +3 -3
- package/dist/lib/chunks/{chunk-5HT55QYX.js → chunk-JQDQVG3D.js} +1 -1
- package/dist/lib/chunks/{chunk-3KQFLOC7.js → chunk-JXBLGCXZ.js} +1 -1
- package/dist/lib/chunks/{chunk-D2INDP5W.js → chunk-JYFEXVWC.js} +7 -6
- package/dist/lib/chunks/{chunk-X2Y2ZNG3.js → chunk-K2FZFESR.js} +8 -8
- package/dist/lib/chunks/{chunk-DC6PN7QJ.js → chunk-K4Y5NT4M.js} +11 -7
- package/dist/lib/chunks/chunk-K7YFL5KB.js +182 -0
- package/dist/lib/chunks/{chunk-ZYSPTOKK.js → chunk-KQCRJIEG.js} +1 -1
- package/dist/lib/chunks/{chunk-LPND3VNQ.js → chunk-KSOHZKV5.js} +43 -35
- package/dist/lib/chunks/{chunk-FBFZBLTY.js → chunk-LR27H2HZ.js} +15 -16
- package/dist/lib/chunks/{chunk-KZR25REO.js → chunk-LTI2YYU3.js} +1 -1
- package/dist/lib/chunks/{chunk-EPQHVILQ.js → chunk-MA27TFEY.js} +5 -3
- package/dist/lib/chunks/{chunk-J46W3EMQ.js → chunk-MENTBQGB.js} +8 -7
- package/dist/lib/chunks/chunk-MPJCZN4G.js +155 -0
- package/dist/lib/chunks/{chunk-56VOFZ7T.js → chunk-MTDYBJXH.js} +92 -26
- package/dist/lib/chunks/{chunk-PCYNBDZ7.js → chunk-OD36HUXA.js} +17 -12
- package/dist/lib/chunks/{chunk-WDSCJEDG.js → chunk-OQFAMKLN.js} +11 -11
- package/dist/lib/chunks/{chunk-Z4LMDKBU.js → chunk-PWOYEIPF.js} +4 -4
- package/dist/lib/chunks/{chunk-XL4JIQ5X.js → chunk-PXB4PWJI.js} +7 -3
- package/dist/lib/chunks/{chunk-7ZOJE6BH.js → chunk-QGZ4QSUE.js} +8 -7
- package/dist/lib/chunks/chunk-QJZTDZMB.js +321 -0
- package/dist/lib/chunks/{chunk-MHAKYFDF.js → chunk-R2AJYV6A.js} +22 -22
- package/dist/lib/chunks/{chunk-5B3RNVZ6.js → chunk-RK57YZKM.js} +1 -1
- package/dist/lib/chunks/{chunk-ZXGATMMH.js → chunk-RPTADJXD.js} +1 -1
- package/dist/lib/chunks/{chunk-2NJEWPCV.js → chunk-RXSHKWZJ.js} +3 -3
- package/dist/lib/chunks/chunk-RYCRL3YA.js +106 -0
- package/dist/lib/chunks/{chunk-E3OEE5XN.js → chunk-SD7LR26G.js} +3 -3
- package/dist/lib/chunks/{chunk-GVC4LH2N.js → chunk-SIJOQRRK.js} +1 -1
- package/dist/lib/chunks/{chunk-ZBDUE3A5.js → chunk-SLAPBFRH.js} +12 -7
- package/dist/lib/chunks/{chunk-CKUTDJAB.js → chunk-SMPP7B7F.js} +45 -10
- package/dist/lib/chunks/{chunk-POUSX3T4.js → chunk-SQQ56UP2.js} +15 -6
- package/dist/lib/chunks/{chunk-I3TMFPK4.js → chunk-T5XQ6NXD.js} +6 -4
- package/dist/lib/chunks/{chunk-EYKINDNK.js → chunk-TAPVCSCR.js} +1 -1
- package/dist/lib/chunks/{chunk-ISN6MBNB.js → chunk-U5USH2HB.js} +7 -7
- package/dist/lib/chunks/chunk-U64NCRRR.js +97 -0
- package/dist/lib/chunks/{chunk-D2LPQO6Y.js → chunk-U6BW6LGX.js} +10 -3
- package/dist/lib/chunks/chunk-U772TN32.js +67 -0
- package/dist/lib/chunks/{chunk-XHWRSGX3.js → chunk-UYDQXXDQ.js} +4 -4
- package/dist/lib/chunks/{chunk-CPT2GKKW.js → chunk-V5JJEEBT.js} +1 -1
- package/dist/lib/chunks/{chunk-YWJPJI3W.js → chunk-VL253W5C.js} +3 -1
- package/dist/lib/chunks/{chunk-I7VNIW6Q.js → chunk-VPXYGN4I.js} +86 -15
- package/dist/lib/chunks/{chunk-Z7V63UZA.js → chunk-VXDMOB7O.js} +4 -4
- package/dist/lib/chunks/chunk-W5X7WJYL.js +91 -0
- package/dist/lib/chunks/{chunk-6AUEDSTU.js → chunk-WCLKIPJV.js} +1 -1
- package/dist/lib/chunks/{chunk-QFVRCSJ2.js → chunk-WDOA5JEH.js} +2 -0
- package/dist/lib/chunks/chunk-WDT2Y7D7.js +117 -0
- package/dist/lib/chunks/{chunk-OVUCZLH2.js → chunk-WIBMVNIH.js} +2 -2
- package/dist/lib/chunks/{chunk-5T3V6XJS.js → chunk-WNIXDMJL.js} +1 -1
- package/dist/lib/chunks/{chunk-OORO55OM.js → chunk-WZGI7UVM.js} +23 -8
- package/dist/lib/chunks/{chunk-2GY42RIJ.js → chunk-XAKME6NM.js} +1 -1
- package/dist/lib/chunks/{chunk-Q2PWES4B.js → chunk-XAN4CRFP.js} +33 -41
- package/dist/lib/chunks/{chunk-MIF5IYNR.js → chunk-XDG6NPJB.js} +26 -29
- package/dist/lib/chunks/{chunk-IPNK7FYT.js → chunk-XFUYEFQP.js} +1 -1
- package/dist/lib/chunks/{chunk-OQVIRYT5.js → chunk-XNTFOVCE.js} +2 -2
- package/dist/lib/chunks/chunk-Y2CZ6FZY.js +61 -0
- package/dist/lib/chunks/{chunk-D7GEQVLL.js → chunk-YKJHFD64.js} +1 -1
- package/dist/lib/chunks/chunk-YZEZRQIG.js +194 -0
- package/dist/lib/chunks/chunk-ZIGNJAPC.js +11 -0
- package/dist/lib/chunks/{chunk-5ZITQDVE.js → chunk-ZQ3ER7JD.js} +12 -13
- package/dist/lib/cli/bundle-commands.js +102 -94
- package/dist/lib/cli/guide-command.js +25 -0
- package/dist/lib/cli/io.js +1 -1
- package/dist/lib/cli/run-commands.js +310 -140
- package/dist/lib/cli/status-command.js +236 -0
- package/dist/lib/codex-workflow/aggregate.js +22 -24
- package/dist/lib/codex-workflow/author-search.js +4 -3
- package/dist/lib/codex-workflow/author-tools.js +18 -17
- package/dist/lib/codex-workflow/author.js +39 -36
- package/dist/lib/codex-workflow/capture.js +26 -25
- package/dist/lib/codex-workflow/checkpoint.js +14 -15
- package/dist/lib/codex-workflow/checks.js +16 -18
- package/dist/lib/codex-workflow/codex-binary.js +13 -0
- package/dist/lib/codex-workflow/codex-home.js +6 -3
- package/dist/lib/codex-workflow/copy-editor.js +33 -32
- package/dist/lib/codex-workflow/copy-recovery.js +12 -13
- package/dist/lib/codex-workflow/copy.js +30 -29
- package/dist/lib/codex-workflow/finish.js +37 -38
- package/dist/lib/codex-workflow/host-models.js +7 -7
- package/dist/lib/codex-workflow/loop.js +71 -65
- package/dist/lib/codex-workflow/quality.js +12 -13
- package/dist/lib/codex-workflow/run-inputs.js +13 -14
- package/dist/lib/codex-workflow/run-source.js +28 -24
- package/dist/lib/codex-workflow/schemas.js +12 -13
- package/dist/lib/codex-workflow/session.js +15 -16
- package/dist/lib/codex-workflow/stage.js +51 -45
- package/dist/lib/codex-workflow/workdir.js +14 -15
- package/dist/lib/engine/audit-file.js +18 -13
- package/dist/lib/engine/author.js +62 -53
- package/dist/lib/engine/budget.js +7 -1
- package/dist/lib/engine/cost-estimate.js +43 -0
- package/dist/lib/engine/local-run.js +79 -71
- package/dist/lib/engine/preflight.js +17 -13
- package/dist/lib/engine/rejudge.js +87 -79
- package/dist/lib/engine/resources.js +1 -1
- package/dist/lib/engine/run-configuration.js +2 -1
- package/dist/lib/engine/run-status.js +153 -0
- package/dist/lib/engine/templates.js +19 -14
- package/dist/lib/grounding/chromium-guard.js +13 -0
- package/dist/lib/grounding/controller.js +13 -12
- package/dist/lib/grounding/extract.js +12 -11
- package/dist/lib/grounding/fetch.js +4 -7
- package/dist/lib/grounding/file-store.js +5 -5
- package/dist/lib/grounding/grounding-runtime.js +34 -32
- package/dist/lib/grounding/guarded-request.js +18 -0
- package/dist/lib/grounding/model.js +11 -10
- package/dist/lib/grounding/profile.js +4 -4
- package/dist/lib/grounding/recorded-tools.js +18 -17
- package/dist/lib/grounding/session.js +3 -3
- package/dist/lib/grounding/tools.js +4 -3
- package/dist/lib/grounding/validation.js +2 -2
- package/dist/lib/harness/report/artifacts.js +12 -13
- package/dist/lib/harness/report/capture-coverage.js +4 -4
- package/dist/lib/lib/checkpoint.js +11 -12
- package/dist/lib/lib/progress-comparison.js +2 -2
- package/dist/lib/models/batching.js +5 -5
- package/dist/lib/models/cost-coefficients.js +20 -0
- package/dist/lib/models/local-profile.js +10 -0
- package/dist/lib/models/pricing.js +6 -0
- package/dist/lib/models/profiles.js +7 -14
- package/dist/lib/models/structured-images.js +1 -1
- package/dist/lib/models/structured.js +4 -4
- package/dist/lib/models/supported-models.js +20 -0
- package/dist/lib/pipeline.js +21 -21
- package/dist/lib/probes/agent-cli-parsers.js +1 -1
- package/dist/lib/probes/agent-clis.js +13 -12
- package/dist/lib/probes/charged-trace.js +10 -0
- package/dist/lib/probes/probes.js +12 -12
- package/dist/lib/probes/web-tool-guard.js +3 -3
- package/dist/lib/report/contracts.js +4 -4
- package/dist/lib/report/core/progress-comparison.js +2 -2
- package/dist/lib/report/core/progress-schema.js +2 -2
- package/dist/lib/report/core/schema.js +2 -4
- package/dist/lib/report/core/surfaces.js +1 -3
- package/dist/lib/runner.js +25 -26
- package/dist/lib/schema.js +20 -15
- package/dist/lib/section-result.js +15 -17
- package/dist/lib/stores/artifacts.js +18 -19
- package/dist/lib/stores/files.js +32 -32
- package/dist/lib/stores/local-versions.js +11 -12
- package/dist/lib/stores/memory.js +34 -35
- package/dist/lib/stores/publication.js +23 -23
- package/dist/lib/surfaces.js +1 -3
- package/dist/lib/viewer/server.js +38 -39
- package/dist/lib/workflow/schema.js +9 -10
- package/dist/types/agents/author-schema.d.ts +3 -3
- package/dist/types/agents/copy-validation.d.ts +4 -4
- package/dist/types/agents/verifier.d.ts +6 -6
- package/dist/types/analysis/scoring.d.ts +2 -2
- package/dist/types/bundle/contracts.d.ts +3 -2
- package/dist/types/bundle/isolation.d.ts +37 -0
- package/dist/types/bundle/project-journal.d.ts +2 -0
- package/dist/types/bundle/recorder.d.ts +4 -0
- package/dist/types/bundle/writer-lock.d.ts +9 -0
- package/dist/types/checks/crawler-access.d.ts +3 -2
- package/dist/types/checks/renderability.d.ts +8 -1
- package/dist/types/cli/guide-command.d.ts +4 -0
- package/dist/types/cli/status-command.d.ts +2 -0
- package/dist/types/codex-workflow/author-tools.d.ts +3 -3
- package/dist/types/codex-workflow/codex-binary.d.ts +26 -0
- package/dist/types/codex-workflow/codex-home.d.ts +24 -20
- package/dist/types/codex-workflow/copy-editor.d.ts +1 -1
- package/dist/types/codex-workflow/copy.d.ts +3 -4
- package/dist/types/codex-workflow/finish.d.ts +5 -3
- package/dist/types/codex-workflow/host-models.d.ts +7 -3
- package/dist/types/codex-workflow/loop.d.ts +10 -1
- package/dist/types/codex-workflow/run-inputs.d.ts +31 -113
- package/dist/types/codex-workflow/schemas.d.ts +6 -6
- package/dist/types/codex-workflow/stage.d.ts +16 -5
- package/dist/types/engine/audit-file.d.ts +9 -3
- package/dist/types/engine/author.d.ts +7 -1
- package/dist/types/engine/budget.d.ts +46 -15
- package/dist/types/engine/cost-estimate.d.ts +40 -0
- package/dist/types/engine/local-run.d.ts +6 -0
- package/dist/types/engine/preflight.d.ts +7 -0
- package/dist/types/engine/resources.d.ts +2 -0
- package/dist/types/engine/run-configuration.d.ts +4 -3
- package/dist/types/engine/run-status.d.ts +75 -0
- package/dist/types/engine/templates.d.ts +1 -2
- package/dist/types/grounding/chromium-guard.d.ts +41 -0
- package/dist/types/grounding/fetch.d.ts +0 -10
- package/dist/types/grounding/guarded-request.d.ts +76 -0
- package/dist/types/harness/report/artifacts.d.ts +1 -0
- package/dist/types/lib/checkpoint.d.ts +5 -6
- package/dist/types/models/cost-coefficients.d.ts +106 -0
- package/dist/types/models/local-profile.d.ts +12 -0
- package/dist/types/models/pricing.d.ts +8 -0
- package/dist/types/models/profiles.d.ts +55 -160
- package/dist/types/models/served-model.d.ts +2 -3
- package/dist/types/models/structured.d.ts +3 -3
- package/dist/types/models/supported-models.d.ts +48 -0
- package/dist/types/pipeline.d.ts +2 -1
- package/dist/types/probes/charged-trace.d.ts +8 -0
- package/dist/types/probes/probe-trace.d.ts +2 -0
- package/dist/types/probes/probes.d.ts +2 -1
- package/dist/types/report/contracts.d.ts +2 -0
- package/dist/types/report/core/schema.d.ts +3 -1
- package/dist/types/report/core/surfaces.d.ts +0 -1
- package/dist/types/schema.d.ts +50 -113
- package/dist/types/section-result.d.ts +1 -1
- package/dist/types/workflow/schema.d.ts +79 -152
- package/package.json +2 -1
- package/resources/guide/OPERATOR.md +189 -0
- package/src/agents/author-schema.ts +13 -1
- package/src/agents/author-validation.ts +2 -5
- package/src/agents/copy-validation.ts +8 -12
- package/src/agents/facts.ts +8 -8
- package/src/agents/narrative-facts.ts +9 -20
- package/src/agents/verifier.ts +12 -16
- package/src/analysis/progress.ts +1 -0
- package/src/analysis/scoring.ts +9 -13
- package/src/bundle/contracts.ts +9 -4
- package/src/bundle/isolation.ts +157 -0
- package/src/bundle/project-journal.ts +4 -0
- package/src/bundle/project.ts +20 -7
- package/src/bundle/recorder.ts +5 -0
- package/src/bundle/verify.ts +3 -3
- package/src/bundle/writer-lock.ts +27 -0
- package/src/capture-manifest.ts +4 -0
- package/src/checks/crawler-access.ts +70 -50
- package/src/checks/renderability.ts +113 -87
- package/src/checks/run-checks.ts +16 -3
- package/src/cli/guide-command.ts +28 -0
- package/src/cli/io.ts +2 -0
- package/src/cli/literally-aeo.ts +39 -19
- package/src/cli/run-commands.ts +238 -18
- package/src/cli/status-command.ts +113 -0
- package/src/codex-workflow/aggregate.ts +1 -0
- package/src/codex-workflow/author-tools.ts +39 -60
- package/src/codex-workflow/capture.ts +1 -0
- package/src/codex-workflow/codex-binary.ts +105 -0
- package/src/codex-workflow/codex-home.ts +50 -40
- package/src/codex-workflow/copy-editor.ts +3 -3
- package/src/codex-workflow/copy.ts +7 -10
- package/src/codex-workflow/finish.ts +13 -8
- package/src/codex-workflow/host-models.ts +33 -24
- package/src/codex-workflow/loop.ts +38 -11
- package/src/codex-workflow/stage.ts +126 -17
- package/src/engine/audit-file.ts +98 -9
- package/src/engine/author.ts +47 -2
- package/src/engine/budget.ts +138 -43
- package/src/engine/cost-estimate.ts +178 -0
- package/src/engine/guide/OPERATOR.md +189 -0
- package/src/engine/local-run.ts +38 -8
- package/src/engine/preflight.ts +140 -7
- package/src/engine/resources.ts +9 -4
- package/src/engine/run-configuration.ts +19 -1
- package/src/engine/run-status.ts +452 -0
- package/src/engine/templates.ts +5 -2
- package/src/grounding/chromium-guard.ts +273 -0
- package/src/grounding/controller.ts +1 -1
- package/src/grounding/fetch.ts +39 -276
- package/src/grounding/guarded-request.ts +428 -0
- package/src/grounding/tools.ts +2 -1
- package/src/grounding/validation.ts +1 -1
- package/src/lib/checkpoint.ts +15 -16
- package/src/models/cost-coefficients.ts +140 -0
- package/src/models/local-profile.ts +150 -0
- package/src/models/pricing.ts +31 -0
- package/src/models/profiles.ts +58 -419
- package/src/models/served-model.ts +2 -3
- package/src/models/structured-images.ts +5 -4
- package/src/models/structured.ts +20 -7
- package/src/models/supported-models.ts +112 -0
- package/src/pipeline.ts +13 -7
- package/src/probes/agent-clis.ts +26 -5
- package/src/probes/charged-trace.ts +87 -0
- package/src/probes/probe-trace.ts +2 -0
- package/src/probes/probes.ts +72 -12
- package/src/report/core/schema.ts +4 -1
- package/src/report/core/surfaces.ts +4 -8
- package/src/runner.ts +1 -0
- package/src/schema.ts +68 -4
- package/src/section-result.ts +6 -5
- package/dist/lib/chunks/chunk-6EH4N3EU.js +0 -113
- package/dist/lib/chunks/chunk-CFFPOTP4.js +0 -356
- package/dist/lib/chunks/chunk-LIZX4N3H.js +0 -110
- package/dist/lib/chunks/chunk-OYKV5NDM.js +0 -28
- package/dist/lib/chunks/chunk-SWJ7KQSL.js +0 -318
- package/dist/lib/chunks/chunk-WE2WPNG2.js +0 -104
- package/dist/lib/chunks/{chunk-XI5H46DF.js → chunk-SASE7U6E.js} +3 -3
|
@@ -1,23 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
tokenCostUsd
|
|
3
|
+
} from "./chunk-ZIGNJAPC.js";
|
|
1
4
|
import {
|
|
2
5
|
forgetSession,
|
|
3
6
|
readSession,
|
|
4
7
|
saveSession
|
|
5
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FDM2YNQL.js";
|
|
6
9
|
import {
|
|
7
10
|
CopyVerificationUnavailableError,
|
|
8
11
|
recoverEditorialRounds
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LTI2YYU3.js";
|
|
10
13
|
import {
|
|
11
14
|
authorFiles,
|
|
12
15
|
authorPacket,
|
|
13
16
|
authorSessionInputs
|
|
14
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-OQFAMKLN.js";
|
|
15
18
|
import {
|
|
16
19
|
copyDir
|
|
17
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-3OE4UQIB.js";
|
|
18
21
|
import {
|
|
19
22
|
batchInput
|
|
20
23
|
} from "./chunk-VHDVKEWO.js";
|
|
24
|
+
import {
|
|
25
|
+
sessionReservation
|
|
26
|
+
} from "./chunk-DVFFYY5G.js";
|
|
21
27
|
import {
|
|
22
28
|
killChildProcessGroup
|
|
23
29
|
} from "./chunk-7QYZSP7Q.js";
|
|
@@ -25,15 +31,21 @@ import {
|
|
|
25
31
|
mergeBatches,
|
|
26
32
|
restoreQualificationQuotes,
|
|
27
33
|
validateStage
|
|
28
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-I3UE52ZV.js";
|
|
29
35
|
import {
|
|
30
36
|
sessionPrompt,
|
|
31
37
|
stagePrompts
|
|
32
38
|
} from "./chunk-4QQJXCD2.js";
|
|
33
39
|
import {
|
|
34
|
-
|
|
40
|
+
codexGateway,
|
|
41
|
+
codexStageConfig,
|
|
35
42
|
prepareCodexHome
|
|
36
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-XDG6NPJB.js";
|
|
44
|
+
import {
|
|
45
|
+
codexArgs,
|
|
46
|
+
codexBinaryAt,
|
|
47
|
+
resolveCodexBinary
|
|
48
|
+
} from "./chunk-U772TN32.js";
|
|
37
49
|
import {
|
|
38
50
|
writePendingJson
|
|
39
51
|
} from "./chunk-MX6Y4RD2.js";
|
|
@@ -42,25 +54,25 @@ import {
|
|
|
42
54
|
qualifyRowSchema,
|
|
43
55
|
stageJsonSchema,
|
|
44
56
|
stageVersions
|
|
45
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-SIJOQRRK.js";
|
|
46
58
|
import {
|
|
47
59
|
isAuthError
|
|
48
60
|
} from "./chunk-7O3M6I2X.js";
|
|
49
|
-
import {
|
|
50
|
-
isObject
|
|
51
|
-
} from "./chunk-7PLK6VGC.js";
|
|
52
61
|
import {
|
|
53
62
|
getEnvironment,
|
|
54
63
|
readEnv
|
|
55
64
|
} from "./chunk-PO2J5OQ3.js";
|
|
65
|
+
import {
|
|
66
|
+
isObject
|
|
67
|
+
} from "./chunk-7PLK6VGC.js";
|
|
56
68
|
import {
|
|
57
69
|
maxReviewRounds
|
|
58
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-EDQTINTL.js";
|
|
59
71
|
|
|
60
72
|
// src/codex-workflow/stage.ts
|
|
61
73
|
import { spawn } from "node:child_process";
|
|
62
74
|
import { createWriteStream } from "node:fs";
|
|
63
|
-
import { createHash } from "node:crypto";
|
|
75
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
64
76
|
import {
|
|
65
77
|
appendFile,
|
|
66
78
|
mkdir,
|
|
@@ -112,6 +124,7 @@ var stageSpecs = {
|
|
|
112
124
|
analyze: {
|
|
113
125
|
...reportStage,
|
|
114
126
|
batched: true,
|
|
127
|
+
sessionCost: "answers",
|
|
115
128
|
judgedOn: "batch",
|
|
116
129
|
persistent: false,
|
|
117
130
|
sharedInputs: fixedInputs([
|
|
@@ -132,6 +145,7 @@ var stageSpecs = {
|
|
|
132
145
|
qualify: {
|
|
133
146
|
...reportStage,
|
|
134
147
|
batched: true,
|
|
148
|
+
sessionCost: "answers",
|
|
135
149
|
judgedOn: "batch",
|
|
136
150
|
persistent: false,
|
|
137
151
|
sharedInputs: fixedInputs([
|
|
@@ -157,6 +171,7 @@ var stageSpecs = {
|
|
|
157
171
|
review: {
|
|
158
172
|
...reportStage,
|
|
159
173
|
batched: true,
|
|
174
|
+
sessionCost: "answers",
|
|
160
175
|
judgedOn: "batch",
|
|
161
176
|
persistent: true,
|
|
162
177
|
sharedInputs: fixedInputs([
|
|
@@ -186,6 +201,7 @@ var stageSpecs = {
|
|
|
186
201
|
write: {
|
|
187
202
|
...reportStage,
|
|
188
203
|
batched: false,
|
|
204
|
+
sessionCost: "report",
|
|
189
205
|
judgedOn: "all",
|
|
190
206
|
persistent: true,
|
|
191
207
|
// Everything under COPY/, listed at digest time.
|
|
@@ -217,6 +233,7 @@ var stageSpecs = {
|
|
|
217
233
|
// read-only sandbox, judged by the host's verdict after it submits.
|
|
218
234
|
author: {
|
|
219
235
|
batched: false,
|
|
236
|
+
sessionCost: "brief",
|
|
220
237
|
judgedOn: "all",
|
|
221
238
|
persistent: true,
|
|
222
239
|
sharedInputs: authorFiles,
|
|
@@ -242,6 +259,10 @@ var sumUsage = (usages) => {
|
|
|
242
259
|
(total, usage) => total + usage.inputTokens,
|
|
243
260
|
0
|
|
244
261
|
),
|
|
262
|
+
cachedInputTokens: reported.reduce(
|
|
263
|
+
(total, usage) => total + usage.cachedInputTokens,
|
|
264
|
+
0
|
|
265
|
+
),
|
|
245
266
|
outputTokens: reported.reduce(
|
|
246
267
|
(total, usage) => total + usage.outputTokens,
|
|
247
268
|
0
|
|
@@ -292,7 +313,7 @@ var scopeFor = (ctx, stage, batch) => {
|
|
|
292
313
|
var batchInputsDigest = async (ctx, stage, batch) => {
|
|
293
314
|
const spec = stageSpecs[stage];
|
|
294
315
|
const parts = {
|
|
295
|
-
model: JSON.stringify(
|
|
316
|
+
model: JSON.stringify(codexStageConfig(ctx.stageModel)),
|
|
296
317
|
prompt: stagePrompts[stage],
|
|
297
318
|
version: String(stageVersions[stage]),
|
|
298
319
|
schema: JSON.stringify(stageJsonSchema(stage)),
|
|
@@ -340,7 +361,11 @@ var sessionSandbox = (spec) => {
|
|
|
340
361
|
};
|
|
341
362
|
var eventText = z.string().optional().catch(void 0);
|
|
342
363
|
var eventTokens = z.number().optional().catch(void 0);
|
|
343
|
-
var eventUsage = z.looseObject({
|
|
364
|
+
var eventUsage = z.looseObject({
|
|
365
|
+
input_tokens: eventTokens,
|
|
366
|
+
cached_input_tokens: eventTokens,
|
|
367
|
+
output_tokens: eventTokens
|
|
368
|
+
}).optional().catch(void 0);
|
|
344
369
|
var codexEventSchema = z.looseObject({
|
|
345
370
|
type: eventText,
|
|
346
371
|
thread_id: eventText,
|
|
@@ -377,6 +402,42 @@ var describeItem = (item) => {
|
|
|
377
402
|
}
|
|
378
403
|
return item.type ?? "item";
|
|
379
404
|
};
|
|
405
|
+
var reserveSession = async (ctx, { stage, batch, attempt }) => {
|
|
406
|
+
const { accounting, stageModel } = ctx;
|
|
407
|
+
if (!accounting) {
|
|
408
|
+
return void 0;
|
|
409
|
+
}
|
|
410
|
+
const pricing = stageModel.pricingUsdPerMillion;
|
|
411
|
+
const reserved = sessionReservation({
|
|
412
|
+
cost: stageSpecs[stage].sessionCost,
|
|
413
|
+
answers: batch.files.length
|
|
414
|
+
});
|
|
415
|
+
const callId = `codex:${stage}-${batch.index}:${attempt ?? 1}:${randomUUID()}`;
|
|
416
|
+
await accounting.reserve({
|
|
417
|
+
callId,
|
|
418
|
+
role: `stage:${stage}`,
|
|
419
|
+
requestedModel: stageModel.model,
|
|
420
|
+
reasoningEffort: stageModel.reasoningEffort,
|
|
421
|
+
reservedUsd: tokenCostUsd(pricing, reserved),
|
|
422
|
+
inputTokens: reserved.inputTokens,
|
|
423
|
+
maxOutputTokens: reserved.outputTokens
|
|
424
|
+
});
|
|
425
|
+
const charge = {
|
|
426
|
+
settle: async (usage) => {
|
|
427
|
+
await accounting.settle(
|
|
428
|
+
callId,
|
|
429
|
+
usage ? {
|
|
430
|
+
requestedModel: stageModel.model,
|
|
431
|
+
costUsd: tokenCostUsd(pricing, usage),
|
|
432
|
+
inputTokens: usage.inputTokens,
|
|
433
|
+
cachedInputTokens: usage.cachedInputTokens,
|
|
434
|
+
outputTokens: usage.outputTokens
|
|
435
|
+
} : { requestedModel: stageModel.model, valid: false }
|
|
436
|
+
);
|
|
437
|
+
}
|
|
438
|
+
};
|
|
439
|
+
return charge;
|
|
440
|
+
};
|
|
380
441
|
var execCodex = async (ctx, { stage, batch, feedback, attempt }) => {
|
|
381
442
|
const env = ctx.codexEnv;
|
|
382
443
|
const spec = stageSpecs[stage];
|
|
@@ -386,7 +447,7 @@ var execCodex = async (ctx, { stage, batch, feedback, attempt }) => {
|
|
|
386
447
|
const contract = sha({
|
|
387
448
|
stage,
|
|
388
449
|
version: stageVersions[stage],
|
|
389
|
-
model:
|
|
450
|
+
model: codexStageConfig(ctx.stageModel),
|
|
390
451
|
prompt: stagePrompts[stage],
|
|
391
452
|
continuation: sessionPrompt(stage, batch.index, { continuation: true }),
|
|
392
453
|
schema: stageJsonSchema(stage),
|
|
@@ -427,7 +488,9 @@ ${input}` : input;
|
|
|
427
488
|
resumeInput ? "-" : instruction
|
|
428
489
|
];
|
|
429
490
|
let threadId = session?.threadId ?? null;
|
|
491
|
+
const codexBinary = ctx.command ? codexBinaryAt(ctx.command) : resolveCodexBinary();
|
|
430
492
|
ctx.signal?.throwIfAborted();
|
|
493
|
+
const charge = await reserveSession(ctx, { stage, batch, attempt });
|
|
431
494
|
const operation = await ctx.recorder?.start({
|
|
432
495
|
kind: "codex_session",
|
|
433
496
|
stage,
|
|
@@ -439,16 +502,17 @@ ${input}` : input;
|
|
|
439
502
|
arguments: JSON.stringify(args)
|
|
440
503
|
},
|
|
441
504
|
details: {
|
|
442
|
-
requestedModel:
|
|
443
|
-
provider:
|
|
444
|
-
reasoningEffort:
|
|
505
|
+
requestedModel: ctx.stageModel.model,
|
|
506
|
+
provider: codexGateway.providerName,
|
|
507
|
+
reasoningEffort: ctx.stageModel.reasoningEffort,
|
|
508
|
+
codex: { source: codexBinary.source, version: codexBinary.version },
|
|
445
509
|
sandbox: sessionSandbox(spec),
|
|
446
510
|
resumedThreadId: session?.threadId ?? null
|
|
447
511
|
}
|
|
448
512
|
});
|
|
449
513
|
const transcript = [];
|
|
450
514
|
const result = await new Promise((resolve) => {
|
|
451
|
-
const child = spawn(
|
|
515
|
+
const child = spawn(codexBinary.command, codexArgs(codexBinary, args), {
|
|
452
516
|
cwd: ctx.dir,
|
|
453
517
|
env,
|
|
454
518
|
detached: true,
|
|
@@ -489,6 +553,7 @@ ${input}` : input;
|
|
|
489
553
|
if (found) {
|
|
490
554
|
usage = {
|
|
491
555
|
inputTokens: found.input_tokens ?? 0,
|
|
556
|
+
cachedInputTokens: found.cached_input_tokens ?? 0,
|
|
492
557
|
outputTokens: found.output_tokens ?? 0
|
|
493
558
|
};
|
|
494
559
|
}
|
|
@@ -533,6 +598,7 @@ ${input}` : input;
|
|
|
533
598
|
sessionUsage: result.usage
|
|
534
599
|
}
|
|
535
600
|
});
|
|
601
|
+
await charge?.settle(result.usage);
|
|
536
602
|
if (spec.persistent && threadId) {
|
|
537
603
|
const files = await saveSession(ctx.dir, label, { contract, threadId });
|
|
538
604
|
await ctx.checkpoint?.(files);
|
|
@@ -1360,11 +1426,11 @@ var runStage = async (initial, stage, options = {}) => {
|
|
|
1360
1426
|
}
|
|
1361
1427
|
const ctx = {
|
|
1362
1428
|
...initial,
|
|
1363
|
-
codexEnv: await prepareCodexHome(
|
|
1364
|
-
initial.
|
|
1365
|
-
getEnvironment(),
|
|
1366
|
-
spec.research ? initial.research :
|
|
1367
|
-
)
|
|
1429
|
+
codexEnv: await prepareCodexHome(initial.dir, {
|
|
1430
|
+
stageModel: initial.stageModel,
|
|
1431
|
+
env: getEnvironment(),
|
|
1432
|
+
...spec.research && initial.research ? { research: initial.research } : {}
|
|
1433
|
+
})
|
|
1368
1434
|
};
|
|
1369
1435
|
const batches = stageBatches(ctx, stage);
|
|
1370
1436
|
const qualificationWasFresh = stage === "review" && await isStageFresh(ctx, "qualify");
|
|
@@ -1449,7 +1515,7 @@ var runStage = async (initial, stage, options = {}) => {
|
|
|
1449
1515
|
}
|
|
1450
1516
|
const result = {
|
|
1451
1517
|
stage,
|
|
1452
|
-
model:
|
|
1518
|
+
model: ctx.stageModel.model,
|
|
1453
1519
|
ok: output !== void 0,
|
|
1454
1520
|
durationMs: Date.now() - started,
|
|
1455
1521
|
usage,
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
structuredWireSchema
|
|
3
|
-
} from "./chunk-Y6D6IVOM.js";
|
|
4
1
|
import {
|
|
5
2
|
structuredImageMessages,
|
|
6
3
|
structuredImageTokens
|
|
7
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WDOA5JEH.js";
|
|
5
|
+
import {
|
|
6
|
+
structuredWireSchema
|
|
7
|
+
} from "./chunk-Y6D6IVOM.js";
|
|
8
8
|
import {
|
|
9
9
|
servedModelOf
|
|
10
10
|
} from "./chunk-ZVAKKRRD.js";
|
|
11
11
|
import {
|
|
12
12
|
createLog
|
|
13
13
|
} from "./chunk-ZSEY7AHQ.js";
|
|
14
|
+
import {
|
|
15
|
+
readEnv
|
|
16
|
+
} from "./chunk-PO2J5OQ3.js";
|
|
14
17
|
import {
|
|
15
18
|
structuredFailureDiagnostic
|
|
16
19
|
} from "./chunk-NANJGMEJ.js";
|
|
@@ -20,10 +23,7 @@ import {
|
|
|
20
23
|
import {
|
|
21
24
|
internalModelRoleDigest,
|
|
22
25
|
internalModelRoleSchema
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import {
|
|
25
|
-
readEnv
|
|
26
|
-
} from "./chunk-PO2J5OQ3.js";
|
|
26
|
+
} from "./chunk-RYCRL3YA.js";
|
|
27
27
|
import {
|
|
28
28
|
ModelBudgetError
|
|
29
29
|
} from "./chunk-TNL2GWYR.js";
|
|
@@ -54,6 +54,11 @@ var StructuredJournalError = class extends Error {
|
|
|
54
54
|
this.name = "StructuredJournalError";
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
|
+
var reasoningEffortOf = (role) => {
|
|
58
|
+
const { openai, gateway: gateway2 } = role.providerOptions;
|
|
59
|
+
const gatewayEffort = gateway2 && "effort" in gateway2.reasoning ? gateway2.reasoning.effort : void 0;
|
|
60
|
+
return openai?.reasoningEffort ?? gatewayEffort;
|
|
61
|
+
};
|
|
57
62
|
var reportedNumber = (value) => {
|
|
58
63
|
const number = typeof value === "string" && value.trim() ? Number(value) : value;
|
|
59
64
|
return typeof number === "number" && Number.isFinite(number) && number >= 0 ? number : void 0;
|
|
@@ -247,7 +252,7 @@ var generateStructured = async (input, transport = gatewayTransport) => {
|
|
|
247
252
|
callId,
|
|
248
253
|
role: input.roleName,
|
|
249
254
|
requestedModel: input.role.model,
|
|
250
|
-
reasoningEffort: input.role
|
|
255
|
+
reasoningEffort: reasoningEffortOf(input.role),
|
|
251
256
|
profileDigest: internalModelRoleDigest(input.role),
|
|
252
257
|
...reservation
|
|
253
258
|
});
|
|
@@ -302,7 +307,7 @@ var generateStructured = async (input, transport = gatewayTransport) => {
|
|
|
302
307
|
assertModelCallActive(signal, error);
|
|
303
308
|
await input.accounting.settle(callId, {
|
|
304
309
|
requestedModel: input.role.model,
|
|
305
|
-
reasoningEffort: input.role
|
|
310
|
+
reasoningEffort: reasoningEffortOf(input.role),
|
|
306
311
|
durationMs: Date.now() - start,
|
|
307
312
|
costUsd: 0,
|
|
308
313
|
inputTokens: 0,
|
|
@@ -318,7 +323,7 @@ var generateStructured = async (input, transport = gatewayTransport) => {
|
|
|
318
323
|
...billed.usage,
|
|
319
324
|
callId,
|
|
320
325
|
requestedModel: input.role.model,
|
|
321
|
-
reasoningEffort: input.role
|
|
326
|
+
reasoningEffort: reasoningEffortOf(input.role),
|
|
322
327
|
durationMs: Date.now() - start,
|
|
323
328
|
valid: false
|
|
324
329
|
};
|
|
@@ -353,7 +358,7 @@ var generateStructured = async (input, transport = gatewayTransport) => {
|
|
|
353
358
|
...result.usage,
|
|
354
359
|
callId,
|
|
355
360
|
requestedModel: input.role.model,
|
|
356
|
-
reasoningEffort: input.role
|
|
361
|
+
reasoningEffort: reasoningEffortOf(input.role),
|
|
357
362
|
durationMs: Date.now() - start
|
|
358
363
|
};
|
|
359
364
|
await journal(input.journal, {
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import {
|
|
2
2
|
authorDir
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
enginePackageRoot
|
|
6
|
-
} from "./chunk-3BFCI7LI.js";
|
|
3
|
+
} from "./chunk-3OE4UQIB.js";
|
|
7
4
|
import {
|
|
8
5
|
readResearchDocuments,
|
|
9
6
|
readResearchJournal,
|
|
10
7
|
researchDir,
|
|
11
8
|
summarizeResearch
|
|
12
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XAN4CRFP.js";
|
|
10
|
+
import {
|
|
11
|
+
enginePackageRoot
|
|
12
|
+
} from "./chunk-3BFCI7LI.js";
|
|
13
13
|
import {
|
|
14
14
|
authorExamples
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-XFUYEFQP.js";
|
|
16
16
|
import {
|
|
17
17
|
writeFileAtomically
|
|
18
18
|
} from "./chunk-MX6Y4RD2.js";
|
|
19
19
|
import {
|
|
20
20
|
authorStageOutputSchema,
|
|
21
21
|
stageJsonSchema
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import {
|
|
24
|
-
validateAuthorOutput
|
|
25
|
-
} from "./chunk-X6E44EGV.js";
|
|
22
|
+
} from "./chunk-SIJOQRRK.js";
|
|
26
23
|
import {
|
|
27
24
|
getEnvironment
|
|
28
25
|
} from "./chunk-PO2J5OQ3.js";
|
|
26
|
+
import {
|
|
27
|
+
validateAuthorOutput
|
|
28
|
+
} from "./chunk-7LBSNDRR.js";
|
|
29
29
|
import {
|
|
30
30
|
canonicalResearchUrl
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-MPJCZN4G.js";
|
|
32
32
|
import {
|
|
33
33
|
normalizeDomain
|
|
34
34
|
} from "./chunk-QTXOW5XC.js";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-3UFZ2XPE.js";
|
|
4
4
|
import {
|
|
5
5
|
isRetryable
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SASE7U6E.js";
|
|
7
7
|
import {
|
|
8
8
|
truncateAnswer
|
|
9
9
|
} from "./chunk-TGTM5ZFR.js";
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
} from "./chunk-JS3GBU3R.js";
|
|
13
13
|
import {
|
|
14
14
|
batchModelInputs
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WCLKIPJV.js";
|
|
16
16
|
import {
|
|
17
17
|
generateStructured
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-OD36HUXA.js";
|
|
19
19
|
import {
|
|
20
20
|
createLog
|
|
21
21
|
} from "./chunk-ZSEY7AHQ.js";
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from "./chunk-TNL2GWYR.js";
|
|
25
25
|
import {
|
|
26
26
|
aeoPerceptionSchema
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-EDQTINTL.js";
|
|
28
28
|
|
|
29
29
|
// src/analysis/sentiment.ts
|
|
30
30
|
import { z } from "zod";
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
observedIsolation
|
|
3
|
+
} from "./chunk-2FOKEIIN.js";
|
|
1
4
|
import {
|
|
2
5
|
openJournal,
|
|
3
6
|
putObject,
|
|
4
7
|
readJournal
|
|
5
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JXBLGCXZ.js";
|
|
6
9
|
import {
|
|
7
10
|
mintRunId
|
|
8
11
|
} from "./chunk-W46Y7KBR.js";
|
|
@@ -13,7 +16,7 @@ import {
|
|
|
13
16
|
operationKinds,
|
|
14
17
|
toolId,
|
|
15
18
|
toolVersion
|
|
16
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-T5XQ6NXD.js";
|
|
17
20
|
|
|
18
21
|
// src/bundle/recorder.ts
|
|
19
22
|
import { readFile, rename, stat } from "node:fs/promises";
|
|
@@ -102,7 +105,8 @@ var openRecorder = async (dir, options) => {
|
|
|
102
105
|
version: toolVersion,
|
|
103
106
|
node: process.version,
|
|
104
107
|
platform: process.platform,
|
|
105
|
-
arch: process.arch
|
|
108
|
+
arch: process.arch,
|
|
109
|
+
isolation: options.isolation ?? observedIsolation()
|
|
106
110
|
};
|
|
107
111
|
const observes = [...options.observes ?? workflowOperationKinds];
|
|
108
112
|
if (journal.head().count === 0) {
|
|
@@ -2,14 +2,16 @@ import {
|
|
|
2
2
|
normalizeDomain
|
|
3
3
|
} from "./chunk-QTXOW5XC.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} from "./chunk-OBXAHX3L.js";
|
|
5
|
+
runsPerPromptOn
|
|
6
|
+
} from "./chunk-DL6YQDTE.js";
|
|
8
7
|
|
|
9
8
|
// src/analysis/scoring.ts
|
|
10
9
|
var computeAISearchSummary = (args) => {
|
|
11
|
-
const { competitorDomains, prompts, results, surfaces } = args;
|
|
12
|
-
const totalRunsPerPrompt =
|
|
10
|
+
const { competitorDomains, prompts, results, surfaces, depth } = args;
|
|
11
|
+
const totalRunsPerPrompt = surfaces.reduce(
|
|
12
|
+
(sum, surface) => sum + runsPerPromptOn(surface, depth),
|
|
13
|
+
0
|
|
14
|
+
);
|
|
13
15
|
const totalPrompts = prompts.length * totalRunsPerPrompt;
|
|
14
16
|
const mentioned = results.filter((r) => r.clientMentioned).length;
|
|
15
17
|
const cited = results.filter((r) => r.clientCited).length;
|
|
@@ -18,8 +20,7 @@ var computeAISearchSummary = (args) => {
|
|
|
18
20
|
const byModel = {};
|
|
19
21
|
for (const surface of surfaces) {
|
|
20
22
|
const modelResults = results.filter((r) => r.model === surface);
|
|
21
|
-
const
|
|
22
|
-
const total = prompts.length * runsPerPrompt;
|
|
23
|
+
const total = prompts.length * runsPerPromptOn(surface, depth);
|
|
23
24
|
byModel[surface] = {
|
|
24
25
|
sov: total > 0 ? modelResults.filter((r) => r.clientMentioned).length / total * 100 : 0,
|
|
25
26
|
citation: total > 0 ? modelResults.filter((r) => r.clientCited).length / total * 100 : 0
|