mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-09 01:50:44 +08:00
重构仓库目录为统一的 runtime 分层并清理历史 openclaw 残留。
本次迁移将网关/通道/工具/技能/脚本与协议资源集中到新结构,统一路径常量与脚本转发机制,减少顶层噪音并保证运行与测试行为一致。 Made-with: Cursor
This commit is contained in:
parent
ba3836f00f
commit
4a23b715a2
498 changed files with 2760 additions and 2200 deletions
|
|
@ -1,81 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
CHANNEL="wecom"
|
||||
SKIP_INSTALL=0
|
||||
SKIP_CONFIG_HINT=0
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--no-ui)
|
||||
# Kept for compatibility; stack no longer starts Streamlit.
|
||||
shift
|
||||
;;
|
||||
--channel)
|
||||
CHANNEL="${2:-wecom}"
|
||||
shift 2
|
||||
;;
|
||||
--skip-install)
|
||||
SKIP_INSTALL=1
|
||||
shift
|
||||
;;
|
||||
--skip-config-hint)
|
||||
SKIP_CONFIG_HINT=1
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Unknown arg: $1"
|
||||
echo "Usage: $0 [--no-ui] [--channel wecom] [--skip-install] [--skip-config-hint]"
|
||||
echo "Note: --no-ui is legacy; stack does not start Streamlit. Chat: http://127.0.0.1:8787/chat"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||
cd "$ROOT_DIR"
|
||||
|
||||
step() { printf '\n==> %s\n' "$1"; }
|
||||
|
||||
if ! command -v python >/dev/null 2>&1; then
|
||||
echo "[ERROR] python not found in PATH." >&2
|
||||
REAL_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")/../runtime/operations/scripts" && pwd)/start_ops.sh"
|
||||
if [[ ! -f "$REAL_PATH" ]]; then
|
||||
echo "[ERROR] Forward script target not found: $REAL_PATH" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
step "Project root: $ROOT_DIR"
|
||||
step "Python: $(command -v python)"
|
||||
|
||||
if [[ "$SKIP_INSTALL" -eq 0 ]]; then
|
||||
step "Installing dependencies"
|
||||
python -m pip install -r requirements.txt
|
||||
else
|
||||
step "Skip dependency install"
|
||||
fi
|
||||
|
||||
if [[ "$SKIP_CONFIG_HINT" -eq 0 ]]; then
|
||||
step "Current WeCom status"
|
||||
python -m oclaw.ops channel wecom status || true
|
||||
cat <<'EOF'
|
||||
|
||||
If WeCom is not configured yet, run:
|
||||
python -m oclaw.ops channel wecom config --help
|
||||
EOF
|
||||
fi
|
||||
|
||||
step "Stopping previous stack"
|
||||
python -m oclaw.ops stack down || true
|
||||
|
||||
step "Starting stack"
|
||||
python -m oclaw.ops stack up --channel "$CHANNEL"
|
||||
|
||||
cat <<'EOF'
|
||||
|
||||
Started successfully.
|
||||
Admin: http://127.0.0.1:8787/admin
|
||||
Chat: http://127.0.0.1:8787/chat
|
||||
|
||||
Useful commands:
|
||||
python -m oclaw.ops stack status
|
||||
python -m oclaw.ops stack down
|
||||
EOF
|
||||
exec bash "$REAL_PATH" "$@"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue