intake/relay rewire

This commit is contained in:
serversdwn
2025-12-06 04:32:42 -05:00
parent fc85557f76
commit 4acaddfd12
4 changed files with 123 additions and 185 deletions

View File

@@ -1,6 +1,8 @@
import os
from datetime import datetime
from typing import List, Dict, Any, TYPE_CHECKING
from collections import deque
if TYPE_CHECKING:
from collections import deque as _deque

View File

@@ -10,7 +10,6 @@ from reasoning.reflection import reflect_notes
from reasoning.refine import refine_answer
from persona.speak import speak
from persona.identity import load_identity
from ingest.intake_client import IntakeClient
from context import collect_context, update_last_assistant_message
from intake.intake import add_exchange_internal
@@ -50,9 +49,6 @@ if VERBOSE_DEBUG:
# -----------------------------
cortex_router = APIRouter()
# Initialize Intake client once
intake_client = IntakeClient()
# -----------------------------
# Pydantic models
@@ -202,11 +198,10 @@ class IngestPayload(BaseModel):
assistant_msg: str
@cortex_router.post("/ingest")
async def ingest(payload: IngestPayload):
"""
Relay calls this after /reason.
We update Cortex state AND feed Intake's internal buffer.
"""
async def ingest_stub():
# Intake is internal now — this endpoint is only for compatibility.
return {"status": "ok", "note": "intake is internal now"}
# 1. Update Cortex session state
update_last_assistant_message(payload.session_id, payload.assistant_msg)