From 23028a3082e2e8e3f4ec327638ac5f10f07f09a6 Mon Sep 17 00:00:00 2001 From: Amr Gharbeia Date: Thu, 16 Apr 2026 15:24:29 -0400 Subject: [PATCH] fix: Add ASDF registry path to startup logic --- literate/setup.org | 2 +- opencortex.sh | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/literate/setup.org b/literate/setup.org index 6ffc7b6..0e08382 100644 --- a/literate/setup.org +++ b/literate/setup.org @@ -59,7 +59,7 @@ if [ -f "opencortex.asd" ] || [ -d "literate" ]; then echo -e "${BLUE}Starting OpenCortex via SBCL...${NC}" sbcl --non-interactive \ --eval "(load \"~/quicklisp/setup.lisp\")" \ - --eval "(ql:quickload :opencortex)" \ + --eval "(push "$(pwd)/" asdf:*central-registry*) (ql:quickload :opencortex)" \ --eval "(opencortex:main)" fi #+end_src diff --git a/opencortex.sh b/opencortex.sh index 3ee2597..19bc0d5 100755 --- a/opencortex.sh +++ b/opencortex.sh @@ -44,12 +44,24 @@ if [ ! -d ".git" ]; then bootstrap_opencortex fi -# ... (Local Mode) +# 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}" + socat READLINE,history=$HOME/.org_agent_history TCP:$HOST:$PORT + exit 0 +fi + +# 2. Local repository detection and launch if [ -f "opencortex.asd" ] || [ -d "literate" ]; then - if [ ! -f .env ]; then ./scripts/onboard-baremetal.sh; fi + if [ ! -f .env ]; then + ./scripts/onboard-baremetal.sh + fi + echo -e "${BLUE}Starting OpenCortex via SBCL...${NC}" + # EXPLICITLY push current directory to ASDF registry sbcl --non-interactive \ --eval "(load \"~/quicklisp/setup.lisp\")" \ + --eval "(push \"$(pwd)/\" asdf:*central-registry*)" \ --eval "(ql:quickload :opencortex)" \ --eval "(opencortex:main)" fi