Apple
89c3f2ac66
P1: NCS-first model selection + NATS capabilities + Grok 4.1
...
Router model selection:
- New model_select.py: resolve_effective_profile → profile_requirements →
select_best_model pipeline. NCS-first with graceful static fallback.
- selection_policies in router-config.node2.yml define prefer order per
profile without hardcoding models (e.g. local_default_coder prefers
qwen3:14b then qwen3.5:35b-a3b).
- Cloud profiles (cloud_grok, cloud_deepseek) skip NCS; on cloud failure
use fallback_profile via NCS for local selection.
- Structured logs: selected_profile, required_type, runtime, model,
caps_age_s, fallback_reason on every infer request.
Grok model fix:
- grok-2-1212 no longer exists on xAI API → updated to
grok-4-1-fast-reasoning across all 3 hardcoded locations in main.py
and router-config.node2.yml.
NCS NATS request/reply:
- node-capabilities subscribes to node.noda2.capabilities.get (NATS
request/reply). Enabled via ENABLE_NATS_CAPS=true in compose.
- NODA1 router can query NODA2 capabilities over NATS leafnode without
HTTP connectivity.
Verified:
- NCS: 14 served models from Ollama+Swapper+llama-server
- NATS: request/reply returns full capabilities JSON
- Sofiia: cloud_grok → grok-4-1-fast-reasoning (tested, 200 OK)
- Helion: NCS → qwen3:14b via Ollama (caps_age=23.7s cache hit)
- Router health: ok
Made-with: Cursor
2026-02-27 02:17:34 -08:00
Apple
e2a3ae342a
node2: fix Sofiia routing determinism + Node Capabilities Service
...
Bug fixes:
- Bug A: GROK_API_KEY env mismatch — router expected GROK_API_KEY but only
XAI_API_KEY was present. Added GROK_API_KEY=${XAI_API_KEY} alias in compose.
- Bug B: 'grok' profile missing in router-config.node2.yml — added cloud_grok
profile (provider: grok, model: grok-2-1212). Sofiia now has
default_llm=cloud_grok with fallback_llm=local_default_coder.
- Bug C: Router silently defaulted to cloud DeepSeek when profile was unknown.
Now falls back to agent.fallback_llm or local_default_coder with WARNING log.
Hardcoded Ollama URL (172.18.0.1) replaced with config-driven base_url.
New service: Node Capabilities Service (NCS)
- services/node-capabilities/ — FastAPI microservice exposing live model
inventory from Ollama, Swapper, and llama-server.
- GET /capabilities — canonical JSON with served_models[] and inventory_only[]
- GET /capabilities/models — flat list of served models
- POST /capabilities/refresh — force cache refresh
- Cache TTL 15s, bound to 127.0.0.1:8099
- services/router/capabilities_client.py — async client with TTL cache
Artifacts:
- ops/node2_models_audit.md — 3-layer model view (served/disk/cloud)
- ops/node2_models_audit.yml — machine-readable audit
- ops/node2_capabilities_example.json — sample NCS output (14 served models)
Made-with: Cursor
2026-02-27 02:07:40 -08:00
Apple
7b8499dd8a
node2: P0 vision restore + P1 security hardening + node-specific router config
...
P0 — Vision:
- swapper_config_node2.yaml: add llava-13b as vision model (vision:true)
/vision/models now returns non-empty list; inference verified ~3.5s
- ollama.url fixed to host.docker.internal:11434 (was localhost, broken in Docker)
P1 — Security:
- Remove NODES_NODA1_SSH_PASSWORD from .env and docker-compose.node2-sofiia.yml
- SSH ED25519 key generated, authorized on NODA1, mounted as /run/secrets/noda1_ssh_key
- sofiia-console reads key via NODES_NODA1_SSH_PRIVATE_KEY env var
- secrets/noda1_id_ed25519 added to .gitignore
P1 — Router:
- services/router/router-config.node2.yml: new node2-specific config
replaces all 172.17.0.1:11434 → host.docker.internal:11434
- docker-compose.node2-sofiia.yml: mount router-config.node2.yml (not root config)
P1 — Ports:
- router (9102), swapper (8890), sofiia-console (8002): bind to 127.0.0.1
- gateway (9300): keep 0.0.0.0 (Telegram webhook requires public access)
Artifacts:
- ops/patch_node2_P0P1_20260227.md — change log
- ops/validation_node2_P0P1_20260227.md — all checks PASS
- ops/node2.env.example — safe env template (no secrets)
- ops/security_hardening_node2.md — SSH key migration guide + firewall
- ops/node2_models_pull.sh — model pull script for P0/P1
Made-with: Cursor
2026-02-27 01:27:38 -08:00
NODA1 System
cca16254e5
feat(docs): add document write-back publish pipeline
2026-02-21 17:02:55 +01:00
NODA1 System
f53e71a0f4
feat(docs): add versioned document update and versions APIs
2026-02-21 16:49:24 +01:00
NODA1 System
5d52cf81c4
feat(docs): add standard file processing and router document ingest/query
2026-02-21 14:02:59 +01:00
NODA1 System
f44e920486
agromatrix: enforce mentor auth and expose shared-memory review via gateway
2026-02-21 13:18:36 +01:00
NODA1 System
68ac8fa355
agromatrix: add shared-memory review api and crawl4ai robustness
2026-02-21 13:18:36 +01:00
NODA1 System
01bfa97783
agromatrix: tighten numeric source contract guard
2026-02-21 13:18:36 +01:00
NODA1 System
d963c52fe5
agromatrix: add pending-question memory, anti-repeat guard, and numeric contract
2026-02-21 13:18:36 +01:00
NODA1 System
a87a1fe52c
agromatrix: deterministic plant-id flow + confidence guard + plantnet env
2026-02-21 13:18:36 +01:00
NODA1 System
50dfcd7390
router: enforce direct image inputs for plant tools and inject runtime image_data
2026-02-21 13:18:36 +01:00
NODA1 System
a91309de11
agromatrix: deploy context/photo learning + deterministic excel policy
2026-02-21 13:18:36 +01:00
Apple
195eb9b7ac
agents: add planned AISTALK orchestrator and crew profile
2026-02-20 10:24:59 -08:00
NODA1 System
987ece5bac
ops: add plant-vision node1 service and update monitor/prober scripts
2026-02-20 17:57:40 +01:00
NODA1 System
90eff85662
crewai: add agromatrix and plant-intel role packs with updated team config
2026-02-20 17:56:55 +01:00
NODA1 System
a8a153a87a
router: add tool manager runtime and memory retrieval updates
2026-02-20 17:56:33 +01:00
Apple
e01ed7be75
router: remove qwen2.5 profile and pin monitor to local qwen3
2026-02-19 00:25:55 -08:00
Apple
c57e6ed96b
services: update comfy agent, senpai md consumer, and swapper deps
2026-02-19 00:14:18 -08:00
Apple
c201d105f6
services: add clan consent/visibility and oneok adapter stack
2026-02-19 00:14:12 -08:00
Apple
dfc0ef1ceb
runtime: sync router/gateway/config policy and clan role registry
2026-02-19 00:14:06 -08:00
Apple
de8bb36462
docs+router: formalize runtime policy and remove temporary cloud-first code override
2026-02-18 10:40:40 -08:00
Apple
05435e7fad
router: bypass local routing rules for cloud-first agents
2026-02-18 10:28:53 -08:00
Apple
ef59cb0950
router: enforce cloud-first direct path for top-level and monitor agents
2026-02-18 10:26:29 -08:00
Apple
5bca7fb79d
router: unify top-level DeepSeek-first + on-demand CrewAI policy
2026-02-18 10:20:10 -08:00
Apple
a23cde217f
clan: route simple requests to fast crew profile; keep zhos_mvp for complex
2026-02-18 09:59:53 -08:00
Apple
7c3bc68ac2
clan: restore zhos_mvp profile in crewai-service and re-enable clan zhos routing
2026-02-18 09:56:06 -08:00
Apple
b65ed7cdf2
clan: stop forcing missing zhos_mvp crew profile; use available default
2026-02-18 09:43:33 -08:00
Apple
13aa0c79f0
router: bundle CLAN runtime registry in router image path
2026-02-18 09:42:00 -08:00
Apple
63fec84734
clan: map runtime-guard manager alias so agent_id=clan is recognized
2026-02-18 09:40:54 -08:00
Apple
760022d7f5
helion: ignore keyword complexity hints; trigger CrewAI only by explicit detailed/complex flags
2026-02-18 09:25:52 -08:00
Apple
635f2d7e37
helion: deepseek-first, on-demand CrewAI, local subagent profiles, concise post-synthesis
2026-02-18 09:21:47 -08:00
Apple
77ab034744
Sync NODE1 crewai-service runtime files and monitor summary script
2026-02-18 06:00:19 -08:00
Apple
b9f83a5006
Sync NODE1 runtime config for Sofiia monitor + Clan canary fixes
2026-02-18 05:56:21 -08:00
Apple
b2be937fbb
feat(file-tool): add djvu conversion and extraction actions
2026-02-15 03:11:55 -08:00
Apple
3a565fd910
feat(file-tool): harden svg rendering and add rich pptx/pdf updates
2026-02-15 02:48:35 -08:00
Apple
aad5870e81
feat(file-tool): add image_bundle and svg actions
2026-02-15 02:33:42 -08:00
Apple
36314a871f
feat(file-tool): add pptx ods parquet and image actions
2026-02-15 02:30:00 -08:00
Apple
cf6ac778bb
feat(file-tool): add text markdown xml html actions
2026-02-15 02:24:11 -08:00
Apple
e91584246d
feat(router): implement file_tool excel actions on NODE1 stack
2026-02-15 02:11:28 -08:00
Apple
21576f0ca3
node1: add universal file tool, gateway document delivery, and sync runbook
2026-02-15 01:50:37 -08:00
Apple
25e57d8221
feat: Add valid ComfyUI SD1.5 workflow to comfy-agent
...
- Replace placeholder workflow with complete SD1.5 pipeline
- Support dynamic prompt, negative_prompt, steps, seed, width, height
- Nodes: CheckpointLoader -> CLIP -> KSampler -> VAE -> SaveImage
Co-Authored-By: Warp <agent@warp.dev >
2026-02-10 04:39:40 -08:00
Apple
42599787a6
chore(helion): respond to direct mentions in groups
...
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 >
2026-02-10 04:20:03 -08:00
Apple
7f3ee700a4
fix(router): guard DSML tool-call flows
...
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 >
2026-02-10 04:19:57 -08:00
Apple
c41c68dc08
feat: Add Comfy Agent service for NODE3 image/video generation
...
- Create comfy-agent service with FastAPI + NATS integration
- ComfyUI client with HTTP/WebSocket support
- REST API: /generate/image, /generate/video, /status, /result
- NATS subjects: agent.invoke.comfy, comfy.request.*
- Async job queue with progress tracking
- Docker compose configuration for NODE3
- Update PROJECT-MASTER-INDEX.md with NODE2/NODE3 docs
Co-Authored-By: Warp <agent@warp.dev >
2026-02-10 04:13:49 -08:00
Apple
09dee24342
feat: MD pipeline — market-data-service hardening + SenpAI NATS consumer
...
Producer (market-data-service):
- Backpressure: smart drop policy (heartbeats→quotes→trades preserved)
- Heartbeat monitor: synthetic HeartbeatEvent on provider silence
- Graceful shutdown: WS→bus→storage→DB engine cleanup sequence
- Bybit V5 public WS provider (backup for Binance, no API key needed)
- FailoverManager: health-based provider switching with recovery
- NATS output adapter: md.events.{type}.{symbol} for SenpAI
- /bus-stats endpoint for backpressure monitoring
- Dockerfile + docker-compose.node1.yml integration
- 36 tests (parsing + bus + failover), requirements.lock
Consumer (senpai-md-consumer):
- NATSConsumer: subscribe md.events.>, queue group senpai-md, backpressure
- State store: LatestState + RollingWindow (deque, 60s)
- Feature engine: 11 features (mid, spread, VWAP, return, vol, latency)
- Rule-based signals: long/short on return+volume+spread conditions
- Publisher: rate-limited features + signals + alerts to NATS
- HTTP API: /health, /metrics, /state/latest, /features/latest, /stats
- 10 Prometheus metrics
- Dockerfile + docker-compose.senpai.yml
- 41 tests (parsing + state + features + rate-limit), requirements.lock
CI: ruff + pytest + smoke import for both services
Tests: 77 total passed, lint clean
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-02-09 11:46:15 -08:00
Apple
c50843933f
feat: market-data-service for SenpAI trading agent
...
New service: real-time market data collection with unified event model.
Architecture:
- Domain events: TradeEvent, QuoteEvent, BookL2Event, HeartbeatEvent
- Provider interface: MarketDataProvider ABC with connect/subscribe/stream/close
- Async EventBus with fan-out to multiple consumers
Providers:
- BinanceProvider: public WebSocket (trades + bookTicker), no API key needed,
auto-reconnect with exponential backoff, heartbeat timeout detection
- AlpacaProvider: IEX real-time data + paper trading auth,
dry-run mode when no keys configured (heartbeats only)
Consumers:
- StorageConsumer: SQLite (via SQLAlchemy async) + JSONL append-only log
- MetricsConsumer: Prometheus counters, latency histograms, events/sec gauge
- PrintConsumer: sampled structured logging (1/100 events)
CLI: python -m app run --provider binance --symbols BTCUSDT,ETHUSDT
HTTP: /health, /metrics (Prometheus), /latest?symbol=XXX
Tests: 19/19 passed (Binance parse, Alpaca parse, bus smoke tests)
Config: pydantic-settings + .env, all secrets via environment variables.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-02-09 11:19:00 -08:00
Apple
7887f7cbe9
fix: DSML fallback — 3rd LLM call for clean synthesis + think tag stripping
...
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 >
2026-02-09 10:30:37 -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