bfb81428ab
Complete the consolidation pipeline: summaries -> profile + eras -> narrative.
- memory: eras table (per-month digests) + Era, summaries_by_month, store_era,
list_eras, recall_eras; narrative table + set/get_narrative
- lyra/era.py (lyra-era): groups session gists by the month the session occurred
(real timestamps) and map-reduces each month into a "what was happening" digest
- lyra/narrative.py (lyra-narrative): distills profile + recent eras into the
current arc/trends/callbacks ("remember when…", "you're trending toward…")
- chat.build_messages injects the narrative alongside the profile
Verified on the real corpus: 17 monthly eras (Dec 2024-Jun 2026) + a narrative
that surfaces specific callbacks (the $573 Hollywood session, 4 years sober).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
44 lines
859 B
TOML
44 lines
859 B
TOML
[project]
|
|
name = "lyra"
|
|
version = "0.1.0"
|
|
description = "Persistent, autonomous AI assistant"
|
|
readme = "README.md"
|
|
requires-python = ">=3.11"
|
|
dependencies = [
|
|
"fastapi>=0.115",
|
|
"httpx>=0.28.1",
|
|
"numpy>=2.4.5",
|
|
"openai>=2.37.0",
|
|
"python-dotenv>=1.2.2",
|
|
"uvicorn[standard]>=0.34",
|
|
]
|
|
|
|
[project.scripts]
|
|
lyra = "lyra.__main__:main"
|
|
lyra-web = "lyra.web.server:serve"
|
|
lyra-import = "lyra.ingest:main"
|
|
lyra-summarize = "lyra.summary:main"
|
|
lyra-profile = "lyra.profile:main"
|
|
lyra-era = "lyra.era:main"
|
|
lyra-narrative = "lyra.narrative:main"
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"pytest>=8.0",
|
|
"ruff>=0.6",
|
|
]
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["lyra"]
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py311"
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|