@nexus-cortex/cli 4.124.24 → 4.124.26

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/.cortex/orient CHANGED
@@ -7,6 +7,16 @@
7
7
  W="$(pwd)"
8
8
  echo "== WORKSPACE MAP: $W =="
9
9
  ls -1A "$W" 2>/dev/null | head -40
10
+ # orient v2 ships DARK (2026-09-27): every v2 section runs only with CORTEX_ORIENT_V2=1; unset = the v1 output byte-for-byte.
11
+ V2="${CORTEX_ORIENT_V2:-0}"
12
+ # orient v2 (2026-09-27, MiMo: the whole library lived under vendor/ and the map showed one level): one more level for the top
13
+ # directories (skipping caches/vendored deps of the toolchain), capped so the map stays small.
14
+ [ "$V2" = "1" ] && for d in $(ls -1A "$W" 2>/dev/null | head -40); do
15
+ [ -d "$W/$d" ] || continue
16
+ case "$d" in .git|node_modules|__pycache__|.venv|venv|.cache|.cortex|.addon-tools|dist|build|target) continue;; esac
17
+ n=$(ls -1A "$W/$d" 2>/dev/null | wc -l | tr -d ' ')
18
+ echo " $d/ ($n): $(ls -1A "$W/$d" 2>/dev/null | head -8 | tr '\n' ' ')"
19
+ done | head -8
10
20
  PROJECT=""
11
21
  CMDS=""
12
22
  if [ -f package.json ]; then
@@ -38,15 +48,59 @@ for b in file xxd strings ps pgrep free pdftotext tesseract gcc make git curl; d
38
48
  if command -v "$b" >/dev/null 2>&1; then HAVE="$HAVE $b"; else MISS="$MISS $b"; fi
39
49
  done
40
50
  echo "-- tooling:${TI:- (no python/node on PATH)} | have:${HAVE:- none} | missing:${MISS:- none}"
51
+ # orient v2: the baseline the judge's workspace delta is computed against — know it before editing.
52
+ if [ "$V2" != "1" ]; then :
53
+ elif command -v git >/dev/null 2>&1 && git -C "$W" rev-parse --is-inside-work-tree >/dev/null 2>&1; then
54
+ CH=$(git -C "$W" status --porcelain 2>/dev/null | wc -l | tr -d ' ')
55
+ if git -C "$W" rev-parse --verify -q HEAD >/dev/null 2>&1; then
56
+ echo "-- git: $(git -C "$W" rev-parse --abbrev-ref HEAD 2>/dev/null) @ $(git -C "$W" log -1 --format=%h 2>/dev/null), $CH changed file(s) — \`git diff\` shows your edits"
57
+ else
58
+ echo "-- git: repository with no commits yet ($CH untracked/changed path(s)) — commit a baseline before editing to diff your work"
59
+ fi
60
+ else
61
+ echo "-- git: not a repository (no baseline to diff your edits against)"
62
+ fi
41
63
  # Bare-box hint (2026-09-03, operator-simplified): a task container may ship WITHOUT the language, compiler,
42
64
  # package or library the objective needs — on purpose (the agent phase is bare; internet is usually allowed).
43
65
  # State the FACTS (package manager present, whether we are root) and ONE principled directive — no command
44
66
  # cookbook: the model bootstraps correctly on its own (pro solved a bare-box torch task with only this line).
45
67
  # Prescribing exact incantations is prompt mass that misdirects; observation + intent is enough.
68
+ # The directive exists because some bench task containers ship WITHOUT the dependencies the task needs (operator, 09-27): they must be
69
+ # installed efficiently — once, cached, never duplicated. Trigger unchanged from v1 (no interpreter OR no C compiler). orient v2 adds a
70
+ # guard instead of suppressing the line: the MiMo doctrine mine found 21 sessions pip-installing into the task's frozen vendor trees.
46
71
  if [ "${CORTEX_ORIENT_BOOTSTRAP:-0}" = "1" ] && { ! command -v python3 >/dev/null 2>&1 && ! command -v python >/dev/null 2>&1 || ! command -v cc >/dev/null 2>&1; }; then
47
72
  PM=""; for m in apt-get apk dnf yum pacman zypper brew; do command -v "$m" >/dev/null 2>&1 && { PM="$m"; break; }; done
48
73
  ROOT=$([ "$(id -u 2>/dev/null)" = "0" ] && echo yes || echo no)
