literally-aeo 0.1.0 → 0.2.0

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.
Files changed (262) hide show
  1. package/README.md +42 -6
  2. package/dist/author-tools.js +33 -64
  3. package/dist/cli.mjs +2723 -1616
  4. package/dist/lib/agents/author-schema.js +4 -5
  5. package/dist/lib/agents/author-validation.js +5 -6
  6. package/dist/lib/agents/copy-validation.js +4 -5
  7. package/dist/lib/agents/verifier.js +8 -8
  8. package/dist/lib/analysis/domain-classifier.js +8 -8
  9. package/dist/lib/analysis/domain-labels.js +3 -4
  10. package/dist/lib/analysis/progress.js +3 -4
  11. package/dist/lib/analysis/sentiment.js +8 -8
  12. package/dist/lib/author/examples.js +5 -6
  13. package/dist/lib/bundle/contracts.js +5 -6
  14. package/dist/lib/bundle/export.js +22 -19
  15. package/dist/lib/bundle/isolation.js +17 -0
  16. package/dist/lib/bundle/journal.js +6 -7
  17. package/dist/lib/bundle/project-journal.js +11 -10
  18. package/dist/lib/bundle/project.js +19 -16
  19. package/dist/lib/bundle/read.js +23 -20
  20. package/dist/lib/bundle/recorder.js +9 -8
  21. package/dist/lib/bundle/redact.js +6 -7
  22. package/dist/lib/bundle/trace-coverage.js +6 -7
  23. package/dist/lib/bundle/verify-integrity.js +8 -9
  24. package/dist/lib/bundle/verify-measurement.js +10 -11
  25. package/dist/lib/bundle/verify-report.js +11 -12
  26. package/dist/lib/bundle/verify.js +17 -18
  27. package/dist/lib/bundle/writer-lock.js +3 -1
  28. package/dist/lib/capture-manifest.js +3 -4
  29. package/dist/lib/checks/run-checks.js +10 -9
  30. package/dist/lib/chunks/chunk-2B5QF6UQ.js +159 -0
  31. package/dist/lib/chunks/{chunk-4US3OBKJ.js → chunk-2GU6CNQI.js} +12 -7
  32. package/dist/lib/chunks/{chunk-AWOJWMPN.js → chunk-2ROXN2EC.js} +42 -7
  33. package/dist/lib/chunks/{chunk-XHWRSGX3.js → chunk-3JO5TXBA.js} +1 -1
  34. package/dist/lib/chunks/{chunk-5GZVDGTX.js → chunk-4PD65FRJ.js} +7 -3
  35. package/dist/lib/chunks/{chunk-P4K6BP3L.js → chunk-5JPYM4MD.js} +1 -1
  36. package/dist/lib/chunks/{chunk-5VNYUCLL.js → chunk-622NMXN6.js} +6 -9
  37. package/dist/lib/chunks/{chunk-4ZY6P5SO.js → chunk-663HABKP.js} +5 -5
  38. package/dist/lib/chunks/{chunk-RMFT4KKK.js → chunk-6G25V4CF.js} +1 -1
  39. package/dist/lib/chunks/{chunk-GVC4LH2N.js → chunk-6GHHNPFJ.js} +1 -1
  40. package/dist/lib/chunks/{chunk-KMRQSIZW.js → chunk-6GOBBNDU.js} +16 -1
  41. package/dist/lib/chunks/{chunk-SBAZBOPI.js → chunk-6P7EZJI7.js} +4 -2
  42. package/dist/lib/chunks/chunk-7XO3SQAX.js +117 -0
  43. package/dist/lib/chunks/{chunk-M2OD74GP.js → chunk-7Z27HQWL.js} +3 -3
  44. package/dist/lib/chunks/{chunk-IPNK7FYT.js → chunk-AYY4MYTW.js} +1 -1
  45. package/dist/lib/chunks/{chunk-WDSCJEDG.js → chunk-BE4ENGUY.js} +10 -10
  46. package/dist/lib/chunks/{chunk-FKLNEB2P.js → chunk-BGOIPHJZ.js} +39 -11
  47. package/dist/lib/chunks/{chunk-7GXRDAUY.js → chunk-BLKLPUYR.js} +2 -2
  48. package/dist/lib/chunks/chunk-BSRKN6FU.js +93 -0
  49. package/dist/lib/chunks/{chunk-PCYNBDZ7.js → chunk-CO5T6WU5.js} +14 -9
  50. package/dist/lib/chunks/{chunk-BEQLSAVX.js → chunk-CUYVHXHI.js} +2 -2
  51. package/dist/lib/chunks/{chunk-RBOO4NDG.js → chunk-D3GE3OCB.js} +1 -1
  52. package/dist/lib/chunks/chunk-DVFFYY5G.js +74 -0
  53. package/dist/lib/chunks/{chunk-5H3SNUQT.js → chunk-EBUQPCKB.js} +1 -1
  54. package/dist/lib/chunks/{chunk-4E4NDGOZ.js → chunk-EE26FNSY.js} +1 -1
  55. package/dist/lib/chunks/{chunk-AUB5THIS.js → chunk-EJ655TVU.js} +1 -1
  56. package/dist/lib/chunks/{chunk-S2AM76LT.js → chunk-F4W5YHDZ.js} +2 -2
  57. package/dist/lib/chunks/chunk-FAUFE7MI.js +31 -0
  58. package/dist/lib/chunks/{chunk-2KJZ326K.js → chunk-FOCJ7HPC.js} +7 -7
  59. package/dist/lib/chunks/{chunk-OL746E4T.js → chunk-FUAUPNRO.js} +26 -18
  60. package/dist/lib/chunks/{chunk-J6IJGYP5.js → chunk-G62E525I.js} +2 -2
  61. package/dist/lib/chunks/{chunk-2NJEWPCV.js → chunk-GDKGZQ3T.js} +2 -2
  62. package/dist/lib/chunks/{chunk-HSZ3DM74.js → chunk-GEFKDW7X.js} +15 -2
  63. package/dist/lib/chunks/{chunk-CS24IL3K.js → chunk-GESHTTSA.js} +2 -2
  64. package/dist/lib/chunks/chunk-GNMFJ2OK.js +321 -0
  65. package/dist/lib/chunks/{chunk-H3G3VTT7.js → chunk-HFRAHG5C.js} +44 -26
  66. package/dist/lib/chunks/{chunk-MHAKYFDF.js → chunk-HQG63ZKO.js} +11 -11
  67. package/dist/lib/chunks/{chunk-OORO55OM.js → chunk-HTOD4W4E.js} +21 -6
  68. package/dist/lib/chunks/{chunk-Q2PWES4B.js → chunk-I3XGRGXE.js} +1 -1
  69. package/dist/lib/chunks/{chunk-WUELMJ22.js → chunk-IE7NAL6B.js} +1 -1
  70. package/dist/lib/chunks/{chunk-KRFHQQS7.js → chunk-JXMDOAKA.js} +17 -17
  71. package/dist/lib/chunks/{chunk-S7KJZIUR.js → chunk-KJMU5KH4.js} +2 -2
  72. package/dist/lib/chunks/{chunk-2ROSV4HD.js → chunk-L7MEIRJB.js} +1 -1
  73. package/dist/lib/chunks/{chunk-CPT2GKKW.js → chunk-LOBXOZ2R.js} +1 -1
  74. package/dist/lib/chunks/{chunk-IAR6XGEW.js → chunk-ML4W6KC6.js} +1 -1
  75. package/dist/lib/chunks/{chunk-WKH6BJAZ.js → chunk-MNWO7EHC.js} +4 -4
  76. package/dist/lib/chunks/{chunk-D2LPQO6Y.js → chunk-MRL5RUP7.js} +1 -1
  77. package/dist/lib/chunks/{chunk-IEVAFDW7.js → chunk-NCXSNHXX.js} +3 -3
  78. package/dist/lib/chunks/{chunk-AKKFERA4.js → chunk-NGHAP2P5.js} +4 -4
  79. package/dist/lib/chunks/{chunk-ZLOOC46D.js → chunk-OKL7GN2F.js} +3 -3
  80. package/dist/lib/chunks/{chunk-YOZNLFSB.js → chunk-OQU5IXAJ.js} +5 -5
  81. package/dist/lib/chunks/{chunk-I7VNIW6Q.js → chunk-OU73OUX4.js} +16 -10
  82. package/dist/lib/chunks/{chunk-56VOFZ7T.js → chunk-QHUDJVPJ.js} +90 -24
  83. package/dist/lib/chunks/{chunk-WTQWU522.js → chunk-QSJ4IKUF.js} +9 -9
  84. package/dist/lib/chunks/{chunk-FBFZBLTY.js → chunk-R6XDZWUL.js} +7 -8
  85. package/dist/lib/chunks/{chunk-CJ5YD3CU.js → chunk-RJ5R6YYA.js} +5 -5
  86. package/dist/lib/chunks/{chunk-5EX5DKMA.js → chunk-RR46EDDR.js} +33 -25
  87. package/dist/lib/chunks/chunk-RYCRL3YA.js +106 -0
  88. package/dist/lib/chunks/{chunk-Z4LMDKBU.js → chunk-SHUMCKCS.js} +2 -2
  89. package/dist/lib/chunks/{chunk-3EBWDHPK.js → chunk-TJQ5OPLQ.js} +10 -12
  90. package/dist/lib/chunks/chunk-U64NCRRR.js +97 -0
  91. package/dist/lib/chunks/chunk-U772TN32.js +67 -0
  92. package/dist/lib/chunks/{chunk-YR67JG2V.js → chunk-UEMZYHYJ.js} +8 -3
  93. package/dist/lib/chunks/{chunk-J46W3EMQ.js → chunk-UZJSTJFP.js} +5 -5
  94. package/dist/lib/chunks/{chunk-XJVXASDD.js → chunk-V7OAPKNF.js} +3 -3
  95. package/dist/lib/chunks/{chunk-WE2WPNG2.js → chunk-VKM6MMA4.js} +66 -7
  96. package/dist/lib/chunks/{chunk-YWJPJI3W.js → chunk-VL253W5C.js} +3 -1
  97. package/dist/lib/chunks/{chunk-XU6WQ5UL.js → chunk-VPZQGND4.js} +3 -3
  98. package/dist/lib/chunks/{chunk-X2Y2ZNG3.js → chunk-W2VGLWTS.js} +3 -3
  99. package/dist/lib/chunks/{chunk-6AUEDSTU.js → chunk-W5DC23OP.js} +1 -1
  100. package/dist/lib/chunks/chunk-W5X7WJYL.js +91 -0
  101. package/dist/lib/chunks/{chunk-QFVRCSJ2.js → chunk-WDOA5JEH.js} +2 -0
  102. package/dist/lib/chunks/{chunk-6KO7HGCQ.js → chunk-WVACVWBL.js} +2 -2
  103. package/dist/lib/chunks/{chunk-MIF5IYNR.js → chunk-XDG6NPJB.js} +26 -29
  104. package/dist/lib/chunks/{chunk-X6E44EGV.js → chunk-XR44YSHT.js} +2 -2
  105. package/dist/lib/chunks/chunk-Y2CZ6FZY.js +61 -0
  106. package/dist/lib/chunks/{chunk-5KKLUM7M.js → chunk-YAAUWCJ4.js} +1 -1
  107. package/dist/lib/chunks/{chunk-N2ZZ6JRF.js → chunk-YRBIC5QH.js} +1 -1
  108. package/dist/lib/chunks/chunk-ZIGNJAPC.js +11 -0
  109. package/dist/lib/cli/bundle-commands.js +71 -65
  110. package/dist/lib/cli/guide-command.js +25 -0
  111. package/dist/lib/cli/io.js +1 -1
  112. package/dist/lib/cli/run-commands.js +270 -104
  113. package/dist/lib/cli/status-command.js +234 -0
  114. package/dist/lib/codex-workflow/aggregate.js +8 -9
  115. package/dist/lib/codex-workflow/author-tools.js +6 -7
  116. package/dist/lib/codex-workflow/author.js +17 -17
  117. package/dist/lib/codex-workflow/capture.js +10 -9
  118. package/dist/lib/codex-workflow/checkpoint.js +6 -7
  119. package/dist/lib/codex-workflow/checks.js +6 -7
  120. package/dist/lib/codex-workflow/codex-binary.js +13 -0
  121. package/dist/lib/codex-workflow/codex-home.js +6 -3
  122. package/dist/lib/codex-workflow/copy-editor.js +14 -14
  123. package/dist/lib/codex-workflow/copy-recovery.js +3 -4
  124. package/dist/lib/codex-workflow/copy.js +11 -11
  125. package/dist/lib/codex-workflow/finish.js +17 -18
  126. package/dist/lib/codex-workflow/host-models.js +7 -7
  127. package/dist/lib/codex-workflow/loop.js +42 -38
  128. package/dist/lib/codex-workflow/quality.js +3 -4
  129. package/dist/lib/codex-workflow/run-inputs.js +5 -6
  130. package/dist/lib/codex-workflow/run-source.js +14 -13
  131. package/dist/lib/codex-workflow/schemas.js +5 -6
  132. package/dist/lib/codex-workflow/session.js +7 -8
  133. package/dist/lib/codex-workflow/stage.js +26 -23
  134. package/dist/lib/codex-workflow/workdir.js +6 -7
  135. package/dist/lib/engine/audit-file.js +7 -6
  136. package/dist/lib/engine/author.js +37 -31
  137. package/dist/lib/engine/budget.js +7 -1
  138. package/dist/lib/engine/cost-estimate.js +41 -0
  139. package/dist/lib/engine/local-run.js +48 -42
  140. package/dist/lib/engine/preflight.js +10 -6
  141. package/dist/lib/engine/rejudge.js +56 -50
  142. package/dist/lib/engine/resources.js +1 -1
  143. package/dist/lib/engine/run-configuration.js +2 -1
  144. package/dist/lib/engine/run-status.js +151 -0
  145. package/dist/lib/engine/templates.js +8 -7
  146. package/dist/lib/grounding/controller.js +7 -7
  147. package/dist/lib/grounding/extract.js +6 -6
  148. package/dist/lib/grounding/grounding-runtime.js +18 -17
  149. package/dist/lib/grounding/model.js +5 -5
  150. package/dist/lib/grounding/recorded-tools.js +10 -9
  151. package/dist/lib/harness/report/artifacts.js +4 -5
  152. package/dist/lib/lib/checkpoint.js +3 -4
  153. package/dist/lib/models/batching.js +5 -5
  154. package/dist/lib/models/cost-coefficients.js +20 -0
  155. package/dist/lib/models/local-profile.js +10 -0
  156. package/dist/lib/models/pricing.js +6 -0
  157. package/dist/lib/models/profiles.js +7 -14
  158. package/dist/lib/models/structured-images.js +1 -1
  159. package/dist/lib/models/structured.js +4 -4
  160. package/dist/lib/models/supported-models.js +20 -0
  161. package/dist/lib/pipeline.js +9 -8
  162. package/dist/lib/probes/agent-cli-parsers.js +1 -1
  163. package/dist/lib/probes/agent-clis.js +6 -5
  164. package/dist/lib/probes/charged-trace.js +10 -0
  165. package/dist/lib/probes/probes.js +6 -6
  166. package/dist/lib/runner.js +10 -10
  167. package/dist/lib/schema.js +3 -4
  168. package/dist/lib/section-result.js +3 -4
  169. package/dist/lib/stores/artifacts.js +3 -4
  170. package/dist/lib/stores/files.js +9 -9
  171. package/dist/lib/stores/local-versions.js +4 -5
  172. package/dist/lib/stores/memory.js +6 -7
  173. package/dist/lib/stores/publication.js +5 -6
  174. package/dist/lib/viewer/server.js +18 -19
  175. package/dist/lib/workflow/schema.js +2 -3
  176. package/dist/types/agents/copy-validation.d.ts +4 -4
  177. package/dist/types/agents/verifier.d.ts +6 -6
  178. package/dist/types/bundle/contracts.d.ts +1 -1
  179. package/dist/types/bundle/isolation.d.ts +37 -0
  180. package/dist/types/bundle/project-journal.d.ts +2 -0
  181. package/dist/types/bundle/recorder.d.ts +4 -0
  182. package/dist/types/bundle/writer-lock.d.ts +9 -0
  183. package/dist/types/cli/guide-command.d.ts +4 -0
  184. package/dist/types/cli/status-command.d.ts +2 -0
  185. package/dist/types/codex-workflow/codex-binary.d.ts +26 -0
  186. package/dist/types/codex-workflow/codex-home.d.ts +24 -20
  187. package/dist/types/codex-workflow/copy-editor.d.ts +1 -1
  188. package/dist/types/codex-workflow/copy.d.ts +3 -4
  189. package/dist/types/codex-workflow/finish.d.ts +5 -3
  190. package/dist/types/codex-workflow/host-models.d.ts +7 -3
  191. package/dist/types/codex-workflow/loop.d.ts +10 -1
  192. package/dist/types/codex-workflow/run-inputs.d.ts +28 -113
  193. package/dist/types/codex-workflow/stage.d.ts +16 -5
  194. package/dist/types/engine/audit-file.d.ts +3 -2
  195. package/dist/types/engine/author.d.ts +7 -1
  196. package/dist/types/engine/budget.d.ts +46 -15
  197. package/dist/types/engine/cost-estimate.d.ts +40 -0
  198. package/dist/types/engine/local-run.d.ts +6 -0
  199. package/dist/types/engine/preflight.d.ts +5 -0
  200. package/dist/types/engine/resources.d.ts +2 -0
  201. package/dist/types/engine/run-configuration.d.ts +4 -3
  202. package/dist/types/engine/run-status.d.ts +75 -0
  203. package/dist/types/engine/templates.d.ts +1 -2
  204. package/dist/types/models/cost-coefficients.d.ts +106 -0
  205. package/dist/types/models/local-profile.d.ts +12 -0
  206. package/dist/types/models/pricing.d.ts +8 -0
  207. package/dist/types/models/profiles.d.ts +55 -160
  208. package/dist/types/models/served-model.d.ts +2 -3
  209. package/dist/types/models/structured.d.ts +3 -3
  210. package/dist/types/models/supported-models.d.ts +48 -0
  211. package/dist/types/probes/charged-trace.d.ts +8 -0
  212. package/dist/types/probes/probe-trace.d.ts +2 -0
  213. package/dist/types/schema.d.ts +28 -113
  214. package/dist/types/workflow/schema.d.ts +79 -152
  215. package/package.json +2 -1
  216. package/resources/guide/OPERATOR.md +180 -0
  217. package/src/agents/copy-validation.ts +8 -12
  218. package/src/agents/verifier.ts +10 -14
  219. package/src/bundle/contracts.ts +3 -3
  220. package/src/bundle/isolation.ts +157 -0
  221. package/src/bundle/project-journal.ts +4 -0
  222. package/src/bundle/project.ts +20 -7
  223. package/src/bundle/recorder.ts +5 -0
  224. package/src/bundle/writer-lock.ts +27 -0
  225. package/src/cli/guide-command.ts +28 -0
  226. package/src/cli/io.ts +2 -0
  227. package/src/cli/literally-aeo.ts +39 -19
  228. package/src/cli/run-commands.ts +236 -18
  229. package/src/cli/status-command.ts +113 -0
  230. package/src/codex-workflow/codex-binary.ts +105 -0
  231. package/src/codex-workflow/codex-home.ts +50 -40
  232. package/src/codex-workflow/copy.ts +7 -10
  233. package/src/codex-workflow/finish.ts +13 -8
  234. package/src/codex-workflow/host-models.ts +33 -24
  235. package/src/codex-workflow/loop.ts +36 -9
  236. package/src/codex-workflow/stage.ts +126 -17
  237. package/src/engine/audit-file.ts +10 -8
  238. package/src/engine/author.ts +47 -2
  239. package/src/engine/budget.ts +138 -43
  240. package/src/engine/cost-estimate.ts +178 -0
  241. package/src/engine/guide/OPERATOR.md +180 -0
  242. package/src/engine/local-run.ts +38 -8
  243. package/src/engine/preflight.ts +90 -7
  244. package/src/engine/resources.ts +9 -4
  245. package/src/engine/run-configuration.ts +19 -1
  246. package/src/engine/run-status.ts +452 -0
  247. package/src/engine/templates.ts +5 -2
  248. package/src/models/cost-coefficients.ts +140 -0
  249. package/src/models/local-profile.ts +150 -0
  250. package/src/models/pricing.ts +31 -0
  251. package/src/models/profiles.ts +58 -419
  252. package/src/models/served-model.ts +2 -3
  253. package/src/models/structured-images.ts +5 -4
  254. package/src/models/structured.ts +20 -7
  255. package/src/models/supported-models.ts +112 -0
  256. package/src/probes/agent-clis.ts +24 -2
  257. package/src/probes/charged-trace.ts +87 -0
  258. package/src/probes/probe-trace.ts +2 -0
  259. package/src/probes/probes.ts +48 -2
  260. package/dist/lib/chunks/chunk-CFFPOTP4.js +0 -356
  261. package/dist/lib/chunks/chunk-LIZX4N3H.js +0 -110
  262. package/dist/lib/chunks/chunk-OYKV5NDM.js +0 -28
