literally-aeo 0.1.1 → 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.
- package/README.md +42 -6
- package/dist/author-tools.js +33 -64
- package/dist/cli.mjs +2723 -1616
- package/dist/lib/agents/author-schema.js +4 -5
- package/dist/lib/agents/author-validation.js +5 -6
- package/dist/lib/agents/copy-validation.js +4 -5
- package/dist/lib/agents/verifier.js +8 -8
- package/dist/lib/analysis/domain-classifier.js +8 -8
- package/dist/lib/analysis/domain-labels.js +3 -4
- package/dist/lib/analysis/progress.js +3 -4
- package/dist/lib/analysis/sentiment.js +8 -8
- package/dist/lib/author/examples.js +5 -6
- package/dist/lib/bundle/contracts.js +5 -6
- package/dist/lib/bundle/export.js +22 -19
- package/dist/lib/bundle/isolation.js +17 -0
- package/dist/lib/bundle/journal.js +6 -7
- package/dist/lib/bundle/project-journal.js +11 -10
- package/dist/lib/bundle/project.js +19 -16
- package/dist/lib/bundle/read.js +23 -20
- package/dist/lib/bundle/recorder.js +9 -8
- package/dist/lib/bundle/redact.js +6 -7
- package/dist/lib/bundle/trace-coverage.js +6 -7
- package/dist/lib/bundle/verify-integrity.js +8 -9
- package/dist/lib/bundle/verify-measurement.js +10 -11
- package/dist/lib/bundle/verify-report.js +11 -12
- package/dist/lib/bundle/verify.js +17 -18
- package/dist/lib/bundle/writer-lock.js +3 -1
- package/dist/lib/capture-manifest.js +3 -4
- package/dist/lib/checks/run-checks.js +10 -9
- package/dist/lib/chunks/chunk-2B5QF6UQ.js +159 -0
- package/dist/lib/chunks/{chunk-ZBDUE3A5.js → chunk-2GU6CNQI.js} +12 -7
- package/dist/lib/chunks/{chunk-CKUTDJAB.js → chunk-2ROXN2EC.js} +42 -7
- package/dist/lib/chunks/{chunk-XHWRSGX3.js → chunk-3JO5TXBA.js} +1 -1
- package/dist/lib/chunks/{chunk-XL4JIQ5X.js → chunk-4PD65FRJ.js} +7 -3
- package/dist/lib/chunks/{chunk-GMKF2FU4.js → chunk-5JPYM4MD.js} +1 -1
- package/dist/lib/chunks/{chunk-5VNYUCLL.js → chunk-622NMXN6.js} +6 -9
- package/dist/lib/chunks/{chunk-XNRSHATN.js → chunk-663HABKP.js} +5 -5
- package/dist/lib/chunks/{chunk-RMFT4KKK.js → chunk-6G25V4CF.js} +1 -1
- package/dist/lib/chunks/{chunk-GVC4LH2N.js → chunk-6GHHNPFJ.js} +1 -1
- package/dist/lib/chunks/{chunk-KMRQSIZW.js → chunk-6GOBBNDU.js} +16 -1
- package/dist/lib/chunks/{chunk-SBAZBOPI.js → chunk-6P7EZJI7.js} +4 -2
- package/dist/lib/chunks/chunk-7XO3SQAX.js +117 -0
- package/dist/lib/chunks/{chunk-SWS3K62X.js → chunk-7Z27HQWL.js} +3 -3
- package/dist/lib/chunks/{chunk-IPNK7FYT.js → chunk-AYY4MYTW.js} +1 -1
- package/dist/lib/chunks/{chunk-WDSCJEDG.js → chunk-BE4ENGUY.js} +10 -10
- package/dist/lib/chunks/{chunk-FKLNEB2P.js → chunk-BGOIPHJZ.js} +39 -11
- package/dist/lib/chunks/{chunk-7GXRDAUY.js → chunk-BLKLPUYR.js} +2 -2
- package/dist/lib/chunks/chunk-BSRKN6FU.js +93 -0
- package/dist/lib/chunks/{chunk-PCYNBDZ7.js → chunk-CO5T6WU5.js} +14 -9
- package/dist/lib/chunks/{chunk-E3OEE5XN.js → chunk-CUYVHXHI.js} +2 -2
- package/dist/lib/chunks/{chunk-2GY42RIJ.js → chunk-D3GE3OCB.js} +1 -1
- package/dist/lib/chunks/chunk-DVFFYY5G.js +74 -0
- package/dist/lib/chunks/{chunk-ZXGATMMH.js → chunk-EBUQPCKB.js} +1 -1
- package/dist/lib/chunks/{chunk-4E4NDGOZ.js → chunk-EE26FNSY.js} +1 -1
- package/dist/lib/chunks/{chunk-AUB5THIS.js → chunk-EJ655TVU.js} +1 -1
- package/dist/lib/chunks/{chunk-S2AM76LT.js → chunk-F4W5YHDZ.js} +2 -2
- package/dist/lib/chunks/chunk-FAUFE7MI.js +31 -0
- package/dist/lib/chunks/{chunk-FNDJUELJ.js → chunk-FOCJ7HPC.js} +7 -7
- package/dist/lib/chunks/{chunk-FPAN3VRW.js → chunk-FUAUPNRO.js} +26 -18
- package/dist/lib/chunks/{chunk-OQVIRYT5.js → chunk-G62E525I.js} +2 -2
- package/dist/lib/chunks/{chunk-2NJEWPCV.js → chunk-GDKGZQ3T.js} +2 -2
- package/dist/lib/chunks/{chunk-HSZ3DM74.js → chunk-GEFKDW7X.js} +15 -2
- package/dist/lib/chunks/{chunk-47IZBMP2.js → chunk-GESHTTSA.js} +2 -2
- package/dist/lib/chunks/chunk-GNMFJ2OK.js +321 -0
- package/dist/lib/chunks/{chunk-NVBMIPXR.js → chunk-HFRAHG5C.js} +44 -26
- package/dist/lib/chunks/{chunk-MHAKYFDF.js → chunk-HQG63ZKO.js} +11 -11
- package/dist/lib/chunks/{chunk-OORO55OM.js → chunk-HTOD4W4E.js} +21 -6
- package/dist/lib/chunks/{chunk-Q2PWES4B.js → chunk-I3XGRGXE.js} +1 -1
- package/dist/lib/chunks/{chunk-WUELMJ22.js → chunk-IE7NAL6B.js} +1 -1
- package/dist/lib/chunks/{chunk-KRFHQQS7.js → chunk-JXMDOAKA.js} +17 -17
- package/dist/lib/chunks/{chunk-S7KJZIUR.js → chunk-KJMU5KH4.js} +2 -2
- package/dist/lib/chunks/{chunk-POUSX3T4.js → chunk-L7MEIRJB.js} +1 -1
- package/dist/lib/chunks/{chunk-CPT2GKKW.js → chunk-LOBXOZ2R.js} +1 -1
- package/dist/lib/chunks/{chunk-IAR6XGEW.js → chunk-ML4W6KC6.js} +1 -1
- package/dist/lib/chunks/{chunk-WKH6BJAZ.js → chunk-MNWO7EHC.js} +4 -4
- package/dist/lib/chunks/{chunk-D2LPQO6Y.js → chunk-MRL5RUP7.js} +1 -1
- package/dist/lib/chunks/{chunk-IEVAFDW7.js → chunk-NCXSNHXX.js} +3 -3
- package/dist/lib/chunks/{chunk-HFOYASRQ.js → chunk-NGHAP2P5.js} +4 -4
- package/dist/lib/chunks/{chunk-ZLOOC46D.js → chunk-OKL7GN2F.js} +3 -3
- package/dist/lib/chunks/{chunk-3DG7GHFA.js → chunk-OQU5IXAJ.js} +5 -5
- package/dist/lib/chunks/{chunk-I7VNIW6Q.js → chunk-OU73OUX4.js} +16 -10
- package/dist/lib/chunks/{chunk-56VOFZ7T.js → chunk-QHUDJVPJ.js} +90 -24
- package/dist/lib/chunks/{chunk-KHU5DRBE.js → chunk-QSJ4IKUF.js} +9 -9
- package/dist/lib/chunks/{chunk-FBFZBLTY.js → chunk-R6XDZWUL.js} +7 -8
- package/dist/lib/chunks/{chunk-CJ5YD3CU.js → chunk-RJ5R6YYA.js} +5 -5
- package/dist/lib/chunks/{chunk-LPND3VNQ.js → chunk-RR46EDDR.js} +33 -25
- package/dist/lib/chunks/chunk-RYCRL3YA.js +106 -0
- package/dist/lib/chunks/{chunk-Z4LMDKBU.js → chunk-SHUMCKCS.js} +2 -2
- package/dist/lib/chunks/{chunk-3EBWDHPK.js → chunk-TJQ5OPLQ.js} +10 -12
- package/dist/lib/chunks/chunk-U64NCRRR.js +97 -0
- package/dist/lib/chunks/chunk-U772TN32.js +67 -0
- package/dist/lib/chunks/{chunk-YR67JG2V.js → chunk-UEMZYHYJ.js} +8 -3
- package/dist/lib/chunks/{chunk-J46W3EMQ.js → chunk-UZJSTJFP.js} +5 -5
- package/dist/lib/chunks/{chunk-XJVXASDD.js → chunk-V7OAPKNF.js} +3 -3
- package/dist/lib/chunks/{chunk-WE2WPNG2.js → chunk-VKM6MMA4.js} +66 -7
- package/dist/lib/chunks/{chunk-YWJPJI3W.js → chunk-VL253W5C.js} +3 -1
- package/dist/lib/chunks/{chunk-MD4AVTK2.js → chunk-VPZQGND4.js} +3 -3
- package/dist/lib/chunks/{chunk-X2Y2ZNG3.js → chunk-W2VGLWTS.js} +3 -3
- package/dist/lib/chunks/{chunk-6AUEDSTU.js → chunk-W5DC23OP.js} +1 -1
- package/dist/lib/chunks/chunk-W5X7WJYL.js +91 -0
- package/dist/lib/chunks/{chunk-QFVRCSJ2.js → chunk-WDOA5JEH.js} +2 -0
- package/dist/lib/chunks/{chunk-I3TMFPK4.js → chunk-WVACVWBL.js} +2 -2
- package/dist/lib/chunks/{chunk-MIF5IYNR.js → chunk-XDG6NPJB.js} +26 -29
- package/dist/lib/chunks/{chunk-X6E44EGV.js → chunk-XR44YSHT.js} +2 -2
- package/dist/lib/chunks/chunk-Y2CZ6FZY.js +61 -0
- package/dist/lib/chunks/{chunk-5KKLUM7M.js → chunk-YAAUWCJ4.js} +1 -1
- package/dist/lib/chunks/{chunk-3KQFLOC7.js → chunk-YRBIC5QH.js} +1 -1
- package/dist/lib/chunks/chunk-ZIGNJAPC.js +11 -0
- package/dist/lib/cli/bundle-commands.js +71 -65
- package/dist/lib/cli/guide-command.js +25 -0
- package/dist/lib/cli/io.js +1 -1
- package/dist/lib/cli/run-commands.js +270 -104
- package/dist/lib/cli/status-command.js +234 -0
- package/dist/lib/codex-workflow/aggregate.js +8 -9
- package/dist/lib/codex-workflow/author-tools.js +6 -7
- package/dist/lib/codex-workflow/author.js +17 -17
- package/dist/lib/codex-workflow/capture.js +10 -9
- package/dist/lib/codex-workflow/checkpoint.js +6 -7
- package/dist/lib/codex-workflow/checks.js +6 -7
- 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 +14 -14
- package/dist/lib/codex-workflow/copy-recovery.js +3 -4
- package/dist/lib/codex-workflow/copy.js +11 -11
- package/dist/lib/codex-workflow/finish.js +17 -18
- package/dist/lib/codex-workflow/host-models.js +7 -7
- package/dist/lib/codex-workflow/loop.js +42 -38
- package/dist/lib/codex-workflow/quality.js +3 -4
- package/dist/lib/codex-workflow/run-inputs.js +5 -6
- package/dist/lib/codex-workflow/run-source.js +14 -13
- package/dist/lib/codex-workflow/schemas.js +5 -6
- package/dist/lib/codex-workflow/session.js +7 -8
- package/dist/lib/codex-workflow/stage.js +26 -23
- package/dist/lib/codex-workflow/workdir.js +6 -7
- package/dist/lib/engine/audit-file.js +7 -6
- package/dist/lib/engine/author.js +37 -31
- package/dist/lib/engine/budget.js +7 -1
- package/dist/lib/engine/cost-estimate.js +41 -0
- package/dist/lib/engine/local-run.js +48 -42
- package/dist/lib/engine/preflight.js +10 -6
- package/dist/lib/engine/rejudge.js +56 -50
- package/dist/lib/engine/resources.js +1 -1
- package/dist/lib/engine/run-configuration.js +2 -1
- package/dist/lib/engine/run-status.js +151 -0
- package/dist/lib/engine/templates.js +8 -7
- package/dist/lib/grounding/controller.js +7 -7
- package/dist/lib/grounding/extract.js +6 -6
- package/dist/lib/grounding/grounding-runtime.js +18 -17
- package/dist/lib/grounding/model.js +5 -5
- package/dist/lib/grounding/recorded-tools.js +10 -9
- package/dist/lib/harness/report/artifacts.js +4 -5
- package/dist/lib/lib/checkpoint.js +3 -4
- 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 +9 -8
- package/dist/lib/probes/agent-cli-parsers.js +1 -1
- package/dist/lib/probes/agent-clis.js +6 -5
- package/dist/lib/probes/charged-trace.js +10 -0
- package/dist/lib/probes/probes.js +6 -6
- package/dist/lib/runner.js +10 -10
- package/dist/lib/schema.js +3 -4
- package/dist/lib/section-result.js +3 -4
- package/dist/lib/stores/artifacts.js +3 -4
- package/dist/lib/stores/files.js +9 -9
- package/dist/lib/stores/local-versions.js +4 -5
- package/dist/lib/stores/memory.js +6 -7
- package/dist/lib/stores/publication.js +5 -6
- package/dist/lib/viewer/server.js +18 -19
- package/dist/lib/workflow/schema.js +2 -3
- package/dist/types/agents/copy-validation.d.ts +4 -4
- package/dist/types/agents/verifier.d.ts +6 -6
- package/dist/types/bundle/contracts.d.ts +1 -1
- 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/cli/guide-command.d.ts +4 -0
- package/dist/types/cli/status-command.d.ts +2 -0
- 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 +28 -113
- package/dist/types/codex-workflow/stage.d.ts +16 -5
- package/dist/types/engine/audit-file.d.ts +3 -2
- 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 +5 -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/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/probes/charged-trace.d.ts +8 -0
- package/dist/types/probes/probe-trace.d.ts +2 -0
- package/dist/types/schema.d.ts +28 -113
- package/dist/types/workflow/schema.d.ts +79 -152
- package/package.json +2 -1
- package/resources/guide/OPERATOR.md +180 -0
- package/src/agents/copy-validation.ts +8 -12
- package/src/agents/verifier.ts +10 -14
- package/src/bundle/contracts.ts +3 -3
- 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/writer-lock.ts +27 -0
- 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 +236 -18
- package/src/cli/status-command.ts +113 -0
- package/src/codex-workflow/codex-binary.ts +105 -0
- package/src/codex-workflow/codex-home.ts +50 -40
- 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 +36 -9
- package/src/codex-workflow/stage.ts +126 -17
- package/src/engine/audit-file.ts +10 -8
- 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 +180 -0
- package/src/engine/local-run.ts +38 -8
- package/src/engine/preflight.ts +90 -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/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/probes/agent-clis.ts +24 -2
- package/src/probes/charged-trace.ts +87 -0
- package/src/probes/probe-trace.ts +2 -0
- package/src/probes/probes.ts +48 -2
- 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
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
checkIntegrity,
|
|
3
3
|
checkTraceChain,
|
|
4
4
|
checkTraceCoverage
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VPZQGND4.js";
|
|
6
6
|
import {
|
|
7
7
|
checkJudgments,
|
|
8
8
|
checkPlan
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-OQU5IXAJ.js";
|
|
10
10
|
import {
|
|
11
11
|
checkCopy,
|
|
12
12
|
checkGrounding,
|
|
13
13
|
checkMetrics
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-CUYVHXHI.js";
|
|
15
15
|
import {
|
|
16
16
|
CheckOutcome,
|
|
17
17
|
checkFrom,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "./chunk-6KHQ7DXP.js";
|
|
22
22
|
import {
|
|
23
23
|
capturedAnswerOf
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-5JPYM4MD.js";
|
|
25
25
|
import {
|
|
26
26
|
bundleManifestSchema,
|
|
27
27
|
bundlePaths,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
canonicalization,
|
|
30
30
|
predecessorPrefix,
|
|
31
31
|
traceSchemaVersion
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-WVACVWBL.js";
|
|
33
33
|
import {
|
|
34
34
|
parseBundleJson
|
|
35
35
|
} from "./chunk-E6NQQU6V.js";
|
|
@@ -82,9 +82,24 @@ var acquireWriterLock = async (dir, purpose) => {
|
|
|
82
82
|
};
|
|
83
83
|
return { takenOver, release };
|
|
84
84
|
};
|
|
85
|
+
var readWriterLock = async (dir) => {
|
|
86
|
+
const owner = await readOwner(path.join(dir, writerLockFile)).catch(
|
|
87
|
+
// A lock torn mid-write reads as an unknown owner, never as no writer.
|
|
88
|
+
() => ({ host: "", pid: -1, purpose: "unknown", acquiredAt: "" })
|
|
89
|
+
);
|
|
90
|
+
if (owner === void 0) {
|
|
91
|
+
return void 0;
|
|
92
|
+
}
|
|
93
|
+
let state = "unknown";
|
|
94
|
+
if (owner.host === hostname()) {
|
|
95
|
+
state = owner.pid > 0 && isProcessAlive(owner.pid) ? "live" : "abandoned";
|
|
96
|
+
}
|
|
97
|
+
return { owner, state };
|
|
98
|
+
};
|
|
85
99
|
|
|
86
100
|
export {
|
|
87
101
|
writerLockFile,
|
|
88
102
|
WriterLockHeldError,
|
|
89
|
-
acquireWriterLock
|
|
103
|
+
acquireWriterLock,
|
|
104
|
+
readWriterLock
|
|
90
105
|
};
|
|
@@ -18,13 +18,15 @@ var engineResources = async () => {
|
|
|
18
18
|
return {
|
|
19
19
|
root,
|
|
20
20
|
author: path.join(packed, "author"),
|
|
21
|
-
editorial: path.join(packed, "editorial")
|
|
21
|
+
editorial: path.join(packed, "editorial"),
|
|
22
|
+
guide: path.join(packed, "guide", "OPERATOR.md")
|
|
22
23
|
};
|
|
23
24
|
}
|
|
24
25
|
return {
|
|
25
26
|
root,
|
|
26
27
|
author: path.join(root, "src", "author"),
|
|
27
|
-
editorial: path.join(root, "src", "engine", "editorial")
|
|
28
|
+
editorial: path.join(root, "src", "engine", "editorial"),
|
|
29
|
+
guide: path.join(root, "src", "engine", "guide", "OPERATOR.md")
|
|
28
30
|
};
|
|
29
31
|
};
|
|
30
32
|
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import {
|
|
2
|
+
tokenCostUsd
|
|
3
|
+
} from "./chunk-ZIGNJAPC.js";
|
|
4
|
+
import {
|
|
5
|
+
authorToolCaps
|
|
6
|
+
} from "./chunk-I3XGRGXE.js";
|
|
7
|
+
import {
|
|
8
|
+
authorSearchLowUsd,
|
|
9
|
+
authorTokens,
|
|
10
|
+
costCoefficientsVersion,
|
|
11
|
+
hostTokensPerAnswer,
|
|
12
|
+
probeUsd,
|
|
13
|
+
searchUsdPerAnswer,
|
|
14
|
+
stageTokens
|
|
15
|
+
} from "./chunk-DVFFYY5G.js";
|
|
16
|
+
|
|
17
|
+
// src/engine/cost-estimate.ts
|
|
18
|
+
var cents = (usd) => {
|
|
19
|
+
return Math.round(usd * 100) / 100;
|
|
20
|
+
};
|
|
21
|
+
var rangeOf = (low, high) => {
|
|
22
|
+
return { low: cents(low), high: cents(high) };
|
|
23
|
+
};
|
|
24
|
+
var recommendedCapOf = (high) => {
|
|
25
|
+
return Math.max(1, Math.ceil(high));
|
|
26
|
+
};
|
|
27
|
+
var tokensCost = (model, tokens, cachedShare) => {
|
|
28
|
+
return tokenCostUsd(model.pricingUsdPerMillion, {
|
|
29
|
+
inputTokens: tokens.input,
|
|
30
|
+
cachedInputTokens: Math.round(tokens.input * cachedShare),
|
|
31
|
+
outputTokens: tokens.output
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
var scaled = (tokens, factor) => {
|
|
35
|
+
return { input: tokens.input * factor, output: tokens.output * factor };
|
|
36
|
+
};
|
|
37
|
+
var sumOf = (ranges) => {
|
|
38
|
+
return rangeOf(
|
|
39
|
+
ranges.reduce((total, range) => total + range.low, 0),
|
|
40
|
+
ranges.reduce((total, range) => total + range.high, 0)
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
var estimateRunCost = ({
|
|
44
|
+
plan,
|
|
45
|
+
model,
|
|
46
|
+
grounding
|
|
47
|
+
}) => {
|
|
48
|
+
const answers = plan.units.length;
|
|
49
|
+
const { cachedShare } = stageTokens;
|
|
50
|
+
const probes = sumOf(
|
|
51
|
+
[...plan.probesBySurface].map(
|
|
52
|
+
([surface, count]) => rangeOf(probeUsd[surface].low * count, probeUsd[surface].high * count)
|
|
53
|
+
)
|
|
54
|
+
);
|
|
55
|
+
const stages = rangeOf(
|
|
56
|
+
tokensCost(
|
|
57
|
+
model,
|
|
58
|
+
scaled(stageTokens.perAnswer.low, answers),
|
|
59
|
+
cachedShare.high
|
|
60
|
+
) + tokensCost(model, stageTokens.perRun.low, cachedShare.high),
|
|
61
|
+
tokensCost(
|
|
62
|
+
model,
|
|
63
|
+
scaled(stageTokens.perAnswer.high, answers),
|
|
64
|
+
cachedShare.low
|
|
65
|
+
) + tokensCost(model, stageTokens.perRun.high, cachedShare.low)
|
|
66
|
+
);
|
|
67
|
+
const hostTokens = hostTokensPerAnswer[grounding];
|
|
68
|
+
const hostCalls = rangeOf(
|
|
69
|
+
tokensCost(model, scaled(hostTokens.low, answers), 0),
|
|
70
|
+
tokensCost(model, scaled(hostTokens.high, answers), 0)
|
|
71
|
+
);
|
|
72
|
+
const search = grounding === "full" ? rangeOf(
|
|
73
|
+
searchUsdPerAnswer.low * answers,
|
|
74
|
+
searchUsdPerAnswer.high * answers
|
|
75
|
+
) : rangeOf(0, 0);
|
|
76
|
+
const total = sumOf([probes, stages, hostCalls, search]);
|
|
77
|
+
const estimate = {
|
|
78
|
+
currency: "USD",
|
|
79
|
+
kind: "estimate",
|
|
80
|
+
model: model.id,
|
|
81
|
+
coefficientsVersion: costCoefficientsVersion,
|
|
82
|
+
low: total.low,
|
|
83
|
+
high: total.high,
|
|
84
|
+
categories: { probes, stages, hostCalls, search },
|
|
85
|
+
recommendedCapUsd: recommendedCapOf(total.high)
|
|
86
|
+
};
|
|
87
|
+
return estimate;
|
|
88
|
+
};
|
|
89
|
+
var estimateAuthorCost = (model) => {
|
|
90
|
+
const { cachedShare } = stageTokens;
|
|
91
|
+
const stages = rangeOf(
|
|
92
|
+
tokensCost(model, authorTokens.session.low, cachedShare.high),
|
|
93
|
+
tokensCost(model, authorTokens.session.high, cachedShare.low)
|
|
94
|
+
);
|
|
95
|
+
const search = rangeOf(authorSearchLowUsd, authorToolCaps.searchSpendUsd);
|
|
96
|
+
const total = sumOf([stages, search]);
|
|
97
|
+
const estimate = {
|
|
98
|
+
currency: "USD",
|
|
99
|
+
kind: "estimate",
|
|
100
|
+
model: model.id,
|
|
101
|
+
coefficientsVersion: costCoefficientsVersion,
|
|
102
|
+
low: total.low,
|
|
103
|
+
high: total.high,
|
|
104
|
+
categories: { stages, search },
|
|
105
|
+
recommendedCapUsd: recommendedCapOf(total.high)
|
|
106
|
+
};
|
|
107
|
+
return estimate;
|
|
108
|
+
};
|
|
109
|
+
var describeCostRange = (range) => {
|
|
110
|
+
return `$${range.low.toFixed(2)} to $${range.high.toFixed(2)}`;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
export {
|
|
114
|
+
estimateRunCost,
|
|
115
|
+
estimateAuthorCost,
|
|
116
|
+
describeCostRange
|
|
117
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
checkpointScope
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3JO5TXBA.js";
|
|
4
4
|
import {
|
|
5
5
|
runTechnicalChecks
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-L7MEIRJB.js";
|
|
7
7
|
import {
|
|
8
8
|
writeFileAtomically
|
|
9
9
|
} from "./chunk-MX6Y4RD2.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-2QLAFBCG.js";
|
|
16
16
|
import {
|
|
17
17
|
technicalChecksArtifactSchema
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-YAAUWCJ4.js";
|
|
19
19
|
|
|
20
20
|
// src/codex-workflow/run-source.ts
|
|
21
21
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import {
|
|
2
2
|
authorDir
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
enginePackageRoot
|
|
6
|
-
} from "./chunk-3BFCI7LI.js";
|
|
3
|
+
} from "./chunk-TJQ5OPLQ.js";
|
|
7
4
|
import {
|
|
8
5
|
readResearchDocuments,
|
|
9
6
|
readResearchJournal,
|
|
10
7
|
researchDir,
|
|
11
8
|
summarizeResearch
|
|
12
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-I3XGRGXE.js";
|
|
10
|
+
import {
|
|
11
|
+
enginePackageRoot
|
|
12
|
+
} from "./chunk-3BFCI7LI.js";
|
|
13
13
|
import {
|
|
14
14
|
authorExamples
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-AYY4MYTW.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-6GHHNPFJ.js";
|
|
26
23
|
import {
|
|
27
24
|
getEnvironment
|
|
28
25
|
} from "./chunk-PO2J5OQ3.js";
|
|
26
|
+
import {
|
|
27
|
+
validateAuthorOutput
|
|
28
|
+
} from "./chunk-XR44YSHT.js";
|
|
29
29
|
import {
|
|
30
30
|
canonicalResearchUrl
|
|
31
31
|
} from "./chunk-SWJ7KQSL.js";
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getGoogleAIOverview
|
|
3
|
+
} from "./chunk-IB6RROHE.js";
|
|
1
4
|
import {
|
|
2
5
|
extractAnthropicRetrieval,
|
|
3
6
|
extractGeminiRetrieval,
|
|
@@ -5,9 +8,6 @@ import {
|
|
|
5
8
|
retrievalResultUrls,
|
|
6
9
|
rewriteRetrievalUrls
|
|
7
10
|
} from "./chunk-S2SFHTJD.js";
|
|
8
|
-
import {
|
|
9
|
-
getGoogleAIOverview
|
|
10
|
-
} from "./chunk-IB6RROHE.js";
|
|
11
11
|
import {
|
|
12
12
|
ProbeTraceError,
|
|
13
13
|
endAttempt,
|
|
@@ -33,6 +33,9 @@ import {
|
|
|
33
33
|
import {
|
|
34
34
|
createLog
|
|
35
35
|
} from "./chunk-ZSEY7AHQ.js";
|
|
36
|
+
import {
|
|
37
|
+
isObject
|
|
38
|
+
} from "./chunk-7PLK6VGC.js";
|
|
36
39
|
import {
|
|
37
40
|
sleep,
|
|
38
41
|
unlimited
|
|
@@ -63,6 +66,19 @@ var aiSearchProbeModels = {
|
|
|
63
66
|
var chatProbeRequestedModel = (surface) => {
|
|
64
67
|
return surface === "google_ai_overview" ? null : aiSearchProbeModels[surface];
|
|
65
68
|
};
|
|
69
|
+
var gatewayCostOf = (metadata) => {
|
|
70
|
+
const cost = isObject(metadata) && isObject(metadata.gateway) ? metadata.gateway.cost : void 0;
|
|
71
|
+
const usd = typeof cost === "string" && cost.trim() ? Number(cost) : cost;
|
|
72
|
+
return typeof usd === "number" && Number.isFinite(usd) && usd >= 0 ? usd : void 0;
|
|
73
|
+
};
|
|
74
|
+
var reportedCostOf = (costs) => {
|
|
75
|
+
if (costs.some((cost) => cost === void 0)) {
|
|
76
|
+
return {};
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
reportedCostUsd: costs.reduce((sum, cost) => sum + (cost ?? 0), 0)
|
|
80
|
+
};
|
|
81
|
+
};
|
|
66
82
|
var searchPromptPrefix = "Search the web for current information to answer the following question. Return a complete answer, not just search results.\n\n";
|
|
67
83
|
var formatProbeSources = (sources) => {
|
|
68
84
|
const rows = [];
|
|
@@ -146,11 +162,13 @@ var runSearchRequiredProbe = async (args) => {
|
|
|
146
162
|
});
|
|
147
163
|
retrieval = null;
|
|
148
164
|
}
|
|
165
|
+
const firstCost = gatewayCostOf(first.providerMetadata);
|
|
149
166
|
if (first.text.trim().length > 0) {
|
|
150
167
|
return {
|
|
151
168
|
text: withProbeSources(first.text, first.sources),
|
|
152
169
|
retrieval,
|
|
153
|
-
...served
|
|
170
|
+
...served,
|
|
171
|
+
...reportedCostOf([firstCost])
|
|
154
172
|
};
|
|
155
173
|
}
|
|
156
174
|
log.warn("Search probe returned no answer text; synthesizing from search", {
|
|
@@ -179,9 +197,10 @@ var runSearchRequiredProbe = async (args) => {
|
|
|
179
197
|
maxRetries: 0,
|
|
180
198
|
abortSignal: AbortSignal.timeout(chatProbeTimeoutMs)
|
|
181
199
|
});
|
|
182
|
-
const [followupText, followupSources] = await Promise.all([
|
|
200
|
+
const [followupText, followupSources, followupMetadata] = await Promise.all([
|
|
183
201
|
followupStream.text,
|
|
184
|
-
followupStream.sources
|
|
202
|
+
followupStream.sources,
|
|
203
|
+
followupStream.providerMetadata
|
|
185
204
|
]).catch((error) => {
|
|
186
205
|
throw followupFailure ?? error;
|
|
187
206
|
});
|
|
@@ -193,7 +212,8 @@ var runSearchRequiredProbe = async (args) => {
|
|
|
193
212
|
first.sources.length > 0 ? first.sources : followup.sources
|
|
194
213
|
),
|
|
195
214
|
retrieval,
|
|
196
|
-
...served
|
|
215
|
+
...served,
|
|
216
|
+
...reportedCostOf([firstCost, gatewayCostOf(followupMetadata)])
|
|
197
217
|
};
|
|
198
218
|
}
|
|
199
219
|
throw new ProbeFailure(
|
|
@@ -269,8 +289,14 @@ var buildProbeModels = (args) => {
|
|
|
269
289
|
const result = await Promise.all([
|
|
270
290
|
stream.text,
|
|
271
291
|
stream.sources,
|
|
272
|
-
stream.response
|
|
273
|
-
|
|
292
|
+
stream.response,
|
|
293
|
+
stream.providerMetadata
|
|
294
|
+
]).then(([text, sources, response, providerMetadata]) => ({
|
|
295
|
+
text,
|
|
296
|
+
sources,
|
|
297
|
+
response,
|
|
298
|
+
providerMetadata
|
|
299
|
+
})).catch((error) => {
|
|
274
300
|
throw streamFailure ?? error;
|
|
275
301
|
});
|
|
276
302
|
if (result.text.trim().length === 0) {
|
|
@@ -286,7 +312,8 @@ var buildProbeModels = (args) => {
|
|
|
286
312
|
return {
|
|
287
313
|
text: withProbeSources(result.text, result.sources),
|
|
288
314
|
retrieval: unexposedRetrieval("perplexity"),
|
|
289
|
-
...reportedModel === void 0 ? {} : { reportedModel }
|
|
315
|
+
...reportedModel === void 0 ? {} : { reportedModel },
|
|
316
|
+
...reportedCostOf([gatewayCostOf(result.providerMetadata)])
|
|
290
317
|
};
|
|
291
318
|
}
|
|
292
319
|
},
|
|
@@ -485,7 +512,8 @@ var runChatUnit = async (unit, { prompt, model, limiter, job, logContext }) => {
|
|
|
485
512
|
retrieval: answer.retrieval,
|
|
486
513
|
requestedModel: chatProbeRequestedModel(model.name),
|
|
487
514
|
...answer.reportedModel ? { reportedModel: answer.reportedModel } : {},
|
|
488
|
-
...answer.noOverview ? { noOverview: true } : {}
|
|
515
|
+
...answer.noOverview ? { noOverview: true } : {},
|
|
516
|
+
...answer.reportedCostUsd === void 0 ? {} : { costUsd: answer.reportedCostUsd }
|
|
489
517
|
});
|
|
490
518
|
if (unrecorded !== null) {
|
|
491
519
|
return {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
groundingRules
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IE7NAL6B.js";
|
|
4
4
|
import {
|
|
5
5
|
locateVerbatimPassage
|
|
6
6
|
} from "./chunk-3UFZ2XPE.js";
|
|
7
7
|
import {
|
|
8
8
|
generateStructured
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CO5T6WU5.js";
|
|
10
10
|
import {
|
|
11
11
|
ModelBudgetError
|
|
12
12
|
} from "./chunk-TNL2GWYR.js";
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import {
|
|
2
|
+
readEnv
|
|
3
|
+
} from "./chunk-PO2J5OQ3.js";
|
|
4
|
+
import {
|
|
5
|
+
isAgentSurface
|
|
6
|
+
} from "./chunk-OBXAHX3L.js";
|
|
7
|
+
|
|
8
|
+
// src/bundle/isolation.ts
|
|
9
|
+
import { z } from "zod";
|
|
10
|
+
var IsolationBoundary = {
|
|
11
|
+
NATIVE: "native",
|
|
12
|
+
CONTAINER: "container"
|
|
13
|
+
};
|
|
14
|
+
var writerIsolationSchema = z.looseObject({
|
|
15
|
+
boundary: z.enum([IsolationBoundary.NATIVE, IsolationBoundary.CONTAINER]),
|
|
16
|
+
/** The sandbox the Codex probe surface runs in, should it run. */
|
|
17
|
+
codexProbeSandbox: z.string()
|
|
18
|
+
});
|
|
19
|
+
var observedIsolation = () => {
|
|
20
|
+
const isolation = {
|
|
21
|
+
boundary: readEnv("AEO_ISOLATED_ADAPTER") === "1" ? IsolationBoundary.CONTAINER : IsolationBoundary.NATIVE,
|
|
22
|
+
codexProbeSandbox: readEnv("AEO_CODEX_SANDBOX") === "danger-full-access" ? "danger-full-access" : "read-only"
|
|
23
|
+
};
|
|
24
|
+
return isolation;
|
|
25
|
+
};
|
|
26
|
+
var runtimeIsolationOf = (event) => {
|
|
27
|
+
const runtime = z.looseObject({ isolation: writerIsolationSchema }).safeParse(event.payload.runtime);
|
|
28
|
+
return runtime.success ? runtime.data.isolation.boundary : "unknown";
|
|
29
|
+
};
|
|
30
|
+
var stringOf = (value) => {
|
|
31
|
+
return typeof value === "string" ? value : void 0;
|
|
32
|
+
};
|
|
33
|
+
var sandboxOf = (event) => {
|
|
34
|
+
const details = z.looseObject({ sandbox: z.string() }).safeParse(event.payload.details);
|
|
35
|
+
return details.success ? details.data.sandbox : void 0;
|
|
36
|
+
};
|
|
37
|
+
var summarizeIsolation = (events) => {
|
|
38
|
+
const writers = [];
|
|
39
|
+
const stageSandboxes = /* @__PURE__ */ new Set();
|
|
40
|
+
const agentCliAccounts = /* @__PURE__ */ new Set();
|
|
41
|
+
for (const event of events) {
|
|
42
|
+
if (event.type === "run_started" || event.type === "run_resumed") {
|
|
43
|
+
writers.push(runtimeIsolationOf(event));
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
if (event.type !== "operation_started") {
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
const kind = stringOf(event.payload.kind);
|
|
50
|
+
const role = stringOf(event.payload.role);
|
|
51
|
+
const sandbox = sandboxOf(event);
|
|
52
|
+
if (kind === "codex_session" && sandbox !== void 0) {
|
|
53
|
+
stageSandboxes.add(sandbox);
|
|
54
|
+
}
|
|
55
|
+
const writer = writers.at(-1);
|
|
56
|
+
if ((kind === "probe" || kind === "canary") && role !== void 0 && isAgentSurface(role) && writer !== IsolationBoundary.CONTAINER) {
|
|
57
|
+
agentCliAccounts.add(role);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
const isolation = {
|
|
61
|
+
writers,
|
|
62
|
+
stageSandboxes: [...stageSandboxes].sort(),
|
|
63
|
+
agentCliAccounts: [...agentCliAccounts].sort()
|
|
64
|
+
};
|
|
65
|
+
return isolation;
|
|
66
|
+
};
|
|
67
|
+
var isolationLimitations = (isolation) => {
|
|
68
|
+
const limitations = [];
|
|
69
|
+
if (isolation.writers.includes("unknown")) {
|
|
70
|
+
limitations.push(
|
|
71
|
+
"A writer of this run predates isolation recording; its boundary is unknown."
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
if (isolation.writers.includes(IsolationBoundary.NATIVE)) {
|
|
75
|
+
limitations.push(
|
|
76
|
+
"Part or all of this run executed natively, without a container boundary. Codex sandboxes restrict writes and network access, not reads: a Codex session could read any file the operator's account can, while it processed untrusted answers and pages."
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
if (isolation.agentCliAccounts.length > 0) {
|
|
80
|
+
limitations.push(
|
|
81
|
+
`The coding-agent CLIs ${isolation.agentCliAccounts.join(", ")} ran as the operator's own account. Account-level settings outside the tool's control (user rules, approved MCP servers) applied and are not recorded.`
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
return limitations;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export {
|
|
88
|
+
IsolationBoundary,
|
|
89
|
+
writerIsolationSchema,
|
|
90
|
+
observedIsolation,
|
|
91
|
+
summarizeIsolation,
|
|
92
|
+
isolationLimitations
|
|
93
|
+
};
|
|
@@ -4,13 +4,16 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
structuredImageMessages,
|
|
6
6
|
structuredImageTokens
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WDOA5JEH.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,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
aggregateJudgments,
|
|
3
3
|
metricsView
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UZJSTJFP.js";
|
|
5
5
|
import {
|
|
6
6
|
CheckOutcome,
|
|
7
7
|
checkFrom,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
bundlePaths,
|
|
13
13
|
calculationVersion
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WVACVWBL.js";
|
|
15
15
|
import {
|
|
16
16
|
canonicalDigest
|
|
17
17
|
} from "./chunk-E6NQQU6V.js";
|