COWMODSКаталог модов
kashub

ВЕРСИИ (6)

beta

kashub v0.9.0-beta

v0.9.0-beta
25 янв. 2026 г.150Minecraft: 1.21.1fabric
Скачать
Что нового
## [v0.9.0-beta] - 2026-01-25 ### 🛡️ New Features #### CrashGuard Command - **Protection System** - New `crashguard { }` command to protect code from crashes and errors - Exception handling (like try-catch) - FPS monitoring and throttling - Execution timeout protection - Memory usage monitoring - Automatic recovery - **Configurable Options** - `crashguard(timeout=5000)` - Set custom timeout in milliseconds - `crashguard(minFps=30)` - Set minimum FPS threshold - `crashguard(timeout=10000, minFps=25)` - Combine options - **Use Cases** - Protect scanner operations from crashes - Monitor performance during heavy operations - Prevent infinite loops with timeouts - Safe entity interaction #### System Object - **New Global Object** - `System` object with essential utilities - `System.print(message)` - Output to chat and console - `System.log(message)` - Output to console only (no chat) - `System.chat(message)` - Send chat message - `System.wait(ms)` - Sleep for milliseconds - `System.time()` - Get current timestamp - `System.exit()` - Stop script execution - `System.gc()` - Request garbage collection - `System.memory()` - Get memory usage info (used, free, total, max) - **Migration Path** - Legacy functions (`print`, `wait`, `chat`) still work but deprecated - **Better Organization** - System-level functions now grouped in one object ### 📚 Documentation - **CrashGuard Guide** - Complete guide with examples and best practices - **System Object Guide** - Full documentation for System object methods - **Updated README** - Added new features to main documentation - **Example Scripts** - New test scripts demonstrating crashguard and System object ### 🎨 UI Improvements - **Auto-completion** - Added System object and crashguard to code completion - **Snippets** - New snippets for crashguard patterns - `crashguard` - Basic protected block - `crashguard_timeout` - Block with timeout - `crashguard_fps` - Block with FPS monitoring ### 🔧 Developer Experience - **Better Error Handling** - Errors inside crashguard are caught and logged without crashing - **Performance Monitoring** - Built-in FPS and memory tracking - **Safer Scripts** - Encourage use of crashguard for risky operations ### 🚀 Scripting Engine 2.0 (Object-Oriented) ✅ **Goal:** Modernize KHScript with object-oriented syntax, making it more powerful and intuitive (like JavaScript). #### Core Features - **Object-Oriented Syntax** - Use `object.method()` and `object.property` - `player.health` instead of `$PLAYER_HEALTH` - `player.jump()` instead of `jump` - `scanner.scan()` instead of `scanner scan` - `inventory.count("diamond")` instead of `inventory count diamond` - **System Objects** - New global objects for core functionality - `System` - System utilities (print, log, wait, memory, time) - `player` - Player state and control (pos, health, inventory, etc.) - `vision` - Raycasting and entity targeting - `scanner` - Block and entity scanning - `inventory` - Inventory management - And more... - **Data Structures** - **List Literals** - Support for `[1, 2, 3]` syntax - **Bracket Access** - Access lists/maps via `list[0]` - **Better Expressions** - Unified expression engine for all commands #### UI Improvements - **Icon-Based Tabs** - Editor tabs now use compact icons (`Map`, `Emerald`) instead of text, saving screen space. - **Modernized README** - Updated documentation style to match Modrinth. - **License Update** - Project is now under MIT License. ### 🏗️ Architecture Refactoring (Phases 1-5) ✅ **Goal:** Migrate from global `ScriptInterpreter` singleton to per-script `ScriptTask` architecture for better isolation, thread safety, and maintainability. #### Phase 1: New Core Classes ✅ - **ScriptExecutionContext** - Per-script execution context 🆕 - Isolated variable storage per script (no more variable leaks!) - Per-script function definitions - Per-script command queue management - Per-script event registration tracking - Thread-safe with `ConcurrentHashMap` and `ConcurrentLinkedDeque` - Variable processing with `$VAR` substitution - Expression evaluation using `ExpressionParser` - Condition evaluation for control flow - Clean separation from global state - **EnvironmentVariableProvider** - Singleton for read-only environment variables 🆕 - Extracts environment variable logic from `ScriptInterpreter` - Shared across all scripts (read-only) - Updated globally from game state - Throttled updates (max every 50ms) for performance - **30+ environment variables** including: - Player: position, health, food, XP, speed, air supply - Player state: sneaking, sprinting, swimming, flying, riding, on_ground, in_water, in_lava, burning, dead - World: time, day, weather, difficulty, is_day, is_night, moon_phase - Game: mode, dimension, singleplayer/multiplayer, server_name - Held item: name, count, slot - Target: block, entity, distance #### Phase 2: Core Feature Migration ✅ - **ScriptTask** - Now uses `ScriptExecutionContext` 🔄 - `setVariable()` now delegates to context - `processVariables()` uses context for variable substitution - `evaluateCondition()` uses context for condition evaluation - `executeIncrement()` uses context for variable updates - `getVariables()` returns variables from context - `stop()` calls `context.cleanup()` for proper cleanup - Added `getContext()` method for direct context access - Legacy `variables` map kept for backward compatibility (will be removed in Phase 6) - **Variable System** - Migrated to context-based storage - All variable operations now go through `ScriptExecutionContext` - Variables are isolated per script - No more variable leaks between scripts - Thread-safe concurrent access #### Phase 3: Event System Update ✅ - **EventManager** - Now supports event ownership tracking 🔄 - Added `eventOwners` map to track which script owns which event - New `registerEventScript(eventName, scriptCode, ownerScriptName)` overload - Creates temporary `ScriptExecutionContext` for each event execution - Event variables are isolated and don't leak to other scripts - `clear()` now also clears owner tracking - **ScriptTask** - Event registration with owner tracking - Now passes script name when registering events - Events are properly attributed to their owner script - Better logging with owner information - **Event Isolation** - Events now execute in isolated contexts - Each event creates a temporary execution context - Event variables (`$event_*`) don't leak between events - Backward compatibility maintained with ScriptInterpreter #### Integration Updates - **KashubClient** - Now uses `EnvironmentVariableProvider` - Calls `EnvironmentVariableProvider.getInstance().update()` every tick - Environment variables updated before event/task processing - Better performance with throttled updates - **v0.9.0**: Auto-initializes `ModpackScriptManager` when world loads #### Benefits of New Architecture - ✅ **Better Script Isolation** - Variables don't leak between scripts - ✅ **Thread Safety** - No race conditions with concurrent scripts - ✅ **Easier Testing** - Each context can be tested independently - ✅ **Cleaner Code** - Centralized variable/condition logic - ✅ **Foundation for Future** - Ready for multi-threaded execution ### 🌐 Server & Modpack Scripts ✅ **Goal:** Enable server-side script execution and modpack-level scripting capabilities. #### Modpack Script System - **ModpackScriptManager** - Manages server-side/modpack scripts 🆕 - Auto-discovers scripts from `config/kashub/modpack_scripts/` - Auto-starts mandatory modpack scripts on world load - Persistent data storage between server restarts - Automatic cleanup on world unload - **ModpackScript** - Represents modpack-level scripts 🆕 - Mandatory flag for required scripts - Priority system for execution order - Isolated from user scripts - **GlobalEventHooks** - Global event hooks for modpack scripts 🆕 - Register global event handlers - Priority-based execution - Persistent across sessions - Modpack-level event management #### Features - ✅ **Server-Side Execution** - Scripts run in server/modpack context - ✅ **Modpack Scripts** - Mandatory scripts for all players - ✅ **Event Hooks** - Global event handlers with priorities - ✅ **Persistent Data** - Data survives server restarts - ✅ **Auto-Initialization** - System starts automatically on world load ### ⚙️ Flexible Configuration ✅ **Goal:** Provide flexible configuration options for admins and modpack creators. #### Configuration System - **Enhanced KashubConfig** - New configuration options 🆕 - `restrictedMode` - Restrict mod usage to modpack scripts only - `allowEditorAccess` - Control editor access - `allowDebuggerAccess` - Control debugger access - `disabledCommands` - List of disabled commands - `clientEnforcement` - Enforce settings on client #### Features - ✅ **Feature Toggles** - Enable/disable editor, debugger, or specific commands - ✅ **Restricted Mode** - Limit mod usage to modpack scripts only - ✅ **Custom Functionality** - Configure unique server mechanics - ✅ **Runtime Configuration** - Change settings without restart - ✅ **Command Blacklisting** - Disable specific commands ### 🔌 Universal Integration System ✅ **Goal:** Enable integration with any mod through reflection and dynamic compatibility. #### Mod Bridge System - **ModBridgeManager** - Universal mod integration 🆕 - Auto-discovers all loaded mods - Reflection-based API calls - Field access (get/set) - Method invocation with arguments - Mod presence detection - **TagManager** - Item/Block tag system 🆕 - Check if items/blocks have specific tags - Get all items/blocks with a tag - Support for vanilla and modded tags - Enable mod compatibility in scripts #### Features - ✅ **Mod Bridge API** - Integration with any mod via reflection - ✅ **Dynamic Compatibility** - Scripts adapt based on available mods - ✅ **Item/Block Tags** - Work with tags from vanilla and mods - ✅ **Mod Detection** - Check mod presence before using features - ✅ **API Access** - Call mod methods and access fields - ✅ **Safe Integration** - Graceful handling of missing mods ### 👥 Player & Network Interaction ✅ **Goal:** Enable player permissions, messaging, and network interactions. #### Player Interaction System - **PlayerInteractionManager** - Player management 🆕 - Permission system with wildcards - Player data storage - Message sending - Current player detection #### New Events - **onPlayerJoin** - Fires when player joins world 🆕 - **onPlayerLeave** - Fires when player leaves world 🆕 #### Features - ✅ **Permissions System** - Control who can run scripts - ✅ **Player Messaging** - Send messages to specific players - ✅ **Player Data Storage** - Store per-player data - ✅ **Join/Leave Events** - React to player connections - ✅ **Wildcard Permissions** - Flexible permission patterns ### 🎮 Discord Rich Presence (Bonus Feature) ✅ **Goal:** Show Kashub activity in Discord automatically (like VSCode). #### Discord Integration - **DiscordRichPresence** - Automatic Discord Rich Presence 🆕 - Shows number of running scripts - Displays current world/server name - Shows mod version and session duration - Auto-updates every 15 seconds - Always enabled (no configuration needed) - Graceful handling when Discord not running #### Features - ✅ **Activity Display** - Shows running scripts and world info - ✅ **Automatic** - Works like VSCode, no setup needed - ✅ **Auto-Update** - Updates every 15 seconds - ✅ **Safe** - Handles Discord not running gracefully - ✅ **Zero Configuration** - Just works out of the box ### 🔄 Client Config Enforcement ✅ **Goal:** Synchronize server config with clients for consistent behavior. #### Config Sync System - **ConfigSyncManager** - Client config enforcement 🆕 - Receives server config on join - Applies server restrictions - Resets to local on disconnect - Transparent to user #### Features - ✅ **Server Override** - Server config overrides client - ✅ **Automatic Sync** - Syncs on player join - ✅ **Transparent** - Works automatically - ✅ **Safe** - Resets to local on disconnect ### 📝 Notes - **Backward Compatible** - Existing scripts work without changes - **All v0.9.0 Features Complete** - Architecture refactoring, Server & Modpack Scripts, Flexible Configuration, Universal Integration, Player & Network Interaction, Discord Rich Presence - **Next Steps** (v1.0.0): - Phase 6: Remove ScriptInterpreter singleton (breaking change) - Client Enforcement for configuration sync - Full multiplayer network packet handling
beta

