build: purge obsolete rca docs and redundant installer scripts
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 3s
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 3s
- Deleted docs/rca/ as they were early v0.1.0 development artifacts. - Deleted minimal.asd. - Deleted scripts/onboard-baremetal.sh (subsumed by opencortex.sh). - Moved scripts/browser-bridge.py to skills/assets/ for upcoming Web Research skill. - Removed scripts/ directory.
This commit is contained in:
@@ -1,54 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
import sys
|
||||
import json
|
||||
import base64
|
||||
from playwright.sync_api import sync_playwright
|
||||
|
||||
def run_bridge():
|
||||
# Read command from stdin
|
||||
try:
|
||||
raw_input = sys.stdin.read()
|
||||
if not raw_input:
|
||||
print(json.dumps({"status": "error", "message": "No input provided"}))
|
||||
return
|
||||
|
||||
args = json.loads(raw_input)
|
||||
except Exception as e:
|
||||
print(json.dumps({"status": "error", "message": f"Invalid JSON input: {str(e)}"}))
|
||||
return
|
||||
|
||||
url = args.get("url")
|
||||
action = args.get("action", "extract_text")
|
||||
selector = args.get("selector", "body")
|
||||
|
||||
if not url:
|
||||
print(json.dumps({"status": "error", "message": "No URL provided"}))
|
||||
return
|
||||
|
||||
try:
|
||||
with sync_playwright() as p:
|
||||
browser = p.chromium.launch(headless=True)
|
||||
page = browser.new_page()
|
||||
|
||||
# Navigate and wait for network to be idle
|
||||
page.goto(url, wait_until="networkidle")
|
||||
|
||||
result = {"status": "success", "url": url}
|
||||
|
||||
if action == "extract_text":
|
||||
result["content"] = page.inner_text(selector)
|
||||
elif action == "screenshot":
|
||||
screenshot_bytes = page.screenshot()
|
||||
result["screenshot_base64"] = base64.b64encode(screenshot_bytes).decode("utf-8")
|
||||
else:
|
||||
result["status"] = "error"
|
||||
result["message"] = f"Unknown action: {action}"
|
||||
|
||||
browser.close()
|
||||
print(json.dumps(result))
|
||||
|
||||
except Exception as e:
|
||||
print(json.dumps({"status": "error", "message": f"Playwright Error: {str(e)}"}))
|
||||
|
||||
if __name__ == "__main__":
|
||||
run_bridge()
|
||||
@@ -1,59 +0,0 @@
|
||||
#!/bin/bash
|
||||
# OpenCortex Final-Mile Installer
|
||||
RED='\033[0;31m'; GREEN='\033[0;32m'; BLUE='\033[0;34m'; YELLOW='\033[0;33m'; NC='\033[0m'
|
||||
echo -e "${BLUE}=== OpenCortex: Baremetal Power-User Setup ===${NC}"
|
||||
|
||||
prompt_user() {
|
||||
local prompt="$1"
|
||||
local default="$2"
|
||||
local var_name="$3"
|
||||
local result=""
|
||||
echo -n -e "${YELLOW}$prompt (default: $default): ${NC}" >&2
|
||||
if read -t 5 result; then :; else result="$default"; echo -e "${BLUE} [Auto-Selected: $default]${NC}" >&2; fi
|
||||
val=${result:-$default}
|
||||
eval "$var_name=\"$val\""
|
||||
}
|
||||
|
||||
# 1. Dependencies
|
||||
if ! command -v sbcl >/dev/null 2>&1; then
|
||||
echo -e "${BLUE}Installing dependencies...${NC}"
|
||||
sudo apt-get update && sudo apt-get install -y sbcl emacs git curl socat || true
|
||||
fi
|
||||
|
||||
# 2. Quicklisp
|
||||
if [ ! -d "$HOME/quicklisp" ]; then
|
||||
curl -O https://beta.quicklisp.org/quicklisp.lisp
|
||||
sbcl --non-interactive --load quicklisp.lisp --eval "(quicklisp-quickstart:install)" --eval "(ql-util:without-prompting (ql:add-to-init-file))"
|
||||
rm quicklisp.lisp
|
||||
fi
|
||||
|
||||
# 3. Tangling
|
||||
echo -e "${BLUE}Tangling source files...${NC}"
|
||||
mkdir -p src
|
||||
for f in literate/*.org; do
|
||||
echo " - Tangling $f"
|
||||
emacs --batch --eval "(require 'org)" --eval "(org-babel-tangle-file \"$f\")" >/dev/null 2>&1
|
||||
done
|
||||
|
||||
# 4. Config
|
||||
if [ ! -f .env ]; then cp .env.example .env; fi
|
||||
prompt_user "What is your name?" "User" "USER_NAME"
|
||||
prompt_user "What shall we name your Assistant?" "OpenCortex" "AGENT_NAME"
|
||||
prompt_user "Select provider (1:Gemini, 2:OpenRouter)" "1" "LLM_CHOICE"
|
||||
|
||||
sed -i "s/MEMEX_USER=.*/MEMEX_USER=\"$USER_NAME\"/g" .env
|
||||
sed -i "s/MEMEX_ASSISTANT=.*/MEMEX_ASSISTANT=\"$AGENT_NAME\"/g" .env
|
||||
|
||||
# 5. Path Alignment
|
||||
INSTALL_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
sed -i "s|MEMEX_DIR=.*|MEMEX_DIR=\"$(dirname "$INSTALL_DIR")\"|g" .env
|
||||
sed -i "s|SKILLS_DIR=.*|SKILLS_DIR=\"$INSTALL_DIR/skills\"|g" .env
|
||||
|
||||
mkdir -p "$HOME/.local/bin"
|
||||
ln -sf "$INSTALL_DIR/opencortex.sh" "$HOME/.local/bin/opencortex"
|
||||
echo -e "${GREEN}✓ Installed 'opencortex' command to ~/.local/bin${NC}"
|
||||
|
||||
echo -e "\n${GREEN}==============================================${NC}"
|
||||
echo -e " OpenCortex Installation Complete! "
|
||||
echo -e "==============================================${NC}"
|
||||
echo -e "To start: opencortex"
|
||||
Reference in New Issue
Block a user