@@ -0,0 +1,106 @@
1
+ import type { AeoSurface } from '../surfaces';
2
+ import type { TokenUsage } from './pricing';
3
+ export declare const costCoefficientsVersion = 1;
4
+ export type TokenRange = {
5
+ input: number;
6
+ output: number;
7
+ };
8
+ export type Range<T> = {
9
+ low: T;
10
+ high: T;
11
+ };
12
+ /** Codex stage tokens. `perAnswer` covers every stage that reads answer
13
+ * files; `perRun` the write stage, which reads the whole report. */
14
+ export declare const stageTokens: {
15
+ readonly perAnswer: {
16
+ readonly low: {
17
+ readonly input: 30000;
18
+ readonly output: 4000;
19
+ };
20
+ readonly high: {
21
+ readonly input: 90000;
22
+ readonly output: 16000;
23
+ };
24
+ };
25
+ readonly perRun: {
26
+ readonly low: {
27
+ readonly input: 250000;
28
+ readonly output: 10000;
29
+ };
30
+ readonly high: {
31
+ readonly input: 900000;
32
+ readonly output: 40000;
33
+ };
34
+ };
35
+ /** The share of stage input served from cache: high is cheap. The
36
+ * supported models reported none through the gateway in the spike. */
37
+ readonly cachedShare: {
38
+ readonly low: 0;
39
+ readonly high: 0.8;
40
+ };
41
+ };
42
+ /** The one author session. */
43
+ export declare const authorTokens: {
44
+ readonly session: {
45
+ readonly low: {
46
+ readonly input: 250000;
47
+ readonly output: 10000;
48
+ };
49
+ readonly high: {
50
+ readonly input: 800000;
51
+ readonly output: 45000;
52
+ };
53
+ };
54
+ };
55
+ /** The author's research searches at the low end; the high end is the
56
+ * research tools' own spend cap (`authorToolCaps.searchSpendUsd`). */
57
+ export declare const authorSearchLowUsd = 0.05;
58
+ /** The host's own model calls per captured answer, by grounding:
59
+ * perception, source labels and the copy verifier always; claim research
60
+ * and adjudication under full grounding. */
61
+ export declare const hostTokensPerAnswer: {
62
+ readonly extraction_only: {
63
+ readonly low: {
64
+ readonly input: 1500;
65
+ readonly output: 3000;
66
+ };
67
+ readonly high: {
68
+ readonly input: 8000;
69
+ readonly output: 12000;
70
+ };
71
+ };
72
+ readonly full: {
73
+ readonly low: {
74
+ readonly input: 6000;
75
+ readonly output: 6000;
76
+ };
77
+ readonly high: {
78
+ readonly input: 24000;
79
+ readonly output: 18000;
80
+ };
81
+ };
82
+ };
83
+ /** Grounding search per captured answer under full grounding. */
84
+ export declare const searchUsdPerAnswer: {
85
+ readonly low: 0.001;
86
+ readonly high: 0.01;
87
+ };
88
+ /** One probe unit, by surface, in USD. The coding-agent surfaces run on
89
+ * the operator's own login and bill nothing to the run. */
90
+ export declare const probeUsd: Record<AeoSurface, Range<number>>;
91
+ /** The calibrated workload a Codex session is: a batch of answer files
92
+ * (analyze, qualify, review), the whole report (write) or a brief
93
+ * (author). Each stage's descriptor names its own. */
94
+ export type SessionCost = 'answers' | 'report' | 'brief';
95
+ /**
96
+ * sessionReservation is what one Codex session is reserved at before it
97
+ * starts: the same high figures, cache share included, that the estimate's
98
+ * high end assumes, so a run under the cap the estimate recommends is never
99
+ * refused for its reservations. The session settles at the tokens it
100
+ * reports; its reservation bounds how far one session can carry the run
101
+ * past its cap.
102
+ */
103
+ export declare const sessionReservation: ({ cost, answers, }: {
104
+ cost: SessionCost;
105
+ answers: number;
106
+ }) => TokenUsage;
@@ -0,0 +1,12 @@
1
+ import { type CodexStageModel, type InternalModelProfile } from './profiles';
2
+ import type { SupportedModel } from './supported-models';
3
+ /** The Codex stages' settings for a supported model. */
4
+ export declare const localStageModel: (model: SupportedModel) => CodexStageModel;
5
+ type LocalModelProfileOptions = {
6
+ /** Full grounding researches through the pinned search provider; it is
7
+ * pinned by the audit, never inferred from which credentials are set. */
8
+ searchProvider: InternalModelProfile['searchProvider'];
9
+ };
10
+ /** localModelProfile builds the profile a local run pins for `model`. */
11
+ export declare const localModelProfile: (model: SupportedModel, { searchProvider }: LocalModelProfileOptions) => InternalModelProfile;
12
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { ModelPricing } from './profiles';
2
+ export type TokenUsage = {
3
+ inputTokens: number;
4
+ /** Part of inputTokens, served from the provider's cache. */
5
+ cachedInputTokens: number;
6
+ outputTokens: number;
7
+ };
8
+ export declare const tokenCostUsd: (pricing: ModelPricing, usage: TokenUsage) => number;
@@ -1,44 +1,22 @@
1
1
  import { z } from 'zod';
