@nexus-cortex/core 4.124.42 → 4.124.44
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 +110 -0
- package/dist/adapters/GatewayTranslationLayer.d.ts.map +1 -1
- package/dist/adapters/GatewayTranslationLayer.js +10 -0
- package/dist/adapters/GatewayTranslationLayer.js.map +1 -1
- package/dist/config/SettingsLoader.d.ts +3 -1
- package/dist/config/SettingsLoader.d.ts.map +1 -1
- package/dist/config/SettingsLoader.js +18 -4
- package/dist/config/SettingsLoader.js.map +1 -1
- package/dist/config/SettingsSchema.d.ts +1 -0
- package/dist/config/SettingsSchema.d.ts.map +1 -1
- package/dist/config/SettingsSchema.js +9 -0
- package/dist/config/SettingsSchema.js.map +1 -1
- package/dist/config/effectiveConfig.d.ts +1 -1
- package/dist/config/effectiveConfig.d.ts.map +1 -1
- package/dist/config/effectiveConfig.js +14 -2
- package/dist/config/effectiveConfig.js.map +1 -1
- package/dist/config/interactiveProfile.d.ts +86 -0
- package/dist/config/interactiveProfile.d.ts.map +1 -0
- package/dist/config/interactiveProfile.js +114 -0
- package/dist/config/interactiveProfile.js.map +1 -0
- package/dist/middleware/HelperModelMiddleware.d.ts +10 -0
- package/dist/middleware/HelperModelMiddleware.d.ts.map +1 -1
- package/dist/middleware/HelperModelMiddleware.js +49 -6
- package/dist/middleware/HelperModelMiddleware.js.map +1 -1
- package/dist/middleware/SystemMessageMiddleware.d.ts.map +1 -1
- package/dist/middleware/SystemMessageMiddleware.js +4 -2
- package/dist/middleware/SystemMessageMiddleware.js.map +1 -1
- package/dist/middleware/helpers/helperProviderMatch.d.ts +40 -0
- package/dist/middleware/helpers/helperProviderMatch.d.ts.map +1 -0
- package/dist/middleware/helpers/helperProviderMatch.js +50 -0
- package/dist/middleware/helpers/helperProviderMatch.js.map +1 -0
- package/dist/orchestrator/APIClient.d.ts.map +1 -1
- package/dist/orchestrator/APIClient.js +26 -3
- package/dist/orchestrator/APIClient.js.map +1 -1
- package/dist/orchestrator/CortexOrchestrator.d.ts +2 -1
- package/dist/orchestrator/CortexOrchestrator.d.ts.map +1 -1
- package/dist/orchestrator/CortexOrchestrator.js +23 -3
- package/dist/orchestrator/CortexOrchestrator.js.map +1 -1
- package/dist/orchestrator/OrchestratorFactory.d.ts.map +1 -1
- package/dist/orchestrator/OrchestratorFactory.js +10 -0
- package/dist/orchestrator/OrchestratorFactory.js.map +1 -1
- package/dist/orchestrator/plateauStop.d.ts +12 -3
- package/dist/orchestrator/plateauStop.d.ts.map +1 -1
- package/dist/orchestrator/plateauStop.js +18 -6
- package/dist/orchestrator/plateauStop.js.map +1 -1
- package/dist/orchestrator/transportFixes.d.ts +55 -0
- package/dist/orchestrator/transportFixes.d.ts.map +1 -0
- package/dist/orchestrator/transportFixes.js +182 -0
- package/dist/orchestrator/transportFixes.js.map +1 -0
- package/dist/system-messages/promptPresets.d.ts +29 -1
- package/dist/system-messages/promptPresets.d.ts.map +1 -1
- package/dist/system-messages/promptPresets.js +44 -2
- package/dist/system-messages/promptPresets.js.map +1 -1
- package/dist/training/DecisionStore.d.ts +1 -1
- package/dist/training/DecisionStore.d.ts.map +1 -1
- package/dist/training/DecisionStore.js.map +1 -1
- package/dist/training/endTurnResolver.d.ts +7 -2
- package/dist/training/endTurnResolver.d.ts.map +1 -1
- package/dist/training/endTurnResolver.js +7 -4
- package/dist/training/endTurnResolver.js.map +1 -1
- package/dist/training/liftPlanner.d.ts +2 -1
- package/dist/training/liftPlanner.d.ts.map +1 -1
- package/dist/training/liftPlanner.js +5 -2
- package/dist/training/liftPlanner.js.map +1 -1
- package/dist/training/taskRules.d.ts +33 -0
- package/dist/training/taskRules.d.ts.map +1 -0
- package/dist/training/taskRules.js +68 -0
- package/dist/training/taskRules.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* R211–R214 HB-TASK-RULES (dark, 2026-10-02). Four general verification rules from the TB4.0 requirement-miss pass over the 16
|
|
3
|
+
* never-passed tasks that fail one identical hidden test every run (.cortex/research/tb4-never-passed-2026-10-02.md §Requirement-miss
|
|
4
|
+
* pass): input overlooked / given input altered, ambiguous convention settled by heuristic, overfit to the visible sample, fidelity with
|
|
5
|
+
* no independent check. Each rule is its own env flag (A/B-able) and rides TWO carriers:
|
|
6
|
+
*
|
|
7
|
+
* A — planner: one doctrine bullet per active rule in the lift-plan persona (liftPlanner.plannerSystem), so the plan carries the step.
|
|
8
|
+
* B — judge: one rubric clause per active rule appended to the EndTurn judge persona (endTurnResolver.resolverSystemPrompt),
|
|
9
|
+
* exactly like R208's RESOLVER_SCALE_CLAUSE: evidence that does not establish the rule → GAP with a concrete CHECK.
|
|
10
|
+
*
|
|
11
|
+
* CORTEX_RULE_INPUTS = off (default) | on R211 L1 input-coverage audit
|
|
12
|
+
* CORTEX_RULE_INTERP = off (default) | on R212 L2 interpretation enumeration
|
|
13
|
+
* CORTEX_RULE_HOLDOUT = off (default) | on R213 L3 held-out / variant validation
|
|
14
|
+
* CORTEX_RULE_INDEP = off (default) | on R214 L4 independent verifier
|
|
15
|
+
*
|
|
16
|
+
* All off → both personas byte-identical. The rules only ever ask for MORE verification. Pure apart from the env read.
|
|
17
|
+
*/
|
|
18
|
+
/** Canonical order (block and clause order never depend on env iteration order). */
|
|
19
|
+
export const TASK_RULES = ['inputs', 'interp', 'holdout', 'indep'];
|
|
20
|
+
export const TASK_RULE_ENV = {
|
|
21
|
+
inputs: 'CORTEX_RULE_INPUTS',
|
|
22
|
+
interp: 'CORTEX_RULE_INTERP',
|
|
23
|
+
holdout: 'CORTEX_RULE_HOLDOUT',
|
|
24
|
+
indep: 'CORTEX_RULE_INDEP',
|
|
25
|
+
};
|
|
26
|
+
/** Active rules, canonical order. A rule is on for on | true | 1 (case-insensitive); anything else is off. */
|
|
27
|
+
export function resolveTaskRules(env = process.env) {
|
|
28
|
+
return TASK_RULES.filter((r) => /^(on|true|1)$/i.test((env[TASK_RULE_ENV[r]] ?? '').trim()));
|
|
29
|
+
}
|
|
30
|
+
/** Carrier A: one planner doctrine bullet per rule (same `- NAME: …\n` shape as the other doctrine bullets). */
|
|
31
|
+
export const TASK_RULE_PLAN_LINES = {
|
|
32
|
+
inputs: '- INPUT COVERAGE: include a step that lists every field, column and parameter of the provided inputs and where the solution uses ' +
|
|
33
|
+
'each one. Never change a given constant or input to make the problem feasible; if it looks infeasible with the given data, ' +
|
|
34
|
+
're-read the task and the inputs — something was misread.\n',
|
|
35
|
+
interp: '- INTERPRETATIONS: when the task or the work names alternative readings, conventions or candidates, include a step that computes ' +
|
|
36
|
+
'each one and keeps the one consistent with every explicit hint and all of the data, stating why.\n',
|
|
37
|
+
holdout: '- HELD-OUT VALIDATION: when the task implies hidden inputs, other variants or generalisation, include a step that validates on a ' +
|
|
38
|
+
'held-out split or constructed variants, not only the visible sample.\n',
|
|
39
|
+
indep: '- INDEPENDENT CHECK: include a final check that does not reuse the producing logic (a separate method or recomputation), resolve ' +
|
|
40
|
+
'every measured discrepancy before finishing, and run the task\'s own verification commands within its stated limits.\n',
|
|
41
|
+
};
|
|
42
|
+
/** The combined planner block for the active rules ('' when none). */
|
|
43
|
+
export function taskRulesPlanBlock(rules) {
|
|
44
|
+
return TASK_RULES.filter((r) => rules.includes(r)).map((r) => TASK_RULE_PLAN_LINES[r]).join('');
|
|
45
|
+
}
|
|
46
|
+
/** Carrier B: one judge rubric clause per rule (same `\n\nNAME RULE (HB-…): question? If … treat that as a GAP and name a CHECK …` shape
|
|
47
|
+
* as RESOLVER_SCALE_CLAUSE). */
|
|
48
|
+
export const TASK_RULE_JUDGE_CLAUSES = {
|
|
49
|
+
inputs: '\n\nINPUTS RULE (HB-RULE-INPUTS): when the task provides input data, parameters or constants, does the work use them and leave the ' +
|
|
50
|
+
'given values unchanged? If a provided field is ignored or a given value was altered to make the problem feasible, treat that as a GAP ' +
|
|
51
|
+
'and name a CHECK that shows where that input is used. Tasks with no provided inputs are not affected by this rule.',
|
|
52
|
+
interp: '\n\nINTERPRETATION RULE (HB-RULE-INTERP): where the task or the work names alternative readings, conventions or candidates, does ' +
|
|
53
|
+
'the evidence show each one was computed and the chosen one is consistent with every explicit hint and all the data? If an ' +
|
|
54
|
+
'alternative was set aside without that comparison, treat that as a GAP and name a CHECK that scores the alternatives against the ' +
|
|
55
|
+
'hints and the data.',
|
|
56
|
+
holdout: '\n\nHELD-OUT RULE (HB-RULE-HOLDOUT): if the task implies hidden inputs, other variants or generalisation, does the verification ' +
|
|
57
|
+
'go beyond the visible sample (a held-out split or constructed variants)? If the evidence covers only the visible sample, treat ' +
|
|
58
|
+
'that as a GAP and name a CHECK on held-out or constructed variant inputs.',
|
|
59
|
+
indep: '\n\nINDEPENDENT-CHECK RULE (HB-RULE-INDEP): is the final verification independent of the logic that produced the result — the ' +
|
|
60
|
+
'task\'s own tests or commands within their stated limits, or a separate method — rather than a self-check that only restates the ' +
|
|
61
|
+
'producing code\'s own output? Running the task\'s own tests counts as independent. A self-only check, or a measured discrepancy left ' +
|
|
62
|
+
'unreconciled, is a GAP: name an independent CHECK that settles it.',
|
|
63
|
+
};
|
|
64
|
+
/** The combined judge clauses for the active rules ('' when none). */
|
|
65
|
+
export function taskRulesJudgeClause(rules) {
|
|
66
|
+
return TASK_RULES.filter((r) => rules.includes(r)).map((r) => TASK_RULE_JUDGE_CLAUSES[r]).join('');
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=taskRules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taskRules.js","sourceRoot":"","sources":["../../src/training/taskRules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,oFAAoF;AACpF,MAAM,CAAC,MAAM,UAAU,GAAwB,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;AAExF,MAAM,CAAC,MAAM,aAAa,GAA6B;IACrD,MAAM,EAAE,oBAAoB;IAC5B,MAAM,EAA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ACtE,MAAM,UAAU,oBAAoB,CAAC,KAA0B;IAC7D,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACrG,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.44",
|
|
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.44",
|
|
51
|
+
"@nexus-cortex/types": "4.124.44",
|
|
52
52
|
"@types/uuid": "^10.0.0",
|
|
53
53
|
"ajv": "^8.12.0",
|
|
54
54
|
"chokidar": "^3.6.0",
|