fix(setup): Remove invisible trailing spaces that broke bash line continuation
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 24s

This commit is contained in:
2026-04-17 18:38:34 -04:00
parent 63751e7752
commit f1d231841f

View File

@@ -51,17 +51,17 @@ setup_system() {
cd "$SCRIPT_DIR" cd "$SCRIPT_DIR"
if [ ! -f .env ]; then if [ ! -f .env ]; then
cp .env.example .env cp .env.example .env
echo -e "\n${YELLOW}--- Identity Configuration ---${NC}" echo -e "\n${YELLOW}--- Identity Configuration ---${NC}"
echo "Let's personalize your OpenCortex experience." echo "Let's personalize your OpenCortex experience."
read -p "Your Name [User]: " user_name < /dev/tty read -p "Your Name [User]: " user_name < /dev/tty
user_name=${user_name:-User} user_name=${user_name:-User}
sed -i "s|MEMEX_USER=.*|MEMEX_USER=\"$user_name\"|" .env sed -i "s|MEMEX_USER=.*|MEMEX_USER=\"$user_name\"|" .env
read -p "Agent Name [OpenCortex]: " agent_name < /dev/tty read -p "Agent Name [OpenCortex]: " agent_name < /dev/tty
agent_name=${agent_name:-OpenCortex} agent_name=${agent_name:-OpenCortex}
sed -i "s|MEMEX_ASSISTANT=.*|MEMEX_ASSISTANT=\"$agent_name\"|" .env sed -i "s|MEMEX_ASSISTANT=.*|MEMEX_ASSISTANT=\"$agent_name\"|" .env
echo -e "\n${YELLOW}--- LLM Configuration ---${NC}" echo -e "\n${YELLOW}--- LLM Configuration ---${NC}"
echo "You can enter your LLM API keys now, or press Enter to skip and configure them later." echo "You can enter your LLM API keys now, or press Enter to skip and configure them later."
read -p "Gemini API Key: " gemini_key < /dev/tty read -p "Gemini API Key: " gemini_key < /dev/tty
@@ -82,15 +82,15 @@ setup_system() {
sed -i "s|SKILLS_DIR=.*|SKILLS_DIR=\"$SCRIPT_DIR/skills\"|" .env sed -i "s|SKILLS_DIR=.*|SKILLS_DIR=\"$SCRIPT_DIR/skills\"|" .env
sed -i "s|ZETTELKASTEN_DIR=.*|ZETTELKASTEN_DIR=\"$memex_dir/notes\"|" .env sed -i "s|ZETTELKASTEN_DIR=.*|ZETTELKASTEN_DIR=\"$memex_dir/notes\"|" .env
read -p "Inbox Directory [$memex_dir/inbox]: " inbox_dir < /dev/tty read -p "Inbox Directory [$memex_dir/inbox]: " inbox_dir < /dev/tty
inbox_dir=${inbox_dir:-$memex_dir/inbox} inbox_dir=${inbox_dir:-$memex_dir/inbox}
sed -i "s|INBOX_DIR=.*|INBOX_DIR=\"$inbox_dir\"|" .env sed -i "s|INBOX_DIR=.*|INBOX_DIR=\"$inbox_dir\"|" .env
read -p "Daily Directory [$memex_dir/daily]: " daily_dir < /dev/tty read -p "Daily Directory [$memex_dir/daily]: " daily_dir < /dev/tty
daily_dir=${daily_dir:-$memex_dir/daily} daily_dir=${daily_dir:-$memex_dir/daily}
sed -i "s|DAILY_DIR=.*|DAILY_DIR=\"$daily_dir\"|" .env sed -i "s|DAILY_DIR=.*|DAILY_DIR=\"$daily_dir\"|" .env
read -p "Projects Directory [$memex_dir/projects]: " proj_dir < /dev/tty read -p "Projects Directory [$memex_dir/projects]: " proj_dir < /dev/tty
proj_dir=${proj_dir:-$memex_dir/projects} proj_dir=${proj_dir:-$memex_dir/projects}
sed -i "s|PROJECTS_DIR=.*|PROJECTS_DIR=\"$proj_dir\"|" .env sed -i "s|PROJECTS_DIR=.*|PROJECTS_DIR=\"$proj_dir\"|" .env
@@ -123,13 +123,13 @@ setup_system() {
done done
export PATH="$HOME/.local/bin:$PATH" export PATH="$HOME/.local/bin:$PATH"
echo -e "${YELLOW}--- Compiling and Loading OpenCortex (this may take a minute) ---${NC}" echo -e "${YELLOW}--- Compiling and Loading OpenCortex (this may take a minute) ---${NC}"
sbcl --non-interactive \ sbcl --non-interactive \
--eval "(load (merge-pathnames \"quicklisp/setup.lisp\" (user-homedir-pathname)))" \ --eval "(load (merge-pathnames \"quicklisp/setup.lisp\" (user-homedir-pathname)))" \
--eval "(push (truename \"$SCRIPT_DIR/\") asdf:*central-registry*)" \ --eval "(push (truename \"$SCRIPT_DIR/\") asdf:*central-registry*)" \
--eval "(ql:quickload '(:opencortex :croatoan))" --eval "(ql:quickload '(:opencortex :croatoan))"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo -e "${RED}✗ Compilation or Loading failed.${NC}" echo -e "${RED}✗ Compilation or Loading failed.${NC}"
exit 1 exit 1
@@ -139,7 +139,7 @@ setup_system() {
# Nuke any existing brain logs # Nuke any existing brain logs
> "$SCRIPT_DIR/brain.log" > "$SCRIPT_DIR/brain.log"
"$SCRIPT_DIR/opencortex.sh" --boot > "$SCRIPT_DIR/brain.log" 2>&1 & "$SCRIPT_DIR/opencortex.sh" --boot > "$SCRIPT_DIR/brain.log" 2>&1 &
local success=false local success=false
for i in {1..30}; do for i in {1..30}; do
if nc -z localhost $PORT 2>/dev/null; then if nc -z localhost $PORT 2>/dev/null; then
@@ -149,7 +149,7 @@ setup_system() {
sleep 2 sleep 2
echo -n "." echo -n "."
done done
if [ "$success" = true ]; then if [ "$success" = true ]; then
echo -e "\n${GREEN}✓ Brain is alive and responsive on port $PORT.${NC}" echo -e "\n${GREEN}✓ Brain is alive and responsive on port $PORT.${NC}"
echo -e "${GREEN}✓ Setup complete. You can now run 'opencortex tui'.${NC}" echo -e "${GREEN}✓ Setup complete. You can now run 'opencortex tui'.${NC}"
@@ -201,7 +201,7 @@ if [[ "$1" == "tui" ]]; then
done done
echo "" echo ""
fi fi
# Launch TUI # Launch TUI
echo -e "${BLUE}Launching Croatoan TUI...${NC}" echo -e "${BLUE}Launching Croatoan TUI...${NC}"
exec sbcl \ exec sbcl \