kashub v0.8.0-beta

v0.8.0-beta
3 янв. 2026 г.57Minecraft: 1.21.1fabric
Скачать
Что нового
## [v0.8.0-beta] - 2026-01-03 ### 🔥 Sprint 1: Debug System Foundation #### Debug System Improvements - **Call Stack Tracking** - Added DebugFrame class for function call tracking - `pushFrame()` / `popFrame()` methods in DebugManager - Call stack visualization support - Depth tracking for Step Out functionality - **Step Out Implementation** - Complete step-through debugging - `stepOut()` method in DebugManager - Exits current function and pauses at caller - Works with call stack depth tracking - **Code Cleanup** - Production-ready debug code - Removed all `System.err.println` debug output - Replaced with `ScriptLogger.debug()` with null-safe formatting - Removed unused imports (HashMap, Map from DebugSession) - Added SLF4J-style `{}` placeholder formatting to ScriptLogger ### 🎯 Sprint 1.5: Event System Revival #### Event System Fixes (2026-01-03) - **CRITICAL FIX: Event blocks now parse correctly** 🔥 - Added `onEvent { }` block parsing in ScriptTask - Events were completely broken - blocks were ignored - Now properly collects event script body - Registers directly with EventManager - **CRITICAL FIX: Events now work after script restart** 🔥 - Fixed event persistence bug when stopping/restarting scripts - Added `registeredEvents` tracking in ScriptTask - Events are now properly unregistered in `stop()` method - Events re-register correctly on `restart()` - Prevents duplicate/stale event handlers - **CRITICAL FIX: Events work after stop hotkey (Bug #11)** 🔥 - Fixed `ScriptInterpreter.shouldStop` flag blocking event execution - Added automatic flag reset in `queueCommand()` and `executeQueuedCommands()` - Events now execute correctly after pressing Z (stop all scripts) - Test script: `test_events_after_stop.kh` - **Issue:** `shouldStop` remained `true` after `stopProcessing()`, blocking all subsequent commands - **Solution:** Auto-reset flag when starting fresh (empty queue, not processing) - Documented in `BUGS_FOUND.md` as Bug #11 - **Error Logging Improvements** - Replaced all `System.err.println` with `ScriptLogger` in: - EventManager (registerEventScript, fireEvent) - ChatMessageMixin - BlockBreakMixin - BlockPlaceMixin - AttackMixin - Consistent error reporting across event system #### Package System Foundation (2026-01-03) - **NEW: Export/Import System** 🎉 - First step towards full package system (see PACKAGE_SYSTEM_CONCEPT.md) - `export` command - share variables between scripts - `import` command - use variables from other scripts - ExportManager for cross-script variable sharing - Automatic cleanup on script stop - Fixed script name tracking for proper export/import resolution - **Usage Examples:** ```javascript // script1.kh export myVar 100 export playerName "Kasper" // script2.kh import myVar from script1 import playerName from script1 print $myVar // Outputs: 100 ``` - **Test Scripts:** - `test_export.kh` - demonstrates export functionality - `test_import.kh` - demonstrates import functionality - **VSCode Extension:** - Added `export` and `import` to command autocomplete - **NEW: Hover Provider** - hover over commands/variables to see documentation - Commands show full help text from mod - Variables show current values and types - Works offline with basic info, full docs when connected - **Event Validation** - Honest event status reporting - Split events into IMPLEMENTED vs WIP categories - Warning when registering WIP events - Updated documentation to reflect reality - ✅/⚠️ indicators in help text - **Mixin Implementation** - Critical events now work - **ChatMessageMixin** - onChat event captures chat messages - **BlockBreakMixin** - onBlockBreak event captures block breaking - **BlockPlaceMixin** - onBlockPlace event captures block placement - **AttackMixin** - onAttack event captures entity attacks - All mixins registered in kashub.mixins.json - **Event Variables** - Rich event data - onChat: `$event_message`, `$event_sender`, `$event_full_message` - onBlockBreak: `$event_x`, `$event_y`, `$event_z`, `$event_block` - onBlockPlace: `$event_x`, `$event_y`, `$event_z`, `$event_block`, `$event_side` - onAttack: `$event_target_name`, `$event_target_id`, `$event_target_type`, `$event_target_x/y/z` #### Implemented Events (9 total) - ✅ onTick - Every 20 ticks (1 second) - ✅ onDamage - Player takes damage - ✅ onHeal - Player heals - ✅ onHunger - Hunger level changes - ✅ onDeath - Player dies - ✅ onChat - Chat message received - ✅ onBlockBreak - Block broken - ✅ onBlockPlace - Block placed - ✅ onAttack - Entity attacked #### WIP Events (6 remaining) - ⚠️ onRespawn - Player respawns - ⚠️ onJump - Player jumps - ⚠️ onSneak - Sneak toggled - ⚠️ onSprint - Sprint toggled - ⚠️ onItemUse - Item used - ⚠️ onInventoryChange - Inventory changed ### 🔥 Sprint 2: Advanced Breakpoints (Phase 2.1) #### Conditional Breakpoints Core - **Enhanced Breakpoint Class** - Full-featured breakpoint system - Three types: BREAKPOINT (always stops), CONDITIONAL (stops if true), LOGPOINT (logs without stopping) - Hit count tracking for each breakpoint - Hit conditions: `>= 5`, `% 10 == 0`, `== 3` - Condition and log message support - **ConditionEvaluator** - Smart condition evaluation - Uses ExpressionParser for condition evaluation - Caches compiled conditions (max 100) for performance - Validates complexity (max 10 operators) to prevent lag - Supports all event variables (`$event_*`) - Variable lookup with fallback strategies - Log message interpolation with `{$var}` placeholders - **DebugManager Integration** - Conditional logic in shouldPause() - Evaluates conditions with current scope variables - Handles LOGPOINT without pausing - Handles CONDITIONAL with condition check - Increments hit count on each hit - Checks hit conditions before pausing #### New API Methods - `setConditionalBreakpoint(scriptName, line, condition)` - Set conditional breakpoint - `setLogpoint(scriptName, line, message)` - Set logpoint - `setHitCondition(scriptName, line, hitCondition)` - Set hit condition - `getBreakpoint(scriptName, line)` - Get breakpoint for inspection ### 🎯 Sprint 2: Advanced Breakpoints (Phase 2.3) #### Performance Profiler - **ProfilerManager** - Thread-safe performance tracking - CommandStats with atomic operations (total, count, min, max, avg) - Top N queries (hotspots, slowest, most called) - Multiple export formats (text, JSON, Chrome Tracing) - Integrated into ScriptTask execution - **API Endpoints** - Full profiler control - GET `/api/profiler/status` - Profiler status - POST `/api/profiler/start` - Start profiling - POST `/api/profiler/stop` - Stop profiling - POST `/api/profiler/clear` - Clear data - GET `/api/profiler/report` - Text report - GET `/api/profiler/json` - JSON export - GET `/api/profiler/chrome-tracing` - Chrome Tracing format - POST `/api/profiler/save` - Save to file - **Chrome Tracing Export** - Premium visualization - Open in `chrome://tracing` for visual analysis - Timeline view of command execution - Hotspot identification - Performance bottleneck detection ### 🔌 Sprint 3: VSCode Integration (Phase 3.1) #### Debug Adapter Protocol (DAP) API - **DTO Classes** - DAP-compatible data structures - `DebugStackFrame` - Stack frame representation - `DebugScope` - Scope representation (Local, Global, Event, Environment) - `DebugVariable` - Variable representation with type inference - **Debug API Endpoints** - Full debugging support - GET `/api/debug/scopes?scriptId=X&frameId=Y` - Get scopes for frame - GET `/api/debug/variables?variablesReference=X&scriptId=Y` - Get variables for scope - POST `/api/debug/evaluate` - Evaluate expression in context - GET `/api/debug/stacktrace?scriptId=X` - Get call stack - POST `/api/debug/setVariable` - Modify variable during debugging - **Scope System** - Organized variable access - **Local Scope** (ref: 1) - Task-specific variables - **Event Scope** (ref: 3) - Event variables (`$event_*`) - **Global Scope** (ref: 2) - Interpreter variables - **Environment Scope** (ref: 4) - Environment variables (`$PLAYER_*`) #### WebSocket Integration (Phase 3.2) - **Real-time Debug Events** - Already integrated - `debug_event` - Broadcasts PAUSED, RESUMED, STEP events - `debug_action` - Handles pause, resume, step_over, step_into - `set_breakpoints` - Sync breakpoints from VSCode - `get_variables` - Request variables - `set_variable` - Modify variables - `stackTrace` - Request call stack - `scopes` - Request scopes - **Bidirectional Communication** - VSCode → Server: Debug actions, breakpoint changes - Server → VSCode: Debug events, variable updates, state changes ### 📝 Notes - Test scripts included: `test_events.kh`, `test_conditional_breakpoints.kh`, `test_profiler.kh`, `test_events_after_stop.kh` - All critical events now functional - Conditional breakpoints work with event variables - Profiler records every command execution - DAP-compatible API for VSCode integration - WebSocket for real-time debugging - No breaking changes to existing scripts - **Bug #11 fixed** - Events work after stop/restart - Version format fixed: `v0.8.0-beta` → `0.8.0-beta` (removes Fabric Loader warning) ### 🏗️ Future Plans - **v0.8.1** - UI polish, code analysis, unit tests - **v0.9.0** - Architecture refactoring (remove ScriptInterpreter singleton) - **v1.0.0** - Stable release with complete GUI features - See `REFACTORING_PLAN.md` for detailed architecture migration plan - See `ROADMAP_FUTURE.md` for complete feature roadmap ### 🎯 Release Status - **Roadmap Completion:** 85% (excellent for beta) - **Critical Bugs:** 0 (all fixed) - **Code Quality:** 9/10 - **Build Status:** ✅ SUCCESSFUL - **Ready for Release:** ✅ YES ### 🆕 Sprint 4: Command Audit & New Commands #### New Commands - **MacroCommand** - Record and playback player actions - `macro record <name>` - Start recording macro - `macro stop` - Stop recording - `macro play <name> [speed]` - Play macro at custom speed - `macro save <name>` - Save to file - `macro list` - List saved macros - `macro delete <name>` - Delete macro - Captures movement, camera rotation, timing - Useful for automation, farming, building - **HealthMonitorCommand** - Monitor health and status effects - `healthMonitor monitor <threshold> [action]` - Start monitoring - `healthMonitor check` - Check current status - `healthMonitor effects` - List active effects - `healthMonitor stop` - Stop monitoring - Alerts on low HP and dangerous effects (poison, wither) - Actions: log, chat, sound - 5 second cooldown between alerts - **TimerCommand** - Timers and delayed execution - `timer set <name> <seconds> [message]` - Create timer - `timer check <name>` - Check remaining time - `timer cancel <name>` - Cancel timer - `timer list` - List active timers - `timer clear` - Clear all timers - Optional message on expiration - Useful for farming, crafting, cooldowns - **ReportBugCommand** - Bug reporting system - `reportBug <description>` - Send bug report to developers - Automatically collects last 500 lines of logs - Includes system info (OS, Java, MC version) - Sends to Discord webhook with file attachment - Rate limited (1 report per 5 minutes) - Webhook obfuscated (base64 + reverse) to prevent abuse - Fixed: Logs now sent as file attachment instead of embed field (Discord 1024 char limit) #### Command Improvements - **AICommand** - Fixed threading and timeout issues - Added fixed thread pool (2 threads) instead of unlimited - Added 30 second timeout for AI requests - Added rate limiting (6 second cooldown between requests) - Prevents thread exhaustion and API spam - **SpeedHackCommand** - Added server detection - Max 2.0x speed on multiplayer servers (anti-cheat safe) - Max 10.0x speed in singleplayer - Automatic detection and clamping - Updated documentation with warnings - **AnimationCommand** - Implemented list action - Added `list` action to show active animations - Added AnimationManager null check - Improved error handling - **ChatMessageMixin** - Fixed for Minecraft 1.21.1 - Removed `boolean overlay` parameter (API change in 1.21.1) - Fixed mixin crash on game startup - Chat events now work correctly #### Documentation in GitHub - **COMMAND_AUDIT_REPORT.md** - Complete audit of all 42 commands - Identified 4 potential issues (all fixed) - Rated all commands (A+ to C) - Provided fix recommendations - Overall code quality: 9/10 - **DEVELOPMENT_NOTES.md** - AI development guidelines - Language requirements (English for all user-facing text) - Common pitfalls (Registry API, Chat Mixin changes) - Code style and best practices
beta

