feat: workspaces, agentic action tools, local Whisper STT, vec recall

- Projects/workspaces: documents grouped into projects; chat RAG scopes to the
  active project. Switcher in the Documents page.
- Agentic action tools: web_search, fetch_url, and remember (first write tool),
  allowlist-gated per playbook.
- Local Whisper STT (faster-whisper, no torch): on-device dictation replacing
  the browser Web Speech API. POST /stt + GET /stt/status; browser fallback.
- Vector index extended to conversation recall (message_vectors), with the
  brute-force cosine scan kept as the fallback.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
jon
2026-07-23 14:22:46 -05:00
co-authored by Claude Opus 4.8
parent f4aea78b55
commit ba6a4ac4e4
12 changed files with 586 additions and 53 deletions
+18
View File
@@ -23,6 +23,24 @@ async def _drain(gen):
return [s async for s in gen]
def test_remember_writes_a_memory_fact(tmp_path, monkeypatch):
# The `remember` action tool persists a fact through the store.
import synapse.memory.store as store_mod
from synapse.memory.store import PersistentMemoryStore
fresh = PersistentMemoryStore(tmp_path / "m.db")
monkeypatch.setattr(tools, "store", fresh)
out = asyncio.run(tools.dispatch("remember", {"text": "user likes tea", "section": "Prefs"}))
assert "user likes tea" in out
assert any(it.text == "user likes tea" for it in fresh.all())
def test_action_tools_registered():
for name in ("web_search", "fetch_url", "remember"):
assert name in tools.REGISTRY
names = [s["function"]["name"] for s in tools.schemas_for(["web_search", "remember", "nope"])]
assert names == ["web_search", "remember"]
class _FakeManager:
"""Returns a tool_call on the first chat() call, plain content after."""
def __init__(self):