@mcoda/agents
Advanced tools
+2
-1
@@ -10,3 +10,4 @@ # Changelog | ||
| `xhigh`, and an effort outside the enum is reported on stderr instead of | ||
| being ignored silently. | ||
| being ignored silently. The report names the effort the run falls back to, | ||
| which is the `high` cap on gpt-5.1 and the model default elsewhere. | ||
@@ -13,0 +14,0 @@ ## 0.1.75 |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"CodexCliRunner.d.ts","sourceRoot":"","sources":["../../../src/adapters/codex/CodexCliRunner.ts"],"names":[],"mappings":"AAy3BA,eAAO,MAAM,UAAU,GAAI,sBAAoB,KAAG;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CA+BjG,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,QAAQ,MAAM,EACd,QAAQ,MAAM,EACd,eAAe,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACtC,YAAY,MAAM,EAClB,kBAAkB,MAAM,KACvB,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CASzC,CAAC;AAEF,wBAAuB,kBAAkB,CACvC,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,MAAM,EACd,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACtC,SAAS,CAAC,EAAE,MAAM,EAClB,eAAe,CAAC,EAAE,MAAM,GACvB,cAAc,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,IAAI,EAAE,OAAO,CAAC,CAoFhE"} | ||
| {"version":3,"file":"CodexCliRunner.d.ts","sourceRoot":"","sources":["../../../src/adapters/codex/CodexCliRunner.ts"],"names":[],"mappings":"AAo4BA,eAAO,MAAM,UAAU,GAAI,sBAAoB,KAAG;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CA+BjG,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,QAAQ,MAAM,EACd,QAAQ,MAAM,EACd,eAAe,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACtC,YAAY,MAAM,EAClB,kBAAkB,MAAM,KACvB,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CASzC,CAAC;AAEF,wBAAuB,kBAAkB,CACvC,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,MAAM,EACd,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACtC,SAAS,CAAC,EAAE,MAAM,EAClB,eAAe,CAAC,EAAE,MAAM,GACvB,cAAc,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,IAAI,EAAE,OAAO,CAAC,CAoFhE"} |
@@ -577,25 +577,29 @@ import { spawn, spawnSync } from "node:child_process"; | ||
| // An effort codex does not accept used to be dropped without a trace: the run | ||
| // silently fell back to the model default while `mcoda agent details` still | ||
| // showed the configured value. Say so instead, once per distinct value so a | ||
| // long-running process does not repeat itself. | ||
| // silently fell back to whatever the model would have used anyway while | ||
| // `mcoda agent details` still showed the configured value. Say so instead, and | ||
| // name the effort actually used, which is not always the model default -- on | ||
| // gpt-5.1 the fallback below is `high`. Deduped per distinct (value, fallback) | ||
| // pair so a long-running process does not repeat itself. | ||
| const warnedReasoningEfforts = new Set(); | ||
| const warnUnsupportedReasoningEffort = (raw) => { | ||
| if (warnedReasoningEfforts.has(raw)) | ||
| const warnUnsupportedReasoningEffort = (raw, fallback) => { | ||
| const key = `${raw}\u0000${fallback ?? ""}`; | ||
| if (warnedReasoningEfforts.has(key)) | ||
| return; | ||
| warnedReasoningEfforts.add(raw); | ||
| warnedReasoningEfforts.add(key); | ||
| const used = fallback ? `${JSON.stringify(fallback)}` : "the model default"; | ||
| process.stderr.write(`[mcoda] codex reasoning effort ${JSON.stringify(raw)} is not one of ` + | ||
| `${CODEX_REASONING_EFFORTS.join(", ")}; using the model default instead.\n`); | ||
| `${CODEX_REASONING_EFFORTS.join(", ")}; using ${used} instead.\n`); | ||
| }; | ||
| // Returns the recognised effort, or the raw text under `rejected` so the caller | ||
| // can report it once it knows which fallback the model will actually get. | ||
| const normalizeReasoningEffort = (raw) => { | ||
| if (!raw) | ||
| return undefined; | ||
| return {}; | ||
| const trimmed = raw.trim(); | ||
| if (!trimmed) | ||
| return undefined; | ||
| return {}; | ||
| const normalized = normalizeCodexReasoningEffort(trimmed); | ||
| if (!normalized) { | ||
| warnUnsupportedReasoningEffort(trimmed); | ||
| return undefined; | ||
| } | ||
| return normalized; | ||
| if (!normalized) | ||
| return { rejected: trimmed }; | ||
| return { effort: normalized }; | ||
| }; | ||
@@ -606,5 +610,8 @@ // gpt-5.1 tops out at `high`; anything stronger is rejected upstream, so cap it | ||
| const resolveReasoningEffort = (model, effort) => { | ||
| const configured = normalizeReasoningEffort(effort ?? process.env[CODEX_REASONING_ENV] ?? process.env[CODEX_REASONING_ENV_FALLBACK]); | ||
| const { effort: configured, rejected } = normalizeReasoningEffort(effort ?? process.env[CODEX_REASONING_ENV] ?? process.env[CODEX_REASONING_ENV_FALLBACK]); | ||
| const normalizedModel = (model ?? "").toLowerCase(); | ||
| const isGpt51 = normalizedModel.includes("gpt-5.1"); | ||
| if (rejected) { | ||
| warnUnsupportedReasoningEffort(rejected, isGpt51 ? GPT_51_MAX_REASONING_EFFORT : undefined); | ||
| } | ||
| if (configured) { | ||
@@ -611,0 +618,0 @@ if (isGpt51 && |
+3
-3
| { | ||
| "name": "@mcoda/agents", | ||
| "version": "0.1.130", | ||
| "version": "0.1.131", | ||
| "description": "Agent registry and capabilities for mcoda.", | ||
@@ -33,4 +33,4 @@ "type": "module", | ||
| "dependencies": { | ||
| "@mcoda/db": "0.1.130", | ||
| "@mcoda/shared": "0.1.130" | ||
| "@mcoda/db": "0.1.131", | ||
| "@mcoda/shared": "0.1.131" | ||
| }, | ||
@@ -37,0 +37,0 @@ "scripts": { |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
248918
0.27%5584
0.13%+ Added
+ Added
- Removed
- Removed
Updated
Updated