@nexus-cortex/cli 4.82.0 → 4.83.0

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.
Files changed (2) hide show
  1. package/.env.example +31 -17
  2. package/package.json +2 -2
package/.env.example CHANGED
@@ -109,7 +109,8 @@ CLAUDE_CODE_OAUTH_TOKEN=
109
109
  # ============================================
110
110
 
111
111
  # Default model for new sessions (any registry ID or alias — `cortex models list`)
112
- DEFAULT_MODEL_ID=deepseek-v4-pro
112
+ # Optimal TB2 apprentice tier — pairs with the pro MENTORSHIP_HELPER_MODEL (stronger mentor).
113
+ DEFAULT_MODEL_ID=deepseek-v4-flash
113
114
  # Cheaper model for context compaction & mentorship
114
115
  HELPER_MODEL_ID=deepseek-v4-flash
115
116
 
@@ -149,8 +150,14 @@ PROJECT_PATH=
149
150
  # REACTIVE MENTORSHIP (AI-to-AI self-improvement)
150
151
  # ============================================
151
152
 
152
- # Master switch for the mentorship system
153
- MENTORSHIP_ENABLED=false
153
+ # Master switch for the mentorship system. ON = a stronger MENTORSHIP_HELPER_MODEL mentors
154
+ # the primary model (AskForAdvice hints on thrash). Only meaningful when the primary
155
+ # (DEFAULT_MODEL_ID) is WEAKER than the helper — a same-tier pair adds nothing.
156
+ MENTORSHIP_ENABLED=true
157
+ # Forced-tool_choice backstop (AskForAdvice v2): on HIGH-confidence thrash, FORCE the model to
158
+ # call AskForAdvice for one turn. Voluntary heed is ~0 (0/47 lifted transcripts), so forcing is
159
+ # what actually makes the mentor fire. OFF by default — the v2 forcing path is not yet TB2-validated.
160
+ CORTEX_MENTOR_FORCE=false
154
161
  # Trigger helper-model review on tool errors (only applies when mentorship is enabled)
155
162
  MENTORSHIP_TRIGGER_ON_ERROR=false
156
163
  # Minimum error severity to trigger. Options: low, medium, high
@@ -160,10 +167,13 @@ MENTORSHIP_KEYWORDS_ENABLED=false
160
167
  # Additional trigger keywords (comma-separated, e.g. @help,@stuck)
161
168
  MENTORSHIP_CUSTOM_KEYWORDS=
162
169
  # Model used for mentorship guidance (overrides HELPER_MODEL_ID).
163
- # Default = deepseek-v4-flash for SINGLE-PROVIDER congruence: the shipped harness
164
- # (and the TB2 bench container) reuses the main DeepSeek key no 2nd API key needed.
170
+ # MUST be a STRONGER model than the primary/apprentice model: the mentor gives HINTS the
171
+ # weaker model cannot produce on its own (AskForAdvice), so a same-tier helper adds nothing.
172
+ # Default = deepseek-v4-pro — still SINGLE-PROVIDER (reuses the main DeepSeek key, no 2nd API
173
+ # key needed), just the stronger DeepSeek tier. Pair with DEFAULT_MODEL_ID=deepseek-v4-flash
174
+ # (apprentice) so the mentor is genuinely stronger on the task.
165
175
  # (For image/vision background tasks, deepseek-v4-flash-vision-exp is the vision-capable option.)
166
- MENTORSHIP_HELPER_MODEL=deepseek-v4-flash
176
+ MENTORSHIP_HELPER_MODEL=deepseek-v4-pro
167
177
  # Periodic mentorship review every N turns
168
178
  MENTORSHIP_TURN_BASED_ENABLED=false
169
179
  # Turns between periodic reviews (1-50)
@@ -218,7 +228,7 @@ MEMORY_ARCHIVE_MAX_BYTES=10000
218
228
  # Maximum tool executions per turn
219
229
  MAX_TOOL_ITERATIONS=1000
220
230
  # Stop the turn after this many consecutive all-error iterations
221
- MAX_CONSECUTIVE_ERRORS=3
231
+ MAX_CONSECUTIVE_ERRORS=6
222
232
  # Soft per-turn tool-call budget (R29b brake: escalating reminders, hard cap at 2x)
223
233
  # 0 disables budget pressure entirely (R64)
224
234
  TOOL_BUDGET_SOFT=400
@@ -234,11 +244,11 @@ MAX_LOOP_REPETITIONS=5
234
244
  # Bench/server profiles: wrap bash commands with `set -o pipefail` so
235
245
  # `failing-cmd | tail` classifies as a failure instead of masking behind the
236
246
  # pipe's exit 0. NEVER default-on (changes user command semantics).
237
- #CORTEX_BASH_PIPEFAIL=false
247
+ CORTEX_BASH_PIPEFAIL=true
238
248
  # Lift the Bash $() command-substitution block entirely (sandboxed profiles,
239
249
  # e.g. bench containers — an OPERATOR decision; the check is a security
240
250
  # control). $(( )) arithmetic is never flagged regardless of this setting.
241
- #CORTEX_ALLOW_CMD_SUBSTITUTION=false
251
+ CORTEX_ALLOW_CMD_SUBSTITUTION=true
242
252
  # Inaction guard (ladder's inverse, 4.70.0): one bounded "act first" retry on a
243
253
  # long actless first-turn response in a tool-capable request. Default OFF.
244
254
  #CORTEX_INACTION_NUDGE=false