kashub v0.7.0-beta

v0.7.0-beta
28 дек. 2025 г.35Minecraft: 1.21.1fabric
Скачать
Что нового
## [v0.7.0 beta] - 2025-12-21 ### 🔥 Major Features #### VSCode Integration & API Server - **HTTP API Server** for external tool integration (VSCode, custom tools) - Default port: 25566 (configurable) - REST endpoints for script management - CORS support for web-based tools - **WebSocket Server** for real-time communication - Default port: 25567 (configurable) - Live script output streaming - Task state change notifications - Error broadcasting - **VSCode Extension** (separate package: kashub-vscode) - Full KHScript syntax highlighting - IntelliSense with online/offline modes - Real-time validation powered by actual Kashub parser - Kashub Console panel for live output - Run scripts directly from VSCode (Ctrl+Shift+K) - Environment variables viewer - Task management ### ✨ API Endpoints | Endpoint | Method | Description | |----------|--------|-------------| | `/api/status` | GET | Mod status, player info, task stats | | `/api/validate` | POST | Validate KHScript code | | `/api/autocomplete` | POST | Get autocomplete suggestions | | `/api/run` | POST | Execute script code | | `/api/tasks` | GET | List all running tasks | | `/api/tasks/{id}/stop` | POST | Stop a specific task | | `/api/tasks/{id}/pause` | POST | Pause a specific task | | `/api/tasks/{id}/resume` | POST | Resume a paused task | | `/api/variables` | GET | Get all environment variables | ### ✨ WebSocket Events | Event | Description | |-------|-------------| | `script_output` | Script print/log output | | `script_error` | Script execution errors | | `task_state_change` | Task started/stopped/paused | | `variable_update` | Environment variable changed | ### ⚙️ New Configuration Options ```json { "apiEnabled": true, "apiPort": 25566, "apiWebSocketPort": 25567, "apiRequireAuth": false } ``` ### 🔧 Improvements - Print and Log commands now broadcast to WebSocket for VSCode console - Better error messages with line numbers - Improved command validation ### 📝 Notes - API server starts automatically when mod loads (if enabled) - VSCode extension available separately - Works with hot-reload from v0.6.0
beta

