@nexus-cortex/server 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 +61 -2
- package/package.json +3 -3
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
|
-
|
|
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexus-cortex/server",
|
|
3
|
-
"version": "4.124.
|
|
3
|
+
"version": "4.124.26",
|
|
4
4
|
"description": "Thin Express server wrapper for Nexus Cortex core library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"prepack": "node ../../scripts/copy-pkg-cortex-scaffold.mjs"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@nexus-cortex/core": "4.124.
|
|
24
|
-
"@nexus-cortex/executors": "4.124.
|
|
23
|
+
"@nexus-cortex/core": "4.124.26",
|
|
24
|
+
"@nexus-cortex/executors": "4.124.26",
|
|
25
25
|
"chalk": "^5.3.0",
|
|
26
26
|
"cors": "^2.8.5",
|
|
27
27
|
"dotenv": "^16.4.5",
|