mirror of
https://github.com/qwibitai/nanoclaw.git
synced 2026-06-04 10:14:47 +08:00
1f7508f2aa
Collapses the two-phase setup into a single linear skill: steps 1-6 (prereqs through end-to-end CLI ping) run straight through, steps 7-13 (naming, timezone, channel wiring, mounts, QoL, done) are skippable. Drops the "chat now vs. continue" branch point — after the ping the flow emits "Test Agent success, proceeding with setup" and continues directly into the naming questions. Also updates stale `/new-setup-2` header comments in setup/install-*.sh. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
47 lines
1.4 KiB
Bash
Executable File
47 lines
1.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Setup helper: install-webex — bundles the preflight + install commands
|
|
# from the /add-webex skill into one idempotent script so /new-setup can
|
|
# run them programmatically before continuing to credentials.
|
|
#
|
|
# Copies the Webex adapter in from the `channels` branch; appends the
|
|
# self-registration import; installs the pinned @bitbasti/chat-adapter-webex
|
|
# package; builds. All steps are safe to re-run.
|
|
set -euo pipefail
|
|
|
|
PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
cd "$PROJECT_ROOT"
|
|
|
|
echo "=== NANOCLAW SETUP: INSTALL_WEBEX ==="
|
|
|
|
needs_install=false
|
|
[[ -f src/channels/webex.ts ]] || needs_install=true
|
|
grep -q "import './webex.js';" src/channels/index.ts || needs_install=true
|
|
grep -q '"@bitbasti/chat-adapter-webex"' package.json || needs_install=true
|
|
[[ -d node_modules/@bitbasti/chat-adapter-webex ]] || needs_install=true
|
|
|
|
if ! $needs_install; then
|
|
echo "STATUS: already-installed"
|
|
echo "=== END ==="
|
|
exit 0
|
|
fi
|
|
|
|
echo "STEP: fetch-channels-branch"
|
|
git fetch origin channels
|
|
|
|
echo "STEP: copy-files"
|
|
git show origin/channels:src/channels/webex.ts > src/channels/webex.ts
|
|
|
|
echo "STEP: register-import"
|
|
if ! grep -q "import './webex.js';" src/channels/index.ts; then
|
|
printf "import './webex.js';\n" >> src/channels/index.ts
|
|
fi
|
|
|
|
echo "STEP: pnpm-install"
|
|
pnpm install @bitbasti/chat-adapter-webex@0.1.0
|
|
|
|
echo "STEP: pnpm-build"
|
|
pnpm run build
|
|
|
|
echo "STATUS: installed"
|
|
echo "=== END ==="
|