@mcoda/agents
Advanced tools
+7
-1
| # Changelog | ||
| ## Unreleased | ||
| - None. | ||
| - Accept every reasoning effort codex-cli accepts | ||
| (`minimal|low|medium|high|xhigh|max|ultra`) instead of only | ||
| `low|medium|high|xhigh`, so `max` and `ultra` reach | ||
| `-c model_reasoning_effort=...` instead of being dropped for the model | ||
| default. The gpt-5.1 ceiling now caps anything above `high` rather than only | ||
| `xhigh`, and an effort outside the enum is reported on stderr instead of | ||
| being ignored silently. | ||
@@ -6,0 +12,0 @@ ## 0.1.75 |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"CodexCliRunner.d.ts","sourceRoot":"","sources":["../../../src/adapters/codex/CodexCliRunner.ts"],"names":[],"mappings":"AAu1BA,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":"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"} |
@@ -5,2 +5,3 @@ import { spawn, spawnSync } from "node:child_process"; | ||
| import path from "node:path"; | ||
| import { CODEX_REASONING_EFFORTS, codexReasoningEffortRank, normalizeCodexReasoningEffort, } from "@mcoda/shared"; | ||
| const CODEX_MAX_BUFFER_BYTES = 10 * 1024 * 1024; | ||
@@ -576,12 +577,30 @@ const CODEX_REASONING_ENV = "MCODA_CODEX_REASONING_EFFORT"; | ||
| }; | ||
| // 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. | ||
| const warnedReasoningEfforts = new Set(); | ||
| const warnUnsupportedReasoningEffort = (raw) => { | ||
| if (warnedReasoningEfforts.has(raw)) | ||
| return; | ||
| warnedReasoningEfforts.add(raw); | ||
| process.stderr.write(`[mcoda] codex reasoning effort ${JSON.stringify(raw)} is not one of ` + | ||
| `${CODEX_REASONING_EFFORTS.join(", ")}; using the model default instead.\n`); | ||
| }; | ||
| const normalizeReasoningEffort = (raw) => { | ||
| if (!raw) | ||
| return undefined; | ||
| const normalized = raw.trim().toLowerCase(); | ||
| if (!normalized) | ||
| const trimmed = raw.trim(); | ||
| if (!trimmed) | ||
| return undefined; | ||
| if (!["low", "medium", "high", "xhigh"].includes(normalized)) | ||
| const normalized = normalizeCodexReasoningEffort(trimmed); | ||
| if (!normalized) { | ||
| warnUnsupportedReasoningEffort(trimmed); | ||
| return undefined; | ||
| } | ||
| return normalized; | ||
| }; | ||
| // gpt-5.1 tops out at `high`; anything stronger is rejected upstream, so cap it | ||
| // rather than fail the run. | ||
| const GPT_51_MAX_REASONING_EFFORT = "high"; | ||
| const resolveReasoningEffort = (model, effort) => { | ||
@@ -592,8 +611,10 @@ const configured = normalizeReasoningEffort(effort ?? process.env[CODEX_REASONING_ENV] ?? process.env[CODEX_REASONING_ENV_FALLBACK]); | ||
| if (configured) { | ||
| if (configured === "xhigh" && isGpt51) | ||
| return "high"; | ||
| if (isGpt51 && | ||
| codexReasoningEffortRank(configured) > codexReasoningEffortRank(GPT_51_MAX_REASONING_EFFORT)) { | ||
| return GPT_51_MAX_REASONING_EFFORT; | ||
| } | ||
| return configured; | ||
| } | ||
| if (isGpt51) | ||
| return "high"; | ||
| return GPT_51_MAX_REASONING_EFFORT; | ||
| return undefined; | ||
@@ -600,0 +621,0 @@ }; |
+3
-3
| { | ||
| "name": "@mcoda/agents", | ||
| "version": "0.1.129", | ||
| "version": "0.1.130", | ||
| "description": "Agent registry and capabilities for mcoda.", | ||
@@ -33,4 +33,4 @@ "type": "module", | ||
| "dependencies": { | ||
| "@mcoda/db": "0.1.129", | ||
| "@mcoda/shared": "0.1.129" | ||
| "@mcoda/db": "0.1.130", | ||
| "@mcoda/shared": "0.1.130" | ||
| }, | ||
@@ -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.
248242
0.62%5577
0.38%+ Added
+ Added
- Removed
- Removed
Updated
Updated