@nexus-cortex/core 4.124.35 → 4.124.36
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/.env.defaults +8 -6
- package/dist/config/effectiveConfig.js +1 -1
- package/dist/config/effectiveConfig.js.map +1 -1
- package/dist/orchestrator/CortexOrchestrator.d.ts +1 -1
- package/dist/orchestrator/CortexOrchestrator.d.ts.map +1 -1
- package/dist/orchestrator/CortexOrchestrator.js +5 -4
- package/dist/orchestrator/CortexOrchestrator.js.map +1 -1
- package/dist/orchestrator/effortRamp.d.ts +11 -8
- package/dist/orchestrator/effortRamp.d.ts.map +1 -1
- package/dist/orchestrator/effortRamp.js +23 -10
- package/dist/orchestrator/effortRamp.js.map +1 -1
- package/package.json +3 -3
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
* HB-EFFORT-RAMP (CORTEX_EFFORT_RAMP, DARK — 2026-09-30).
|
|
3
3
|
*
|
|
4
4
|
* Evidence (TB4.0 t4cw traces, photonic-waveguide-routing r2 / protein-autointerp-disulfide r1): the action model hit the
|
|
5
|
-
* 65,536-token output wall right after reading the task — trying to solve the routing plan / the
|
|
6
|
-
* before writing any code
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* 65,536-token output wall right after reading the task — on its 3rd and 6th calls — trying to solve the routing plan / the
|
|
6
|
+
* hidden rule in its head before writing any code, and only began acting after being forced down to low. A window of action
|
|
7
|
+
* calls runs at a lower effort, then the configured effort (CORTEX_ACTION_EFFORT / request param / card) returns.
|
|
8
|
+
* Calls are counted from 1 per turn (1 = the initial request). The initial call should stay at the configured effort: the
|
|
9
|
+
* 4.124.35 smoke with the window starting at call 1 skipped the boot prompt's orient step in 2 of 3 runs (0 of 1 without).
|
|
10
|
+
* NOTE: a GLOBAL low was measured harmful on TB4.0 (e6: 3/29 vs high 10/29) — this lever covers only the window.
|
|
10
11
|
*
|
|
11
|
-
* CORTEX_EFFORT_RAMP = off (default) | <level>
|
|
12
|
+
* CORTEX_EFFORT_RAMP = off (default) | <level>:<from>-<to> (e.g. low:2-8, calls from..to inclusive, 1..100)
|
|
13
|
+
* | <level>:<n> (calls 2..n+1 — the initial call is never ramped) | on (= low:2-8)
|
|
12
14
|
*
|
|
13
15
|
* Precedence at a call: R153 exhaustion backoff > effort pulse > ramp > request param > card.
|
|
14
16
|
*/
|
|
@@ -16,9 +18,10 @@ import type { ReasoningEffortLevel } from './emptyResponseClassifier.js';
|
|
|
16
18
|
export interface EffortRampConfig {
|
|
17
19
|
enabled: boolean;
|
|
18
20
|
level: ReasoningEffortLevel;
|
|
19
|
-
|
|
21
|
+
from: number;
|
|
22
|
+
to: number;
|
|
20
23
|
}
|
|
21
24
|
export declare function resolveEffortRamp(env?: NodeJS.ProcessEnv): EffortRampConfig;
|
|
22
|
-
/** The ramp level for the call with this index in the turn (0 = the initial request), or undefined
|
|
25
|
+
/** The ramp level for the call with this 0-based index in the turn (0 = the initial request = call 1), or undefined. */
|
|
23
26
|
export declare function rampEffortFor(cfg: EffortRampConfig, callIndex: number): ReasoningEffortLevel | undefined;
|
|
24
27
|
//# sourceMappingURL=effortRamp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effortRamp.d.ts","sourceRoot":"","sources":["../../src/orchestrator/effortRamp.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"effortRamp.d.ts","sourceRoot":"","sources":["../../src/orchestrator/effortRamp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEzE,MAAM,WAAW,gBAAgB;IAAG,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,oBAAoB,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE;AAM7G,wBAAgB,iBAAiB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,gBAAgB,CAWxF;AAED,wHAAwH;AACxH,wBAAgB,aAAa,CAAC,GAAG,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,GAAG,oBAAoB,GAAG,SAAS,CAGxG"}
|
|
@@ -1,21 +1,34 @@
|
|
|
1
1
|
const LEVELS = ['low', 'medium', 'high', 'max'];
|
|
2
|
-
const OFF = { enabled: false, level: 'low',
|
|
2
|
+
const OFF = { enabled: false, level: 'low', from: 0, to: 0 };
|
|
3
|
+
const int = (x) => (x !== undefined && /^\d+$/.test(x.trim()) ? Number(x.trim()) : NaN);
|
|
3
4
|
export function resolveEffortRamp(env = process.env) {
|
|
4
5
|
const v = String(env.CORTEX_EFFORT_RAMP ?? '').trim().toLowerCase();
|
|
5
6
|
if (v === '' || v === 'off' || v === 'false' || v === '0')
|
|
6
7
|
return OFF;
|
|
7
8
|
if (v === 'on' || v === 'true' || v === '1')
|
|
8
|
-
return { enabled: true, level: 'low',
|
|
9
|
-
const [lv,
|
|
10
|
-
if (!LEVELS.includes(lv))
|
|
9
|
+
return { enabled: true, level: 'low', from: 2, to: 8 };
|
|
10
|
+
const [lv, spec] = v.split(':');
|
|
11
|
+
if (!LEVELS.includes(lv) || spec === undefined)
|
|
11
12
|
return OFF;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
let from;
|
|
14
|
+
let to;
|
|
15
|
+
if (spec.includes('-')) {
|
|
16
|
+
const [a, b] = spec.split('-');
|
|
17
|
+
from = int(a);
|
|
18
|
+
to = int(b);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
const n = int(spec);
|
|
22
|
+
from = 2;
|
|
23
|
+
to = n + 1;
|
|
24
|
+
}
|
|
25
|
+
if (!Number.isFinite(from) || !Number.isFinite(to) || from < 2 || to < from)
|
|
26
|
+
return OFF; // the initial call is never ramped
|
|
27
|
+
return { enabled: true, level: lv, from, to: Math.min(100, to) };
|
|
16
28
|
}
|
|
17
|
-
/** The ramp level for the call with this index in the turn (0 = the initial request), or undefined
|
|
29
|
+
/** The ramp level for the call with this 0-based index in the turn (0 = the initial request = call 1), or undefined. */
|
|
18
30
|
export function rampEffortFor(cfg, callIndex) {
|
|
19
|
-
|
|
31
|
+
const call = callIndex + 1;
|
|
32
|
+
return cfg.enabled && call >= cfg.from && call <= cfg.to ? cfg.level : undefined;
|
|
20
33
|
}
|
|
21
34
|
//# sourceMappingURL=effortRamp.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effortRamp.js","sourceRoot":"","sources":["../../src/orchestrator/effortRamp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"effortRamp.js","sourceRoot":"","sources":["../../src/orchestrator/effortRamp.ts"],"names":[],"mappings":"AAoBA,MAAM,MAAM,GAAoC,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACjF,MAAM,GAAG,GAAqB,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC;AAC/E,MAAM,GAAG,GAAG,CAAC,CAAqB,EAAU,EAAE,CAAC,CAAC,CAAC,KAAK,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAEpH,MAAM,UAAU,iBAAiB,CAAC,MAAyB,OAAO,CAAC,GAAG;IACpE,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,kBAAkB,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACpE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,OAAO,IAAI,CAAC,KAAK,GAAG;QAAE,OAA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AwH;AACxH,MAAM,UAAU,aAAa,CAAC,GAAqB,EAAE,SAAiB;IACpE,MAAM,IAAI,GAAG,SAAS,GAAG,CAAC,CAAC;IAC3B,OAAO,GAAG,CAAC,OAAO,IAAI,IAAI,IAAI,GAAG,CAAC,IAAI,IAAI,IAAI,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACnF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexus-cortex/core",
|
|
3
|
-
"version": "4.124.
|
|
3
|
+
"version": "4.124.36",
|
|
4
4
|
"description": "Core orchestration library implementing Claude CLI architecture patterns",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"@google/generative-ai": "^0.2.1",
|
|
48
48
|
"@gradio/client": "^2.3.1",
|
|
49
49
|
"@modelcontextprotocol/sdk": "^1.20.2",
|
|
50
|
-
"@nexus-cortex/executors": "4.124.
|
|
51
|
-
"@nexus-cortex/types": "4.124.
|
|
50
|
+
"@nexus-cortex/executors": "4.124.36",
|
|
51
|
+
"@nexus-cortex/types": "4.124.36",
|
|
52
52
|
"@types/uuid": "^10.0.0",
|
|
53
53
|
"ajv": "^8.12.0",
|
|
54
54
|
"chokidar": "^3.6.0",
|