Clarify Helion group behavior: stay silent unless energy topic or direct mention, but answer operational questions when directly addressed.
Co-authored-by: Cursor <cursoragent@cursor.com>
Prevent DeepSeek DSML from leaking to users and avoid returning raw memory_search/web results when DSML is detected.
Co-authored-by: Cursor <cursoragent@cursor.com>
- Fix market-data-service host port 8891→8893 (conflict with Swapper)
- Increase healthcheck start_period/retries for market-data-service
- Add Market Data Service + SenpAI MD Consumer to PROJECT-MASTER-INDEX.md
- Update noda1-operations rule and skill with new ports/containers
Co-authored-by: Cursor <cursoragent@cursor.com>
Router (main.py):
- When DSML detected in 2nd LLM response after tool execution,
make a 3rd LLM call with explicit synthesis prompt instead of
returning raw tool results to the user
- Falls back to format_tool_calls_for_response only if 3rd call fails
Router (tool_manager.py):
- Added _strip_think_tags() helper for <think>...</think> removal
from DeepSeek reasoning artifacts
Gateway (http_api.py):
- Strip <think>...</think> tags before sending to Telegram
- Strip DSML/XML-like markup (function_calls, invoke, parameter tags)
- Ensure empty text after stripping gets "..." fallback
Deployed to NODE1 and verified services running.
Co-authored-by: Cursor <cursoragent@cursor.com>
- Fixed unquoted `helion` variable reference to string literal `"helion"`
in tool_manager.py search_memories fallback
- Replaced `[Контекст пам'яті]` with `[INTERNAL MEMORY - do NOT repeat
to user]` in all 3 injection points in main.py
- Verified: Senpai now responds without Helion contamination or memory
brief leaking
Tested and deployed on NODE1.
Co-authored-by: Cursor <cursoragent@cursor.com>
1. YAML structure bug: Senpai was in `policies:` instead of `agents:`
in router-config.yml. Router couldn't find Senpai config → no routing
rule → fallback to local model.
2. tool_manager agent_id not passed: memory_search and graph_query
tools were called without agent_id → defaulted to "helion" →
ALL agents' tool calls searched Helion's Qdrant collections.
Fixed: agent_id now flows from main.py → execute_tool → _memory_search.
3. Config not mounted: router-config.yml was baked into Docker image,
host changes had no effect. Added volume mount in docker-compose.
Also added:
- Sofiia agent config + routing rule (was completely missing)
- Senpai routing rule: cloud_deepseek (was falling to local qwen3:8b)
- Anti-echo instruction for memory brief injection
Deployed and verified on NODE1: Senpai now searches senpai_* collections.
Co-authored-by: Cursor <cursoragent@cursor.com>
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>
1. thread_has_agent_participation (SOWA Priority 11):
- New function has_agent_chat_participation() in behavior_policy.py
- Checks if agent responded to ANY user in this chat within 30min
- When active + user asks question/imperative → agent responds
- Different from per-user conversation_context (Priority 12)
- Wired into both detect_explicit_request() and analyze_message()
2. ACK reply_to_message_id:
- When SOWA sends ACK ("NUTRA тут"), it now replies to the user's
message instead of sending a standalone message
- Better UX: visually linked to what the user wrote
- Uses allow_sending_without_reply=True for safety
Known issue (not fixed - too risky):
- Lines 1368-1639 in http_api.py are dead code (brand commands /бренд)
at incorrect indentation level (8 spaces, inside unreachable block)
- These commands never worked on NODE1, fixing 260 lines of indentation
carries regression risk — deferred to separate cleanup PR
Co-authored-by: Cursor <cursoragent@cursor.com>