@mcoda/agents 0.1.130 → 0.1.131

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/CHANGELOG.md CHANGED
@@ -7,7 +7,8 @@
7
7
  `-c model_reasoning_effort=...` instead of being dropped for the model
8
8
  default. The gpt-5.1 ceiling now caps anything above `high` rather than only
9
9
  `xhigh`, and an effort outside the enum is reported on stderr instead of
10
- being ignored silently.
10
+ being ignored silently. The report names the effort the run falls back to,
11
+ which is the `high` cap on gpt-5.1 and the model default elsewhere.
11
12
 
12
13
  ## 0.1.75
13
14
  - Forward per-agent Codex CLI `reasoningEffort` configuration into `codex exec` so agents such as `codex55` can use `model_reasoning_effort=xhigh` without relying on process-wide environment variables.
@@ -1 +1 @@
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"}
1
+ {"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"}
@@ -574,37 +574,44 @@ const createStreamFormatter = (model) => {
574
574
  return { handleLine, end };
575
575
  };
576
576
  // An effort codex does not accept used to be dropped without a trace: the run
577
- // silently fell back to the model default while `mcoda agent details` still
578
- // showed the configured value. Say so instead, once per distinct value so a
579
- // long-running process does not repeat itself.
577
+ // silently fell back to whatever the model would have used anyway while
578
+ // `mcoda agent details` still showed the configured value. Say so instead, and
579
+ // name the effort actually used, which is not always the model default -- on
580
+ // gpt-5.1 the fallback below is `high`. Deduped per distinct (value, fallback)
581
+ // pair so a long-running process does not repeat itself.
580
582
  const warnedReasoningEfforts = new Set();
581
- const warnUnsupportedReasoningEffort = (raw) => {
582
- if (warnedReasoningEfforts.has(raw))
583
+ const warnUnsupportedReasoningEffort = (raw, fallback) => {
584
+ const key = `${raw}\u0000${fallback ?? ""}`;
585
+ if (warnedReasoningEfforts.has(key))
583
586
  return;
584
- warnedReasoningEfforts.add(raw);
587
+ warnedReasoningEfforts.add(key);
588
+ const used = fallback ? `${JSON.stringify(fallback)}` : "the model default";
585
589
  process.stderr.write(`[mcoda] codex reasoning effort ${JSON.stringify(raw)} is not one of ` +
586
- `${CODEX_REASONING_EFFORTS.join(", ")}; using the model default instead.\n`);
590
+ `${CODEX_REASONING_EFFORTS.join(", ")}; using ${used} instead.\n`);
587
591
  };
592
+ // Returns the recognised effort, or the raw text under `rejected` so the caller
593
+ // can report it once it knows which fallback the model will actually get.
588
594
  const normalizeReasoningEffort = (raw) => {
589
595
  if (!raw)
590
- return undefined;
596
+ return {};
591
597
  const trimmed = raw.trim();
592
598
  if (!trimmed)
593
- return undefined;
599
+ return {};
594
600
  const normalized = normalizeCodexReasoningEffort(trimmed);
595
- if (!normalized) {
596
- warnUnsupportedReasoningEffort(trimmed);
597
- return undefined;
598
- }
599
- return normalized;
601
+ if (!normalized)
602
+ return { rejected: trimmed };
603
+ return { effort: normalized };
600
604
  };
601
605
  // gpt-5.1 tops out at `high`; anything stronger is rejected upstream, so cap it
602
606
  // rather than fail the run.
603
607
  const GPT_51_MAX_REASONING_EFFORT = "high";
604
608
  const resolveReasoningEffort = (model, effort) => {
605
- const configured = normalizeReasoningEffort(effort ?? process.env[CODEX_REASONING_ENV] ?? process.env[CODEX_REASONING_ENV_FALLBACK]);
609
+ const { effort: configured, rejected } = normalizeReasoningEffort(effort ?? process.env[CODEX_REASONING_ENV] ?? process.env[CODEX_REASONING_ENV_FALLBACK]);
606
610
  const normalizedModel = (model ?? "").toLowerCase();
607
611
  const isGpt51 = normalizedModel.includes("gpt-5.1");
612
+ if (rejected) {
613
+ warnUnsupportedReasoningEffort(rejected, isGpt51 ? GPT_51_MAX_REASONING_EFFORT : undefined);
614
+ }
608
615
  if (configured) {
609
616
  if (isGpt51 &&
610
617
  codexReasoningEffortRank(configured) > codexReasoningEffortRank(GPT_51_MAX_REASONING_EFFORT)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcoda/agents",
3
- "version": "0.1.130",
3
+ "version": "0.1.131",
4
4
  "description": "Agent registry and capabilities for mcoda.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -30,8 +30,8 @@
30
30
  "access": "public"
31
31
  },
32
32
  "dependencies": {
33
- "@mcoda/db": "0.1.130",
34
- "@mcoda/shared": "0.1.130"
33
+ "@mcoda/db": "0.1.131",
34
+ "@mcoda/shared": "0.1.131"
35
35
  },
36
36
  "scripts": {
37
37
  "build": "tsc -p tsconfig.json",