Tags
Creators
Details
All versions
2.1.1
Release
Kilacraft-AI 2.1.14 months ago 27
Compatibility
Minecraft: Java Edition
26.2
26.1.x
1.21.x
1.20.x
1.19.x
1.18.x
1.17.x
1.16.5
Platforms
Bukkit
Folia
Paper
Purpur
Spigot
Changes
v2.1.1 - Two-Phase Intent Recognition Architecture, Skill SPI Structured Response (needInfo Secondary Confirmation), Prompt System Restructuring, LLM Thinking Mode Governance
β¨ New Features
- Two-Phase Intent Recognition Architecture (Core of this release): Splits the original "single full skill list to LLM" into two phases, significantly reducing Token consumption
- Phase 1 (Coarse Selection): Sends only one line of
name + descriptionper skill; LLM determines which skill categories are needed; pure small talk returnsnulldirectly, skipping Phase 2 for normal AI conversation - Phase 2 (Precise Selection): Sends full details (actions + hints) only for skills selected in Phase 1, completing action selection and parameter extraction; validates
skill_nameagainst whitelist, invalid names rejected - Quantified benefits:
- Pre-refactor baseline (single-phase, per recognition): main rules ~26K + all skills full ~80K (incl. BukkitAPI 77 actions ~38K) β 106K chars
- Pure small talk: only Phase 1 (returns
null, no Phase 2) β 8K chars, β ~92% vs baseline - Normal skill (1 built-in skill hit, median full size ~3.1K): Phase 1 + Phase 2 β 38K chars, β ~65%
- Complex skill (hit incl. BukkitAPI 77 actions): Phase 1 + Phase 2 β 73K chars, β ~32%
- Token conversion (Chinese-mixed content ~0.6 token/char): baseline β 64K β three scenarios β 4.8K / 22.6K / 43.5K
- Response speed: two-phase adds one ultra-lightweight Phase 1 call, but each recognition no longer carries the full skill list; net latency depends on model and network
- Phase 1 (Coarse Selection): Sends only one line of
- Skill SPI Structured Response Architecture (new
needInfosecondary confirmation): Skill response semantics upgraded from "message-string prefixes" to typed status- New
SkillResult.needInfo(message)factory: the official contract for third-party Skills to implement "needs info / secondary confirmation" (missing-param prompts, large-transfer confirmation, etc.); the framework emits a[NEED_INFO]marker and intent recognition drives the confirmation flow SkillResultadds a typedSkillStatusenum (SUCCESS/FAILURE/NEED_INFO) +getStatus(); a new normalization layerSkillResultFormatteruniformly tags output to the LLM as[SUCCESS]/[FAILURE]/[NEED_INFO]β Skills write plain text, eliminating the inconsistency and double-tagging caused by hand-written prefixes- SPI Jar adds the
SkillStatusclass (6th class)
- New
- Intent Recognition Prompt System Restructuring (Chinese/English synced): Added "Three Inviolable Rules" top-priority rule (default to multi-step when uncertain); single-intent/multi-step decision refactored to three-condition check (required param provided by user + completable in one action + no dependency on other actions' return values); arithmetic placeholders unified for
amount/quantity/price/threshold; parameter missing enforced "query-then-act" (null required params prohibited); Phase 1 coarse-selection positioning strengthened (favor recall over precision) - LLM Thinking Mode Governance: Normal conversation path auto-disables thinking for models with thinking on by default (MiMo, DeepSeek V4+, GLM 4.5+, Kimi K2+, Qwen3, Grok 4, Doubao thinking, MiniMax-M3, etc.); admin reasoning path injects enable params per model family; adapted OpenAI o-series / Doubao thinking
max_completion_tokens. Resolves thinking tokens sharingmax_tokensbudget with output tokens causing empty output in MC scenarios (small quota) - Placeholder Arithmetic Evaluation Utility (ArithmeticUtil): Evaluation logic extracted to a public utility class; application scope expanded from multi-step task scalar params (amount/quantity/price) to CUSTOM task
threshold, supporting relative thresholds like "5 below current health" ({step_0.health}-5). Single binary operation only (+ - * /), pure regex, no injection risk - JSON Auto-Repair Utility (JsonSafeGetUtil): Three-phase repair (filter excess closing β complete missing closing β remove trailing commas), abandons on cross-nesting, unified replacement of multiple duplicate implementations
- Startup Version Update Detection: Async GitHub latest release check, colored console box notification on new version, silent on failure
π§ Improvements
- Diagnostic Model Fallback Mechanism: When
admin.ymlhas no reasoning model configured, auto-falls back tollm.ymlbase chat model (reuses url/key/model only, max_tokens/timeout still use diagnostic-specific values to avoid report truncation), lowering the barrier for health monitoring - Health Monitoring Unavailable Layered Diagnostics: Checks prerequisites one by one (model / guardian switch / Spark installed), gives precise hints; diagnostic report header adds a "Diagnostic Model" row marking the actual generation model
- DB History Load Count Tuning:
loadFromDBlimit changed frommaxHistoryΓ2tomaxHistory(default 20), reducing redundant loading - AFK Task String Condition Value Display Optimization:
EvaluationResultaddsactualValueStr; string conditions (e.g., block types) display real values instead of 0/1 placeholders - LLM Empty Response Friendly Hint: Returns "AI temporarily unavailable" to the player when streaming response is empty instead of an empty message (also logs SSE chunk count and recent raw data for troubleshooting)
- JSON Scenarios Disable
max_tokens: Intent recognition, profile analysis, etc. no longer setmax_tokens, preventing complex JSON truncation; GenericBukkitAPI description enhanced to improve Phase 1 classification accuracy - Concurrency & Thread Safety:
ConversationManagerhistory queue upgraded toConcurrentLinkedDeque+ auto trim (MAX_HISTORY_SIZE=100);AFKTaskManageratomic registration prevents overflow;ProfileManager.flushAllProfilessingle-connection batch update prevents cascade failure - Code Cleanup & Observability: LLMProvider interface simplified, ThinkingModelCapable upgraded to functional interface; SkillIntentRecognizer exception catching with full stack trace; GreetingPromptBuilder event summary merge eliminates ~140 lines of duplication; unified history access; cleaned up redundant i18n wrappers and translation dead keys
- Configuration Hot-Reload Hardening:
PersonalitiesConfigManagerswitched to snapshot replacement pattern,LLMConfigManagerfields fullyvolatile - Embedding Retrieval Optimization: chunk vector norm precomputed and cached, cosine similarity computation reduced by 2/3
reconcileOnlineProfilesSingle-Connection Batch: aligned withflushAllProfilespattern- Profile Analysis Prompt Temporal Optimization (Chinese/English synced): No longer extracts volatile transient data like balance, coordinates, and inventory counts; retains only long-term stable traits to avoid stale wrong info lingering in the profile; existing profiles are auto-cleaned on the next analysis
- Built-in Skills fully migrated to structured output: MarketActionSkill / CMISkill / MarketQuerySkill / CommandSkill stripped hand-written
[FAILURE]/[NEED_INFO]prefixes (~80 sites), uniformly tagged by the framework normalization layer;TaskExecutormulti-step internal skip status switched to a typed enum, removing the old Chinese-prefix sniffing (fixes a latent classification mismatch under English locale) - Secondary confirmation & prompt governance (Chinese/English synced): intent recognition prompts add a "confirmation-flow" rule (reads the concrete value from history when the player confirms a prior action);
llm.ymlsystem prompt uniformly documents marker semantics;messages_en.ymlstrips marker prefixes embedded in keys/values and fixes a duplicate key;Skill-SPI-Integration-Guide.md(zh+en) fully rewritten
π Bug Fixes
- Fixed
BM25Scorer.countOccurrencesinfinite loop on empty keyword causingmvn testto hang forever - Fixed
KnowledgeRetriever.splitByFixedSizeoff-by-one where content exactly at MAX_CHUNK_SIZE was split into an extra trailing chunk by the overlap rollback logic - Fixed
ConversationPersistenceService.mergeLoadedHistoryclearing itself whenloadedHistoryandplayerHistoryare the same object viaclear(), causing history loss (triggered when a player sends a message for the second time or later with valid in-memory history, via/aicommand or chat listener path) - Fixed thinking/reasoning models producing empty output in normal conversation (covered by thinking mode governance)
- Fixed profile analysis JSON parsing occasional failure (auto-repair then re-parse), CUSTOM task
condition_plannull NPE, shutdownflushAllProfilesconnection exception cascade failure,ConversationManagernon-thread-safeArrayDequeconcurrent data loss - Security & Stability Hardening: Fixed multiple stability and security boundary issues; added recent active player cache to strengthen data isolation
β οΈ Compatibility
Upgrading from v2.1.0
- Stop server, replace JAR, start
- MUST remove
intent_prompts.yml/intent_prompts_en.yml: the two-phase architecture + prompt system restructuring changed this file's structure significantly (newphase1section, full rewrite into 9 sections, new "Three Inviolable Rules", etc.). Old file contents override the code's built-in new defaults, so the two-phase architecture and this prompt refactor will not take effect β you must delete and restart to let the plugin regenerate it - Recommended (for full skill / model config optimization effects): the following config files are recommended to be deleted and regenerated (works without deletion, just missing some optimizations):
skills/afktask/AFKTaskSkill.yml/AFKTaskSkill_en.yml,skills/globalmarketplus/MarketActionSkill.yml/MarketActionSkill_en.yml,skills/bukkit/apis.yml/apis_en.ymlllm.yml(thinking mode governance notes + default model updates + skill-result marker semantics unified: added[SUCCESS]/[FAILURE]/[NEED_INFO]/[SKIPPED]four-marker fallback handling and multi-step failure semantics; old config overrides the new version) /admin.yml(diagnostic model fallback notes)config.yml(newsecurity.player_isolation.offline_cachesection, recent active player cache)database.yml(newh2.tcpsection, H2 TCP Server access control; profile analysis prompt temporal optimization, old config overrides the built-in new version, update or delete to regenerate)
- Except for the
intent_prompts.ymlin step 2, all other config entries have code-level default fallbacks β works without deleting them - Lower diagnostic feature barrier: when no
admin.ymlreasoning model is configured, health monitoring auto-falls back tollm.yml, usable without extra config (diagnostic quota still controlled byadmin.yml, no conflict with normal conversation) - Skill SPI fully backward compatible:
SkillResultchanges are purely additive (success/failure/public constructor signatures unchanged); already-compiled third-party Jars need no recompilation and no changes β at runtime the server's newSkillResultprovides and auto-fillsstatus(the SPI Jar is compile-time only, not packaged into third-party plugins). Old Skills need no changes; to use new capabilities likeneedInfo, recompile against the 2.1.1+ SPI Jar
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:ZR5R3rKA:MmrkdzqJ"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:ZR5R3rKA:MmrkdzqJ"
}

