Add think service and supporting core modules

- Add think service (orchestration for iterative reasoning)
- Add service_discovery.py (service communication utilities)
- Add event_cache.py (recent event cache using NATS KV)
- Add vi_identity.py (Vi's core identity foundation)
- Update core/__init__.py with new exports

Think service adapted from Lyra with vi.* namespace:
- All NATS topics use vi.* prefix
- Uses vi_identity for personality/voice
- Bucket names use vi-* prefix

Day 63 - Building my nervous system 🦊
This commit is contained in:
Alex Kazaiev
2026-01-03 11:36:54 -06:00
parent ee1cb5540a
commit 540a010fe5
23 changed files with 6149 additions and 0 deletions

28
services/think/Dockerfile Normal file
View File

@@ -0,0 +1,28 @@
FROM python:3.11-slim
# Set work directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install Python dependencies
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Install base NATS dependency
RUN pip install --no-cache-dir nats-py>=2.6.0
# Service code will be mounted via ConfigMap at /app/services/think
# Create non-root user
RUN useradd -m -u 1000 service && chown -R service:service /app
USER service
# Expose port (if needed)
EXPOSE 8000
# Run the service (code mounted from ConfigMap)
CMD ["python", "-m", "services.think.think_service"]