Apple
e9dedffa48
feat(production): sync all modified production files to git
...
Includes updates across gateway, router, node-worker, memory-service,
aurora-service, swapper, sofiia-console UI and node2 infrastructure:
- gateway-bot: Dockerfile, http_api.py, druid/aistalk prompts, doc_service
- services/router: main.py, router-config.yml, fabric_metrics, memory_retrieval,
offload_client, prompt_builder
- services/node-worker: worker.py, main.py, config.py, fabric_metrics
- services/memory-service: Dockerfile, database.py, main.py, requirements
- services/aurora-service: main.py (+399), kling.py, quality_report.py
- services/swapper-service: main.py, swapper_config_node2.yaml
- services/sofiia-console: static/index.html (console UI update)
- config: agent_registry, crewai_agents/teams, router_agents
- ops/fabric_preflight.sh: updated preflight checks
- router-config.yml, docker-compose.node2.yml: infra updates
- docs: NODA1-AGENT-ARCHITECTURE, fabric_contract updated
Made-with: Cursor
2026-03-03 07:13:29 -08:00
Apple
90080c632a
fix(fabric): use broadcast subject for NATS capabilities discovery
...
NATS wildcards (node.*.capabilities.get) only work for subscriptions,
not for publish. Switch to a dedicated broadcast subject
(fabric.capabilities.discover) that all NCS instances subscribe to,
enabling proper scatter-gather discovery across nodes.
Made-with: Cursor
2026-02-27 03:20:13 -08:00
Apple
990e594a1d
feat: harden memory summary — fingerprint dedup, versioning, prompt injection defense
...
Summary hardening:
- SHA256 fingerprint of events content for deduplication
(skips LLM call when events unchanged since last summary)
- Versioned summary storage: summary:agent:channel:vN keys
- Latest pointer: summary_latest:agent:channel for fast retrieval
- Prompt injection defense: sanitize event content before LLM,
strip [SYSTEM]/[INTERNAL] markers, block "ignore instructions" patterns
- Anti-injection clause in SUMMARY_SYSTEM_PROMPT
Database fix:
- list_facts_by_agent: SQL filter by fact_prefix to only return chat_events
(prevents summary/version facts from consuming LIMIT quota)
- Fixed NULL team_id issue in UNIQUE constraint (PostgreSQL NULL != NULL)
using "__system__" sentinel for team_id in summary operations
Tested on NODE1: dedup works (same events → skipped), force=true bypasses.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-02-09 10:26:03 -08:00
Apple
0cfd3619ea
feat: auto-summarize trigger for agent memory
...
- Memory Service: POST /agents/{agent_id}/summarize endpoint
- Fetches recent events by agent_id (new db.list_facts_by_agent)
- Generates structured summary via DeepSeek LLM
- Saves summary to PostgreSQL facts + Qdrant vector store
- Returns structured JSON (summary, goals, decisions, key_facts)
- Gateway memory_client: auto-trigger after 30 turns
- Turn counter per chat (agent_id:channel_id)
- 5-minute debounce between summarize calls
- Fire-and-forget via asyncio.ensure_future (non-blocking)
- Configurable via SUMMARIZE_TURN_THRESHOLD / SUMMARIZE_DEBOUNCE_SECONDS
- Database: list_facts_by_agent() for agent-level queries without user_id
Tested on NODE1: Helion summarize returns valid Ukrainian summary with 20 events.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-02-09 10:15:43 -08:00
Apple
3b924118be
fix: quarantine dead brand commands + implement Memory LLM summary
...
Brand commands (~290 lines):
- Code was trapped inside `if reply_to_message:` block (unreachable)
- Moved to feature flag: ENABLE_BRAND_COMMANDS=true to activate
- Zero re-indentation: 8sp code naturally fits as feature flag body
- Helper functions (_brand_*, _artifact_*) unchanged
Memory LLM Summary:
- Replace placeholder with real DeepSeek API integration
- Structured output: summary, goals, decisions, open_questions, next_steps, key_facts
- Graceful fallback if API key not set or call fails
- Added MEMORY_DEEPSEEK_API_KEY config
- Ukrainian output language
Deployed and verified on NODE1.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-02-09 09:42:44 -08:00
Apple
0c8bef82f4
feat: Add Alateya, Clan, Eonarch agents + fix gateway-router connection
...
## Agents Added
- Alateya: R&D, biotech, innovations
- Clan (Spirit): Community spirit agent
- Eonarch: Consciousness evolution agent
## Changes
- docker-compose.node1.yml: Added tokens for all 3 new agents
- gateway-bot/http_api.py: Added configs and webhook endpoints
- gateway-bot/clan_prompt.txt: New prompt file
- gateway-bot/eonarch_prompt.txt: New prompt file
## Fixes
- Fixed ROUTER_URL from :9102 to :8000 (internal container port)
- All 9 Telegram agents now working
## Documentation
- Created PROJECT-MASTER-INDEX.md - single entry point
- Added various status documents and scripts
Tokens configured:
- Helion, NUTRA, Agromatrix (existing)
- Alateya, Clan, Eonarch (new)
- Druid, GreenFood, DAARWIZZ (configured)
2026-01-28 06:40:34 -08:00
Apple
5290287058
feat: implement TTS, Document processing, and Memory Service /facts API
...
- TTS: xtts-v2 integration with voice cloning support
- Document: docling integration for PDF/DOCX/PPTX processing
- Memory Service: added /facts/upsert, /facts/{key}, /facts endpoints
- Added required dependencies (TTS, docling)
2026-01-17 08:16:37 -08:00
Apple
38cb96dd68
🔐 Auth: інтеграція JWT в Memory Service + конфігурації
...
- Опціональна JWT auth в Memory Service endpoints
- get_current_service_optional для backward compatibility
- NATS auth config (nkeys) - шаблони
- Qdrant auth config (API keys) - шаблони
- Тестовий скрипт для повного потоку
TODO: Генерація реальних JWT/ключів та застосування конфігів
2026-01-10 10:46:25 -08:00
Apple
90758facae
🧠 Add Agent Memory System with PostgreSQL + Qdrant + Cohere
...
Features:
- Three-tier memory architecture (short/mid/long-term)
- PostgreSQL schema for conversations, events, memories
- Qdrant vector database for semantic search
- Cohere embeddings (embed-multilingual-v3.0, 1024 dims)
- FastAPI Memory Service with full CRUD
- External Secrets integration with Vault
- Kubernetes deployment manifests
Components:
- infrastructure/database/agent-memory-schema.sql
- infrastructure/kubernetes/apps/qdrant/
- infrastructure/kubernetes/apps/memory-service/
- services/memory-service/ (FastAPI app)
Also includes:
- External Secrets Operator
- Traefik Ingress Controller
- Cert-Manager with Let's Encrypt
- ArgoCD for GitOps
2026-01-10 07:52:32 -08:00
Apple
3de3c8cb36
feat: Add presence heartbeat for Matrix online status
...
- matrix-gateway: POST /internal/matrix/presence/online endpoint
- usePresenceHeartbeat hook with activity tracking
- Auto away after 5 min inactivity
- Offline on page close/visibility change
- Integrated in MatrixChatRoom component
2025-11-27 00:19:40 -08:00
Apple
7aa0745877
refactor: reorganize memory-service into app/ directory structure
...
- Move models.py, schemas.py, crud.py, main.py to app/
- Update imports to use app.* prefix
- Update README with new structure
- Fix uvicorn run command for new structure
2025-11-15 10:14:26 -08:00