- Replace singleton kb_content table with kb_articles (id, title, content)
- Add article_id to kb_chunks for per-article chunk tracking
- Auto-migrate old kb_content data on startup
- KbManager: index/delete per article, search across all with article_title
- API: full CRUD on /kb/articles, keep GET /kb for agent tool
- Agent: kb_search shows article labels, kb_read concatenates all articles
- Frontend: Sidebar KB mode with article list, KbEditor for single article
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
torch/sentence-transformers only provide manylinux (glibc) wheels,
not musl. The musl-compiled tori binary is statically linked and
runs fine on glibc systems.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use /app/venv with uv instead of system python/pip
- Pre-download all-MiniLM-L6-v2 model during Docker build
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ort (ONNX Runtime) has no prebuilt binaries for aarch64-musl.
Use a Python subprocess with sentence-transformers instead:
- scripts/embed.py: reads JSON stdin, outputs embeddings
- kb.rs: calls Python script via tokio subprocess
- Dockerfile: install python3 + sentence-transformers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- KB module: fastembed (AllMiniLML6V2) for CPU embedding, SQLite for
vector storage with brute-force cosine similarity search
- Chunking by ## headings, embeddings stored as BLOB in kb_chunks table
- API: GET/PUT /api/kb for full-text read/write with auto re-indexing
- Agent tools: kb_search (top-5 semantic search) and kb_read (full text)
available in both planning and execution phases
- Frontend: Settings menu in sidebar footer, KB editor as independent
view with markdown textarea and save button
- Also: extract shared db_err/ApiResult to api/mod.rs, add context
management design doc
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add delete button (×) to sidebar project list, shown on hover
- Soft-delete: mark projects as deleted in DB instead of hard delete
- Move workspace files to /app/data/deleted/ folder on deletion
- Filter deleted projects from list query
- Auto-select next project after deleting current one
- Also includes agent prompt improvements for reverse proxy paths
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rewrite agent loop as Planning→Executing(N)→Completed state machine with
per-step context isolation to prevent token explosion
- Split tools and prompts by phase (planning vs execution)
- Add advance_step/save_memo tools for step transitions and cross-step memory
- Unify LLM interface: remove duplicate types, single chat_with_tools path
- Add UTF-8 safe truncation (truncate_str) to prevent panics on Chinese text
- Extract CreateForm component, add auto-scroll to execution log
- Add report generation with app access URL, non-blocking title generation
- Add timer system, file serving, app proxy, exec module
- Update Dockerfile with uv, deployment config
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Dockerfile: drop Rust build stage, COPY static musl binary directly
- Add traefik Ingress for tori.oci.euphon.net with LE cert
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>