49
- echo "-- setup: this box may be missing a tool/language/library the task needs (pkg-mgr=${PM:-none}, root=$ROOT). If so, INSTALL what you need yourself following standard practice (the system package manager, or the language's own installer); install ONCE and reuse it, and prefer a fast cached installer for the language (uv for Python, bun for JS) — do not re-download a large dependency twice. Pin versions, then verify with a real run before finishing. An empty box is part of the task, not an error."
74
+ GUARD=""; [ "$V2" = "1" ] && GUARD=" Install into the system or a venv, never into the task's own source or vendored tree."
75
+ echo "-- setup: this box may be missing a tool/language/library the task needs (pkg-mgr=${PM:-none}, root=$ROOT). If so, INSTALL what you need yourself following standard practice (the system package manager, or the language's own installer); install ONCE and reuse it, and prefer a fast cached installer for the language (uv for Python, bun for JS) — do not re-download a large dependency twice.$GUARD Pin versions, then verify with a real run before finishing. An empty box is part of the task, not an error."
76
+ fi
77
+ # orient v2 — VERIFICATION ENTRY POINTS: how this task's correctness is checked, so work is built and verified against the real
78
+ # criteria, not the agent's own guess (MiMo K=3: in 57/79 failures the agent's own test passed on a wrong solution). Same usage-line
79
+ # logic as the judge/planner env report (R193), plus probe/test scripts, test config and test directories. Read-only, capped.
80
+ VE=""; TC=""; TD=""
81
+ if [ "$V2" = "1" ]; then
82
+ VE=$(find . -maxdepth 3 \( -iname "*check*" -o -iname "*verif*" -o -iname "*validat*" -o -iname "*grade*" -o -iname "*probe*" -o -name "test_*.py" -o -name "*_test.py" -o -iname "run_tests*" \) \( -name "*.py" -o -name "*.sh" \) 2>/dev/null | grep -vE "node_modules|/\.|site-packages|/vendor/.*/tests?/" | head -6)
83
+ TC=""
84
+ for f in pytest.ini tox.ini setup.cfg pyproject.toml Makefile package.json; do
85
+ [ -f "$f" ] || continue
86
+ case "$f" in
87
+ pytest.ini|tox.ini) TC="$TC $f";;
88
+ setup.cfg) grep -q "tool:pytest" "$f" 2>/dev/null && TC="$TC setup.cfg[tool:pytest]";;
89
+ pyproject.toml) grep -q "tool.pytest" "$f" 2>/dev/null && TC="$TC pyproject.toml[tool.pytest]";;
90
+ Makefile) grep -qE "^(test|check)[a-z_-]*:" "$f" 2>/dev/null && TC="$TC make:$(grep -oE '^(test|check)[a-z_-]*' "$f" | head -3 | tr '\n' ',' | sed 's/,$//')";;
91
+ package.json) grep -q '"test"' "$f" 2>/dev/null && TC="$TC npm-test";;
92
+ esac
93
+ done
94
+ TD=$(find . -maxdepth 3 -type d \( -name tests -o -name test \) 2>/dev/null | grep -vE "node_modules|/\.|site-packages" | head -4 | tr '\n' ' ')
95
+ fi
96
+ if [ -n "$VE$TC$TD" ]; then
97
+ echo "== VERIFICATION ENTRY POINTS (build to and verify against these — not a test you invent) =="
98
+ for f in $VE; do
99
+ echo " $f"
100
+ { grep -n -m3 -iE "usage|^ *Run:|add_argument|sys\.argv|getopts" "$f" 2>/dev/null; } | head -3 | cut -c1-150 | sed 's/^/ /'
101
+ done
102
+ [ -n "$TC" ] && echo " test config:$TC"
103
+ [ -n "$TD" ] && echo " test dirs: $TD"
50
104
  fi
51
105
  if [ -f README.md ]; then
52
106
  echo "-- README head --"
@@ -55,7 +109,7 @@ fi
55
109
  # Capability index — harness-owned steering (item 9b): the skills shipped with
56
110
  # the install, reachable through plain bash reads (works under any tool frame).
57
111
  SK="${CORTEX_ROOT:-$HOME}/.cortex/skills"
58
- if [ -d "$SK" ]; then
112
+ if [ -d "$SK" ] && [ "$V2" != "1" ]; then
59
113
  echo "== CAPABILITY GUIDES (load one with: cat <path>/SKILL.md) =="
60
114
  for d in "$SK"/*/; do
61
115
  [ -d "$d" ] || continue
@@ -64,6 +118,11 @@ if [ -d "$SK" ]; then
64
118
  case "$desc" in ">"|"|"|"") desc="guide";; esac
65
119
  echo " $SK/$n — $desc"
66
120
  done | head -14
121
+ elif [ -d "$SK" ]; then
122
+ # orient v2: one line (was 12 full paths + descriptions ≈ half the output, mostly irrelevant to the task at hand).
123
+ NAMES=$(for d in "$SK"/*/; do [ -d "$d" ] && basename "$d"; done | tr '\n' ' ')
124
+ echo "== CAPABILITY GUIDES: $NAMES(read one: cat $SK/<name>/SKILL.md)"
125
+ [ -f "$SK/verify-work/SKILL.md" ] && echo " before finishing, verify-work: cat $SK/verify-work/SKILL.md"
67
126
  fi