2
- /** Profile IDs are persisted on every run and pipeline, so none is ever
3
- * renamed or removed. The `-harness-` IDs date from the journaled harness
4
- * loop; since 2026-09-13 they resolve the same roles as their `-grounding-`
5
- * siblings (the review roles that set them apart are retired). */
6
- export declare const internalModelProfileIdSchema: z.ZodEnum<{
7
- "opus-grounding-v1": "opus-grounding-v1";
8
- "astra-grounding-v1": "astra-grounding-v1";
9
- "opus-harness-v1": "opus-harness-v1";
10
- "astra-harness-v1": "astra-harness-v1";
11
- "glm-harness-v1": "glm-harness-v1";
12
- "deepseek-harness-v1": "deepseek-harness-v1";
13
- "deepseek-harness-v2": "deepseek-harness-v2";
14
- }>;
2
+ /** A profile's ID: whatever its author named it. */
3
+ export declare const internalModelProfileIdSchema: z.ZodString;
15
4
  export type InternalModelProfileId = z.infer<typeof internalModelProfileIdSchema>;
16
- export declare const defaultInternalModelProfile: InternalModelProfileId;
17
- /** The profile every admission pins, whatever the request named: every
18
- * role, the copy premise verifier included, resolves to DeepSeek, so no
19
- * judgment lands on a premium model (Andrei, 2026-09-13) and the copy
20
- * receipt matches the role the publication gate re-checks. */
21
- export declare const codexRunnerProfile: InternalModelProfileId;
22
- /** The profile an operator configured for the host model steps of the local
23
- * Codex workflow: `AEO_MODEL_PROFILE` (its older name
24
- * `AEO_INTERNAL_MODEL_PROFILE` still reads), validated so a typo fails at
25
- * startup. Pipeline admissions do not read it; they pin codexRunnerProfile. */
26
- export declare const configuredModelProfileId: (env?: Record<string, string | undefined>) => InternalModelProfileId;
27
5
  export declare const generationBackendSchema: z.ZodEnum<{
28
6
  claude_code: "claude_code";
29
7
  codex: "codex";
30
8
  gateway: "gateway";
31
9
  }>;
