Commit Graph
61 Commits
Author SHA1 Message Date
Leonid PershinandCursor 07bb521b70 Add Assistent reference books and remove training dataset output.
Introduce books/ with civitai-krea2 and HF fictext builders, sha-diff seed to VM, and drop train.jsonl from the civitai scrape pipeline.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 22:56:07 +03:00
Leonid PershinandCursor 0bad693b12 Enhance Selectel balance handling and error messaging in GPU rental system
- Updated Selectel documentation to clarify error responses related to balance issues.
- Introduced `peek_balance_rub` function for best-effort balance checks, handling API failures gracefully.
- Improved error messages for insufficient funds and quota issues, specifying Selectel's 403 policy response.
- Added balance checks in the doctor command to ensure users are informed about their balance status before attempting GPU creation.
- Refactored exception handling in cloud operations to provide clearer feedback on balance-related errors.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 17:54:11 +03:00
Leonid PershinandCursor 322577cf9f Add offline analysis and client event tracking to Assistent API
- Introduced `/assistent/analyze-reply` endpoint for offline extraction of patches and client predictions without VRAM.
- Added `/assistent/client-event` and `/assistent/client-events` endpoints for tracking UI interactions and retrieving event history.
- Updated Debug API documentation to reflect new endpoints and their functionalities.
- Enhanced Assistent session handling with improved client prediction logic and diagnostics.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 15:18:39 +03:00
Leonid PershinandCursor 20ae7bd83a Support Assistent persona packs via git and local sync.
Replace assistent-personas overlay seed with assistent-extensions SFTP and an assistent: section in extensions.yaml so personalities install like other extensions without private URLs in the public repo.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 08:28:31 +03:00
Leonid PershinandCursor b24c1b5d4b Sync remaining docs with CLI surface, Assistent, and Civitai dataset.
Align architecture/cli/decisions with modules and Debug API; cross-link seed overlays and scrape→FTS so user docs match 0.2.0.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 08:18:08 +03:00
Leonid PershinandCursor 6dfbf4e702 Add Civitai Krea2 metadata scrape for train JSONL and Assistent FTS search.
Local civitai-dataset launchers collect ~2000 prompt/params rows without images; search.jsonl is pushed on up for cheap example lookup.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 08:13:53 +03:00
Leonid PershinandCursor b83d1d1e9c Add multi-turn Assistent session diagnostics to the Debug API.
POST /assistent/session + /chat with rich per-turn traces (patch, Exact merge, compact_context); chat-eval wraps one session turn. Docs playbook and unit/HTTP tests included.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 07:32:58 +03:00
Leonid PershinandCursor 719d77efd9 Add opt-in /assistent/chat-eval for AssistentChat via Debug API.
Lets agents POST/GET a real Assistent turn (tunnel or SSH) without folding it into cheap /snapshot; documents VRAM/Sqlite side effects.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 07:21:13 +03:00
Leonid PershinandCursor ca11467a0d Stop stacking Ollama -cpu embed tags and verify Assistent Sqlite after seed.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 06:45:04 +03:00
Leonid PershinandCursor 2d404436bd Add deep Assistent probes to the Debug API.
Expose /assistent subpaths for extension/DLL, overlay personas, roles, memory sqlite, live Assistent* API smoke, and optional chat_smoke so agents can diagnose missing tab, empty chat, and wrong models over HTTP.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 06:27:31 +03:00
Leonid Pershin 5847eaab3f Add read-only Debug API support and update documentation
- Introduced a local read-only Debug API accessible at `http://127.0.0.1:17821` for diagnostics and agent interactions.
- Updated CLI commands to include `gpu-rent debug` for launching the Debug API.
- Enhanced documentation to reflect the new Debug API features and usage.
- Modified configuration to include `DEBUG_LOCAL_PORT` for easier customization.
- Added tests to ensure Debug API links are correctly generated in access card outputs.
2026-08-23 06:11:20 +03:00
Leonid Pershin ac0797530d Enhance logging functionality in CLI and tunnel operations. Updated gpu-rent logs to provide a complete journal output, including cloud-init logs by default. Added log digest printing for better visibility during VM operations, especially on failure scenarios. Improved error handling and added tests for new log digest features. 2026-08-23 05:08:05 +03:00
Leonid PershinandCursor d934fc9366 Expose ollama-roles default_chat for Assistent senior model default.
Write preferred chat tag into Assistent/ollama-roles.json so UI and warmup align with manifest default: true.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-22 03:50:58 +03:00
Leonid PershinandCursor 3620ac2b5e Note Assistent 0.10.8 cheap-bug fixes for seed-extensions on main.
Keeps gpu-rent docs aligned with the extension branch operators pull.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-22 03:22:03 +03:00
Leonid PershinandCursor 7be2c27a67 Seed Assistent personas from a shelf folder instead of yaml prompts.
Push assistent-personas/ JSON overlays without wiping VM clones or exact.controls.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-22 01:48:01 +03:00
Leonid PershinandCursor 03ba4cb6ed Seed Assistent personas as overlay folders and tighten Ollama/Assistent glue.
gpu-rent now writes personas/<id>/ on the VM (not legacy personas.json), adds seed-personas/doctor checks, and shortens mid/high keep-alive now that Assistent parks the LLM before Generate.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-22 01:00:14 +03:00
Leonid PershinandCursor 789fa26918 Pick cheapest GPU SKU and pin the VM to an existing disk AZ.
Scan ru-6 by Nova availability zones (a/b/c). First boot uses FLAVOR_SIZE_PRESET=cheap; reruns stay on the disk segment.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-22 00:06:44 +03:00
Leonid PershinandCursor 4081890b4c Support Ollama use: chat|memory and parallel embed beside VL.
Pull nomic-embed-text for Assistent memory, write ollama-roles.json, CPU Modelfile, and raise MAX_LOADED_MODELS/NUM_PARALLEL to 2.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 22:47:03 +03:00
Leonid PershinandCursor 44f46d8190 Add cinema/terse Assistent personas and note personas.json overlay.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 22:04:36 +03:00
Leonid PershinandCursor 6c45a7560e Add capture wanted and harden Assistent wanted-queue merge.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 21:29:00 +03:00
Leonid PershinandCursor ec8bd28ce0 Add assistent-personas support and enhance model merging functionality
- Introduced `assistent-personas.yaml` to the project and updated the `.gitignore` accordingly.
- Implemented functions to seed and merge assistent personas from local files to the VM.
- Enhanced the model capture process to include merging of wanted models from the VM into `models.yaml`.
- Updated documentation to reflect changes in the assistent personas and model management processes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 21:21:53 +03:00
Leonid PershinandCursor 36e29668b0 Note Assistent 0.4 board in the extensions seed docs.
gpu-rent still clones swarm-assistent from main; the UI now has Generate/Ref windows.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 20:56:48 +03:00
Leonid PershinandCursor ffe5a031b4 Warm Ollama into VRAM on up and tunnel so Assistent chat is not cold.
A 1-token /api/chat after tags (and again if /api/ps is empty) loads VL weights before the first message. Mid KEEP_ALIVE is 15m so a short image-gen burst does not unload the model.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 20:47:14 +03:00
Leonid Pershin f8f8dcc93e Update documentation to clarify GPU control commands
- Revised README, architecture, CLI, and other documentation to specify that both `Ctrl+C` and `Ctrl+D` now stop the GPU while preserving disk data, correcting previous inaccuracies.
- Enhanced access card and setup instructions to reflect the updated command behavior for better user understanding.
- Updated tests to ensure the new command behaviors are validated and documented correctly, improving overall clarity in GPU management.
2026-08-21 20:12:03 +03:00
Leonid Pershin a882964ce0 Update GPU performance tuning and documentation for context length
- Enhanced the `OllamaTune` class to include a new `context_length` attribute, improving the configuration for different GPU tiers.
- Updated performance tuning logic to set appropriate context lengths for low, mid, high, and ultra tiers, ensuring optimal resource allocation.
- Modified installation scripts to reflect the new context length settings, enhancing the installation process for Ollama.
- Revised documentation to include context length details in the GPU performance table, providing clearer guidance for users.
- Added tests to validate the correct context length settings in various scenarios, ensuring robustness in performance tuning.
2026-08-21 20:05:33 +03:00
Leonid Pershin 5832c5cf75 Enhance Ollama model management and performance tuning
- Updated the `provision_llm` function to utilize the `/api/tags` endpoint for verifying available models, improving accuracy in model management.
- Introduced a new `already_have_ollama_tag` function to ensure exact tag matching, preventing mismatches during model checks.
- Enhanced the `pull_stream` function to require a successful status from the API before proceeding, ensuring reliable model downloads.
- Added logic to handle unwritten blob files, improving the robustness of the model pulling process.
- Updated documentation and tests to reflect these changes, ensuring clarity and reliability in Ollama model operations.
2026-08-21 14:20:06 +03:00
Leonid Pershin f437cd0373 Update documentation and CLI behavior for GPU management
- Clarified the behavior of `Ctrl+C` and `Ctrl+D` in the README and other documentation, specifying that `Ctrl+C` only stops the tunnel while keeping the GPU active, and `Ctrl+D` stops the GPU while preserving disk data.
- Enhanced the CLI documentation to reflect these changes, ensuring users understand the implications of these commands during GPU operations.
- Improved the handling of data bindings and remounting logic in the codebase to prevent issues with empty model tabs in the UI.
- Added tests to validate the new command behaviors and ensure proper documentation alignment.
2026-08-21 13:25:55 +03:00
Leonid Pershin 1d18ece17b Enhance installation state management and diagnostics for ComfyUI
- Updated the `gpu-rent` logic to ensure the `IsInstalled` flag is accurately set based on the presence of ComfyUI, preventing conflicts during installation.
- Improved the handling of the `/mnt/swarm_data` directory to skip creation if it does not exist, enhancing robustness in provisioning.
- Added tests to validate the new installation state checks and ensure proper diagnostics during the installation process, including scenarios for clearing and setting the `IsInstalled` flag.
2026-08-21 12:48:44 +03:00
Leonid Pershin 1785ab369c Refactor backend status handling and improve idle management
- Updated the idle-killer logic to treat SwarmUI `empty` and `disabled` states as busy, preventing unnecessary idle time during provisioning.
- Enhanced the `wait_backend_idle` function to recognize suspended backends as ready, improving resource utilization and user feedback.
- Refined the `install_swarm_comfy` script to skip installation when backends are already present, streamlining the setup process.
- Improved the `resolve_llm_runtime` function to prioritize live configuration over stale state notes, ensuring accurate runtime detection.
- Added tests to validate the new backend status handling and idle management logic, ensuring robustness and reliability.
2026-08-21 10:07:16 +03:00
Leonid Pershin 26f3be6e96 Refactor ComfyUI installation script to improve Python environment handling
- Replaced direct calls to `venv/bin/pip` with `python -m pip` to avoid execution errors on network mounts and improve compatibility.
- Introduced a new function `find_comfy_python` to locate the appropriate Python executable for ComfyUI installations.
- Updated the `pip_install_sage` function to utilize the new Python handling, enhancing installation reliability.
- Added tests to verify the new behavior of Python environment detection and installation processes, ensuring robustness.
2026-08-21 10:01:42 +03:00
Leonid Pershin 3e0a51cac4 Update backend status handling and improve user notifications
- Enhanced documentation to clarify the transition from 'Idle' to 'ready (running)' for backend states, improving user understanding of system readiness.
- Updated logging messages in the notification system to reflect the new backend status terminology, ensuring accurate feedback during operations.
- Refined access link collection logic to better handle tunneled and non-tunneled scenarios, enhancing user experience.
- Improved tests to validate the new backend status handling and ensure accurate reporting of access links and notifications.
2026-08-21 09:53:48 +03:00
Leonid Pershin f7ba915e74 Implement headless ComfyUI installation and improve backend status handling
- Added a new function to ensure headless installation of ComfyUI when backends are empty, enhancing the setup process for SwarmUI.
- Updated documentation to clarify the installation flow and backend readiness checks, ensuring users understand the requirements for a successful setup.
- Enhanced backend status checks to differentiate between 'empty' and 'idle' states, improving error handling and user feedback during provisioning.
- Adjusted logging messages to provide clearer insights into the installation and backend status processes.
2026-08-21 09:18:59 +03:00
Leonid Pershin f17b1c9731 Update Ollama model configurations and documentation for clarity and consistency
- Revised model descriptions in `ollama-models.example.yaml` to emphasize uncensored and abliterated requirements, enhancing user understanding.
- Updated documentation in `llm.md` to reflect changes in model tags and their meanings, ensuring accurate guidance for users.
- Modified CLI help messages to clarify the nature of presets, reinforcing that all options are abliterate models with Russian support.
- Enhanced the `llm_runtime.py` file to align preset labels with the updated model descriptions, improving consistency across the codebase.
2026-08-21 08:54:21 +03:00
Leonid Pershin 2ab32a8ab5 Refactor LLM configuration to remove llamacpp support
- Removed references to llamacpp from configuration files, scripts, and documentation, streamlining the LLM setup process to focus solely on Ollama.
- Updated environment variables and paths to eliminate llamacpp-related entries, ensuring clarity in the configuration.
- Adjusted CLI commands and help messages to reflect the removal of llamacpp, enhancing user experience and reducing confusion.
- Revised documentation to provide clear guidance on using Ollama exclusively, including updates to setup instructions and runtime options.
2026-08-21 08:51:36 +03:00
Leonid Pershin 9a4b87dc06 Update idle time configuration to improve resource management
- Reduced default values for IDLE_MINUTES from 60 to 30 and IDLE_GRACE_MINUTES from 90 to 45 across configuration files and documentation.
- Updated related documentation to reflect the new default idle time settings, ensuring consistency in user guidance and system behavior.
2026-08-21 08:35:43 +03:00
Leonid Pershin 6871c511c4 Implement UP_STOP_ON_FAIL option to manage GPU state on installation failure
- Added a new configuration option `UP_STOP_ON_FAIL` to control whether the GPU should be stopped automatically if the `up` command fails, enhancing user control over resource management.
- Updated the CLI to include a `--keep-on-fail` flag, allowing users to prevent GPU shutdown during installation errors.
- Enhanced the installation scripts and documentation to reflect these changes, providing clearer guidance on the new behavior and configuration options.
- Improved error handling in the CLI to ensure proper cleanup of resources in case of failure, preventing unexpected billing for unused GPU resources.
2026-08-21 08:32:33 +03:00
Leonid Pershin 91d2ce0fab Enhance LLM configuration and installation scripts for improved flexibility
- Added new environment variables in `env.example` and `gpu-rent.vars.example` for fine-tuning LLM settings, including CUDA build options and model version pinning.
- Updated `llm.md` documentation to include detailed descriptions of new configuration options and usage cases for LLM setups.
- Enhanced the `provision.py` script to forward new environment variables during remote installations, improving the installation process for LLM components.
- Modified the `install_llamacpp.sh` script to support conditional CUDA builds and asset URL overrides, ensuring better compatibility with various environments.
- Improved logging in the installation scripts to provide clearer feedback during the setup process.
2026-08-21 08:19:37 +03:00
Leonid Pershin 242f5b7c89 Enhance LLM runtime and installation script for Linux support
- Added a new function `pick_llamacpp_linux_asset_url` to select appropriate Linux release assets, prioritizing Ubuntu CUDA and Vulkan options while excluding Windows and macOS binaries.
- Updated the installation script to build `llama-server` from source when Linux CUDA binaries are unavailable, improving compatibility and flexibility.
- Revised documentation to reflect changes in asset handling and installation procedures.
- Added tests to validate the new asset selection logic, ensuring correct behavior in various scenarios.
2026-08-21 07:51:17 +03:00
Leonid Pershin 15b95f04c7 Update model configurations and enhance LLM runtime logic
- Revised model URLs and descriptions in `llamacpp-models.example.yaml` and `ollama-models.example.yaml` to reflect new recommendations and vision capabilities.
- Updated the LLM runtime logic to support vision projectors and improved model resolution handling.
- Enhanced the installation script to conditionally include vision projectors when available.
- Added tests to validate the inclusion of vision projectors in model presets and ensure proper URL remapping for deprecated models.
- Improved documentation to clarify model usage and configuration options.
2026-08-21 07:40:47 +03:00
Leonid Pershin 618e6e4806 Add Hugging Face support and enhance model resolution logic
- Introduced support for Hugging Face API integration, allowing fallback model resolution when Civitai fails.
- Updated configuration to include `HF_TOKEN` and `HF_TOKEN_PATH` for authentication.
- Enhanced model capture logic to differentiate between Civitai and Hugging Face sources.
- Improved error handling for model downloads, providing clearer messages for authentication issues.
- Updated documentation to reflect new environment variables and usage instructions for Hugging Face integration.
- Added tests to validate the new fallback mechanism and ensure robust model resolution.
2026-08-21 07:34:15 +03:00
Leonid Pershin 7343fb0e83 Update idle time configuration and documentation
- Increased default values for IDLE_MINUTES from 30 to 60 and IDLE_GRACE_MINUTES from 45 to 90 across configuration files and documentation.
- Updated related documentation to reflect the new default idle time settings, ensuring consistency in user guidance and system behavior.
2026-08-21 07:24:09 +03:00
Leonid Pershin adba4976ee Enhance SwarmUI integration and GPU environment verification
- Updated CLI documentation to reflect the new handling of `CIVITAI_API_TOKEN`, which is now automatically passed to SwarmUI user settings during startup.
- Improved the `render_access_panel` function to include additional warnings for idle-killer failures and stack errors, enhancing user feedback.
- Introduced a new function `seed_swarmui_api_keys` to manage API key injection into SwarmUI, ensuring seamless integration with the Model Downloader.
- Enhanced GPU environment verification logic to include fail-fast checks for critical components like CUDA, improving error handling and user notifications.
- Updated tests to validate the new API key handling and access panel behavior, ensuring robustness in the integration process.
2026-08-21 07:09:20 +03:00
Leonid Pershin 1ec615c03e Implement idle-killer enhancements and swarm management improvements
- Marked critical bugs as resolved in the review documentation, including changes to the `arm_idle_killer` function to raise errors on credential creation failures and ensure proper file permissions for JSON credentials.
- Introduced a new `_try_arm_idle_killer` function in `provision.py` to manage idle-killer state more effectively, ensuring it arms correctly during provisioning.
- Updated the `swarm_busy` function in `remote/idle_killer.py` to allow idle state after a specified duration of Swarm unavailability, preventing unnecessary billing.
- Enhanced performance tuning logic in `tune_swarm_perf.py` to ensure proper handling of pip installation success before applying extra arguments.
- Added tests to validate the new idle-killer behavior and swarm management logic, ensuring robustness in handling idle states and error conditions.
2026-08-21 07:04:09 +03:00
Leonid Pershin d409e2e154 Refactor GPU environment verification tests and update CLI documentation
- Rearranged the order of verification steps in the CLI documentation for clarity.
- Enhanced the `test_verify_gpu_env` tests to improve logging and error assertions, ensuring accurate feedback on GPU stack checks.
- Added a new test to skip the torch requirement when only LLM is enabled, reflecting updated behavior in GPU environment verification.
2026-08-21 07:00:19 +03:00
Leonid Pershin 3c8225a69e Implement GPU environment verification in session management
- Added a new function `verify_gpu_env` to check GPU stack readiness, including nvidia-smi, CUDA, and torch in the Comfy virtual environment when SwarmUI is enabled.
- Updated the session management to call `verify_gpu_env`, capturing GPU environment status and errors in the state notes.
- Enhanced documentation in `cli.md` to reflect the new GPU environment verification process.
- Added tests for `verify_gpu_env` to ensure proper functionality and error handling during GPU checks.
2026-08-21 06:58:23 +03:00
Leonid Pershin 09b7c36f3b Implement balance monitoring and notification for Selectel API integration
- Added support for balance tracking using `SELECTEL_API_TOKEN` in the configuration.
- Introduced new balance notification logic in the local watchdog, alerting users on balance changes based on defined thresholds.
- Updated documentation to include instructions for setting up balance notifications and the required environment variables.
- Enhanced the `ready` and `session` modules to initialize balance state and handle notifications during GPU operations.
- Refactored the CLI and related components to support the new balance monitoring features, ensuring a seamless user experience.
2026-08-21 06:52:51 +03:00
Leonid Pershin 7ed6a99df2 Enhance LLM and SwarmUI integration with improved configuration options
- Updated `env.example` and `gpu-rent.vars.example` to include new variables for LLM runtime and SwarmUI options.
- Refactored CLI commands to support interactive selection of LLM runtime and workload type (SwarmUI, LLM, or both).
- Improved access link generation to handle cases where SwarmUI is disabled, providing clearer user feedback.
- Enhanced provisioning logic to conditionally bootstrap SwarmUI based on user configuration, allowing for LLM-only setups.
- Updated documentation across multiple files to reflect changes in LLM integration, CLI usage, and configuration management.
2026-08-21 06:44:50 +03:00
Leonid Pershin 64f93b4bf6 Update LLM support for llama.cpp and enhance configuration management
- Added support for `llamacpp-models.yaml` in `.gitignore` and implemented logic to copy it in `gpu-rent.ps1` and `gpu-rent.sh`.
- Enhanced CLI to prompt for llama.cpp model presets during setup and execution, improving user experience.
- Updated configuration handling to include `llamacpp_models_manifest` and related functions for managing llama.cpp models.
- Improved documentation in `cli.md` and `llm.md` to reflect changes in llama.cpp integration and model management.
- Refactored provisioning logic to handle llama.cpp model downloads and configurations effectively.
2026-08-21 06:25:12 +03:00
Leonid Pershin 2ccb03f7d2 Enhance GPU probing and performance tuning in provisioning
- Introduced GPU probing functionality to gather and store GPU specifications in `/mnt/swarm_data/.gpu-rent-gpu.json`, aiding in performance tuning.
- Updated `install_ollama.sh` and `install_llamacpp.sh` to utilize GPU information for configuring optimal runtime parameters.
- Enhanced `provision.py` to include GPU probing and performance tuning logic, ensuring better resource allocation for LLM operations.
- Improved documentation in `decisions.md`, `llm.md`, and `swarmui.md` to reflect changes in GPU handling and performance tuning processes.
- Added new tests to validate the GPU probing and model resolution logic, ensuring robustness in handling various GPU configurations.
2026-08-21 06:10:24 +03:00
Leonid Pershin 603165a4ba Enhance CLI and documentation for capturing VM inventory
- Introduced new `capture` commands in the CLI to allow users to merge VM inventory into local manifests without downloading weights.
- Updated `README.md` and `cli.md` to include detailed instructions for the new capture functionality, including options for models and extensions.
- Enhanced `decisions.md` to clarify the role of captured links in the manifest files.
- Improved `extensions.md` to document the process of capturing installed extensions back to the local configuration.
- Added new functions in `civitai.py` to support fetching model versions by hash and generating canonical URLs for models.
2026-08-21 05:56:52 +03:00