@@ -275,7 +285,7 @@ MODEL_ROUTER_ENABLED=false
275
285
  # Routing strategy: auto (classify the prompt) | matrix-only (require explicit task type)
276
286
  MODEL_ROUTER_STRATEGY=auto
277
287
  # Record turn metrics to .cortex/router-matrix.jsonl (independent of routing being enabled)
278
- MODEL_ROUTER_RECORD=true
288
+ MODEL_ROUTER_RECORD=false
279
289
  # Models the router must NEVER auto-select (cost/policy bans), comma-separated.
280
290
  # A trailing '*' is a prefix wildcard: 'grok*' excludes EVERY xAI model (present and
281
291
  # future) so exploration can never route a sub-agent to a grok model — honors the
@@ -469,7 +479,7 @@ MENTORSHIP_ACTIVE_DISCOVERY=false
469
479
  # ============================================
470
480
  # Env override for the model card's anchorProfile (deepseek cards default to
471
481
  # bash-edit). Values: lean | bash-only | bash-plus | bash-edit | none.
472
- #CORTEX_TOOL_ANCHOR=bash-edit
482
+ CORTEX_TOOL_ANCHOR=bash-edit
473
483
  # ── Vision / image-path bridge (item 7) ──
474
484
  # Turns an image stays in the request context before being stubbed out.
475
485
  # MEASURED: an image ANYWHERE in a vision-exp request disables cache reads for
@@ -530,7 +540,7 @@ MENTORSHIP_ACTIVE_DISCOVERY=false
530
540
  #CORTEX_SUBAGENT_TEMPERATURE=
531
541
  # Fetch timeouts (ms) for bench runners / client HTTP.
532
542
  #CORTEX_BENCH_FETCH_TIMEOUT_MS=
533
- #CORTEX_CLIENT_FETCH_TIMEOUT_MS=
543
+ CORTEX_CLIENT_FETCH_TIMEOUT_MS=3600000
534
544
  # P0 compliance gate: allows sk-ant-oat01 subscription tokens on the raw
535
545
  # Messages path ONLY with Anthropic program approval. Leave unset otherwise.
536
546
  #CORTEX_SUBSCRIPTION_AUTH_APPROVED=false
@@ -555,25 +565,29 @@ MENTORSHIP_ACTIVE_DISCOVERY=false
555
565
  # Item 12 — task-integrity guard (anti-reward-hacking; TB2.1 bench + serving profiles).
556
566
  # Appends one static line to the system prompt (survives boot-minimal, prefix-stable):
557
567
  # outputs must derive from executed work — never retrieved/recited solutions.
558
- #CORTEX_TASK_INTEGRITY=true
568
+ CORTEX_TASK_INTEGRITY=true
559
569
  # Poll guard (busy-wait class): one nudge after N consecutive identical SUCCEEDING
560
570
  # calls (run3 deficiency finding). Default off; arm in bench/serving profiles.
561
- #CORTEX_POLL_GUARD=true
571
+ CORTEX_POLL_GUARD=true
562
572
  #POLL_REMIND_AT=4
563
573
  # EndTurn Stage-5 integrity verifier (item 12 layer 4): mechanical checks at the
564
574
  # gate — web-content transplant + solution-shaped queries (AUDIT-ONLY events when
565
575
  # a sources attestation is present: justify-don't-block) + mandatory show-your-work
566
576
  # `sources` attestation whenever web tools were used this turn (the one rejecting
567
577
  # check; bounded nudges, fallback-accept).
568
- #CORTEX_ENDTURN_INTEGRITY=true
578
+ CORTEX_ENDTURN_INTEGRITY=true
569
579
  # Item 13b — surrender guard: one "execute your plan" nudge when a tool-using turn
570
580
  # ends by ENUMERATING remaining steps instead of doing them (the honest-premature-
571
581
  # surrender class). Default off; bench/serving profiles arm it.
572
- #CORTEX_SURRENDER_NUDGE=true
582
+ CORTEX_SURRENDER_NUDGE=true
573
583
  # Item 14b — windowed near-dup breaker: outcome-agnostic sliding-window counter over
574
584
  # the normalized approach hash (catches varied-param polling invisible to the exact
575
585
  # tracker AND the poll guard — observed x65 near-identical calls, max 4 consecutive).
576
586
  # N-in-window → one diversify nudge; 2N → break. Default off; bench/serving arm it.
577
- #CORTEX_NEARDUP_BREAKER=true
587
+ CORTEX_NEARDUP_BREAKER=true
578
588
  #NEARDUP_WINDOW=20
579
589
  #NEARDUP_NUDGE_AT=8
590
+
591
+
592
+ # --- OPTIMAL LIFT CONFIG (appended) ---
593
+ CORTEX_IDLE_TIMEOUT=120
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexus-cortex/cli",
3
- "version": "4.82.0",
3
+ "version": "4.83.0",
4
4
  "description": "Nexus Cortex CLI - Terminal interface for multi-provider LLM orchestration",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -19,7 +19,7 @@
19
19
  "prepack": "node ../../scripts/copy-pkg-cortex-scaffold.mjs"
20
20
  },
21
21
  "dependencies": {
22
- "@nexus-cortex/core": "4.82.0",
22
+ "@nexus-cortex/core": "4.83.0",
23
23
  "chalk": "^4.1.2",
24
24
  "cli-spinners": "^2.9.0",
25
25
  "commander": "^11.0.0",