32
10
  export type GenerationBackend = z.infer<typeof generationBackendSchema>;
11
+ export declare const modelPricingSchema: z.ZodObject<{
12
+ input: z.ZodNumber;
13
+ output: z.ZodNumber;
14
+ cachedInput: z.ZodNumber;
15
+ }, z.core.$strict>;
16
+ /** List prices, USD per million tokens. */
17
+ export type ModelPricing = z.infer<typeof modelPricingSchema>;
33
18
  export declare const internalModelRoleSchema: z.ZodObject<{
34
- model: z.ZodEnum<{
35
- "anthropic/claude-opus-4.6": "anthropic/claude-opus-4.6";
36
- "openai/gpt-6-astra": "openai/gpt-6-astra";
37
- "zai/glm-5.3": "zai/glm-5.3";
38
- "moonshotai/kimi-k3": "moonshotai/kimi-k3";
39
- "deepseek/deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash";
40
- "anthropic/claude-opus-5": "anthropic/claude-opus-5";
41
- }>;
19
+ model: z.ZodString;
42
20
  providerOptions: z.ZodObject<{
43
21
  openai: z.ZodOptional<z.ZodObject<{
44
22
  reasoningEffort: z.ZodLiteral<"high">;
@@ -65,20 +43,29 @@ export declare const internalModelRoleSchema: z.ZodObject<{
65
43
  }, z.core.$strict>;
66
44
  }, z.core.$strict>;
67
45
  export type InternalModelRoleConfig = z.infer<typeof internalModelRoleSchema>;
46
+ /** The model the Codex stages run on, through the gateway: part of every
47
+ * stage's inputs digest and of the run's method. */
48
+ export declare const codexStageModelSchema: z.ZodObject<{
49
+ model: z.ZodString;
50
+ reasoningEffort: z.ZodEnum<{
51
+ high: "high";
52
+ medium: "medium";
53
+ xhigh: "xhigh";
54
+ }>;
55
+ contextWindow: z.ZodNumber;
56
+ pricingUsdPerMillion: z.ZodObject<{
57
+ input: z.ZodNumber;
58
+ output: z.ZodNumber;
59
+ cachedInput: z.ZodNumber;
60
+ }, z.core.$strict>;
61
+ }, z.core.$strict>;
62
+ export type CodexStageModel = z.infer<typeof codexStageModelSchema>;
68
63
  export declare const researchSearchProviderSchema: z.ZodEnum<{
69
64
  disabled: "disabled";
70
65
  "dataforseo-google-organic-v1": "dataforseo-google-organic-v1";
71
66
  }>;
72
67
  export declare const internalModelProfileSchema: z.ZodObject<{
73
- id: z.ZodEnum<{
74
- "opus-grounding-v1": "opus-grounding-v1";
75
- "astra-grounding-v1": "astra-grounding-v1";
76
- "opus-harness-v1": "opus-harness-v1";
77
- "astra-harness-v1": "astra-harness-v1";
78
- "glm-harness-v1": "glm-harness-v1";
79
- "deepseek-harness-v1": "deepseek-harness-v1";
80
- "deepseek-harness-v2": "deepseek-harness-v2";
81
- }>;
68
+ id: z.ZodString;
82
69
  version: z.ZodLiteral<1>;
83
70
  pricingCheckedAt: z.ZodISODate;
84
71
  searchProvider: z.ZodEnum<{
@@ -87,14 +74,7 @@ export declare const internalModelProfileSchema: z.ZodObject<{
87
74
  }>;
88
75
  roles: z.ZodObject<{
89
76
  analyzer: z.ZodObject<{
90
- model: z.ZodEnum<{
91
- "anthropic/claude-opus-4.6": "anthropic/claude-opus-4.6";
92
- "openai/gpt-6-astra": "openai/gpt-6-astra";
93
- "zai/glm-5.3": "zai/glm-5.3";
94
- "moonshotai/kimi-k3": "moonshotai/kimi-k3";
95
- "deepseek/deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash";
96
- "anthropic/claude-opus-5": "anthropic/claude-opus-5";
97
- }>;
77
+ model: z.ZodString;
98
78
  providerOptions: z.ZodObject<{
99
79
  openai: z.ZodOptional<z.ZodObject<{
100
80
  reasoningEffort: z.ZodLiteral<"high">;
@@ -121,14 +101,7 @@ export declare const internalModelProfileSchema: z.ZodObject<{
121
101
  }, z.core.$strict>;
122
102
  }, z.core.$strict>;
123
103
  perception: z.ZodObject<{
124
- model: z.ZodEnum<{
125
- "anthropic/claude-opus-4.6": "anthropic/claude-opus-4.6";
126
- "openai/gpt-6-astra": "openai/gpt-6-astra";
127
- "zai/glm-5.3": "zai/glm-5.3";
128
- "moonshotai/kimi-k3": "moonshotai/kimi-k3";
129
- "deepseek/deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash";
130
- "anthropic/claude-opus-5": "anthropic/claude-opus-5";
131
- }>;
104
+ model: z.ZodString;
132
105
  providerOptions: z.ZodObject<{
133
106
  openai: z.ZodOptional<z.ZodObject<{
134
107
  reasoningEffort: z.ZodLiteral<"high">;
@@ -155,14 +128,7 @@ export declare const internalModelProfileSchema: z.ZodObject<{
155
128
  }, z.core.$strict>;
156
129
  }, z.core.$strict>;
157
130
  research: z.ZodObject<{
158
- model: z.ZodEnum<{
159
- "anthropic/claude-opus-4.6": "anthropic/claude-opus-4.6";
160
- "openai/gpt-6-astra": "openai/gpt-6-astra";
161
- "zai/glm-5.3": "zai/glm-5.3";
162
- "moonshotai/kimi-k3": "moonshotai/kimi-k3";
163
- "deepseek/deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash";
164
- "anthropic/claude-opus-5": "anthropic/claude-opus-5";
165
- }>;
131
+ model: z.ZodString;
166
132
  providerOptions: z.ZodObject<{
167
133
  openai: z.ZodOptional<z.ZodObject<{
168
134
  reasoningEffort: z.ZodLiteral<"high">;
@@ -189,14 +155,7 @@ export declare const internalModelProfileSchema: z.ZodObject<{
189
155
  }, z.core.$strict>;
190
156
  }, z.core.$strict>;
191
157
  adjudication: z.ZodObject<{
192
- model: z.ZodEnum<{
193
- "anthropic/claude-opus-4.6": "anthropic/claude-opus-4.6";
194
- "openai/gpt-6-astra": "openai/gpt-6-astra";
195
- "zai/glm-5.3": "zai/glm-5.3";
196
- "moonshotai/kimi-k3": "moonshotai/kimi-k3";
197
- "deepseek/deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash";
198
- "anthropic/claude-opus-5": "anthropic/claude-opus-5";
199
- }>;
158
+ model: z.ZodString;
200
159
  providerOptions: z.ZodObject<{
201
160
  openai: z.ZodOptional<z.ZodObject<{
202
161
  reasoningEffort: z.ZodLiteral<"high">;
@@ -223,14 +182,7 @@ export declare const internalModelProfileSchema: z.ZodObject<{
223
182
  }, z.core.$strict>;
224
183
  }, z.core.$strict>;
225
184
  premiseVerifier: z.ZodObject<{
226
- model: z.ZodEnum<{
227
- "anthropic/claude-opus-4.6": "anthropic/claude-opus-4.6";
228
- "openai/gpt-6-astra": "openai/gpt-6-astra";
229
- "zai/glm-5.3": "zai/glm-5.3";
230
- "moonshotai/kimi-k3": "moonshotai/kimi-k3";
231
- "deepseek/deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash";
232
- "anthropic/claude-opus-5": "anthropic/claude-opus-5";
233
- }>;
185
+ model: z.ZodString;
234
186
  providerOptions: z.ZodObject<{
235
187
  openai: z.ZodOptional<z.ZodObject<{
236
188
  reasoningEffort: z.ZodLiteral<"high">;
@@ -257,14 +209,7 @@ export declare const internalModelProfileSchema: z.ZodObject<{
257
209
  }, z.core.$strict>;
258
210
  }, z.core.$strict>;
259
211
  author: z.ZodObject<{
260
- model: z.ZodEnum<{
261
- "anthropic/claude-opus-4.6": "anthropic/claude-opus-4.6";
262
- "openai/gpt-6-astra": "openai/gpt-6-astra";
263
- "zai/glm-5.3": "zai/glm-5.3";
264
- "moonshotai/kimi-k3": "moonshotai/kimi-k3";
265
- "deepseek/deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash";
266
- "anthropic/claude-opus-5": "anthropic/claude-opus-5";
267
- }>;
212
+ model: z.ZodString;
268
213
  providerOptions: z.ZodObject<{
269
214
  openai: z.ZodOptional<z.ZodObject<{
270
215
  reasoningEffort: z.ZodLiteral<"high">;
@@ -291,14 +236,7 @@ export declare const internalModelProfileSchema: z.ZodObject<{
291
236
  }, z.core.$strict>;
292
237
  }, z.core.$strict>;
293
238
  copy: z.ZodObject<{
294
- model: z.ZodEnum<{
295
- "anthropic/claude-opus-4.6": "anthropic/claude-opus-4.6";
296
- "openai/gpt-6-astra": "openai/gpt-6-astra";
297
- "zai/glm-5.3": "zai/glm-5.3";
298
- "moonshotai/kimi-k3": "moonshotai/kimi-k3";
299
- "deepseek/deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash";
300
- "anthropic/claude-opus-5": "anthropic/claude-opus-5";
301
- }>;
239
+ model: z.ZodString;
302
240
  providerOptions: z.ZodObject<{
303
241
  openai: z.ZodOptional<z.ZodObject<{
304
242
  reasoningEffort: z.ZodLiteral<"high">;
@@ -325,14 +263,7 @@ export declare const internalModelProfileSchema: z.ZodObject<{
325
263
  }, z.core.$strict>;
326
264
  }, z.core.$strict>;
327
265
  domainClassifier: z.ZodObject<{
328
- model: z.ZodEnum<{
329
- "anthropic/claude-opus-4.6": "anthropic/claude-opus-4.6";
330
- "openai/gpt-6-astra": "openai/gpt-6-astra";
331
- "zai/glm-5.3": "zai/glm-5.3";
332
- "moonshotai/kimi-k3": "moonshotai/kimi-k3";
333
- "deepseek/deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash";
334
- "anthropic/claude-opus-5": "anthropic/claude-opus-5";
335
- }>;
266
+ model: z.ZodString;
336
267
  providerOptions: z.ZodObject<{
337
268
  openai: z.ZodOptional<z.ZodObject<{
338
269
  reasoningEffort: z.ZodLiteral<"high">;
@@ -359,14 +290,7 @@ export declare const internalModelProfileSchema: z.ZodObject<{
359
290
  }, z.core.$strict>;
360
291
  }, z.core.$strict>;
361
292
  logoDiscovery: z.ZodOptional<z.ZodObject<{
362
- model: z.ZodEnum<{
363
- "anthropic/claude-opus-4.6": "anthropic/claude-opus-4.6";
364
- "openai/gpt-6-astra": "openai/gpt-6-astra";
365
- "zai/glm-5.3": "zai/glm-5.3";
366
- "moonshotai/kimi-k3": "moonshotai/kimi-k3";
367
- "deepseek/deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash";
368
- "anthropic/claude-opus-5": "anthropic/claude-opus-5";
369
- }>;
293
+ model: z.ZodString;
370
294
  providerOptions: z.ZodObject<{
371
295
  openai: z.ZodOptional<z.ZodObject<{
372
296
  reasoningEffort: z.ZodLiteral<"high">;
@@ -393,14 +317,7 @@ export declare const internalModelProfileSchema: z.ZodObject<{
393
317
  }, z.core.$strict>;
394
318
  }, z.core.$strict>>;
395
319
  competitorClassifier: z.ZodOptional<z.ZodObject<{
396
- model: z.ZodEnum<{
397
- "anthropic/claude-opus-4.6": "anthropic/claude-opus-4.6";
398
- "openai/gpt-6-astra": "openai/gpt-6-astra";
399
- "zai/glm-5.3": "zai/glm-5.3";
400
- "moonshotai/kimi-k3": "moonshotai/kimi-k3";
401
- "deepseek/deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash";
402
- "anthropic/claude-opus-5": "anthropic/claude-opus-5";
403
- }>;
320
+ model: z.ZodString;
404
321
  providerOptions: z.ZodObject<{
405
322
  openai: z.ZodOptional<z.ZodObject<{
406
323
  reasoningEffort: z.ZodLiteral<"high">;
@@ -427,14 +344,7 @@ export declare const internalModelProfileSchema: z.ZodObject<{
427
344
  }, z.core.$strict>;
428
345
  }, z.core.$strict>>;
429
346
  scrutiny: z.ZodOptional<z.ZodObject<{
430
- model: z.ZodEnum<{
431
- "anthropic/claude-opus-4.6": "anthropic/claude-opus-4.6";
432
- "openai/gpt-6-astra": "openai/gpt-6-astra";
433
- "zai/glm-5.3": "zai/glm-5.3";
434
- "moonshotai/kimi-k3": "moonshotai/kimi-k3";
435
- "deepseek/deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash";
436
- "anthropic/claude-opus-5": "anthropic/claude-opus-5";
437
- }>;
347
+ model: z.ZodString;
438
348
  providerOptions: z.ZodObject<{
439
349
  openai: z.ZodOptional<z.ZodObject<{
440
350
  reasoningEffort: z.ZodLiteral<"high">;
@@ -461,14 +371,7 @@ export declare const internalModelProfileSchema: z.ZodObject<{
461
371
  }, z.core.$strict>;
462
372
  }, z.core.$strict>>;
463
373
  repairPlanner: z.ZodOptional<z.ZodObject<{
464
- model: z.ZodEnum<{
465
- "anthropic/claude-opus-4.6": "anthropic/claude-opus-4.6";
466
- "openai/gpt-6-astra": "openai/gpt-6-astra";
467
- "zai/glm-5.3": "zai/glm-5.3";
468
- "moonshotai/kimi-k3": "moonshotai/kimi-k3";
469
- "deepseek/deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash";
470
- "anthropic/claude-opus-5": "anthropic/claude-opus-5";
471
- }>;
374
+ model: z.ZodString;
472
375
  providerOptions: z.ZodObject<{
473
376
  openai: z.ZodOptional<z.ZodObject<{
474
377
  reasoningEffort: z.ZodLiteral<"high">;
@@ -495,14 +398,7 @@ export declare const internalModelProfileSchema: z.ZodObject<{
495
398
  }, z.core.$strict>;
496
399
  }, z.core.$strict>>;
497
400
  visualReviewer: z.ZodOptional<z.ZodObject<{
498
- model: z.ZodEnum<{
499
- "anthropic/claude-opus-4.6": "anthropic/claude-opus-4.6";
500
- "openai/gpt-6-astra": "openai/gpt-6-astra";
501
- "zai/glm-5.3": "zai/glm-5.3";
502
- "moonshotai/kimi-k3": "moonshotai/kimi-k3";
503
- "deepseek/deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash";
504
- "anthropic/claude-opus-5": "anthropic/claude-opus-5";
505
- }>;
401
+ model: z.ZodString;
506
402
  providerOptions: z.ZodObject<{
507
403
  openai: z.ZodOptional<z.ZodObject<{
508
404
  reasoningEffort: z.ZodLiteral<"high">;
@@ -529,23 +425,22 @@ export declare const internalModelProfileSchema: z.ZodObject<{
529
425
  }, z.core.$strict>;
530
426
  }, z.core.$strict>>;
531
427
  }, z.core.$strict>;
428
+ stages: z.ZodOptional<z.ZodObject<{
429
+ model: z.ZodString;
430
+ reasoningEffort: z.ZodEnum<{
431
+ high: "high";
432
+ medium: "medium";
433
+ xhigh: "xhigh";
434
+ }>;
435
+ contextWindow: z.ZodNumber;
436
+ pricingUsdPerMillion: z.ZodObject<{
437
+ input: z.ZodNumber;
438
+ output: z.ZodNumber;
439
+ cachedInput: z.ZodNumber;
440
+ }, z.core.$strict>;
441
+ }, z.core.$strict>>;
532
442
  }, z.core.$strict>;
533
443
  export type InternalModelProfile = z.infer<typeof internalModelProfileSchema>;
534
444
  export type InternalModelRole = keyof InternalModelProfile['roles'];
535
- /** The model family behind a role. A profile picks one family for its text
536
- * roles, one for the vision role (logo discovery) and one for domain
537
- * classification. Gateway list prices, USD per million tokens, checked on
538
- * `pricingCheckedAt`. */
539
- type ModelFamily = 'opus' | 'astra' | 'glm' | 'kimi' | 'deepseek' | 'opus5';
540
- export declare const parseInternalModelProfileId: (id: string) => {
541
- family: ModelFamily;
542
- version: number;
543
- };
544
- /**
545
- * resolveInternalModelProfile runs once at admission; the complete snapshot is
546
- * persisted for every retry.
547
- */
548
- export declare const resolveInternalModelProfile: (id?: InternalModelProfileId, env?: Record<string, string | undefined>) => InternalModelProfile;
549
445
  export declare const internalModelProfileDigest: (profile: InternalModelProfile) => string;
550
446
  export declare const internalModelRoleDigest: (roleConfig: InternalModelRoleConfig) => string;
551
- export {};
@@ -4,8 +4,7 @@
4
4
  * the provider names none, so a value equal to the request proves nothing and
5
5
  * is recorded as unknown (specs/aeo-open-source-cli-spec.md §7.1: observed
6
6
  * identity is never filled from the requested model). The gateway names the
7
- * upstream route when it has one, for example
8
- * `accounts/fireworks/models/deepseek-v4p1-flash` for
9
- * `deepseek/deepseek-v4.1-flash`.
7
+ * upstream route when it has one: an upstream provider's own name for the
8
+ * model it served.
10
9
  */
11
10
  export declare const servedModelOf: (requestedModel: string, responseModelId: string | undefined) => string | undefined;
@@ -92,9 +92,9 @@ export type StructuredTransport = {
92
92
  * A pinned profile names the gateway routes a family may use (`gateway.only`);
93
93
  * `AEO_GATEWAY_ROUTE_DENYLIST` (comma-separated route names) removes routes from
94
94
  * that list at call time without touching the pin, because route health is
95
- * operational, not part of what was admitted. Measured 2026-09-12: DeepInfra
96
- * passed a one-object probe and then refused the evidence reviewer's request
97
- * with no output, three times, on an execution whose pin already named it. A
95
+ * operational, not part of what was admitted: a route can pass a one-object
96
+ * probe and then refuse a real request with no output, on an execution whose
97
+ * pin already names it. A
98
98
  * denylist that would empty the allowlist is ignored rather than dispatching
99
99
  * with none.
100
100
  */
@@ -0,0 +1,48 @@
1
+ import { z } from 'zod';
2
+ export declare const supportedModelSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ label: z.ZodString;
5
+ pricingUsdPerMillion: z.ZodObject<{
6
+ input: z.ZodNumber;
7
+ output: z.ZodNumber;
8
+ cachedInput: z.ZodNumber;
9
+ }, z.core.$strict>;
10
+ pricingCheckedAt: z.ZodISODate;
11
+ contextWindow: z.ZodNumber;
12
+ maxOutputTokens: z.ZodNumber;
13
+ thinkingInOutput: z.ZodBoolean;
14
+ providerOptions: z.ZodObject<{
15
+ openai: z.ZodOptional<z.ZodObject<{
16
+ reasoningEffort: z.ZodLiteral<"high">;
17
+ }, z.core.$strict>>;
18
+ gateway: z.ZodOptional<z.ZodObject<{
19
+ reasoning: z.ZodUnion<readonly [z.ZodObject<{
20
+ effort: z.ZodLiteral<"high">;
21
+ }, z.core.$strict>, z.ZodObject<{
22
+ max_tokens: z.ZodNumber;
23
+ }, z.core.$strict>]>;
24
+ only: z.ZodOptional<z.ZodArray<z.ZodString>>;
25
+ }, z.core.$strict>>;
26
+ }, z.core.$strict>;
27
+ stageReasoningEffort: z.ZodEnum<{
28
+ high: "high";
29
+ medium: "medium";
30
+ xhigh: "xhigh";
31
+ }>;
32
+ stageRuntimeVerifiedAt: z.ZodNullable<z.ZodISODate>;
33
+ }, z.core.$strict>;
34
+ export type SupportedModel = z.infer<typeof supportedModelSchema>;
35
+ export declare const supportedModels: readonly SupportedModel[];
36
+ /** The model a run uses when audit.json names none: the strongest the
37
+ * engine supports, because judgment and copy quality are the report. */
38
+ export declare const recommendedModelId = "anthropic/claude-opus-5.5";
39
+ /** The supported models as a list a person or an agent can read. */
40
+ export declare const describeSupportedModels: () => string[];
41
+ /** findSupportedModel returns the list's entry for a gateway model ID. */
42
+ export declare const findSupportedModel: (id: string) => SupportedModel | undefined;
43
+ export declare class UnsupportedModelError extends Error {
44
+ constructor(id: string);
45
+ }
46
+ /** resolveSupportedModel returns the entry a run uses: the named model, or
47
+ * the recommended one when none is named. An unknown ID is refused. */
48
+ export declare const resolveSupportedModel: (id?: string) => SupportedModel;
@@ -0,0 +1,8 @@
1
+ import { ModelBudgetError, type ModelCallAccounting } from '../models/accounting';
2
+ import type { ProbeTrace } from './probe-trace';
3
+ export type ChargedTrace = {
4
+ trace: ProbeTrace;
5
+ /** The first refusal of the cap, once an attempt was refused. */
6
+ exhausted: () => ModelBudgetError | undefined;
7
+ };
8
+ export declare const chargedProbeTrace: (trace: ProbeTrace, ledger: ModelCallAccounting) => ChargedTrace;
@@ -19,6 +19,8 @@ export type ProbeAttemptEnd = {
19
19
  requestedModel: string | null;
20
20
  reportedModel?: string;
21
21
  noOverview?: true;
22
+ /** What the provider reported the attempt cost, when it did. */
23
+ costUsd?: number;
22
24
  } | {
23
25
  outcome: 'failed' | 'cancelled';
24
26
  kind: string;