- Text heartbeat every 30s (not ping frames) to survive Cloudflare/proxy
- Comment on completed/failed workflow re-dispatches to worker with state resume
- Dispatch retries 3 times with 5s delay (survives reconnect window)
- Add status_reason column to workflows table (migration)
- AgentUpdate::WorkflowStatus and WorkflowComplete carry reason
- Dispatch failure logs to execution_log with reason
- Worker disconnect marks orphaned workflows as failed with reason
- All status transitions now have traceable cause
- Add AgentUpdate::FileSync (base64-encoded) for file transfer
- Worker syncs all workspace files to server after workflow completes
(skips .venv, __pycache__, .git, node_modules, files > 1MB)
- Server writes synced files to /app/data/workspaces/{project_id}/
- Remove report field from WorkflowComplete (use report.md convention)
- Update prompts: last step should generate report.md, remove KB/worker tool references
- Remove agent_loop from server (was ~400 lines) — server dispatches to workers
- AgentManager simplified to pure dispatcher (send_event → worker)
- Remove LLM config requirement from server (workers bring their own via config.yaml)
- Remove process_feedback, build_feedback_tools from server
- Remove chat API endpoint (LLM on workers only)
- Remove service proxy (services run on workers)
- Worker reads LLM config from its own config.yaml
- ws_worker.rs handles WorkerToServer::Update messages (DB + broadcast)
- Verified locally: tori server + tori worker connect and register
- Split into `tori server` / `tori worker` subcommands (clap derive)
- Extract lib.rs for shared crate (agent, llm, exec, state, etc.)
- Introduce AgentUpdate channel to decouple agent loop from DB/broadcast
- New sink.rs: AgentUpdate enum + ServiceManager + handle_agent_updates
- New worker_runner.rs: connects to server WS, runs full agent loop
- Expand worker protocol: ServerToWorker (workflow_assign, comment)
and WorkerToServer (register, result, update)
- Remove LLM from title generation (heuristic) and template selection
(must be explicit)
- Remove KB tools (kb_search, kb_read) and remote worker tools
(list_workers, execute_on_worker) from agent loop
- run_agent_loop/run_step_loop now take mpsc::Sender<AgentUpdate>
instead of direct DB pool + broadcast sender
- Auth: configurable OAuthProvider enum supporting Google OAuth and TikTok SSO
- Auth: /auth/provider endpoint for frontend to detect active provider
- Auth: user role system (admin via ADMIN_USERS env var sees all projects)
- Projects: project_members many-to-many table with role (owner/member)
- Projects: membership-based access control, auto-add creator as owner
- Projects: member management API (list/add/remove)
- Files: remove Content-Disposition attachment header, let browser decide
- Health: public /tori/api/health endpoint for k8s probes
- POST /tori/api/token — sign ES256 JWT with configurable private key
- exec.rs auto-generates and injects TORI_JWT env var for all commands
- Config: jwt_private_key field for PEM file path
More general-purpose user intervention tool — not just approve/reject,
but any question or input request. Renames across Rust backend, Vue
frontend, prompts, and status strings.
Tool: wait_for_approval → ask_user (param: reason → question)
Status: WaitingApproval → WaitingUser, waiting_approval → waiting_user
Enum: NeedsApproval → NeedsInput
Templates can now set "require_plan_approval": true in template.json
to require user approval after plan generation before execution begins.
On rejection, the LLM re-enters the planning loop with user feedback.
- apply_plan_diff now returns a YAML unified diff string
- Pure Rust LCS diff implementation (no external dependency)
- revise_plan logs the diff to execution log with ```diff fencing
- Frontend renders diff with green/red syntax highlighting
Previously, current_step_chat_history was cleared unconditionally on
resume, causing the agent to lose context and re-run the step from
scratch after approval. Now only clear when advancing to a new step.
When a user approves a wait_for_approval step, resume execution from that
step instead of calling process_feedback which may trigger revise_plan
and restart from step 1. Also check state snapshot for WaitingApproval
steps to handle pod restart scenarios where DB status may already be
'executing' but state still has the waiting step.
Templates can now include a `setup` file that runs in the workdir
before agent execution starts. Used for workspace initialization
like pulling tool binaries or installing dependencies.
ExternalToolManager.discover() now accepts template root dir, detects
pyproject.toml and runs `uv sync` to create a venv. Tool invocation and
schema discovery inject the venv PATH/VIRTUAL_ENV so template tools can
import declared dependencies without manual installation.
- Add Artifact type to Step (name, path, artifact_type, description)
- step_done tool accepts optional artifacts parameter
- Save artifacts to step_artifacts DB table
- Display artifacts in frontend PlanSection (tag style)
- Show artifacts in step context for sub-agents and coordinator
- Add LLM client retry with exponential backoff
- New WsMessage::ActivityUpdate for live status broadcasting
- Shows current activity at bottom of log: LLM calls, tool execution, user approval
- Activity bar with spinner, auto-clears on workflow completion
- Status badge with pulse animation in log header
Main loop becomes a coordinator that reviews step summaries and may
revise the plan. Each step gets its own chat history and scratchpad,
preventing context pollution across steps.
- Add run_step_loop with 50-iteration limit and isolated context
- Replace advance_step with step_done (sub-loop only)
- Add coordinator review after each step completion
- Add scratchpad 8K capacity check
- Add 33 unit tests for state, tools, and message building