- Upgrade OpenClaw primary model from deepseek-v4.1-flash to deepseek-v4.1-flash-1017 across all interactive agents, heartbeats, compaction, and cron jobs. - Configure hardened OpenRouter provider routing for 1017 (deepinfra, inference-net, parasail, cloudflare) with strict fp8/bf16 quantization and tool_choice verification. - Retain deepseek-v4.1-flash (0910), z-ai/glm-5.3-flash, and qwen3.8-flash in the automated fallback chain. - Update ADR 0002 with 1017 economics (30% price reduction on prompt/cache, +60% intelligence benchmark increase) and a 7-point provider qualification playbook. - Add operational scripts and tooling for session compaction, subagent vector deduplication, gateway preflight, and triage diagnostics in k8s/openclaw. - Update DuckDB backend engine, git-sync logic, and test suites. - Enhance Mila tracking UI components and add container build configuration. - Sync Terraform infrastructure state for Authentik.
DuckDB Backend
HTTP-based analytical and transactional backend for personal logging data stored in the Knowledge Wiki. Powered by Python 3.12, FastAPI, and in-memory DuckDB querying JSONL files directly.
Architecture
- Single Source of Truth: Knowledge Wiki (
/wikigit repository with data in/wiki/data/**/*.jsonl). - Engine: In-memory DuckDB reading
sleep,nutrition,mila,entities, andgarminpartitions. - Git Synchronization:
- Background periodic
git pull --rebase origin main(every 60s). - Mutating operations (
POST /duckdb-api/v1/events) append to typed JSONL partition files, sort them, commit, rebase, and push to origin main. - Conflicts trigger automatic rebase abort and flag
git_conflict: trueon/statusand/healthz.
- Background periodic
Endpoints
GET /duckdb-api/v1/mila/dashboard: Curated aggregated dashboard for Mila (sleep, wake timer, feedings, diapers, WHO percentiles).GET /duckdb-api/v1/moritz/dashboard: Curated aggregated dashboard for Moritz (today's intake, yesterday's 24h deficit/surplus, Garmin recovery & sleep, 7d/30d trends).POST /duckdb-api/v1/query: Generic read-only SQL queries against DuckDB tables and views.POST /duckdb-api/v1/events: Record new events (sleep, nutrition, diaper, feeding, growth).POST /duckdb-api/v1/events/stop: Close active open sleep session or interval.DELETE /duckdb-api/v1/events/{id}: Soft-delete event.POST /duckdb-api/v1/entities: Upsert entities (foods,recipes,places,people).GET /duckdb-api/v1/healthz: Liveness and readiness probe.GET /duckdb-api/v1/status: Git synchronization status and table row counts.POST /duckdb-api/v1/git/sync: Manual pull or webhook sync trigger.