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)
This commit is contained in:
Mario Zechner 2025-12-04 12:24:29 +01:00
parent db6d655ee9
commit 706554a5d3
6 changed files with 67 additions and 11 deletions

30
packages/mom/dev.sh Executable file
View file

@ -0,0 +1,30 @@
#!/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