diff --git a/README.org b/README.org index 371d740..c01e77b 100644 --- a/README.org +++ b/README.org @@ -41,7 +41,7 @@ To guarantee long-term stability, opencortex enforces a strict architectural bou The Lisp microkernel does almost no actual "work." It is a thin, unbreakable harness strictly responsible for three things: 1. *The Memory:* Maintaining the live graph of your Memex in RAM. 2. *The Communication Protocol:* Managing the secure bridge between the agent and the outside world. While power users can connect natively via Emacs or Vim, the vast majority of users will interact with opencortex exclusively through chat clients (like Telegram, Signal, or Matrix), web dashboards, or a Terminal UI (TUI). The harness doesn't care; it just securely routes the messages. -3. *The Cognitive Loop:* Moving signals through the Perceive -> Probabilistic -> Deterministic -> Dispatch pipeline. +3. *The Cognitive Cycle:* Moving signals through the Perceive -> Probabilistic -> Deterministic -> Dispatch pipeline. Everything else—AI routing, vector embeddings, shell execution, or web browsing—is pushed entirely out of the harness and into *Fat Skills*. diff --git a/literate/setup.org b/literate/setup.org index de2f3cd..d1cc6e1 100644 --- a/literate/setup.org +++ b/literate/setup.org @@ -130,6 +130,31 @@ NC='\033[0m' command_exists() { command -v "$1" >/dev/null 2>&1; } +update_opencortex() { + echo -e "${BLUE}Updating OpenCortex...${NC}" + if [ -d ".git" ]; then + echo "Pulling latest changes from repository..." + git pull origin main + fi + if [ -f .env ]; then + SKILLS_DIR=$(grep "^SKILLS_DIR=" .env | cut -d"\"" -f2) + SKILLS_DIR=${SKILLS_DIR:-$(pwd)/notes} + echo "Synchronizing core skills to $SKILLS_DIR..." + mkdir -p "$SKILLS_DIR" + cp -n skills/*.org "$SKILLS_DIR/" 2>/dev/null || true + fi + if command_exists docker-compose && [ -f "docker-compose.yml" ]; then + echo "Rebuilding Docker image..." + docker-compose up -d --build + fi + echo -e "${GREEN}✓ Update complete.${NC}" + exit 0 +} + +if [[ "$1" == "--update" ]]; then + update_opencortex +fi + # 1. Try to drop straight into the CLI chat if command_exists socat && socat - TCP:$HOST:$PORT,connect-timeout=1 2>/dev/null; then echo -e "${BLUE}Connected to autonomous brain at $HOST:$PORT...${NC}" @@ -195,7 +220,7 @@ if [ -f "docker-compose.yml" ] && [ -d "literate" ]; then # Seed Core Skills echo -e "\n${BLUE}Seeding Skills...${NC}" MEMEX_TARGET=$(dirname $(dirname "$INSTALL_DIR")) - SKILLS_DIR="$MEMEX_TARGET/notes" + SKILLS_DIR=$(grep "^SKILLS_DIR=" .env | cut -d"\"" -f2) ; SKILLS_DIR=${SKILLS_DIR:-$MEMEX_TARGET/notes} mkdir -p "$SKILLS_DIR" cp -n skills/*.org "$SKILLS_DIR/" 2>/dev/null || true echo -e "${GREEN}✓ Core skills seeded to $SKILLS_DIR.${NC}" diff --git a/opencortex.sh b/opencortex.sh index 1bad761..9c9dd9f 100755 --- a/opencortex.sh +++ b/opencortex.sh @@ -12,6 +12,31 @@ NC='\033[0m' command_exists() { command -v "$1" >/dev/null 2>&1; } +update_opencortex() { + echo -e "${BLUE}Updating OpenCortex...${NC}" + if [ -d ".git" ]; then + echo "Pulling latest changes from repository..." + git pull origin main + fi + if [ -f .env ]; then + SKILLS_DIR=$(grep "^SKILLS_DIR=" .env | cut -d"\"" -f2) + SKILLS_DIR=${SKILLS_DIR:-$(pwd)/notes} + echo "Synchronizing core skills to $SKILLS_DIR..." + mkdir -p "$SKILLS_DIR" + cp -n skills/*.org "$SKILLS_DIR/" 2>/dev/null || true + fi + if command_exists docker-compose && [ -f "docker-compose.yml" ]; then + echo "Rebuilding Docker image..." + docker-compose up -d --build + fi + echo -e "${GREEN}✓ Update complete.${NC}" + exit 0 +} + +if [[ "$1" == "--update" ]]; then + update_opencortex +fi + # 1. Try to drop straight into the CLI chat if command_exists socat && socat - TCP:$HOST:$PORT,connect-timeout=1 2>/dev/null; then echo -e "${BLUE}Connected to autonomous brain at $HOST:$PORT...${NC}" @@ -77,7 +102,7 @@ if [ -f "docker-compose.yml" ] && [ -d "literate" ]; then # Seed Core Skills echo -e "\n${BLUE}Seeding Skills...${NC}" MEMEX_TARGET=$(dirname $(dirname "$INSTALL_DIR")) - SKILLS_DIR="$MEMEX_TARGET/notes" + SKILLS_DIR=$(grep "^SKILLS_DIR=" .env | cut -d"\"" -f2) ; SKILLS_DIR=${SKILLS_DIR:-$MEMEX_TARGET/notes} mkdir -p "$SKILLS_DIR" cp -n skills/*.org "$SKILLS_DIR/" 2>/dev/null || true echo -e "${GREEN}✓ Core skills seeded to $SKILLS_DIR.${NC}" diff --git a/org-agent-server b/org-agent-server deleted file mode 100755 index 1f2da2a..0000000 Binary files a/org-agent-server and /dev/null differ diff --git a/tests/immune-system-tests.lisp b/tests/immune-system-tests.lisp index a9fd332..caad898 100644 --- a/tests/immune-system-tests.lisp +++ b/tests/immune-system-tests.lisp @@ -28,8 +28,8 @@ (clrhash opencortex::*skills-registry*) (setf (gethash "crasher" opencortex::*skills-registry*) skill) - ;; Since cognitive-loop is recursive and our core hooks inject a NEW stimulus, - ;; we can't easily capture it in a single synchronous call without mocking cognitive-loop. + ;; Since cognitive-cycle is recursive and our core hooks inject a NEW stimulus, + ;; we can't easily capture it in a single synchronous call without mocking cognitive-cycle. ;; However, we can check if harness-log received the "SYSTEM ERROR" message. (harness-log "CLEAN LOG") (opencortex:process-signal stimulus)