fleet-memory/hindsight-integrations/openclawd/install.sh
Nicolò Boschi 728ce13cea
fix: rename moltbot to openclawd (#246)
* fix: rename moltbot to openclawd

* fix

* fix

* fix: use single shared pg0 database for all banks + add default mission

This commit fixes a critical database isolation issue and adds the default
mission feature for the openclawd plugin.

## Changes:

**hindsight-embed:**
- Fixed daemon_client.py to use single shared database: pg0://hindsight-embed
- Previously, each bank_id would create a separate pg0 instance (wrong!)
- Now all banks share the same database with isolation via bank_id parameter
- Updated README to clarify database architecture

**openclawd plugin (v0.0.5):**
- Added default bank mission describing OpenClawd's multi-channel assistant role
- Added setBankMission() method to client
- Integrated mission setting during plugin initialization
- Added bankMission to plugin config schema with sensible default
- Updated docs to explain shared database architecture

## Why this matters:
Bank isolation should happen WITHIN the database (via separate tables/schemas),
not via separate database instances. Using HINDSIGHT_EMBED_BANK_ID to create
separate pg0 databases was architecturally wrong and caused confusion.

* ci: rename moltbot to openclawd in workflows and release script

- Updated build-moltbot-integration → build-openclawd-integration in test.yml
- Updated release-moltbot-integration → release-openclawd-integration in release.yml
- Updated all working directories from moltbot to openclawd
- Updated artifact names from moltbot-integration to openclawd-integration
- Added openclawd package.json to release.sh version bump script
2026-01-30 10:31:29 +01:00

49 lines
1.2 KiB
Bash
Executable file

#!/bin/bash
set -e
echo "🚀 Installing Hindsight Memory Plugin for Moltbot..."
# Get the directory where this script is located
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
INSTALL_DIR="$HOME/.clawdbot/extensions/hindsight-openclawd"
# Check Node version
if ! command -v node &> /dev/null; then
echo "❌ Node.js not found. Please install Node.js 22+"
exit 1
fi
# Build the plugin
echo "📦 Building plugin..."
cd "$SCRIPT_DIR"
npm install
npm run build
# Deploy to Clawdbot extensions
echo "📂 Deploying to $INSTALL_DIR..."
rm -rf "$INSTALL_DIR"
mkdir -p "$INSTALL_DIR"
# Copy files
cp -r dist package.json clawdbot.plugin.json README.md "$INSTALL_DIR/"
# Install dependencies in deployed location
echo "📥 Installing dependencies..."
cd "$INSTALL_DIR"
npm install
echo ""
echo "✅ Hindsight Memory Plugin installed successfully!"
echo ""
echo "📋 Next steps:"
echo ""
echo "1. Make sure you have an OpenAI API key set:"
echo " export OPENAI_API_KEY=\"sk-your-key-here\""
echo ""
echo "2. Enable the plugin:"
echo " clawdbot plugins enable hindsight-openclawd"
echo ""
echo "3. Start OpenClawd:"
echo " clawdbot start"
echo ""
echo "On first start, uvx will automatically download hindsight-embed (no manual install needed)"