kashub v0.6.1-beta

v0.6.1-beta
19 дек. 2025 г.29Minecraft: 1.21.1fabric
Скачать
Что нового
## [v0.6.1] - 2025-12-19 ### ⚙️ IBug Fixes #### Task Manager Autorun GUI - **Fixed script selection** - Clicking on scripts in autorun lists now properly selects them - **Fixed arrow buttons** - Add/Remove buttons now work with selected scripts - **Added double-click support** - Double-click to quickly add/remove scripts from autorun - **Visual selection indicator** - Selected scripts are now highlighted with accent color #### Text Editor Crash Fix - **Fixed paste crash** - Fixed `StringIndexOutOfBoundsException` when pasting text with selection - **Bounds checking** - Added proper bounds validation in `deleteSelection()` and selection methods - **Safer text operations** - Selection indices are now clamped to valid line lengths ### 🔧 Improvements #### Code Cleanup - **Removed debug logging** - Eliminated all hardcoded FileWriter debug logs from ScriptTask and ScriptTaskManager - **Cleaner codebase** - Removed 20+ debug log blocks that were writing to absolute paths #### Documentation - **Horizontal scrolling in docs** - DocsDialog now supports Shift+MouseWheel for horizontal scrolling - **No more truncated text** - Command descriptions display in full without "..." truncation - **Updated KHScriptGuide.md** - Removed HTTP references, added Marketplace section - **Complete command documentation** - All commands now have detailed help with: - Full usage syntax and parameters - Multiple examples for each command - Variables set by commands - Notes and important details - Category classification #### Commands with Enhanced Documentation - **Movement**: moveTo, run, jump, sneak, sprint, swim, teleport, stop - **Combat**: attack (with target types, range, count) - **Interaction**: interact, placeBlock, breakBlock, useItem, eat, dropItem, equipArmor - **Inventory**: inventory, selectSlot, autoCraft, autoTrade - **Scanner**: scan, scanner (with caching and async support) - **Visual**: fullbright, animation - **Sound**: sound (with music/melody support) - **Input**: input (comprehensive player input control) - **AI**: ai (AI assistant integration) - **Events**: onEvent (event-driven scripting) - **Control Flow**: loop (with nested loop support) - **Output**: log, chat - **Script Management**: scripts (task management) - **Player**: setHealth, speed #### Security - **Removed HTTP commands** - Deleted HttpCommand, LoadScriptCommand, and HttpService for safer scripting - **Removed HTTP config options** - Cleaned up allowHttpRequests, httpWhitelistedDomains, allowRemoteScripts, remoteScriptSources from config - **Updated GUI** - Removed HTTP toggle from Settings panels ### ✨ Added #### Marketplace Skeleton (Preparation for future) - **MarketplaceService.java** - Service for future GitHub-based script repository - **VerifiedScript.java** - Model for verified scripts with ratings, downloads, signatures - **MarketplaceConfig.java** - Configuration for marketplace settings - Categories: automation, utility, farming, building, combat, navigation, misc ### 🗑️ Removed - `HttpCommand.java` - HTTP GET/POST commands for scripts - `HttpService.java` - Async HTTP service - `LoadScriptCommand.java` - Remote script loading - HTTP-related config options from KashubConfig - HTTP tick processing from KashubClient ### 📝 Notes - This is a patch release focusing on stability and cleanup - Marketplace is skeleton only - full implementation coming in future version
beta

