• v0.11.0 df850dbcf3

    v0.11.0 Stable

    rwachters released this 2026-10-14 05:51:01 +00:00 | 43 commits to master since this release

    📦 Release v0.11.0

    📝 Executive Summary

    Torvian 0.11.0 is a large platform release that introduces automated and manual conversation compaction, user-owned projects with scoped agent roles, reusable model presets, and a shareable instruction library. It also rounds out the chat experience with assistant reasoning, token usage, reported cost, response timing, thread statistics, turn notifications, and a raw LLM request viewer. The server, common contracts, worker and all clients gained substantial new capabilities alongside a broad round of architectural refactoring and dependency-migration work.

    🚀 What's New

    Server (chat runtime & persistence)

    • Automated conversation compaction: Added a token preflight before every primary LLM call with a rolling-window policy, verified chunk persistence (migration V26), a CompactionCompleted turn event, and configuration validation with structural/write-time checks. Failures now abort the turn before an oversized, uncompacted request is ever sent.
    • Manual (on-demand) compaction: Added a one-shot forced compaction of the displayed thread served over a dedicated per-session websocket, including skip reasons and a terminal stream-completed marker, plus abort-on-client-close handling.
    • Per-preset compaction configuration: Model presets can restrain compaction and override the token threshold while the auxiliary summarizer stays a user preference (migration V35; field renamed to automaticCompactionEnabled in V36).
    • Assistant message completion: Persisted completion state, incomplete cause and error code (migration V31); every turn ending without a terminal provider chunk persists its terminal state exactly once. Provider-declared failures and truncations are classified into bounded, server-authored reasons (PROVIDER_OUTPUT_LIMIT_EXCEEDED).
    • Turn limits: Added tool-call iteration bound, per-step batch cap and per-call argument cap.
    • Reasoning streaming: Forwards plaintext reasoning deltas to clients, persists derived reasoning items on normal and abnormal endings, and enforces a fatal reasoning cap.
    • Usage stats & cost: Captures provider-reported token counters (migration V33) and the provider-reported cost, keeping omitted values null rather than zero.
    • Response duration: Measures the provider call from dispatch to its terminal signal (migration V34) and copies it on session clone.
    • Thread statistics: New GET /api/v1/sessions/{sessionId}/stats computing branch-scoped message, token, timing and rate statistics in one transaction.
    • Raw LLM request capture: Added a masked, replayable prepared-request payload surfaced on both chat event surfaces.
    • Per-user disabled agent roles: Users can disable a role for themselves without affecting other users (migration V27), enforced on attach (409) and at turn time.
    • Admin user provisioning & registration control: Added a MANAGE_USERS-gated POST /api/v1/users endpoint with optional forced password change, and a fail-closed selfRegistrationEnabled policy that gates POST /api/v1/auth/register with 403 FEATURE_DISABLED.
    • Session tool overrides removed: Session-specific tool configuration APIs, DAOs and caches were removed (migration V30); effective session tools now come from agent-role assignments.

    Common (shared models & contracts)

    • Projects & clone contracts: ProjectDto, CRUD request models, ProjectResource, the per-session project-selection sub-resource, and ProjectResource.ById.Clone with CloneProjectRequest.
    • Model presets: ModelPresetDto, resource and create/update requests, plus compaction configuration fields.
    • Shareable instructions: AgentInstructionDto, instruction resources/requests and InstructionSlot, replacing per-role inline instructions.
    • Compaction vocabulary: ConversationCompactionPreference, CompactionCompletedPayload, and the CompactionEvent (completed/skipped/error) hierarchy with skip reasons.
    • Assistant message enrichment: Completion fields (isComplete, incompleteCause, errorCode, errorMessage), reasoning delta stream event, UsageStats with nullable cost, and a nullable responseDurationMs.
    • Thread stats & raw request: ThreadStats/DurationStats DTOs and the RawLlmRequest payload/events.
    • Built-in tool catalog: Extended with project, model-preset, instruction, get_current_session_info, delete_agent_role, clone_project and send_message specs, then reorganized into per-family files under models/tool/specs.
    • Shared utilities: A single resolveThreadBranch helper (with ThreadBranchError) now backs the app, server context builder and stats calculator.

    App (client)

    • Conversation Compaction settings tab: Model/settings selector, instruction editor, threshold editor, enabled flag and client-side validation; a snackbar notice on compaction events (transcript deliberately untouched).
    • Manual compaction action: A top-bar "Compact conversation" action with a dedicated COMPACTING turn state that reuses the composer's stop button as the abort control, blocking thread-affecting actions while active.
    • Projects: A Settings ▸ Projects tab (list, detail, create/edit/delete) and a chat top-bar project selector that scopes the role dropdown and switches sessions in one round-trip; project clone dialog, project-name filtering and deletion-cascade summary.
    • Model Presets: A Settings ▸ Model Presets section, a preset picker replacing the role's model/settings pickers, explicit non-sendable state and compaction editing.
    • Instructions library: A Settings ▸ Instructions tab and an in-role instruction picker, with atomic single-request role saves.
    • Agent role tooling: Enable/disable switch per role, project grouping, and a role form/detail that groups tools by origin (operator, server built-in, worker, MCP server) with per-origin sub-groups.
    • Chat message insights: Assistant completion notices, a collapsible reasoning section, a message usage dialog (tokens, response duration, reported cost), a thread stats dialog, and a raw LLM request viewer.
    • Turn feedback: Session-list status indicators, an assistant response timer in the composer, tool-call duration formatting, and a "Writing tool calls…" construction indicator.
    • Turn notifications: A Settings ▸ Notifications tab (master, sound, OS notification) with desktop, web and Android sound/OS channels, permission handling and click-to-select-session.
    • Admin & auth: Create-user dialog with registration-grade validation, and a sign-up entry hidden/gated when self-registration is disabled.
    • Session list ordering: The panel now re-sorts by last activity on persisted-message events.
    • Localization: New English and Spanish strings for projects, compaction, notifications, reasoning, usage/cost and error messages.

    Worker (MCP tool execution)

    • run_command output handling: stdout and stderr are now drained concurrently with bounded output, and stdin, timed-out processes, readers and descendants are cleaned up safely, preventing pipe deadlocks.

    Deployment / Documentation (non-code modules)

    • Docker image tags: Non-production images are now also published under a mutable snapshot channel tag alongside their version-specific tags (deploy/ — note: deploy/ is not one of the modules listed in the project map; reported as-is).
    • Release versioning & docs: Project version moved from 0.11.0-SNAPSHOT to stable 0.11.0, and the feature-tracking documentation set (docs/) was reorganized into Roadmap, Todos, Known issues, Resolved issues and archived ideas.

    🐛 Bug Fixes & Improvements

    • Worker: Prevented run_command pipe deadlocks by draining both streams concurrently and cleaning up process resources.
    • LLM (Responses): Assistant replay content is now serialized as a direct string and empty assistant messages are preserved, so replayed turns keep their original content.
    • LLM (Responses): Model tool names are sanitized before dispatch (with a fallback when empty), preventing HTTP 400 errors from malformed names.
    • Agent tools: Multiline tool responses are built without template indentation, preserving formatting.
    • Agent roles: Role deletion now enforces ownership and collapses foreign/nonexistent roles into not-found errors.
    • App chat: A streaming turn cancelled by this client settles its placeholder as interrupted by the user, and a delivered terminal state always wins over a stale fetch.
    • App reasoning: A manual message edit now clears stored reasoning that no longer matches the new content (clearReasoning flag), while turn finalization keeps it intact.
    • App UI: The reasoning section collapses together with its message and its header gained a tooltip.
    • App performance: Tool-call argument and error payload formatting is memoized to avoid re-parsing on every recomposition.

    🏗️ Technical Updates

    • Database migrations: V26–V36 add compaction chunks, per-user role-disabled state, projects, model presets, assistant completion, thread usage, response duration and preset compaction config, plus the V30 session-tool-config drop, V32 instruction normalization and V36 column rename.
    • Koin module decomposition: Split serviceModule into chatServiceModule, toolServiceModule and mcpServiceModule; split the app appModule into appCoreModule, appApiModule, appChatModule and appSettingsModule, preserving every binding key, qualifier and eager/lazy semantic.
    • App architecture: Split SessionRepository into list and conversation halves with dedicated SessionDetailsStore/ToolCallStore/SessionSummaryStore caches; extracted ChatTurnController and SearchNavigationObserver; split SendMessageUseCase collectors and approval emitter; decomposed the message action row; moved dialog ownership into the relevant use cases.
    • Server architecture: Extracted AgentRoleMapper/AgentRoleRequestValidator, the AuxiliaryCompactionSummarizer, the AuxiliaryCompactionConfigResolver/CompactionPreferenceService pair, and reworked the per-turn compaction resolution into configured/not-configured/rejected outcomes.
    • Common refactors: Split the built-in tool catalog by family and the JSON-schema builders into internal helpers without changing catalog order or public API.
    • Test-suite restructuring: Split the monolithic run-command, session-route, compaction-service and turn-orchestrator suites into focused classes; added RunCommandTestSupport and shared view-model scope utilities. Also de-flaked the project updatedAt, compaction newest-chunk, JWT distinctness and auth fixture-token tests.
    • Breaking changes for out-of-repo consumers:
      • V29 rebuilds agent_roles around a single model_preset_id reference and drops model_id/model_settings_id; pre-existing roles become preset-less and non-sendable until a preset is attached.
      • V30 removes session tool configuration; effective tools are role-derived.
      • PUT /api/v1/me/preferences/conversation_compaction now rejects null auxiliary ids with 400 invalid_argument while enabled is true.
      • Project deletion now returns 200 with a deletion-summary body instead of 204.
    Downloads
  • v0.10.0 9847f34c6d

    v0.10.0 Stable

    rwachters released this 2026-08-27 08:35:55 +00:00 | 217 commits to master since this release

    📦 Release v0.10.0

    📝 Executive Summary

    Torvian Chatbot v0.10.0 introduces a role-based configuration model for chat sessions, enabling users to define reusable agent roles with associated models, settings, instructions, and tools. The release also adds support for Responses-capable LLMs, reasoning-item persistence and replay, server built-in tools, and operator-driven spawned agents. Alongside these features, the release improves tool-call reliability, active-turn safeguards, session-name validation, and worker container runtime behavior.

    🚀 What's New

    Server and Common — Responses-capable LLMs

    • Responses API support: Added a Responses model type, Responses-specific settings, request/response strategies, streaming support, and configuration validation for parameters such as reasoning effort, storage, replay behavior, temperature, and token limits.
    • Reasoning persistence and replay: Assistant reasoning items can now be serialized, stored, reconstructed, sanitized for replay, and forwarded through tool-call iterations. Encrypted reasoning capability and source-model provenance are tracked so replay behavior can be adapted safely.
    • Authoritative tool-call completion: Added ToolCallDone handling so finalized function-call arguments take precedence over accumulated streaming deltas.
    • Provider request handling: Responses storage settings are honored, while storage is disabled for OpenRouter requests that reject store: true. OpenRouter attribution headers are emitted only for OpenRouter providers.

    Server, Common, and App — User-defined agent roles

    • Reusable agent roles: Added user-scoped agent roles that combine model selection, model settings, instructions, and tool associations. Sessions now select an agent role, and turn preparation resolves the effective model, settings, prompts, and tools from that role.
    • Agent role management: Added authenticated CRUD API routes, ownership and validation rules, persistence, permissions, migrations, shared request/response models, repositories, ViewModels, and settings UI for creating and maintaining roles.
    • Role-based chat selection: Added an agent-role selector to chat and prevented message sending when the selected role cannot resolve the required model or settings.
    • Instruction targeting and editing: Added model-specific instructions, spawnable-agent instructions, and server built-in tools for inserting, editing, and removing role instructions. Editing operations provide concise summaries and unified diffs instead of returning full role documents.
    • Spawnable-role allowlists: Added configurable same-user role allowlists for spawn_agent calls, including validation and dynamic prompts describing the roles available to an agent.

    Server and App — Operator and spawned-agent workflows

    • Operator tool catalog: Added the user-scoped spawn_agent operator tool, ownership-aware persistence, startup/user-creation seeding, configurable approval behavior, reset reconciliation, and management settings UI.
    • Operator execution: Added server-side request construction and ownership validation, WebSocket-relayed operator requests and results, approval channels, correlated execution results, and client-side spawned-session execution through dedicated chat ViewModels.
    • Spawned chat lifecycle: Added session-scoped ViewModel resolution, shared ViewModel-store ownership between UI and executor, cancellation for orphaned spawned turns, and assistant summaries for spawned conversations.
    • Server built-in tool catalog: Added eight user-scoped in-process tools for listing and reading tools, models, and model settings, and for creating, reading, and updating agent roles. Built-in tools include strict input validation, ownership checks, approval handling, and terminal error results for unknown or malformed requests.
    • Built-in tool administration: Added authenticated list, update, and reset routes; settings UI; optimistic updates with rollback; approval preferences; and per-user public-name prefixes for server built-in tools. Canonical tool names are preserved for safe dispatch independently of user-facing names.

    🐛 Bug Fixes & Improvements

    • Chat turn safety: Disabled and guarded send, regenerate, branch, delete, insert, and delete-thread actions while assistant generation is active, preventing UI bypasses and race conditions.
    • Stopping indicators: Scoped the pulsing animation to visible stopping controls so it does not run unnecessarily when the controls are hidden.
    • Tool-call capacity: Increased the maximum tool argument payload from 32,000 to 100,000 characters and raised the assistant/tool loop iteration limit from 100 to 200.
    • Session names: Normalized line breaks and enforced the shared 255-character limit across create, rename, and clone flows, with corresponding API validation and UI guidance.
    • Model configuration: Removed the model-level type dependency and unique-name constraint, moving compatibility decisions to settings profiles and allowing names to be reused across model configurations.
    • Prompt migration: Moved system-prompt authoring from model settings into agent-role instructions and removed legacy prompt keys from stored settings data.
    • Tool security and isolation: Enforced user ownership for role tools and built-in/operator tool definitions, using indistinguishable not-found responses where appropriate to avoid leaking resource ownership.
    • Worker runtime: Hardened the worker Docker startup configuration by setting the runtime home directory, removing the base-image user to avoid UID collisions, and retaining root ownership for application files while permitting runtime directory writes.

    🏗️ Technical Updates

    • Database migrations: Added migrations V16–V25 covering assistant reasoning items, removal of model-name uniqueness and model-level type, agent roles and session/message integration, operator tools, server built-in tools, and canonical built-in tool names.
    • Architecture: Separated reusable model records from settings profiles and made agent roles the session-level configuration boundary. Added dedicated DAO, service, API, repository, and dependency-injection layers for agent roles, operator tools, and server built-in tools.
    • Shared utilities: Moved the unified LineDiff implementation from the Worker module into common so server built-in instruction-editing tools and the Worker edit_file tool use the same algorithm and output format.
    • Validation and error handling: Added typed validation and service errors for role, tool, prefix, and built-in tool operations; expected built-in tool failures are returned as LLM-readable terminal results rather than thrown exceptions.
    • Test coverage: Expanded common, server, and desktop test coverage for Responses streaming and replay, role persistence and authorization, tool ownership and execution, spawned-agent coordination, UI turn guards, session-name validation, and migration behavior.
    • Repository and release metadata: Normalized repository text files to LF line endings, preserved shell-script and Gradle-wrapper LF enforcement, updated roadmap documentation, and set the project version to 0.10.0.
    Downloads
  • v0.9.0 4cf6d86bd7

    v0.9.0 Stable

    rwachters released this 2026-08-06 18:58:50 +00:00 | 329 commits to master since this release

    📦 Release v0.9.0

    📝 Executive Summary

    Release v0.9.0 makes the builtin worker tools substantially more capable and safer, adding HTML cleaning, in-content search, unified output truncation, and stricter input validation, while introducing interactive turn control — pause/stop and cooperative cancellation — across the Worker, Server, and App. The release also adds LLM resilience features (retrying API client, embedded-error handling for OpenRouter) and restructures the client into platform-specific modules on an upgraded toolchain.

    🚀 What's New

    Worker (Builtin Tools)

    • HTML Cleaning for Web Tools: New HtmlCleaner sanitizes fetched content down to core tags and visible text; fetch_web_content and download_file support an opt-out cleanHtml parameter (default on) via the new jsoup dependency.
    • In-Content Search: fetch_web_content now supports searchQuery with regex/plain modes, case sensitivity, whole-word matching, context windows, and capped results for targeted text retrieval.
    • Unified Output Limits & Truncation: maxLines / maxBytes / range (line selection) / maxResults / maxEntries across fetch, read, run-command, list, and search tools, with structured truncation notices.
    • Git-Style Unified Diff: edit_file dry runs now show compact Git-compatible unified diffs instead of positional output.
    • Search Enhancements: Regex is the default search mode; overlapping context windows are compacted; SearchTextTool gained configurable timeouts with graceful partial-result feedback.
    • Case-Sensitive File Matches: SearchFilesTool accepts a caseSensitive flag via a new ConfigurableGlobMatcher.
    • Input Validation Overhaul: Consolidated validation helpers, accumulated multi-field error reporting, strict JSON parsing (rejecting literal control characters), and structured error diagnostics surfaced to the LLM.

    Server

    • LLM Resilience: New RetryLLMApiClient adds exponential backoff with jitter for streaming and non-streaming completions.
    • Streaming Error Handling: Embedded error chunks in otherwise-successful SSE streams (e.g., OpenRouter) are detected, surfaced as typed errors, and retried where appropriate.
    • Turn Control: A TurnControlSignal enables pausing and cancelling active chat turns, propagated through the orchestrator and WebSocket layer with proper cooperative cancellation.
    • Response Safety Limits: Byte and character caps on LLM responses with UTF-8 validation and truncation notices prevent unbounded allocations.
    • Structured Tool-Call Metadata: errorCode / errorDetails are persisted on tool calls and preserved through cloning and orchestration.
    • LLM-Safe Tool Naming: Tool name prefix validation and sanitization ensure provider-safe public names (underscore-based, dot removed).

    App

    • Turn Control UI: Pause and Stop controls in the chat input area; cancelled tool calls now render with clear visual and textual indicators.
    • Discoverable "Branch & Continue": Moved to the primary action row for direct access.
    • Faster Message Search: Optimized query handling with a minimum-query-length gate and tuned debounce.

    🐛 Bug Fixes & Improvements

    • EditFileTool: Exact character-by-character matching, normalized EOL handling, preserved indentation, and clarified zero-based edit indices produce predictable, consistent edits across platforms.
    • RunCommand: Updated schema default timeout (600s) and clearer validation guidance; empty/full command lines are rejected with actionable messages.
    • Approval Badges: Removed pulsing animation on static states, fixing an idle CPU usage issue in the desktop app.
    • WebSocket Cancellation: In-flight LLM requests and retry delays are cancelled with the websocket close, and expected CancellationExceptions no longer log as server errors.
    • Tool-Call Replay: Tool calls are replayed faithfully with arguments stored verbatim, improving reliability for interrupted/provisional calls.
    • Worker Workspace: Dedicated workspace directory is initialized and mounted for idempotent reuse in Docker deploys.

    🏗️ Technical Updates

    • Client Module Split: Upgraded to Gradle 9.6.1 with AGP 9.6.1 and split platform entry points into dedicated androidApp, desktopApp, and webApp modules; the shared app module is now a KMP library.
    • Tool-Call Architecture: Removed ToolCallArgumentNormalizer and its code paths, simplifying context-building and replay logic.
    • OpenRouter Integration: Centralized OpenRouterClientInfo attribution headers (HTTP-Referer, X-OpenRouter-Title, X-OpenRouter-Categories) added to requests; model discovery strategy and chat strategy updated accordingly.
    • Gradle Cache Externalization: Project and build-logic caches can be redirected outside the repo via CHATBOT_GRADLE_ROOT or local.gradle.properties, moved into wrapper launchers.
    • Test Refactoring: Split OpenAI strategy and Ktor client suites into focused request/response/streaming tests with shared base fixtures.
    • Documentation: Roadmap and issue tracking documentation updated, with the known-bugs list replaced by a dedicated known-issues document.
    • Docker/Deployment: Worker Docker image now uses a JDK base image with git; build script gains -NoPublish, ServerOnly/WorkerOnly, and production-tag detection modes; server dispatch timeout ceiling raised to 1 hour.
    Downloads
  • v0.8.0 57c1bf4897

    v0.8.0 Stable

    rwachters released this 2026-07-14 08:06:39 +00:00 | 451 commits to master since this release

    📦 Release v0.8.0

    📝 Executive Summary

    This release introduces a new built-in worker tools system that lets workers execute filesystem, command, and web operations directly within a sandboxed workspace, replacing the previous generic tool execution paths. It adds full server, worker, and client support for managing, authorizing, and approving these tools, alongside several chat and settings stability improvements.

    🚀 What's New

    Worker

    • Built-in Worker Tools: Added a worker-side built-in tool framework with a shared catalog and JSON schemas, covering file operations (read_text_file, write_file, edit_file, move_file, list_directory, create_directory, search_files, search_text), sandboxed command execution (run_command), and web access (fetch_web_content, download_file).
    • Workspace Isolation & Safety: Introduced workspace path validation and stable execution error codes to block filesystem escapes outside the configured workspace, plus public-URL validation and DNS abstraction for web tools.
    • Signed Authorization Flow: Added a signed authorization payload and worker-side validator so built-in tool executions are authorized via the existing verification service before running.
    • Tool Name Prefixing: Added an optional toolNamePrefix to worker configuration so built-in tool names can be namespaced per worker.
    • Docker & Config Support: Forwarded startup arguments through the worker Docker entrypoint and added workspace, tool-timeout, and trusted-signer settings to worker config, env mappings, and sample files.

    Server

    • Built-in Tool Persistence: Added a BuiltInToolDefinition DAO, Exposed table, entity mappers, and a Flyway migration (V14) to persist built-in worker tool definitions and worker tool-name prefixes.
    • Dispatch & Execution: Added a BuiltInToolDispatchService (server→worker) and a BuiltInWorkerToolExecutor that routes built-in tool calls to their owning worker with typed events/errors and timeout/validation semantics.
    • Definition Service & Seeding: Added a BuiltInToolDefinitionService (list/update with worker-ownership checks) and a seeder that atomically creates and renames built-in tools, preserving canonical names and optional public prefixes.
    • Orchestration & Routes: Routed built-in worker tool calls through the dedicated executor with signed approval handling, removed legacy auto-approval paths, and exposed type-safe API resources and Ktor routes for listing, updating, and resetting worker tools.
    • Reset-to-Defaults Flow: Added server-side reconciliation that restores catalog defaults while preserving enabled state and approval preferences.

    App (Client)

    • Built-in Tools Management UI: Added a new Settings tab for managing worker built-in tools, including worker selection, enable/disable toggles, approval preferences, an edit dialog for schema/description, a reset-to-defaults confirmation, and empty/loading/error states with dangerous-tool highlighting.
    • API & Repository Layer: Added a BuiltInToolApi (Ktor client) and BuiltInToolRepository with reactive StateFlow caching, plus a BuiltInToolsViewModel for worker selection, tool loading, edits, and toggles.
    • Signed Approvals in Chat: Added on-device request signing for built-in tool approvals, routing auto-approval and denial through the signed authorization path with safeguards for missing sessions or signing failures.
    • Worker Tool Name Prefix: Added a tool-name-prefix field to the worker form and wired it through the workers tab, repository, and update handlers.

    🐛 Bug Fixes & Improvements

    • Chat Sending State: Centralized isSending updates into the ChatViewModel job lifecycle, removing duplicate toggles from SendMessageUseCase so the sending state reliably resets on completion or cancellation.
    • Chat ViewModel Persistence: Moved chat session-to-slot allocation into a Koin-managed ChatViewModelSlotManager, keeping view-model keys stable across navigation and preserving in-flight streams.
    • Search Files Glob Semantics: Matched search patterns against paths relative to the starting directory, allowed excludePatterns as a string or array, and normalized relative paths to forward slashes for consistent cross-platform behavior.
    • Directory Listing Order: Sorted directory listings with folders always before files, keeping size/name as a secondary sort key.
    • Read Text File Ranges: Replaced head/tail with a Python-style range argument (negative indices, open-ended bounds, clamping) and prefixed output with a header showing the source path and 1-based line range.
    • Tool Approval Preferences Loading: Added user tool approval preferences to the session loading flow so approval state is available when a session opens, and surfaced repository errors when those preferences fail to load.

    🏗️ Technical Updates

    • Legacy Tool Paths Removed: Dropped the old generic tool request/model, related CRUD endpoints, and the legacy web-search/weather tool executors and stubs; switched DAO/service mappings to a flat entity with joined polymorphic tool lookup and deprecated MiscToolDefinition.
    • Shared Catalog-Driven Tests: Added a BuiltInToolCatalog.size helper and replaced hardcoded tool-count assertions with catalog-driven checks across seeder and worker-prefix tests.
    • Documentation: Added built-in worker tools concept notes and a Trusted Signers guide covering CLI, Docker, and env-var setup for authorizing client tool execution; updated root and deployment READMEs.
    • Versioning: Bumped the project from 0.8.0-SNAPSHOT to the 0.8.0 release version.

    📚 Appendix: Built-in Worker Tools Reference

    The following built-in tools are seeded by the server into each worker's catalog and executed inside the worker's configured workspace. All paths are relative to that workspace root, and filesystem operations are confined to it. Web tools reject localhost, loopback, link-local, and private-network addresses.

    File Operations

    • read_text_file — Read a UTF-8 text file. Parameters: path (required), range (optional [start, end) line range with Python slice semantics: negative indices count from the end, null for open-ended bounds). Output is prefixed with a header showing the source path and 1-based line range.
    • write_file — Create or overwrite a UTF-8 text file. Parameters: path (required), content (required).
    • edit_file — Apply structured edits to a text file. Parameters: path (required), edits (list of oldText/newText pairs, required), dryRun (optional preview without applying).
    • create_directory — Create a directory and any missing parents. Idempotent. Parameter: path (required).
    • list_directory — List directory contents with [FILE]/[DIR] prefixes. Parameters: path (defaults to workspace root), sortBy (name or size), includeSizes, recursive. Folders are always listed before files.
    • move_file — Move or rename a file/directory; fails if the destination already exists. Parameters: source (required), destination (required).
    • search_files — Find files/directories by glob pattern. Parameters: path (starting directory, defaults to root), pattern (required; ** for recursive, bare *.kt matches only the starting directory), excludePatterns (string or array). Patterns match paths relative to the starting directory; returned paths use forward slashes.
    • search_text — Search UTF-8 text files for plain text or regex, returning matching paths and line numbers. Parameters: path (file or directory, defaults to root), query (required), mode (plain/regex), caseSensitive, wholeWord (plain mode only), filePattern (glob include filter), excludePatterns (string or array), contextBefore/contextAfter (context lines), maxResults (cap on matched lines). Skips binary files and truncates grouped output.

    Command Execution

    • run_command — Run a process inside the workspace with a timeout. Parameters: command (required, must be on PATH or absolute), args (list), timeout (seconds; defaults to the worker's builtInTools.defaultCommandTimeoutSeconds).

    Web Access

    • fetch_web_content — Fetch textual content from a public internet URL. Parameters: url (required), timeoutSeconds, maxBytes, followRedirects (default true), returnMode (auto/text/html).
    • download_file — Download content (including binary) from a public URL to a workspace file. Parameters: url (required), path (required), overwrite (default false), timeoutSeconds, maxBytes, followRedirects (default true).

    Tool metadata (names, descriptions, and JSON Schemas) is defined once in BuiltInToolCatalog and shared between the server (for seeding/LLM discovery) and the worker (for execution), keeping advertised schemas in sync. Public tool names may be namespaced per worker via the optional toolNamePrefix.

    Downloads
  • v0.7.0 f61296899e

    v0.7.0 Stable

    rwachters released this 2026-07-01 02:36:45 +00:00 | 500 commits to master since this release

    📦 Release 0.7.0

    📝 Executive Summary

    This release introduces comprehensive message search functionality across the Torvian Chatbot ecosystem. Users can now search within individual chat sessions and across all sessions with support for thread-scoped and all-thread search modes, while maintaining the ability to navigate back to their previous conversation context. The implementation includes server-side search endpoints, client-side UI components, and extensive test coverage.

    🚀 What's New

    Server

    • Cross-Session Message Search API: Added /api/v1/search/messages endpoint with authenticated route wiring, query validation, and ownership-scoped message search with literal wildcard escaping
    • Thread Scope Search: Introduced MessageSearchScope to support searching only visible branches or all threads, with server-side logic restricting default searches to the current visible thread per session

    App

    • In-Session Message Search: Added top-bar search UI with keyboard shortcut, result navigation, and jump-to-result dialog, with search state wired through chat area, message list, and message rendering for highlighting and selection
    • Cross-Session Search Dialog: Added session list search dialog with result rendering, loading, and error states, enabling users to find messages across all sessions
    • Search Navigation with Rollback: Implemented coordinator support for staged rollback to the previously displayed thread after cross-session search navigation, with return-to-previous-thread action in the UI
    • Search UI Improvements: Added debounced query updates and constrained search bar text to single lines for better visual presentation

    🐛 Bug Fixes & Improvements

    • Search Bar Styling: Constrained search label and placeholder to a single line to prevent text wrapping in the chat search bar UI
    • Search State Management: Consolidated search state handling with a single cohesive UI state and improved repository search handling to ignore stale overlapping responses

    🏗️ Technical Updates

    • Version Bump: Updated project version to 0.7.0 in settings.gradle.kts
    • Search Architecture Refactor: Replaced separate cross-session search ViewModel fields with unified state model, moved in-session search state into ChatViewModel, and added durable navigation intent/state for cross-session result clicks
    • Documentation: Updated message search feature ideas to mark single-session and cross-session message search as complete
    Downloads
  • v0.6.0 d6887a6b0b

    v0.6.0 Stable

    rwachters released this 2026-06-22 11:19:26 +00:00 | 512 commits to master since this release

    📦 Release 0.6.0

    📝 Executive Summary

    This release introduces a comprehensive end-to-end authentication (E2EA) security framework for the Torvian Chatbot ecosystem. The core feature is detached request signing using Ed25519 asymmetric cryptography, enabling secure communication between the app, server, and worker modules. The release also includes significant architectural refactoring of chat services and a new E2EA Security settings tab for user visibility into their cryptographic identity.

    🚀 What's New

    Security (Common)

    • Asymmetric Crypto Contracts: Added a common asymmetric crypto provider interface for key generation, signing, and verification with typed error variants for operational failures and signature mismatches.
    • Ed25519 Implementation: Added JVM and WASM/JS asymmetric crypto providers for Ed25519 signing and verification, wired into Koin modules for all client platforms.
    • Detached Signed Request Model: Introduced a shared SignedRequest value object for payload and signature metadata with canonical signing string helpers.
    • Request Signing Service: Added a generic request-signing service for canonical payload signatures with structured error handling.
    • Signed Payload Verification Pipeline: Created a unified verification-and-decoding pipeline for detached signed requests with typed result handling.

    App

    • Device Identity Signing Keys: Extended device identity storage to load and save asymmetric signing key pairs with browser localStorage and desktop filesystem persistence.
    • App Startup Initializer: Added a common startup initializer that ensures device identity and signing keys exist on app launch.
    • Signed MCP API Client: Updated local MCP server client to use detached signatures for create, update, and draft connection requests.
    • E2EA Security Settings Tab: Added a new settings section for viewing signer ID, public key, and worker registration command with copy-to-clipboard actions.
    • Signed Tool Approvals: Tool approval events now emit signed Local MCP authorization events for worker verification.

    Server

    • Local MCP Signature Storage: Added entity, DAO, and Exposed table for persisting Local MCP server signature metadata with database migration.
    • Signed Server Snapshot Flows: Added detached signed-request DTOs and signer-scoped compensation snapshot models for Local MCP create/update operations.
    • Worker Sync Orchestration: Introduced signed server/request payloads for worker cache sync with compensation flows for failed syncs.
    • Detached Request Route Handling: Added route helpers to capture raw JSON bodies and detached signature headers before decoding.
    • Tool Call Orchestrator: Extracted tool approval and execution flow into a dedicated orchestrator service.
    • Chat Context Builders: Extracted file-reference and tool-result formatting into dedicated builder classes.
    • Conversation Turn Orchestration: Added dedicated conversation turn orchestrator and preparation/persistence services.

    Worker

    • Trusted Signer Configuration: Added trustedSigners to worker runtime config with Base64 public key decoding and validation.
    • Signed Request Verification: Added trust-store-backed verification service for detached signed worker requests with signer, signature, and expiration checks.
    • Signed MCP Config Validation: Added worker-side signed MCP config validation with detached signature checks.
    • MCP Config Sync Security: Added signed-payload validation for MCP create/update sync commands.
    • Local MCP Auth Validation: Added worker-side validation for detached Local MCP signed requests before tool execution.
    • Trusted Signer Admin Mode: Added CLI flags for --add-trusted-signer management with dedicated config mutation support.

    🐛 Bug Fixes & Improvements

    • Gradle Wrapper Updates: Updated wrapper scripts and distribution to Gradle 9.5.1 for improved startup, error handling, and license metadata.
    • Java Target Alignment: Updated project to Java 25 for desktop/server and Java 17 for Android with native access enabled for SQLite/Skiko.
    • CORS Configuration: Updated Local MCP routes to allow signed request headers in CORS configuration.

    🏗️ Technical Updates

    • Dependency Updates:
      • Gradle 9.5.1
      • BouncyCastle and kotlinx-browser dependencies added for crypto and JS interop
    • Architecture Refactoring:
      • Extracted ConversationTurnPreparationService, ConversationTurnPersistence, and ConversationTurnOrchestrator from ChatServiceImpl
      • Extracted SessionMessagesWebSocketHandler for improved route readability
      • Centralized signed payload decoding in common security module
    • Database Migration: Added V13 migration for Local MCP server signatures table.
    • Documentation: Expanded AGENTS.md with clarified module responsibilities and directory layout.
    Downloads
  • v0.5.1 fbcf1d01c1

    v0.5.1 Stable

    rwachters released this 2026-05-31 07:34:31 +00:00 | 557 commits to master since this release

    📦 Release v0.5.1

    📝 Executive Summary

    This patch release focuses on improving the chat input experience in the desktop client and expanding project documentation. Key UI fixes prevent state leakage between chat sessions and restore the Ctrl+Enter keyboard shortcut for message sending. Comprehensive onboarding documentation has been added to help developers understand the project architecture and API.

    🚀 What's New

    Documentation

    • Expanded Onboarding Guide: New comprehensive onboarding documentation covering project architecture, module structure, tech stack, security model, database design, build and test commands, and deployment options.
    • API Reference Documentation: Complete API reference listing all REST endpoints for authentication, chat sessions, messages, groups, LLM providers/models/settings, tools, MCP servers, users, roles, and worker management.

    🐛 Bug Fixes & Improvements

    App

    • Ctrl+Enter Message Sending: Fixed the Ctrl+Enter keyboard shortcut in the chat input field to properly capture and send messages.
    • Session-Isolated Input State: Chat input UI state is now properly scoped to each chat session using key(chatSession.id), preventing text and state leakage when switching between conversations.
    • Removed Unused Parameter: Eliminated the unused inputContent parameter from InputArea and MessageList components, cleaning up the composable API.

    🏗️ Technical Updates

    Infrastructure

    • Version Bump: Project version updated to 0.5.1 in settings.gradle.kts.
    Downloads
  • v0.5.0 7c921a4e5f

    v0.5.0 Stable

    rwachters released this 2026-05-29 20:42:13 +00:00 | 563 commits to master since this release

    📦 Release v0.5.0

    📝 Executive Summary

    This release introduces comprehensive user preference management with device tracking, enhanced version compatibility features across the server-worker-client ecosystem, and significant UI improvements including syntax-highlighted markdown rendering and a unified theming system. The update also includes deployment automation scripts and several bug fixes for chat input handling and authentication.

    🚀 What's New

    App

    • Highlighted Markdown Rendering: Chat messages now render with syntax highlighting using a token-based markdown tokenizer for code blocks, inline code, and other markdown elements.
    • Expanded Chat Input: Increased collapsed input field height and auto-expand thresholds to show more message lines before scrolling.
    • Server Version Metadata: App fetches and displays server version info; shows dismissible warning banner when client and server versions differ.
    • User Preference Repository: Reactive repository for theme and detailed preferences with sync/update flows and system theme fallback.
    • User Preference API Client: Ktor-backed client for authenticated /api/v1/me preference operations with device-id header support.
    • Version Display: App version now shown in desktop window title and browser document title for consistent branding across platforms.
    • About Settings Tab: New About section in settings featuring app name, version, tagline, links, and license information.
    • Appearance Theme Tab: Dedicated settings tab for theme selection with system, light, and dark mode options plus three new brand color schemes (Deep Cobalt, Modern Neutral, Tech Innovation).
    • Centralized Version Info: Project version now defined centrally in settings.gradle.kts and accessible via generated VersionInfo.kt in commonMain.
    • Unified App Lifecycle: CommonAppLifecycleManager consolidates startup, setup, error, and ready-state handling across Android, Desktop, and WasmJS platforms.
    • Platform-Aware Theming: Shared AppTheme with expect/actual PlatformTheme wrappers for scrollbar styling on desktop and web.

    Server

    • Public Metadata Endpoint: New /api/v1/public/info endpoint exposing app name, version, and server start time.
    • User Device Registry: Added user_devices table and DAO to track per-user client devices with usage timestamps and cascade delete support.
    • User Preferences API: Full /api/v1/me/preferences API for reading, updating, and deleting global and device-scoped preferences.
    • Preference Service: Server-side UserPreferenceService with support for preference merging, key validation, and device-scoped resolution.
    • Device Sync on Login: Authentication service now upserts device records on successful login for preference scope resolution.

    Worker

    • Version Compatibility Check: Worker startup now fetches server metadata and compares versions, logging mismatches as non-fatal warnings.
    • Generated Version Info: Worker version logged at startup using centrally generated VersionInfo for clearer runtime identification.

    Common

    • Markdown Tokenizer: Best-effort line-based tokenizer supporting headings, lists, quotes, fences, tables, links, images, code, emphasis, and escapes.
    • Preference Models: Added PreferenceScope enum and DTOs (UserPreferenceDTO, PreferenceDetailDTO) for global and device-scoped preferences.

    Infrastructure

    • Deployment Scripts: PowerShell scripts for building Windows, web, and WSL Linux release packages, plus Docker image build/push workflow for GHCR.

    🐛 Bug Fixes & Improvements

    • Chat Input Focus: Preserved input focus and text state across expand/collapse transitions; shared focus requester prevents focus stealing.
    • Input Area Scroll: Updated to Compose Multiplatform 1.11.0 with improved text field APIs and better scroll/focus behavior.
    • Message Auto-Collapse: Fixed session message auto-collapse to trigger only on new session display, avoiding repeated collapsing.
    • LLM Stream Handling: Switched to readLine() to prevent premature stream termination on long responses.
    • Inactive Account Logging: Added warning log for login attempts rejected due to non-active accounts.
    • Loading Overlay Theme: Loading screen now uses MaterialTheme.colorScheme.surface instead of fixed black tint.

    🏗️ Technical Updates

    • IDE Cleanup: Removed committed IDE inspection profile from version control; added inspectionProfiles to .gitignore.
    • Auth Flow Refactoring: Removed standalone add-account dialog; authentication flow now handles add account action by setting session unauthenticated.
    • Database Migration V12: Added migration for user_devices and user_preferences tables with unique constraints and cascade delete support.
    • Kotlin Upgrade: Bumped Kotlin and related tooling versions (Ktor, Exposed, Coroutines, Flyway, logging) to latest releases.
    • Koin Modernization: Updated to newer KoinApplication configuration API, removing deprecated lambda form.
    • Dependency Cleanup: Removed unused Typesafe Config dependency and SQLDelight references from the app module.
    • Build Configuration: Replaced deprecated webpack static API usage in common module.
    • Environment Mappings: Added SERVER_URL and email configuration (EMAIL_PROVIDER, EMAIL_SENDER, SMTP properties) to env mapping for deployment configuration.
    Downloads
  • v0.4.0 835ad81813

    v0.4.0 Stable

    rwachters released this 2026-05-15 17:15:48 +00:00 | 611 commits to master since this release

    Torvian Chatbot v0.4.0

    Release Date: May 15, 2026


    🔐 Security & Authentication Overhaul

    This major release introduces comprehensive security enhancements to Torvian chatbot, featuring device trust management, multi-device session verification, email-based verification flows, and security alert mechanisms. The authentication architecture has been significantly refactored for better maintainability and extensibility.

    What's New

    🛡️ Device Trust & Security

    • Device Identity Tracking: Each client device gets a persistent identifier for security purposes
    • Account Security Modes: Choose between disabled, warning, or strict security levels
    • Unrecognized Device Alerts: Users are notified of login attempts from new devices with verification requirements
    • Trusted Device Management: Users can view and revoke previously trusted devices
    • Device-Based IP Tracking: Session IP addresses are recorded for suspicious activity detection

    📧 Email Verification Flows

    • Device Verification Email: Unrecognized devices receive an email verification link
    • Email Change Support: Users can change their account email address securely
    • SMTP Configuration: Full SMTP support with TLS/auth for email delivery
    • Email Validation: Email format and ownership validation before account changes

    🔑 Enhanced Password & Session Management

    • Configurable Auth Policies: Server-enforced username and password validation rules
    • Required Password Changes: Force users to change passwords when needed
    • Failed Login Protection: Sliding-window lockout after too many failed login attempts
    • Session Management: List active sessions, revoke specific sessions, or logout all sessions at once
    • Password-Protected Operations: Current password verification for sensitive account changes
    • Restricted Session Mode: Unverified devices have limited capabilities until verified

    🚨 Security Alerts & Resolution

    • Login Alerts: See all unrecognized device attempts that triggered verification
    • Trust or Dismiss: Users can acknowledge alerts to mark devices as trusted or dismiss them
    • Restricted Actions: Blocked session operations from unverified devices to prevent accidental damage
    • Permission Enforcement: Consistent authorization checks across all account operations

    🔄 Architecture Improvements (Backend)

    • Service Layer Refactoring: Split monolithic AuthenticationService into focused services:
      • TokenService - JWT and refresh token management
      • DeviceTrustService - Device trust and verification
      • SecurityAuditService - Audit record management
      • AccountManagementService - User account operations
    • ViewModel Refactoring: Split authentication flow into focused ViewModels for better state management
    • Error Handling: Structured API error codes instead of fragile string matching

    📊 Feature Details

    User-Facing Features

    • ✅ View and manage active sessions from device
    • ✅ Revoke access from other sessions without logging out
    • ✅ Logout all sessions at once
    • ✅ Change email address securely
    • ✅ Change password with current password verification
    • ✅ View security alerts for unrecognized logins
    • ✅ Trust or dismiss security alerts
    • ✅ Review and remove trusted devices
    • ✅ Forced password change flow for admin-triggered resets
    • ✅ Clipboard-friendly device ID sharing

    Server-Side Features

    • ✅ Device verification token lifecycle management
    • ✅ Rate-limited verification attempts
    • ✅ Single-use verification tokens (one-time links)
    • ✅ SMTP-based email notifications
    • ✅ Reverse proxy configuration support (for X-Forwarded-For headers)
    • ✅ Configurable security modes per environment
    • ✅ Public authentication policy endpoint for client validation rules
    • ✅ Audit trails for all device and session activities
    • ✅ Database migrations for all new security tables

    API Additions

    Session & Device Management:

    • GET /api/v1/auth/sessions - List active sessions
    • DELETE /api/v1/auth/logout?sessionId={id} - Revoke specific session
    • POST /api/v1/auth/logout-all - Logout all sessions
    • GET /api/v1/auth/trusted-devices - List trusted devices
    • DELETE /api/v1/auth/trusted-devices/{deviceId} - Revoke trusted device

    Device Verification (Authenticated):

    • POST /api/v1/auth/request-device-verification - Request verification email for current session

    Device Verification (Public):

    • GET /api/v1/public/auth/verify-device?token={token} - Verify device via email link (returns HTML success/failure page)
    • POST /api/v1/public/auth/request-device-verification - Public endpoint for users in STRICT mode without verified device

    Security & Account (Authenticated):

    • GET /api/v1/auth/security-alerts - Retrieve unrecognized login alerts
    • POST /api/v1/auth/security-alerts/{alertId}/resolve - Trust/dismiss alert
    • POST /api/v1/auth/change-password - Change password
    • POST /api/v1/auth/complete-required-password-change - Forced password change completion
    • POST /api/v1/auth/change-email - Change email address
    • GET /api/v1/auth/policy - Fetch account validation policy (public)

    ⚙️ Configuration Changes

    New Configuration Options

    Account Security & Authentication:

    {
      "accountSecurityMode": "WARNING",
      "authPolicy": {
        "passwordConfig": {
          "minLength": 8,
          "maxLength": 128,
          "requireLowercase": true,
          "requireUppercase": true,
          "requireDigit": true,
          "requireSpecialChar": true,
          "checkCommonPasswords": true
        },
        "usernameConfig": {
          "minLength": 3,
          "maxLength": 50,
          "allowedRegexPattern": "^[a-zA-Z0-9_-]+$"
        },
        "maxFailedAttempts": 10,
        "lockoutWindowMinutes": 5
      }
    }
    

    Note: maxFailedAttempts is the maximum failed login attempts allowed within lockoutWindowMinutes before the account is temporarily locked. accountSecurityMode accepts: DISABLED, WARNING, or STRICT.

    Email Verification:

    {
      "email": {
        "provider": "smtp",
        "fromAddress": "noreply@example.com",
        "properties": {
          "host": "smtp.example.com",
          "port": "587",
          "user_env": "SMTP_USER",
          "password_env": "SMTP_PASSWORD",
          "auth": "true",
          "starttls": "true",
          "mail.smtp.ssl.trust": "smtp.example.com"
        }
      },
      "serverUrl": "https://chatbot.example.com"
    }
    

    Note: Sensitive SMTP credentials should be provided via environment variables (prefixed with _env suffix) or in a separate secrets.json file, not in the main config.

    Reverse Proxy:

    {
      "reverseProxy": {
        "enabled": false,
        "proxyCount": 1,
        "useXForwardedHeaders": true,
        "useForwardedHeaders": false
      }
    }
    

    Note: Enable reverseProxy.enabled and set proxyCount to match the number of proxies in front of your server (e.g., 1 for Caddy/Nginx). Set useForwardedHeaders to false for security unless your proxy explicitly overwrites this header.

    Migration Guide

    For Self-Hosted Deployments

    1. Update Configuration Files

      • Copy new settings from application.example-local.json or application.example-vps.json
      • Set accountSecurityMode to match your deployment profile
      • Configure SMTP settings if using email verification
      • Enable reverse proxy support if behind a proxy
    2. Database Migrations

      • 5 new migration files will be automatically applied on server startup:
        • V5__security_audit.sql - Security audit table
        • V6__user_trusted_devices.sql - Trusted devices table
        • V7__user_sessions_is_restricted.sql - Session restriction flag
        • V8__user_sessions_device_id.sql - Device ID on sessions
        • V9__failed_login_attempts.sql - Failed attempts tracking
        • V10__security_audit_status.sql - Alert status tracking
        • V11__device_verification_tokens.sql - Verification tokens
    3. Client Updates

      • Desktop, Web, and Android clients updated for new security flows
      • Device ID is generated and persisted locally on first launch
      • Users will see verification prompts for first-time device logins

    For Docker/Container Users

    • Environment variables support all new config options via env-mapping.json
    • Database migrations run automatically on container startup
    • No manual migration steps required

    🔄 Breaking Changes

    Client Applications:

    • Login endpoints now require deviceId in request payload
    • Auth ViewModel replaced with focused ViewModels - update dependency injection
    • Device identity must be generated and persisted by clients

    API Consumers:

    • Login response now includes isRestricted flag for device status
    • New verification-required error code for unverified devices
    • Email configuration required for device verification flows

    Server Deployment:

    • Email configuration is required if account security mode is enabled
    • SMTP credentials must be set in environment/config before first use
    • Reverse proxy setup may require explicit trust configuration

    📋 Database Migrations Summary

    Migration Purpose
    V5 Security audit tracking (device, IP, timestamp, status)
    V6 User trusted devices (device-user relationships)
    V7 Session restriction flag (for unverified devices)
    V8 Device ID field on sessions
    V9 Failed login attempts sliding-window tracking
    V10 Security audit status (PENDING/TRUSTED/DISMISSED)
    V11 Device verification tokens (single-use verification)

    📦 New Dependencies

    • jakarta.mail:jakarta.mail-api - Email API
    • com.sun.mail:angus-mail - Mail transport provider

    🧪 Testing & Validation

    For Users

    1. Login from a new device - you should receive a verification email
    2. Click verification link or use the in-app verification dialog
    3. After verification, device is marked as trusted
    4. Check "Trusted Devices" in user menu to see all trusted devices
    5. Try changing your email or password - both require current password confirmation

    For Administrators

    1. Monitor security audit logs for suspicious patterns
    2. Configure account security mode appropriate for your deployment (strict for high-security)
    3. Test email delivery if enabled
    4. Verify IP tracking is correct if behind a reverse proxy
    5. Check failed login attempts are being tracked properly

    For Integration Teams

    1. Update clients to send deviceId with login requests
    2. Handle verification-required error code appropriately
    3. Update UI to display restricted session state
    4. Implement email verification dialog if needed
    5. Fetch account validation policy from public endpoint

    🐛 Known Limitations

    • Device trust is device-scoped, not session-scoped (one device = one trusted identity)
    • Email verification tokens expire after 24 hours
    • Failed login window is rolling (calculated from each attempt)
    • Reverse proxy IP detection requires explicit trust configuration
    • SMTP is the only email provider currently supported

    📚 Documentation

    • See docs/Misc/arrow-typed-errors.md for error handling patterns
    • Review deploy/server/application.example-vps.json for production configuration
    • Check server/dev-config-sample/ for development setup examples

    🙏 Contributors

    Thanks to everyone who tested, reviewed, and provided feedback on the security features!


    📝 Release Notes Highlights

    Total Changes: 45 commits
    Files Modified: 150+ files
    New Services: 5 (Token, DeviceTrust, SecurityAudit, AccountManagement, SecurityNotification)
    New ViewModels: 5 (AuthEntry, Session, AccountManagement, SecurityAudit, UserProfile)
    New API Endpoints: 11
    New Database Tables: 5
    Test Coverage: 25+ new test classes


    • PR #211: Settings and server details improvements
    • PR #212: Comprehensive security and session management
    • PR #213: Authentication refactoring and finalization

    For upgrading from v0.3.x, please review the Breaking Changes section above.

    Enjoy the enhanced security features in Torvian Chatbot v0.4.0! 🚀

    Downloads
  • v0.3.0 7ae8d32841

    v0.3.0 Stable

    rwachters released this 2026-05-02 22:32:30 +00:00 | 656 commits to master since this release

    Chatbot v0.3.0

    What is new in plain terms

    • A completely new worker module has been added to handle MCP tool execution, running as a separate process that communicates with the server via WebSocket.
    • Workers now have full authentication with JWT-based registration and login, including service tokens and challenge-response security.
    • MCP tool execution has been moved from client to server worker — the client no longer executes MCP tools directly.
    • A new worker management UI lets you view, update, and delete registered workers from settings.
    • The settings screen has been redesigned with a collapsible sidebar and organized pages.
    • Workers can now be deployed via Docker with auto-start support after initial setup.

    User-facing improvements

    New worker module for MCP tool execution

    • Added a new worker/ module that runs as a standalone process handling all MCP tool calls.
    • Workers connect to the server via WebSocket for bidirectional communication.
    • Each worker has a public UID for external identification.
    • Workers support layered configuration (defaults → secrets → runtime).

    Worker authentication system

    • Workers can now register with the server and receive authentication credentials.
    • JWT-based authentication with separate audiences for users and workers.
    • Service token authentication with challenge-response security.
    • Workers must complete a session handshake before becoming operational.

    Worker management UI

    • Added a worker management section in settings to view all registered workers.
    • Workers can be updated (display name, configuration) and deleted from the UI.
    • Added a worker selection dropdown in the MCP server dialog to choose which worker handles tool execution.
    • Display name resolution is now delegated to the worker setup flow.

    Settings screen redesign

    • Complete overhaul of the settings UI with a collapsible sidebar navigation.
    • Settings are organized into pages for better structure.
    • Added generation-based content control in the topbar for better streaming behavior.

    MCP runtime improvements

    • MCP runtime status is now refreshed automatically after server operations.
    • Client runtime has auto-stop functionality when not in use.
    • Worker runtime properly closes and cleans up MCP resources on shutdown.

    Self-hosting and deployment improvements

    • Added Docker support for the worker module.
    • Workers can be configured to auto-start after initial setup.
    • Added server URL resolution logic for worker setup.
    • Worker configuration is now secured with layered approach (secrets separated from defaults).

    Security and reliability

    • JWT authentication now uses separate audiences for users and workers.
    • Worker configuration is restructured and secured with proper separation of sensitive data.
    • Session handshake completion is now enforced before workers can process requests.
    • Local MCP server API resources have been removed (client-side execution deprecated).

    Build and packaging

    • Worker module has its own Gradle build configuration.
    • Build and application defaults are properly configured for the worker.
    • All tests continue to pass across the application.

    Docs and project housekeeping

    • Expanded onboarding and project documentation.
    • Reorganized documentation files for better structure.
    • Cleaned up local IDE configuration files.

    Commit-backed changelog (checked from commit descriptions)

    Feature commits

    • 1c31178c feat(deploy): add docker support for worker
    • 822c2a0d feat(worker): support auto-start after setup
    • 254feb0b feat(worker-management): add worker management ui and logic
    • b0836afe feat(worker): add worker update and delete endpoints
    • 351c9371 feat(settings): add collapsible sidebar
    • c79f2a2b feat(settings): redesign ui with sidebar and pages
    • 6533614b feat(mcp): refresh runtime status after server ops
    • cec04fea feat(worker-setup): delegate display name resolution
    • 9cd6d857 feat(worker): add display name to identity config
    • 78b7f744 feat(worker-selection-ui): add worker selection dropdown to mcp server dialog
    • 2cca1d1f refactor(worker config): restructure and secure configuration
    • df0062fb fix(worker): enforce session handshake completion
    • 89a33ac9 feat(mcp): move local mcp tool execution to server worker
    • 601dfc7c feat(worker): add MCP server configuration sync commands
    • 546e766c feat(worker): bootstrap assigned mcp server configurations
    • 14c61f1b feat(worker): consolidate mcp tool calls in runtime service
    • 60340ff6 feat(worker): add worker runtime close and mcp cleanup
    • bd4d24b3 feat(mcp): add client runtime control and auto-stop
    • 8feca0fe feat(mcp-runtime-control): implement worker-local mcp runtime control
    • afafe40a feat(mcp-runtime): implement worker local mcp runtime tool discovery
    • 631bbfc8 feat(mcp): implement local mcp runtime control
    • 8c175f51 feat(worker): implement mcp server control commands
    • cc4a78a9 feat(mcp): implement worker-backed runtime control
    • 10aa4788 feat(mcp): add local mcp runtime control architecture
    • ce4aa308 feat(mcp-server): migrate config to server-side persistence
    • 961630fb feat(mcp): migrate local mcp server config to server
    • 62016ecb feat(worker): add server-side websocket message processing
    • 8ebfe11b feat(auth): add worker uid to service jwt and context
    • 91e5453e feat(worker-protocol): implement worker-side message processing
    • d65602ce feat(worker-protocol): add worker websocket protocol definitions
    • a579cb46 feat: add worker setup flow and layered configuration
    • 872df1cd feat(worker): add initial worker setup flow
    • 250260d6 feat(worker-setup): add initial worker setup flow
    • 7e84f775 feat(worker-config): implement layered configuration system
    • f5b3ec87 feat(worker): add public uid for external identification
    • a807c1f5 feat(worker): add main process and auth setup
    • 3e1312ce feat(worker): add runtime for token lifecycle management
    • e29d28ad feat(worker-cli): add command-line argument parsing
    • 63e112f5 feat(worker): add runtime configuration loading
    • 191ca918 feat(worker-auth): add worker authentication manager
    • 32a76b53 feat(auth): add worker authentication api client
    • 2f95cac9 feat(worker-auth): add service token store
    • a9067b0b feat(auth): add worker challenge signer
    • 613be9a6 feat(worker): add worker service authentication
    • f4386214 feat(auth): add worker registration and authentication
    • 74fdf85d feat(worker-registration): add api endpoint
    • 8f4253e3 feat(auth): add worker service token authentication
    • d10b156a feat(auth): implement worker jwt authentication
    • 8c05a72f feat(worker-auth): add worker registration and authentication
    • bb278d8d feat(worker-auth): add worker identity and auth dao
    • 548fd6b7 feat(worker): add worker registration and authentication tables
    • 47557c1b feat(worker-auth): add challenge data model
    • b500bfd5 feat(worker): add worker registration models and database table
    • 051a3ff8 feat(auth): introduce separate jwt audiences for users and workers

    Fixes

    • cbed5f95 fix(topbar): add generation-based content control
    • 67209814 chore(git): clean up local ide config
    • d20cb0ab refactor(worker): migrate session registration to connection start
    • 2c86ae83 fix(test): close test container after each test
    • b934191e fix(auth): use correct access token expiration

    Build/docs/chore

    • e3b5cdda docs(readme): expand onboarding and project docs
    • 10e707a1 docs(structure): reorganize documentation files
    • fb39f071 chore(worker): configure build and application defaults
    • 72f2e980 chore: add log4j2 configuration for worker
    • e84d2dbd refactor(worker): improve unique constraint error handling
    • 1a2a2854 refactor(worker): separate entity and dto models

    Refactoring (architectural changes)

    • 9932f37e refactor: remove deprecated local mcp server api resources
    • 55f15fd5 refactor(mcp): remove local server execution logic
    • edcd7412 refactor(mcp-runtime): move local mcp tool execution to server worker
    • 30f4e66c refactor: remove local mcp tool execution
    • 86a6c2c0 refactor: remove local mcp tool call mediation
    • c8ae0043 refactor(worker-protocol): split mcp runtime command mappings
    • 7f17e843 refactor(mcp): rename worker-prefixed mcp components
    • f7de5efe refactor(local mcp server): remove local database persistence
    • 4f78f827 refactor(worker): use string uid and secrets json config

    Merged pull requests in this range

    • #208 Merge pull request #208 (a5459cdc)
    • #207 Merge pull request #207 (0e8f0c0e)
    • #206 Merge pull request #206 (2e603f23)
    • #205 Merge pull request #205 (9ece432b)
    • #204 Merge pull request #204 (afddd8dd)
    • #203 Merge pull request #203 (4beacf52)
    • #202 Merge pull request #202 (219b7b27)
    • #201 Merge pull request #201 (ccf2447a)
    • #200 Merge pull request #200 (6f719866)
    • #199 Merge pull request #199 (597b2aa9)
    • #198 Merge pull request #198 (7900ab55)
    • #197 Merge pull request #197 (0fec65ec)
    • #196 Add local MCP runtime control architecture (b9da7ef5)
    • #195 Merge pull request #195 (b71f7965)
    • #194 Merge pull request #194 (77ec0ca9)
    • #193 Add server-side message processing (d3344b71)
    • #192 Merge pull request #192 (7ba1b97f)
    • #191 Add worker side message processing (cab80c3b)
    • #190 Merge pull request #190 (693a438b)
    • #189 Merge pull request #189 (3944a148)
    • #188 Add worker registration and authentication (b091aa2e)
    • https://github.com/Torvian-eu/chatbot/compare/v0.2.0...v0.3.0
    • If the tag is not created yet: https://github.com/Torvian-eu/chatbot/compare/v0.2.0...main
    Downloads