@nexus-cortex/server 4.124.26 → 4.124.27
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 +26 -0
- package/package.json +3 -3
package/.cortex/orient
CHANGED
|
@@ -60,6 +60,32 @@ elif command -v git >/dev/null 2>&1 && git -C "$W" rev-parse --is-inside-work-tr
|
|
|
60
60
|
else
|
|
61
61
|
echo "-- git: not a repository (no baseline to diff your edits against)"
|
|
62
62
|
fi
|
|
63
|
+
# Workspace baseline (CORTEX_ORIENT_BASELINE=1, dark, 2026-09-27): MiMo tb64 lost ~10-14% of tasks per run to the grader's
|
|
64
|
+
# protected-file guard (a file outside the task's repair set was modified, usually vendored library code) and the workspaces are not git
|
|
65
|
+
# repos, so nothing could show the agent what it had changed. Record a checksum list ONCE (never overwritten, so a re-run of orient keeps
|
|
66
|
+
# the start state) and ship `.cortex/changed`, which lists modified / added / deleted files against it. POSIX cksum; capped.
|
|
67
|
+
if [ "${CORTEX_ORIENT_BASELINE:-0}" = "1" ]; then
|
|
68
|
+
mkdir -p "$W/.cortex" 2>/dev/null
|
|
69
|
+
cat > "$W/.cortex/changed" 2>/dev/null <<'CHANGED'
|
|
70
|
+
#!/bin/sh
|
|
71
|
+
# Lists files modified / added / deleted since orient recorded .cortex/baseline.cksum (the task's start state).
|
|
72
|
+
cd "$(dirname "$0")/.." || exit 0
|
|
73
|
+
B=.cortex/baseline.cksum
|
|
74
|
+
[ -f "$B" ] || { echo "no baseline recorded (.cortex/baseline.cksum missing)"; exit 0; }
|
|
75
|
+
T=$(mktemp 2>/dev/null || echo /tmp/cortex-now.$$)
|
|
76
|
+
find . \( -path ./.git -o -path ./.cortex -o -name node_modules -o -name __pycache__ -o -name .venv -o -name venv -o -name .cache -o -name .pytest_cache -o -name .mypy_cache \) -prune -o -type f -size -20M -print 2>/dev/null | head -20000 | tr '\n' '\0' | xargs -0 cksum 2>/dev/null > "$T"
|
|
77
|
+
awk 'function k( f) { f=$0; sub(/^[0-9]+[ \t]+[0-9]+[ \t]+/, "", f); return f }
|
|
78
|
+
NR==FNR { b[k()]=$1" "$2; next } { n[k()]=$1" "$2 } END {
|
|
79
|
+
for (f in n) { if (!(f in b)) print "added " f; else if (b[f] != n[f]) print "modified " f }
|
|
80
|
+
for (f in b) if (!(f in n)) print "deleted " f }' "$B" "$T" | sort -k2
|
|
81
|
+
rm -f "$T"
|
|
82
|
+
CHANGED
|
|
83
|
+
if [ ! -f "$W/.cortex/baseline.cksum" ]; then
|
|
84
|
+
( cd "$W" && find . \( -path ./.git -o -path ./.cortex -o -name node_modules -o -name __pycache__ -o -name .venv -o -name venv -o -name .cache -o -name .pytest_cache -o -name .mypy_cache \) -prune -o -type f -size -20M -print 2>/dev/null | head -20000 | tr '\n' '\0' | xargs -0 cksum 2>/dev/null > .cortex/baseline.cksum )
|
|
85
|
+
fi
|
|
86
|
+
BN=$(wc -l < "$W/.cortex/baseline.cksum" 2>/dev/null | tr -d ' ')
|
|
87
|
+
echo "-- baseline: ${BN:-0} files recorded at start; \`sh .cortex/changed\` lists files you modified/added/deleted. Before finishing, run it and revert every change the task did not require."
|
|
88
|
+
fi
|
|
63
89
|
# Bare-box hint (2026-09-03, operator-simplified): a task container may ship WITHOUT the language, compiler,
|
|
64
90
|
# package or library the objective needs — on purpose (the agent phase is bare; internet is usually allowed).
|
|
65
91
|
# State the FACTS (package manager present, whether we are root) and ONE principled directive — no command
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexus-cortex/server",
|
|
3
|
-
"version": "4.124.
|
|
3
|
+
"version": "4.124.27",
|
|
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.27",
|
|
24
|
+
"@nexus-cortex/executors": "4.124.27",
|
|
25
25
|
"chalk": "^5.3.0",
|
|
26
26
|
"cors": "^2.8.5",
|
|
27
27
|
"dotenv": "^16.4.5",
|