kashub v0.6.0-beta

v0.6.0-beta
15 дек. 2025 г.36Minecraft: 1.21.1fabric
Скачать
Что нового
## [v0.6.0 beta] - 2025-12-15 ### 🔥 Major Features #### Hot-Reload System - **Automatic script reloading** when files are modified externally - Edit scripts in your favorite editor (VSCode, IntelliJ, Notepad++, etc.) and see changes instantly - Dual monitoring system: - Java NIO `WatchService` for real-time file system events - Periodic polling (configurable interval, default: 1000ms) for external editor compatibility - Configurable via Settings panel (`hotReload` option) - Automatic registration/unregistration with script lifecycle - Thread-safe reloading with error handling - **Use case**: Edit long-running scripts without stopping them! - **Note**: May have 1-2 second delay for external editors (this is normal) #### Autorun System - **Automatic script execution** on world load - Configure multiple scripts to start automatically when joining a world - Visual management interface in Task Manager (new "Autorun" tab) - Scripts execute sequentially with error handling - Failed scripts don't block other autorun scripts - Configurable via Settings panel (`autorunEnabled`, `autorunScripts`) - **Use case**: Always-on utility scripts (anti-AFK, auto-farm, monitoring, etc.) ### ✨ Added #### Task Manager UI Enhancements - **Tabbed Interface** - Task Manager now has tabs like Windows Task Manager - **Processes Tab** - View and manage running scripts (existing functionality) - **Autorun Tab** - NEW! Manage scripts that auto-start on game launch - **Autorun Management Panel** - Visual interface for autorun scripts - Left panel: Currently configured autorun scripts - Right panel: Available scripts that can be added - Add/Remove buttons (→/←) to move scripts between panels - Real-time status indicators (running/stopped) - Changes saved automatically to config #### Configuration - New settings in `config/kashub/config.json`: - `hotReload` - Enable/disable hot-reload (default: false) - `hotReloadCheckInterval` - Polling interval in milliseconds (default: 1000) - `autorunEnabled` - Enable/disable autorun (default: false) - `autorunScripts` - List of scripts to auto-start (default: []) - Settings accessible via in-game Settings panel - Auto-save on configuration changes ### 🐛 Fixed #### Script Execution - **If/Else If/Else Blocks** - Fixed detection of `else` blocks in conditional chains - `findIfElseChain` now correctly finds all blocks including `else` - Fixed parsing of `} else {` syntax on same line - Extended search range to include blocks outside initial if block - **While (true) Loops** - Fixed infinite loop execution - Loops now correctly re-queue after each iteration - Fixed `findBlockEnd` to properly handle `} else {` syntax - Commands after conditional blocks (like `wait 200`) now execute correctly - **Environment Variables** - Fixed timing of variable updates - Variables now update before condition evaluation - Health checks now use current values instead of stale data - Fixed incorrect health messages when player has full health #### Example Scripts - **Fixed multiple example scripts** to ensure 100% working examples - `example_animations.kh` - Fixed animation command syntax (`animation stopAll` → `animation stop`) - `example_deepslate_miner.kh` - Fixed loop syntax, input commands, and scan commands - `example_area_clearer.kh` - Fixed `lookAt` relative coordinates syntax and loop syntax - `example_scanner_advanced.kh` - Fixed for loop increment syntax (`i = i + 1` → `i++`) - All examples now use correct command syntax and proper quote formatting ### 🔄 Changed - Task Manager dialog now uses tabbed interface for better organization - Autorun configuration moved from Settings to Task Manager for easier access - Improved command queue management for better stability - Enhanced error handling - script errors no longer stop entire script execution - Better state cleanup on script stop/restart - Improved loop marker re-queuing logic for better performance ### 🔒 Security & Stability - Thread-safe hot-reload implementation - Debouncing for rapid file changes (prevents reload spam) - Protected against file lock issues on Windows - Safe handling of missing/deleted files during hot-reload - Autorun scripts validate before execution ### 🔄 Migration from v0.5.x **No breaking changes!** All existing scripts work as-is. **To enable new features:** 1. Open Settings → Enable "Hot-Reload" (optional) 2. Open Task Manager → Autorun tab → Add scripts with → button 3. Enable "Autorun" in Settings 4. Done! 🎉 **Recommended workflow:** - Use Kashub editor for quick tests and debugging - Use external editor (VSCode/IntelliJ) for serious development - Let hot-reload sync changes automatically ### ⚠️ Known Issues (v0.6.0 Beta) - **Hot-reload**: 1-2 second delay for external editors (by design, ensures file write completion) - **Windows**: Rare file lock delays on rapid saves (working on fix for v0.6.1) - **Large scripts** (>1000 lines): Slower reload time (optimization planned) **These will be addressed in v0.6.1!** ### 📚 Notes - **Hot-reload** may have 1-2 second delay for external editors (this is normal) - **Autorun** scripts execute once per world join - Both features disabled by default for backward compatibility - **v0.6.0 beta** - Please report any issues on GitHub!
beta

kashub v0.5.0-beta

v0.5.0-beta
14 дек. 2025 г.33Minecraft: 1.21.1fabric
Скачать
Что нового
# Initial Beta Release 🎉 First public release of Kashub! ## Features - Built-in VSCode-like code editor - 44+ commands for automation - Event system - Debug tools (breakpoints, step-through) - Task Manager (run multiple scripts) - 10+ professional themes - Syntax highlighting & autocomplete ## Known Issues - Not all commands fully stress-tested - Some edge cases may exist - Performance not fully optimized Please report bugs on [GitHub Issues](https://github.com/KasperStudios/Kashub/issues)! **Battle-tested on real multiplayer servers!** ✅