68
127
  echo "note: when your tool list is limited, additional tools may be discoverable via the SearchTools tool."
69
128
  # Mechanical CORTEX.md (items 9c + 10): machine-authored sections live between
package/.env.defaults CHANGED
@@ -595,6 +595,7 @@ CORTEX_LIFT_NUDGE=true
595
595
  # [LEDGER 2026-09-06 @4.93.0] ON (reson standard baseline). Part of the reson stack (GATE+REQ+LIFT+RESOLVER) that shipped through resolver-k5 (proven net-positive as a stack). NOTE: k5 held LIFT on in BOTH arms (shared baseline, not the A/B variable) — its independent efficacy stands from the 2026-09-04 isolated eval (plan quality excellent at max/4000); k5 ratifies the reson stack as standard, not LIFT in isolation.
596
596
  # [LEDGER 2026-09-11 @4.107.1] PLANNER DOCTRINE +4 bullets (HB-PLAN-DOCTRINE, cell-n-r1 census): ONE INSTALL LAYER (uv owns venv+packages / bun / reuse what is present — no python→.venv→python stacks), LONG WAITS (background + poll ≤60 s, no minute-long sleeps), EXACT-OUTPUT (byte-level, never parse→re-serialize), EXPECTED LITERALS ARE LAW + graders re-parameterize (derive at run time, never bake constants). Prompt-only; efficacy = next hard-core run on 4.107.1 vs cell-n-r1 flash-none 10/24. Same release: EndTurn discoveryTier standard→essential (HB-ENDTURN-TIER, not a lever).
597
597
  CORTEX_LIFT_PLAN=true
598
+ # [LEDGER 2026-09-27] MiMo K=3 wire (banked `mentor`, 192 lift plans): pro thinking-on @max median 108 s, p90 166 s, 15/192 thinking-off retries — 12–22% of a 900 s MiMo agent budget. e6 (09-18) found no effort level separating (max 10/28, high 12/29, none 11/29 at 10× faster lift); max buys nothing measured. Candidate: CORTEX_LIFT_PLAN_REASONING=none (operator decision).
598
599
  #CORTEX_LIFT_PLAN_EFFORT=max
599
600
  #CORTEX_LIFT_PLAN_BUDGET_TOKENS=4000
600
601
  #CORTEX_LIFT_PLAN_TIMEOUT_MS=90000
@@ -1109,8 +1110,18 @@ CORTEX_ENDTURN_GATE=true
1109
1110
  # the judge's post-hoc checks (f1: 122 checks confirmed the agent's reading of the spec). Events: spec_tests {checks, genLatencyMs,
1110
1111
  # refused}; endturn_resolver += {specTests, specChecks, specRan, specPassed, specFailed, specInconclusive, specGenLatencyMs}. Default off.
1111
1112
  # [LEDGER 2026-09-20 @4.120.0] BUILT + unit-tested (R174 block in endTurnResolver.test.ts). FIELD: pending (cell g1).
1113
+ # [LEDGER 2026-09-27 @4.124.25+tree] RELIABILITY MEASURED OFFLINE (.bench/specrel/, 64 MiMo tb64 tasks; checks run in each task's container on the BROKEN state and on grader-confirmed CORRECT states rebuilt by replaying a passing session, 44/47 confirmed): per-check false alarm 29% on correct solutions, 48% discriminating, 23% blind; check SETS vetoed a correct solution 53–55% of the time, detected the broken state 89%. Causes: invented literals/paths (84), multi-line commands truncated by the one-line parser (18), 14% refused by the denylist, some checks WRITE the deliverable. A v2 persona with explicit rules: NO gain (set FA 60%). R174c (in tree dc4059bbe7) = structural: groundSpecCheck (drop checks whose literals/paths neither the task nor the env report states) + specCheckParses (`sh -n`): set FA 44%, detection 86%. Still NOT fit as a hard veto; gate value on actual agent final states = see r-specrel-2026-09-27.
1112
1114
  #CORTEX_JUDGE_SPEC_TESTS=
1113
1115
  #CORTEX_JUDGE_SPEC_TESTS_MAX=
