diff --git a/.gitignore b/.gitignore index a95a0c8..7466564 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,7 @@ !webclient/dist/ *.egg-info/ webclient/node_modules/ + +# Local runtime artifacts +.codex +*.db diff --git a/docs/index.md b/docs/index.md index 2f7ebd8..9a7bf11 100644 --- a/docs/index.md +++ b/docs/index.md @@ -49,6 +49,6 @@ - **Web framework**: FastAPI + uvicorn - **LLM**: Ollama (primary), OpenAI-compatible backend wired in - **Default model**: `gemma4:31b-cloud` (configurable per profile) -- **Database**: SQLite via aiosqlite +- **Database**: PostgreSQL via asyncpg - **Logging**: structlog - **Config**: pydantic-settings (reads `.env`) diff --git a/docs/memory.md b/docs/memory.md index be818d8..9f9a0ef 100644 --- a/docs/memory.md +++ b/docs/memory.md @@ -68,7 +68,7 @@ | `memory_summary` | Single-row narrative summary generated from all facts | | `session_memory_state` | Tracks which sessions have been processed (by `extracted_at`) | -`MemoryStore` is initialized synchronously (creates tables), all operations are async via asyncpg (PostgreSQL) or aiosqlite (SQLite fallback). +`MemoryStore` is initialized synchronously (creates tables), all operations are async via asyncpg (PostgreSQL). ### Key operations diff --git a/docs/sessions.md b/docs/sessions.md index e0411db..afba2bf 100644 --- a/docs/sessions.md +++ b/docs/sessions.md @@ -47,8 +47,8 @@ ### `InMemorySessionStore` Simple dict-backed store for testing. -### `SQLiteSessionStore` (`navi/core/sqlite_session_store.py`) -Production store backed by SQLite via aiosqlite. +### `PgSessionStore` (`navi/core/pg_session_store.py`) +Production store backed by PostgreSQL via asyncpg. - `create(profile_id)` → new `Session` - `get(session_id)` → `Session | None` @@ -58,7 +58,7 @@ - `set_pinned(session_id, pinned)` → `bool` - `set_name(session_id, name)` → `bool` -DB path: `settings.db_path` (default: `navi.db`). +Requires `DATABASE_URL` env variable (e.g. `postgresql://user:pass@localhost/navi`). --- diff --git a/navi/profiles/tool_developer/system_prompt.txt b/navi/profiles/tool_developer/system_prompt.txt index 0896a34..d10f01c 100644 --- a/navi/profiles/tool_developer/system_prompt.txt +++ b/navi/profiles/tool_developer/system_prompt.txt @@ -119,5 +119,5 @@ ## Available imports Standard library: anything in Python stdlib. -Third-party (installed): `httpx`, `aiosqlite`, `asyncpg`, `structlog`, `pydantic`. +Third-party (installed): `httpx`, `asyncpg`, `structlog`, `pydantic`. Prefer stdlib and httpx to keep dependencies minimal. diff --git a/webclient/docs/architecture.md b/webclient/docs/architecture.md index 00c79a3..2458bc9 100644 --- a/webclient/docs/architecture.md +++ b/webclient/docs/architecture.md @@ -7,7 +7,7 @@ - **Framework**: FastAPI + uvicorn - **LLM**: Ollama (local), model `gemma4:26b-a4b-it-q4_K_M` (26B params, 4-bit quant) - **Thinking**: Model reasoning is enabled and streamed (`OLLAMA_THINK=true`) -- **Database**: PostgreSQL (primary) or SQLite fallback, via asyncpg / aiosqlite +- **Database**: PostgreSQL via asyncpg - **Context window**: 65 536 tokens ## Component overview @@ -33,7 +33,7 @@ ├── LLM backend (Ollama) ├── ToolRegistry (built-ins + user tools from tools/) ├── ProfileRegistry (loaded from navi/profiles/*/config.json) - └── SessionStore (PostgreSQL or SQLite) + └── SessionStore (PostgreSQL) └── MemoryStore (long-term user facts, same DB) ```