co-mono/packages/mom/dev.sh
Mario Zechner 706554a5d3 fix(mom): private channel messages not being logged
- Add message.groups to required bot events in README
- Add groups:history and groups:read to required scopes in README
- app_mention handler now logs messages directly instead of relying on message event
- Add deduplication in ChannelStore.logMessage() to prevent double-logging
- Remove redundant current message append in agent.ts (already in log)
2025-12-04 12:24:29 +01:00

30 lines
869 B
Bash
Executable file

#!/bin/bash
set -e
CONTAINER_NAME="mom-sandbox"
DATA_DIR="$(pwd)/data"
# Create data directory if it doesn't exist
mkdir -p "$DATA_DIR"
# Check if container exists
if docker ps -a --format '{{.Names}}' | grep -q "^${CONTAINER_NAME}$"; then
# Check if it's running
if ! docker ps --format '{{.Names}}' | grep -q "^${CONTAINER_NAME}$"; then
echo "Starting existing container: $CONTAINER_NAME"
docker start "$CONTAINER_NAME"
else
echo "Container $CONTAINER_NAME already running"
fi
else
echo "Creating container: $CONTAINER_NAME"
docker run -d \
--name "$CONTAINER_NAME" \
-v "$DATA_DIR:/workspace" \
alpine:latest \
tail -f /dev/null
fi
# Run mom with tsx watch mode
echo "Starting mom in dev mode..."
npx tsx --watch-path src --watch src/main.ts --sandbox=docker:$CONTAINER_NAME ./data