Routes now live at /tori/api, /ws/tori, and static files at /tori/.
Root / redirects to /tori/. Object storage mounted at /api/obj.
Dev proxy updated accordingly.
Install httpx, fastapi, uvicorn, requests, flask, pydantic, numpy, pandas,
matplotlib, pillow, jinja2, pyyaml and more on workspace creation. Also
pre-warm uv cache in Dockerfile so first project setup is near-instant.
uv's global cache (~/.cache/uv/) is shared across all project venvs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add llm_call_log table and per-call timing/token tracking in agent loop
- New GET /workflows/{id}/plan endpoint to restore plan from snapshots on page load
- New GET /workflows/{id}/llm-calls endpoint + WS LlmCallLog broadcast
- Parse Usage from LLM API response (prompt_tokens, completion_tokens)
- Detailed mode toggle in execution log showing LLM call cards with phase/tokens/latency
- Quote-to-feedback: hover quote buttons on plan steps and log entries, multi-quote chips in comment input
- Requirement input: larger textarea, multi-line display with pre-wrap and scroll
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add state.rs with AgentState/Step/StepStatus/AgentPhase as single source of truth
- Extract prompts to markdown files loaded via include_str!
- Replace plan_steps table with execution_log + agent_state_snapshots
- Implement user feedback processing with docker-build-cache plan diff:
load snapshot → LLM revise_plan → diff (title, description) → invalidate from first mismatch → resume
- run_agent_loop accepts optional initial_state for mid-execution resume
- Broadcast plan step status (done/running/pending) to frontend on step transitions
- Rewrite frontend types/components to match new API (ExecutionLogEntry, PlanStepInfo with status)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add webapp template (FastAPI + SQLite) with INSTRUCTIONS.md and setup.sh
- select_template() scans templates, asks LLM to match; apply_template() copies to workspace
- ensure_workspace() runs setup.sh if present, otherwise falls back to default venv
- INSTRUCTIONS.md injected into planning and execution prompts
- Fix pre-existing clippy warning in kb.rs (filter_map → map)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Query workflows with status pending/planning/executing after restart
and re-submit them to the agent manager for continuation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 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>
- 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>