REFAC: Global rename of org-agent to opencortex

This commit is contained in:
2026-04-14 12:10:11 -04:00
parent b58b780a44
commit 849c078c37
95 changed files with 662 additions and 642 deletions

20
scripts/opencortex-chat.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
# opencortex-chat: The terminal mouthpiece for the Autonomous Brain.
PORT=9105
HOST=${1:-localhost}
# Check for socat (preferred)
if command -v socat >/dev/null 2>&1; then
# Use socat with READLINE for history and arrow-key support.
# It establishes a persistent bidirectional connection.
socat READLINE,history=$HOME/.org_agent_history TCP:$HOST:$PORT
else
# Fallback to nc (netcat) for a single-shot connection if socat is missing.
# Note: This is less robust for agents with long-thinking times.
echo "WARNING: socat not found. Falling back to nc (no line-editing support)."
while true; do
read -p "User: " MESSAGE
if [ -z "$MESSAGE" ]; then continue; fi
echo "$MESSAGE" | nc -N $HOST $PORT
done
fi