@nexus-cortex/server 4.124.27 → 4.124.28

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/.cortex/orient +24 -0
  2. package/package.json +3 -3
package/.cortex/orient CHANGED
@@ -85,6 +85,30 @@ CHANGED
85
85
  fi
86
86
  BN=$(wc -l < "$W/.cortex/baseline.cksum" 2>/dev/null | tr -d ' ')
87
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
+ elif [ "${CORTEX_ORIENT_BASELINE:-0}" = "auto" ] && ! { command -v git >/dev/null 2>&1 && git -C "$W" rev-parse --is-inside-work-tree >/dev/null 2>&1; }; then
89
+ # auto (general work, 2026-09-27): a git repo already has `git status`, so skip it; otherwise keep the baseline OUTSIDE the project
90
+ # (the user's ~/.cortex, else /tmp), keyed by the workspace path, so nothing is written into the tree being worked on.
91
+ KEY=$(printf %s "$W" | cksum | cut -d' ' -f1)
92
+ BD="${HOME:-/tmp}/.cortex/baselines/$KEY"
93
+ mkdir -p "$BD" 2>/dev/null && [ -w "$BD" ] || { BD="${TMPDIR:-/tmp}/cortex-baselines/$KEY"; mkdir -p "$BD" 2>/dev/null; }
94
+ { printf '#!/bin/sh\n# Lists files modified / added / deleted in %s since orient recorded its start state.\nW=%s\nB=%s\n' "$W" "'$W'" "'$BD/baseline.cksum'"
95
+ cat <<'CHANGED'
96
+ cd "$W" || exit 0
97
+ [ -f "$B" ] || { echo "no baseline recorded ($B missing)"; exit 0; }
98
+ T=$(mktemp 2>/dev/null || echo /tmp/cortex-now.$$)
99
+ 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"
100
+ awk 'function k( f) { f=$0; sub(/^[0-9]+[ \t]+[0-9]+[ \t]+/, "", f); return f }
101
+ NR==FNR { b[k()]=$1" "$2; next } { n[k()]=$1" "$2 } END {
102
+ for (f in n) { if (!(f in b)) print "added " f; else if (b[f] != n[f]) print "modified " f }
103
+ for (f in b) if (!(f in n)) print "deleted " f }' "$B" "$T" | sort -k2
104
+ rm -f "$T"
105
+ CHANGED
106
+ } > "$BD/changed" 2>/dev/null
107
+ if [ ! -f "$BD/baseline.cksum" ]; then
108
+ ( 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 > "$BD/baseline.cksum" )
109
+ fi
110
+ BN=$(wc -l < "$BD/baseline.cksum" 2>/dev/null | tr -d ' ')
111
+ echo "-- baseline: ${BN:-0} files recorded at start (not a git repo); \`sh $BD/changed\` lists files you modified/added/deleted. Before finishing, run it and revert changes to existing files the task did not require."
88
112
  fi
89
113
  # Bare-box hint (2026-09-03, operator-simplified): a task container may ship WITHOUT the language, compiler,
90
114
  # package or library the objective needs — on purpose (the agent phase is bare; internet is usually allowed).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexus-cortex/server",
3
- "version": "4.124.27",
3
+ "version": "4.124.28",
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.27",
24
- "@nexus-cortex/executors": "4.124.27",
23
+ "@nexus-cortex/core": "4.124.28",
24
+ "@nexus-cortex/executors": "4.124.28",
25
25
  "chalk": "^5.3.0",
26
26
  "cors": "^2.8.5",
27
27
  "dotenv": "^16.4.5",