106 Commits
Author SHA1 Message Date
Leonid PershinandCursor 34a4090aba Fix books list command NameError (_log).
EOF

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 23:15:25 +03:00
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 84ed0bb47a Repair Assistent SQLite natives after extension build completes.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 20:31:12 +03:00
Leonid PershinandCursor 208315e329 Verify and repair Assistent SQLite native bundle on provision.
Extend seed/verify to require SQLitePCLRaw bundle or runtimes and copy native e_sqlite3 when repairing extension DLLs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 20:00:18 +03:00
Leonid PershinandCursor 9e9f72c1ac Refactor public network API handling and enhance connectivity checks
- Updated the public network handling to resolve the base URL dynamically based on Keystone catalog.
- Simplified the public network pool function to directly return the compute region.
- Enhanced error messages in the doctor command for better clarity on public network status.
- Introduced new functions for managing security groups and ensuring visibility of public ports in Neutron.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 18:55:19 +03:00
Leonid PershinandCursor eb459dcccf Refactor public network handling in GPU rental system
- Updated terminology from "public-net" to "public-network" for consistency across the codebase.
- Enhanced error handling and logging for public network API interactions.
- Introduced a new function to determine the public network pool based on the compute region.
- Adjusted API request functions to use the new public network terminology and improved error messages.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 18:25:41 +03:00
Leonid PershinandCursor 8074426c43 Refactor GPU rental network handling and enhance IP management
- Renamed "FIP" to "IP" in the status output for clarity.
- Updated `create_gpu_server` to accept `port_id` as an optional parameter, allowing for more flexible network configurations.
- Introduced `delete_access_ip` function to manage direct public ports or floating IPs more effectively.
- Enhanced session management to prioritize direct public IPs over floating IPs, improving connection reliability.
- Added checks for direct network availability in the doctor command to ensure proper network functionality.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 18:19:34 +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 1d431e3a05 Align Assistent debug patch extraction with string generate flags and unfenced JSON.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 09:28:06 +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 23b07672d6 Point gpu-rent logs at gpu-rent-ollama and harden Assistent bin probes.
Stock ollama.service is disabled by install; journal aliases must use
gpu-rent-ollama. Prefer bin/{Debug,Release}/net* when locating the
extension DLL and Sqlite private deps.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 06:46:57 +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 Pershin d06b4f4fdc Fix console output in logs function to prevent rich markup issues with MSBuild paths. Set markup and highlight to False for better compatibility. 2026-08-23 04:44:31 +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 5d0c30f66b Enhance Ollama integration and model management
- Implemented support for parallel embedding in Ollama, allowing for improved performance in chat and memory functions.
- Updated the `ollama-roles.json` and CPU Modelfile to accommodate new features.
- Increased the maximum loaded models and parallel processing limits to 2, optimizing resource usage.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 23:05:48 +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 08120194f9 Deduplicate wanted-queue merge into capture to avoid circular imports.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 21:25: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 79cb0a7e25 Enhance error handling and state management in access card and session modules
- Updated the `render_access_panel` function to conditionally hide LLM errors when the Ollama model is operational, improving user experience by reducing unnecessary error visibility.
- Introduced a new `_notes_from_disk` function to streamline the retrieval of notes from disk, enhancing state management during GPU environment checks.
- Refactored error handling in the `_bind_access` function to ensure that stack and GPU environment errors are accurately recorded and managed, improving robustness in session state updates.
- Added tests to validate the new behavior of error handling and state management, ensuring that LLM errors are appropriately suppressed when conditions are met.
2026-08-21 20:20:49 +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 f8ce9d1981 Update comfy_on_disk function to include additional candidate paths for ComfyUI detection
- Added a loop to check for the presence of ComfyUI in specified candidate paths, enhancing the logic for determining if ComfyUI is installed on disk.
- This change improves the accuracy of installation state reporting by expanding the search for ComfyUI binaries.
2026-08-21 12:47:37 +03:00
Leonid Pershin d785f47534 Enhance Settings.fds management and installation flag handling
- Introduced `comfy_on_disk` and `sync_is_installed` functions to manage the `IsInstalled` flag based on the presence of ComfyUI, ensuring accurate installation state reporting.
- Updated `install_swarm_comfy.py` to clear the `IsInstalled` flag when necessary, allowing the installation process to proceed without conflicts.
- Improved logic to prevent setting `IsInstalled` to true on first boot or empty data volumes, addressing issues with the InstallConfirmWS process.
- Enhanced diagnostics and logging for installation state changes, providing clearer feedback during the installation process.
2026-08-21 12:47:25 +03:00
Leonid Pershin 57d38bd9f6 Enhance backend loading diagnostics and remount logic
- Introduced a new `loading_fail_sec` parameter in the `wait_backend_idle` function to handle prolonged loading states, improving error handling for backend readiness.
- Updated the `ensure_dlbackend_bind` function to stop SwarmUI before remounting, preventing target busy errors and ensuring consistent data mounts.
- Enhanced the `recover_errored_backends` function to account for the new remount logic, improving backend recovery processes.
- Refactored tests to validate the new loading failure conditions and ensure proper handling of backend states during diagnostics.
2026-08-21 12:24:31 +03:00
Leonid Pershin 491816b679 Enhance ExtraArgs sanitization and backend recovery logic
- Introduced the `clean_extra_args` function to filter out unsafe CLI flags and comment garbage from `ExtraArgs`, improving backend configuration integrity.
- Updated the `repair_extra_args_on_disk` function to rewrite corrupted `ExtraArgs` lines in the FDS file, ensuring cleaner backend settings.
- Enhanced the `recover_errored_backends` function to utilize the new sanitization logic, preserving valid `ExtraArgs` during backend reconfiguration.
- Improved the `sanitize_backends_fds` function to drop comment garbage and retain valid entries, enhancing overall backend management.
- Added tests to validate the new sanitization behavior, ensuring robustness in handling `ExtraArgs` during backend operations.
2026-08-21 11:56:53 +03:00
Leonid Pershin b9059cd275 Enhance backend configuration and sanitization logic
- Updated the `recover_errored_backends` function to preserve `ExtraArgs` during backend reconfiguration, improving error recovery.
- Refined the `sanitize_backends_fds` function to prevent newline merging issues with bare `\\x` entries, ensuring correct FDS formatting.
- Enhanced the `configure_comfy_backend` function to accept and manage `ExtraArgs`, preventing loss of important configuration during recovery.
- Added tests to validate the new sanitization behavior and ensure that bare `\\x` entries remain intact, improving overall backend management.
2026-08-21 11:50:01 +03:00
Leonid Pershin 021feaa839 Enhance backend management and performance tuning
- Introduced remounting logic for data directories to ensure correct bindings before restarting services, improving reliability during performance tuning.
- Added functions to sanitize and ensure absolute paths for backend scripts, preventing issues with relative paths in bind mounts.
- Enhanced the `patch_backends_extra_args` function to clean up corrupted entries and ensure proper configuration of backend parameters.
- Updated tests to validate the new sanitization and path handling functionalities, ensuring robustness in backend management.
2026-08-21 11:44:25 +03:00
Leonid Pershin fc60fef279 Enhance Settings.fds management and installation checks
- Introduced functions to ensure the `IsInstalled` flag is set in `Settings.fds`, preventing the UI from displaying the /Install wizard.
- Added logic to create or patch `Settings.fds` with installation details, including the installation date and version.
- Updated the `install_swarm_comfy.py` script to call the new function, ensuring the installation state is correctly managed during backend operations.
- Added tests to verify the presence of the `IsInstalled` flag in the relevant scripts and ensure proper functionality during installation checks.
2026-08-21 11:27:06 +03:00
Leonid Pershin 241ada62cb Enhance CLI options and idle-killer functionality
- Added a `--update` option to the `up` command in the CLI for forced updates during warm ACTIVE states.
- Improved the idle-killer logic with new functions to check for reusable credentials and refresh settings on existing remote credentials.
- Enhanced the `seed_civitai` function to implement caching for model jobs, optimizing the provisioning process.
- Updated the installation script for Ollama to prevent unnecessary restarts when the service configuration has not changed.
- Added diagnostics for model job caching and improved error handling in various functions.
2026-08-21 11:22:14 +03:00
Leonid Pershin d3d689052d Enhance backend management and diagnostics in install_swarm_comfy.py
- Introduced a new `delete_backend` function to facilitate backend removal during recovery processes.
- Improved the `recover_errored_backends` function to handle backend reconfiguration and recreation more effectively, including enhanced logging for diagnostics.
- Added a new `add_comfy_selfstart` function to streamline the addition of new backends.
- Updated the `comfy_start_script` function to prefer absolute paths for better reliability.
- Enhanced diagnostics in `swarm_diag.py` to include detailed backend settings and mount status.
- Added tests to validate the new backend management features and ensure robust error handling.
2026-08-21 11:12:20 +03:00
Leonid Pershin a18074c985 Enhance backend idle management and diagnostics in SwarmUI
- Updated the `wait_backend_idle` function to handle disabled backends, introducing a new failure condition and diagnostics collection for better error handling.
- Refactored the `install_swarm_comfy` script to include a new `configure_comfy_backend` function, streamlining backend configuration and enabling better management of backend states.
- Added tests to validate the new functionality for handling disabled backends and ensuring robust diagnostics, improving overall backend management.
2026-08-21 11:00:01 +03:00