1116
+ # CORTEX_JUDGE_SPEC_TESTS_SAMPLES / CORTEX_JUDGE_SPEC_VETO_FRAC — R174d (in tree, 2026-09-27, r-specrel-2026-09-27): the blind spec checks are authored
1117
+ # SAMPLES times (1..5, default 3; parallel, thinking-off ≈3 s) and the veto evidence is the averaged per-sample spec-fail fraction ≥ VETO_FRAC
1118
+ # (0<f≤1, default 0.5) — not ANY failed check. And a MEETS is held ONCE (inside the evidence cap) when that fraction is reached: before
1119
+ # R174d decideVetoAction returned 'accept' on MEETS before looking at spec evidence, so the checks could never touch the confident-wrong finish.
1120
+ # [LEDGER 2026-09-27 @in-tree] OFFLINE on 175 replayed MiMo final states: judge alone J 0.11 (FA 82% / FH 7%); "any spec check fails" 73–92% false
1121
+ # holds; judge AND averaged fraction <0.5 (3 samples, R174c grounding) J 0.30 (FA 51% / FH 18%); one sample J 0.08–0.25. Live smoke 4:40 AM PT:
1122
+ # specSets 3, specFrac banked on endturn_resolver. FIELD: pending (needs a cell; spec tests stay OFF by default).
1123
+ #CORTEX_JUDGE_SPEC_TESTS_SAMPLES=
1124
+ #CORTEX_JUDGE_SPEC_VETO_FRAC=
1114
1125
  # CORTEX_JUDGE_VETO_MIN_REMAINING / _GAP_HOLD_MIN_INTERVAL_MS / _GAP_HOLD_PLAN_MAX_SIMILARITY — R173c (4.121.0, 2026-09-20, cell g1
1115
1126
  # attribution r-tb4-g1-2026-09-20.md §3): the ONE attributable regression was an evidence veto at 15% budget (27 min left → fail; control's
1116
1127
  # judge accepted at 25% and passed); the three 6-hold failures re-finished six times inside 2–4% of the budget (the ≥3-call progress rule
@@ -1744,6 +1755,12 @@ CORTEX_SLICE_NUDGE=true
1744
1755
  # [LEDGER 2026-09-03 @4.91.1] DARK (default 0) — ships dark, A/B-able (def-60a1dfc55a); do NOT bake into the k=5 pin.
1745
1756
  # [LEDGER 2026-09-06 @4.93.0] ON=1 (reson standard, operator directive: match the full bench COMMON). CAVEAT: was a SHARED BASELINE in both k5 arms (on in reson AND resoff), so NOT independently A/B-validated — it's part of the proven reson BUNDLE (+17pp) but its solo contribution is unmeasured. A/B-able (def-60a1dfc55a) if isolated efficacy is ever needed.
1746
1757
  CORTEX_ORIENT_BOOTSTRAP=1
1758
+ # CORTEX_ORIENT_V2 — orient v2 (2026-09-27, r-specrel-2026-09-27 §7/§7a): VERIFICATION ENTRY POINTS (checker/probe/test scripts with usage
1759
+ # lines, test config, test dirs), a `-- git:` baseline line, a 2-level map of the top dirs, capability guides collapsed to one line, and a
1760
+ # vendor-tree guard sentence on the bootstrap directive. Unset = the v1 output byte-for-byte.
1761
+ # [LEDGER 2026-09-27 @4.124.26] DARK (default 0) — validated for exit/size in 64 MiMo containers (0 failures); outcome effect UNMEASURED:
1762
+ # the MiMo validation cell (4.124.26, orient-v2 arm vs spec-tests arm vs the 4.124.20 K=3 control 59.9%) decides it.
1763
+ #CORTEX_ORIENT_V2=
1747
1764
  # [LEDGER 2026-09-02 @4.89.0] code default 30 (4.88.0) — 20 made the break rung (2N=24) unreachable; preserves 40%/80% density semantics.
1748
1765
  #NEARDUP_WINDOW=30
1749
1766
  # [LEDGER 2026-09-02 @4.89.0] code default 12 (4.88.0) — 8 misfired on persistence-wins grinds (rstan-to-pystan regressed both arms).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexus-cortex/cli",
3
- "version": "4.124.24",
3
+ "version": "4.124.26",
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.124.24",
22
+ "@nexus-cortex/core": "4.124.26",
23
23
  "chalk": "^4.1.2",
24
24
  "cli-spinners": "^2.9.0",
25
25
  "commander": "^11.0.0",
@@ -31,7 +31,7 @@
31
31
  "marked-terminal": "^6.0.0",
32
32
  "node-fetch": "^3.3.2",
33
33
  "undici": "^7.28.0",
34
- "nexus-canon": "1.11.7"
34
+ "nexus-canon": "1.11.8"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/diff": "^7.0.2",