@nexus-cortex/cli 4.72.0 → 4.73.0
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 +41 -13
- package/.env.example +10 -0
- package/package.json +2 -2
package/.cortex/orient
CHANGED
|
@@ -48,22 +48,50 @@ if [ -d "$SK" ]; then
|
|
|
48
48
|
done | head -14
|
|
49
49
|
fi
|
|
50
50
|
echo "note: when your tool list is limited, additional tools may be discoverable via the SearchTools tool."
|
|
51
|
-
# Mechanical CORTEX.md (
|
|
52
|
-
#
|
|
53
|
-
#
|
|
54
|
-
|
|
51
|
+
# Mechanical CORTEX.md (items 9c + 10): machine-authored sections live between
|
|
52
|
+
# markers so the drift check can regenerate ONLY what the machine wrote.
|
|
53
|
+
# - absent doc -> write fresh (with markers)
|
|
54
|
+
# - doc w/ markers + drift -> stage .cortex/CORTEX.md.next + .diff for the
|
|
55
|
+
# HELPER-model curation boundary (item 10); print ONE informational line —
|
|
56
|
+
# the working model gets zero decision surface.
|
|
57
|
+
# - doc without markers -> fully hand-authored; never touched, never staged.
|
|
58
|
+
MB_BEGIN="<!-- orient:auto:begin -->"
|
|
59
|
+
MB_END="<!-- orient:auto:end -->"
|
|
60
|
+
machine_block() {
|
|
61
|
+
echo "$MB_BEGIN"
|
|
62
|
+
echo "## Project"
|
|
63
|
+
echo "${PROJECT:-$(basename "$W")} — see README for details."
|
|
64
|
+
echo
|
|
65
|
+
echo "## Key Commands"
|
|
66
|
+
if [ -n "$CMDS" ]; then printf '%s\n' "$CMDS"; else echo "- (no package.json scripts; check README/Makefile)"; fi
|
|
67
|
+
echo
|
|
68
|
+
echo "## Structure (top level)"
|
|
69
|
+
ls -1A "$W" 2>/dev/null | head -25 | sed 's/^/- /'
|
|
70
|
+
echo "$MB_END"
|
|
71
|
+
}
|
|
72
|
+
DOC=.cortex/CORTEX.md
|
|
73
|
+
if [ ! -f "$DOC" ]; then
|
|
55
74
|
mkdir -p .cortex 2>/dev/null
|
|
56
75
|
{
|
|
57
76
|
echo "# CORTEX.md (mechanical orient scan — refine with init_cortex_context)"
|
|
58
77
|
echo
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
78
|
+
machine_block
|
|
79
|
+
} > "$DOC" 2>/dev/null && echo "(wrote mechanical .cortex/CORTEX.md)"
|
|
80
|
+
elif grep -q "orient:auto:begin" "$DOC" 2>/dev/null; then
|
|
81
|
+
machine_block > .cortex/.orient-fresh-block 2>/dev/null
|
|
82
|
+
awk '/orient:auto:begin/{f=1} f{print} /orient:auto:end/{f=0}' "$DOC" > .cortex/.orient-cur-block 2>/dev/null
|
|
83
|
+
if cmp -s .cortex/.orient-cur-block .cortex/.orient-fresh-block; then
|
|
84
|
+
rm -f .cortex/.orient-fresh-block .cortex/.orient-cur-block
|
|
85
|
+
rm -f "$DOC.next" "$DOC.diff"
|
|
86
|
+
echo "(CORTEX.md current)"
|
|
87
|
+
else
|
|
88
|
+
awk -v fresh=.cortex/.orient-fresh-block '
|
|
89
|
+
/orient:auto:begin/ {skip=1; while ((getline line < fresh) > 0) print line; close(fresh); next}
|
|
90
|
+
/orient:auto:end/ {skip=0; next}
|
|
91
|
+
skip!=1 {print}' "$DOC" > "$DOC.next" 2>/dev/null
|
|
92
|
+
diff -u "$DOC" "$DOC.next" > "$DOC.diff" 2>/dev/null
|
|
93
|
+
rm -f .cortex/.orient-fresh-block .cortex/.orient-cur-block
|
|
94
|
+
echo "(doctrine refresh staged for curation: machine sections drifted)"
|
|
95
|
+
fi
|
|
68
96
|
fi
|
|
69
97
|
exit 0
|
package/.env.example
CHANGED
|
@@ -534,3 +534,13 @@ MENTORSHIP_ACTIVE_DISCOVERY=false
|
|
|
534
534
|
#CORTEX_BENCH_HOLDOUT=false
|
|
535
535
|
#CORTEX_BENCH_SOURCE=cortex-bench
|
|
536
536
|
#CORTEX_EXPERIMENT_TAG=
|
|
537
|
+
|
|
538
|
+
# Item 10 — helper-curated doctrine freshness (session-start / defer-lift boundary).
|
|
539
|
+
# When true, a staged mechanical CORTEX.md refresh (written by the orient script on
|
|
540
|
+
# drift) is curated by the HELPER model in a side context and applied atomically
|
|
541
|
+
# (with .prev rollback) BEFORE doctrine is delivered — synchronous, bounded,
|
|
542
|
+
# fail-open to the previous doc on timeout. The MAIN model never sees the diff.
|
|
543
|
+
#CORTEX_DOCTRINE_CURATION=true
|
|
544
|
+
# Curation wait bound (ms) and output size budget (bytes).
|
|
545
|
+
#CORTEX_DOCTRINE_CURATION_TIMEOUT_MS=25000
|
|
546
|
+
#CORTEX_DOCTRINE_MAX_BYTES=16384
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexus-cortex/cli",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.73.0",
|
|
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.73.0",
|
|
23
23
|
"chalk": "^4.1.2",
|
|
24
24
|
"cli-spinners": "^2.9.0",
|
|
25
25
|
"commander": "^11.0.0",
|