@nexus-cortex/cli 4.90.2 → 4.91.1
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 +9 -6
- package/.env.example +19 -5
- package/package.json +2 -2
package/.cortex/orient
CHANGED
|
@@ -38,12 +38,15 @@ for b in file xxd strings ps pgrep free pdftotext tesseract gcc make git curl; d
|
|
|
38
38
|
if command -v "$b" >/dev/null 2>&1; then HAVE="$HAVE $b"; else MISS="$MISS $b"; fi
|
|
39
39
|
done
|
|
40
40
|
echo "-- tooling:${TI:- (no python/node on PATH)} | have:${HAVE:- none} | missing:${MISS:- none}"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
# Bare-box hint (2026-09-03, operator-simplified): a task container may ship WITHOUT the language, compiler,
|
|
42
|
+
# package or library the objective needs — on purpose (the agent phase is bare; internet is usually allowed).
|
|
43
|
+
# State the FACTS (package manager present, whether we are root) and ONE principled directive — no command
|
|
44
|
+
# cookbook: the model bootstraps correctly on its own (pro solved a bare-box torch task with only this line).
|
|
45
|
+
# Prescribing exact incantations is prompt mass that misdirects; observation + intent is enough.
|
|
46
|
+
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
|
+
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
|
+
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."
|
|
47
50
|
fi
|
|
48
51
|
if [ -f README.md ]; then
|
|
49
52
|
echo "-- README head --"
|
package/.env.example
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# ║ .cortex/bench/r-*.md. K=5 CONFIG (settled 2026-09-03 @4.90.1, r-v4-validation): ║
|
|
8
8
|
# ║ ON set + CORTEX_ENDTURN_GATE=true + CORTEX_ENDTURN_REQUIREMENTS=strict + ║
|
|
9
9
|
# ║ ENABLE_WEBTOOLS=false (bench pin) + VISION_HELPER_MODEL on + TOOL_TIMEOUT_MODE=auto; ║
|
|
10
|
-
# ║ MENTOR_AUTO / EFFORT_TAIL / EFFORT_PULSE dark. Pin nexus-cortex@4.
|
|
10
|
+
# ║ MENTOR_AUTO / EFFORT_TAIL / EFFORT_PULSE dark. Pin nexus-cortex@4.91.0 (4.90.0.s ║
|
|
11
11
|
# ║ timeout-promote was inert). Both models. ║
|
|
12
12
|
# ╚══════════════════════════════════════════════════════════════════════════════════╝
|
|
13
13
|
# Copy to .env and fill in the API keys for the providers you use. Every other value
|
|
@@ -271,6 +271,10 @@ MENTORSHIP_HELPER_MODEL=deepseek-v4-pro
|
|
|
271
271
|
# montage of individually LABELED squares (def-a3e7920cf9): grid/crop-aware prompts beat whole-image reads; a stronger
|
|
272
272
|
# vision card is the next lever once available.
|
|
273
273
|
VISION_HELPER_MODEL=deepseek-v4-flash-vision-exp
|
|
274
|
+
# Per-turn cap on ReadImage→vision-helper hand-offs (0 = unlimited). Past the cap ReadImage returns a
|
|
275
|
+
# "consolidate your reads into ONE labeled montage / change approach" reminder instead of another vision call.
|
|
276
|
+
# [LEDGER 2026-09-03 @4.91.0] ON=8 — ✅ v5 CERTIFIED: flash gcode-to-text fired vis×8 then vision_handoff_capped×2 (v4 was 14 uncapped) — cap bounds the runaway (gcode still fails: it is GEOMETRIC not OCR, vision is the wrong approach there). v4 gcode-to-text: 14 (flash) / 34 (pro) slice reads burned the whole task budget without converging (def-fcb719427f); chess flash passed with 6 reads. Cap event kind: vision_handoff_capped. Measure at k=5 (gcode budget_frac, chess flips).
|
|
277
|
+
VISION_HANDOFF_MAX=8
|
|
274
278
|
# Periodic mentorship review every N turns
|
|
275
279
|
MENTORSHIP_TURN_BASED_ENABLED=false
|
|
276
280
|
# Turns between periodic reviews (1-50)
|
|
@@ -344,7 +348,7 @@ TOOL_BUDGET_SOFT=400
|
|
|
344
348
|
# deadline in interactive ones.
|
|
345
349
|
# [LEDGER 2026-09-02 @4.90.0] ON=120000 — p3 timeout audit (r-p3): the 120s kill fired 42× across 14 task-runs and RESCUED NONE (train-fasttext busy-wait driver, long builds); every p3 timeout was Harbor's budget, not ours. Kept at 120s because TOOL_TIMEOUT_MODE=auto promotes instead of kills in headless (item 8). v4 audit: pro/train-fasttext = the busy-wait driver again (249 bash, 22 cancels) and 4.90.0's promote was INERT (outer-abort race, fixed 4.90.1) → train-fasttext is the 4.90.1 re-test task.
|
|
346
350
|
TOOL_TIMEOUT_MS=120000
|
|
347
|
-
# [LEDGER 2026-09-03 @4.
|
|
351
|
+
# [LEDGER 2026-09-03 @4.91.0] ON=auto — ✅ v5 CERTIFIED FIRING on the real bench (tool_promoted: flash 2 / pro 2, on train-fasttext + dna-insert). 4.90.0 was INERT: the orchestrator's outer abort raced ShellTool's deadline and always won (v4 pro/train-fasttext: 22 cancelled, 0 promoted). 4.90.1: outer cap = TOOL_TIMEOUT_MS+30s, ShellTool default follows TOOL_TIMEOUT_MS; LIVE-VERIFIED (5s deadline, 9s command → tool_promoted event, model read the background output). Re-test task: train-fasttext. PROMOTE-AT-DEADLINE: when a Bash call exceeds TOOL_TIMEOUT_MS in a
|
|
348
352
|
# headless/auto-approve session, the still-running command is moved to a background shell (bash_id) and the tool
|
|
349
353
|
# returns the output so far instead of killing it; interactive sessions keep the kill. Evidence (c3/p3 trajectories):
|
|
350
354
|
# the 120s kill fired 42x across 14 task-runs (19 legitimate scripts, 12 wait loops, 5 builds/trainings) and rescued
|
|
@@ -447,7 +451,7 @@ ROUTER_MIN_SAMPLES=3
|
|
|
447
451
|
|
|
448
452
|
# Mandatory EndTurn pre-delivery self-audit + Stage 2/3 verifiers. Default OFF; ON =
|
|
449
453
|
# graded cortex-channel training records (the tool is hidden when off).
|
|
450
|
-
# [LEDGER 2026-09-03 @4.
|
|
454
|
+
# [LEDGER 2026-09-03 @4.91.0] DARK/PENDING → **RECOMMENDED ON for k=5 (with REQUIREMENTS=strict)** — 4.91.0: gates now run on the STREAMING path too (were sendMessage-only; one shared endTurnGates.ts, live-proven on stream:true) and Stage-2 grounding accepts text the model WROTE this turn (Write/Edit content) — the false 'not grounded' rejections on authored files are gone. COST (v4 pass mining + doctrine-mine): every pass paid 4-8 EndTurn round-trips, the biggest share = Stage-2 CITATION rejects (17/43 doctrine findings; the model never re-ran a command for a fresh verbatim line) → 4.90.2 nudge teaches per-turn grounding + re-run; expect controls' +25-35% turn tax to drop — measure at k=5. — v4 (n=1, @4.90.0): gate engaged heavily under strict (flash gate_req=22/cite=13, pro 17/4), controls bn-fit+sqlite held on BOTH models, pro flips vs p3: dna-insert, pytorch-model-cli, cancel-async (n=1 candidates). Prior 3 cells: 4.71 fp 11→1 · fd +2/5 · c3 (n=2, r-c3-candidate-config) code-from-image FLIP 2/2 (first flash-family pass ever; Stage-4 requirement rejections, no mentor) + dna-insert 1/2; 0 clean regressions outside its LIMIT (accepts a re-attested wrong artifact: pytorch-model-cli r2, dna-insert fd). Cost: attestation turns. Operator decision pending. PRO (r-p3, n=1): controls 3/3 held with NO attestation tax (bn-fit 53→30 turns), 0 regressions, 0 paralysis; 0/13 flips on pro's hard core (budget timeouts while working). → k=5 config for BOTH models: guards + GATE+REQ + ENABLE_WEBTOOLS=false, mentor/tail off.
|
|
451
455
|
CORTEX_ENDTURN_GATE=false
|
|
452
456
|
# Stage 4 (4.70.0, requires the gate ON): task-requirements attestation —
|
|
453
457
|
# enumerate each stated requirement with what satisfies it + how it was
|
|
@@ -458,7 +462,7 @@ CORTEX_ENDTURN_GATE=false
|
|
|
458
462
|
# (a claim with no matching tool output is rejected). Motivation: 4 pro fails
|
|
459
463
|
# (cancel-async-tasks, dna-assembly, dna-insert, pytorch-model-cli) were 85-95% complete with
|
|
460
464
|
# TRUE attestations verified against the model's own tests, not the task's exact constraints.
|
|
461
|
-
# [LEDGER 2026-09-03 @4.
|
|
465
|
+
# [LEDGER 2026-09-03 @4.91.0] DARK/PENDING → `strict` RECOMMENDED for k=5 with the gate. 4.91.0: verified_how also grounds on a Bash command that RAN this turn (12-char windows) so the recommended `$ cmd → output` form passes; Stage-1 reminder names `requirements`. v4 cell (n=1): strict rejects fired heavily (flash gate_req=22, pro=17), 0 control regressions. 🔴 4.90.0 strict CRASHED on EndTurn({}) (null.filter ×4, flash/dna-insert) and rejected 11 honest condensations as paraphrases (protein-assembly) → 4.90.1: null-guarded; verbatim = 24-char window OR ≥70% content tokens; nudge shows a pasted-output example. Needs GATE.
|
|
462
466
|
#CORTEX_ENDTURN_REQUIREMENTS=false
|
|
463
467
|
|
|
464
468
|
# ============================================
|
|
@@ -741,7 +745,7 @@ CORTEX_POLL_GUARD=true
|
|
|
741
745
|
# a sources attestation is present: justify-don't-block) + mandatory show-your-work
|
|
742
746
|
# `sources` attestation whenever web tools were used this turn (the one rejecting
|
|
743
747
|
# check; bounded nudges, fallback-accept).
|
|
744
|
-
# [LEDGER 2026-09-
|
|
748
|
+
# [LEDGER 2026-09-03 @4.91.0] ON — guard stack Stage-5 (transplant/solution-query audit + sources attestation; justify-don't-block); since 4.91.0 also evaluated on the streaming path. Constant-on in every bench arm incl. controls. Fired 'unattested web use 12/12' on protein-assembly (fd) → one of 3 web-tool taxes behind ENABLE_WEBTOOLS.
|
|
745
749
|
CORTEX_ENDTURN_INTEGRITY=true
|
|
746
750
|
# Item 13b — surrender guard: one "execute your plan" nudge when a tool-using turn
|
|
747
751
|
# ends by ENUMERATING remaining steps instead of doing them (the honest-premature-
|
|
@@ -754,6 +758,16 @@ CORTEX_SURRENDER_NUDGE=true
|
|
|
754
758
|
# N-in-window → one diversify nudge; 2N → break. Default off; bench/serving arm it.
|
|
755
759
|
# [LEDGER 2026-09-02 @4.89.0] ON — guard stack; the retry-loop ladder (retry_loop = 65-74% of fails pre-guards). Code defaults NEARDUP_NUDGE_AT=12 (8 regressed rstan-class grinds) / NEARDUP_WINDOW=30 (break rung unreachable at 20).
|
|
756
760
|
CORTEX_NEARDUP_BREAKER=true
|
|
761
|
+
# Slice-reader nudge: after the 3rd bash slice-read (sed -n N,Mp / head -n / tail -n) of the SAME file in a session,
|
|
762
|
+
# append a one-line reminder to read the file once with Read (offset/limit) instead. Event kind: slice_read.
|
|
763
|
+
# [LEDGER 2026-09-03 @4.91.0] ON — ✅ v5 CERTIFIED: slice_read fired (flash 3 / pro 4, on gcode/make-doom/train-fasttext/dna). Doctrine gap flagged 08-29 (A′ doctrine-mine) and recurring in v4 make-doom on BOTH models (5 sed slices of /app/vm.js each); the Bash description's Read-preference line alone does not hold under the bash-edit frame. Post-tool reminder = no turn-1 prompt mass.
|
|
764
|
+
CORTEX_SLICE_NUDGE=true
|
|
765
|
+
# Orient bootstrap directive: when a bare box lacks the language/compiler/library the task needs, orient prints one
|
|
766
|
+
# principled "install what you need + install once + fast cached installer" line. GATED because it is UNPROVEN —
|
|
767
|
+
# the one bare-box pass we have (tp torch-tensor, 4.91.0) happened with ONLY orient's factual tooling line, no
|
|
768
|
+
# directive. The factual tooling line is always on; this flag adds the directive.
|
|
769
|
+
# [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.
|
|
770
|
+
#CORTEX_ORIENT_BOOTSTRAP=0
|
|
757
771
|
# [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.
|
|
758
772
|
#NEARDUP_WINDOW=30
|
|
759
773
|
# [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.
|
|
3
|
+
"version": "4.91.1",
|
|
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.
|
|
22
|
+
"@nexus-cortex/core": "4.91.1",
|
|
23
23
|
"chalk": "^4.1.2",
|
|
24
24
|
"cli-spinners": "^2.9.0",
|
|
25
25
|
"commander": "^11.0.0",
|