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

Kilacraft-AI

The first plugin that gives every server an AI Agent that understands you better the more you use it

Автор: zm_mmm3314обновлён 8 авг. 2026 г.
ХранениеТехнологииУтилиты

Описание

Kilacraft-AI

The first plugin that gives every server an AI agent that understands you better the more you use it — powered by LLM intent recognition and skill execution framework

GitHub Tag MC Java License Discord


Version Compatibility

Minimum Requirements: Minecraft 1.16.5 + Java 17

Minecraft VersionJava RequirementSupported Servers
1.16.5Java 17+Paper / Purpur / Leaf / Folia
1.17 - 1.19Java 17+All
1.20 - 1.21+Java 21+All

One JAR compatible with all versions. Developed on Spigot 1.16.5 API, fully supports Folia regional thread scheduling.

Optional Dependencies

PluginVersionFeatures
CMI9.8.6.4+Teleport, homes, warps, enhanced player info, TPA
GlobalMarketPlus1.3.8.0+Market queries, balance, prices, listings
MythicMobs5.12.0+NPC placeholders (display AI responses)
VaultLatestMulti-currency support
SparkLatestServer performance sampling & analysis (Paper 1.21+ etc. have it built-in)

Features auto-disable when plugins are missing. Core chat remains unaffected.


Quick Start

1. Install

Download the latest Kilacraft-AI.jar, place it in your server's plugins/ directory, and start the server.

2. Configure API

Edit plugins/Kilacraft-AI/llm.yml with your LLM API credentials:

llm:
  api_url: "https://api.deepseek.com/v1/chat/completions"
  api_key: "your-api-key"
  model: "deepseek-chat"

Supports all OpenAI-compatible providers (DeepSeek, Zhipu AI, Moonshot, OpenAI, Groq, SiliconFlow, Gemini, OpenRouter, etc.). Just change api_url and model to switch.

3. Test

/kila hello

If you see an AI response, you're all set.

Reload config with /kilacraft reload, knowledge base with /kilacraft knowledge reload, personalities with /kilacraft personalities reload.


Core Features

AI Smart Chat

CHAT output

ACTION_BAR output

BOSS_BAR output

SIDEBAR output

Three Interaction Modes:

# Command mode
/kila How do I get diamonds?

# Continuous chat mode
/kilacraft chat
> I want to build a farm
> AI: Great idea! What crop do you want to plant?

# Keyword trigger (public chat)
@ai How do I craft this?

Command aliases: /kilacraft, /kila, /ai, /zm

Streaming Output & Carriers:

AI responses display character by character in real-time, eliminating wait. Supports 5 output carriers, configurable per scenario:

CarrierEffectBest For
SIDEBARRight sidebar, no FOV obstructionLong responses (recommended)
BOSS_BARTop barMedium-length text
ACTION_BARAbove hotbarShort notifications
CHATChat boxDefault
TITLEScreen centerShort highlights

AI Response Sound:

Plays a sound when AI starts responding, only the triggering player hears it. Configured in output.yml:

output:
  sound:
    enabled: true
    sound_name: "ENTITY_PLAYER_LEVELUP"
    volume: 0.5
    pitch: 1.2

Knowledge Base Enhancement

Let AI understand your server rules, gameplay, and FAQ. Just place Markdown or TXT files in plugins/Kilacraft-AI/knowledge/:

# server_rules.md

## How to claim land?
Use the /claim command to define your territory. Costs at least 10 coins.

Run /kilacraft knowledge reload to load. AI automatically retrieves and cites relevant content when players ask questions. Supports custom dictionaries for server-specific terminology to improve search accuracy.

Knowledge base file

Knowledge base configuration file

knowledge base retrieval


Advanced Features

Player Profile & Social Relations

Player Profile: AI automatically analyzes player conversation history and builds an eight-dimension behavioral profile for each player, dynamically injecting profile summaries as reference context in subsequent conversations. AI gets smarter about your players over time.

Player Profile

DimensionDescriptionExample
PlaystyleGameplay preferencesCombat-oriented, Explorer, Builder
PersonalityBehavioral patternsFriendly, Humorous, Direct
InterestsLiked areas and activitiesEconomy & trading, Redstone, Building
BoundariesDisliked content or behaviorsDon't use my name, Don't rush me
CommunicationPreferred AI response styleBrief & direct, No emojis
Spatial MemoryMentioned locations, base positionsMain base at desert (1200,64,-800)
Known FactsExplicitly stated facts by the playerSteve is a friend, Home near desert temple
Special ObservationsAI freeform observations"This player has recently shown interest in enchanting"

Automatically triggers analysis on player login/logout (triple gate mechanism to prevent wasting API calls). Configured in llm.yml:

agent:
  profile:
    enabled: true
    min_interval_minutes: 30    # Minimum analysis interval
    min_message_delta: 20       # Minimum new message count

Social Relations: Automatically tracks interactions between players (private messages, TPA, skill interactions), building a social relationship graph. Relationship strength uses diminishing incremental algorithm — inactive relationships naturally decay over time.

  • Friends' milestone events (boss kills, raid completions, pet deaths, etc.) appear in each other's login greetings
  • AI can sense "who's friends with whom" and naturally mention friend dynamics in conversations

Social Relationship System

Effect of social relationship system

Login Greeting

AI automatically sends personalized greetings when players log in. Based on player profiles, offline events, and friend dynamics, every greeting is unique.

First Login: Welcomes new players with an introduction to AI assistant features. Supports custom server info (configured via server_info in greeting.yml).

AI Greetings System Configuration File

AI greeting system effectiveness

Returning Login (Three-Category Data Aggregation):

CategoryData SourceExample
Own EventsEvents that happened while player was offlineItems sold, payments received
Friend DynamicsFriends' milestones during offline periodFriend killed the Ender Dragon
Session HighlightsImportant events since last greetingPet killed, totem triggered, Warden defeated

AI returns to greeting system effectiveness

Personality System & NPC Dialogue

Define different AI personality styles in personalities.yml, and with MythicMobs, NPCs can have independent personalities and dialogue capabilities:

common_prompt: "You are an NPC on a Minecraft server, talking to player {player}."

Fox: |
  You are a clever fox NPC who speaks playfully and cutely.
  Likes to end sentences with "~", often uses emojis.

NPC Dialogue Methods:

Method 1 (Callback Command, recommended):

fox_npc_skill:
  Skills:
  - cmd{c="kilacraft plugins Fox What are the server rules <caster.uuid> myplugin handle_ai {response} <caster.name>"} @self

Method 2 (MythicMobs Placeholder):

fox_npc_skill:
  Skills:
  - cmd{c="kilacraft plugins Fox What are the server rules <caster.uuid>"} @self
  - message{msg="<caster.ai.answer{type=Fox}>"} @trigger

Plugin commands are console-only. Each UUID_personality combination has independent history.

AFK Task System

Create background monitoring tasks via natural language. Automatically notifies or executes actions when conditions are met.

The first instance of the AFK task system

The first example demonstration of the AFK task system

Second instance of the AFK task system

Display of the second example of the AFK task system

Player: Watch for Steve to come online
AI: Got it! I'll notify you as soon as Steve logs in.

[30 minutes later...]
🔔 Steve has joined the server!
Player: Watch for Steve to come online, then check what he's holding
AI: Will do! I'll automatically check Steve's item when he logs in.

[After Steve joins...]
🔔 Steve is online! He's holding a Diamond Sword x1 in main hand.

Supports 20 monitoring types (19 event listeners + custom polling):

Monitor TypeDescription
Player Join/QuitMonitor specific player online status
Player Death/RespawnMonitor death events and respawns
Player Teleport/World ChangeMonitor position changes
Level ChangeMonitor player level ups/downs
Weather ChangeMonitor world weather
Sleep/Item BreakEnter/leave bed, item breakage
FishingNotify or trigger actions on catch
ChatTrigger automation via keywords
Block BreakTrigger actions when specific blocks mined
Entity DeathBoss kill detection
Entity SpawnMob farm efficiency monitoring
Entity ExplosionAnti-grief warning
Furnace SmeltNotify when smelting completes
Crop GrowthNotify when crops mature

Custom Condition Polling — Monitor any numeric condition returned by Skills:

Player: Tell me when my health drops below 10
Player: Remind me when my balance goes below 1000
Player: Check diamond price when I reach level 30

Management: /kilacraft afk to view, /kilacraft afk cancel to cancel. One task per player at a time.

Server Health Monitoring

Real-time server performance monitoring and AI-powered diagnostics based on Spark. A daemon thread runs 24/7 in the background with automatic anomaly detection and alerting.

Automatic Monitoring: The daemon thread polls TPS/MSPT/CPU metrics every 10 seconds. When thresholds are exceeded, it automatically launches Spark Profiler sampling, then calls the reasoning model to generate a diagnostic report upon completion.

Manual Profiling: Use for proactive troubleshooting:

/kilacraft profile start [30-120]    # Start profiling (seconds)
/kilacraft profile status            # View status
/kilacraft profile stop              # Abort and discard

Diagnostic Reports: Includes server status overview, plugin timing and hot method trigger paths (self time), AI diagnostic conclusions and optimization recommendations. Reports are saved in plugins/Kilacraft-AI/reports/ permanently.

AI Report

Alert Notifications: Supports in-game notifications + Discord Webhook / DingTalk bot external push (automatic mode only). Use /kilacraft notify test to test notification channels.

Discord Notice

Historical Queries: Query historical alerts and reports via natural language:

  • "What alerts have there been in the past day?"
  • "List recent diagnostic reports"
  • "I upgraded MythicMobs yesterday, check if performance has improved"

Full configuration guide in admin.yml. Requires Spark plugin + reasoning model API key. Paper 1.21+/Folia/Purpur/Leaf/Pufferfish have Spark built-in.

Player Behavior Analysis

Query your server's player ecosystem via natural language. Permission: kilacraft.admin.player.

  • Online Trends: "What's the player online trend this week?" — Login/logout time distribution
  • Activity Rankings: "Show the most active players leaderboard" — Login count, playtime, last login
  • New Player Influx: "How many new players joined this week?" — Count and time distribution
  • Profile Coverage: "How many players have AI profile analysis?" — Analyzed/pending count
  • Social Insights: "Show player social network analysis" — Total relations, average strength, isolated players
  • Specific Player Social Relations: "Check Steve's social relations" — Detailed social relations, strength, interaction frequency for a specific player

Audit Log Query

Query AI skill usage via natural language. Permission: kilacraft.admin.audit.

  • Execution Records: "Query what skills player Steve has used" — Skill name, parameters, results
  • Usage Statistics: "Show skill usage statistics leaderboard" — Usage count, success/failure, avg duration
  • Error Tracking: "Show failed skill execution records" — Failure records, error messages, time distribution

AI Skill System

AI interacts with the server through Skills, each corresponding to a category of operations. All Skills are read-only queries (except explicitly marked write operations), with fine-grained permission control.

Capabilities Overview

CategoryCapabilitiesDependencyPermission Node
Bukkit API72 built-in read-only interfaces: player inventory/status/info, world info, server info, environment awarenessNonekilacraft.api.*
Vanilla Stats80+ vanilla cumulative stat queries, knowledge base BM25 retrieval, auto unit conversionNonekilacraft.bukkit_stats
Global MarketSearch/list/collect/buy-order/delist/transfer/auction/bulk-sell/bulk-buy (9 operations)GlobalMarketPluskilacraft.market.*
CMI Integration5 queries (home/warp/player info/online/AFK) + 3 teleportsCMIkilacraft.cmi.*
AFK Tasks19 event listeners + custom polling, natural language creation, notification/callback dual modeNonekilacraft.afk
UtilityTimed delay, proactive notification, server-wide broadcastNone—
Command ExecutionExecute commands as player, inherits permission system (disabled by default)Nonekilacraft.command.execute
Sound & ParticlesAI-triggered sounds/particles, only caller perceives, YAML-driven configNonekilacraft.bukkit_fx
Server AdminHealth monitoring, player analysis, audit logs (see Advanced Features above)Spark (optional)kilacraft.admin.*

Wildcards kilacraft.api.* and kilacraft.cmi.* include all sub-permissions respectively.

Products listed on the global market

Global market balance transfer

Confirmation of Global Market Balance Transfer


Data & Security

Data Persistence

Supports both H2 embedded database (default, zero-config) and MySQL. Data persists across restarts. MySQL recommended for multi-server data sharing. Hot-switch with /kilacraft reload, auto-fallback on failure.

DataDescription
Conversation HistoryAll player-AI conversations, batch flushed every 30 seconds
Player ProfilesEight-dimension behavioral analysis results
Social RelationsInteraction strength and type between players
Server EventsMilestone events like deaths, achievements, trades
Skill AuditAll Skill execution logs
Profile SnapshotsProfile historical versions

Data retention days configurable in database.yml. Expired data is automatically cleaned up. Group server data isolation.

Security

  • Player Data Isolation: Built-in non-cooperative security filter scans all Skill parameter values — non-self, non-whitelisted player names are automatically replaced (sanitization)
  • Third-Party Skill Protection: Even if a third-party Skill attempts to operate on other players, the security filter automatically sanitizes inputs
  • Skill Global Registry: Usage statistics and security review status of all registered third-party Skills at Skill Global Registry. Reviewed Skills marked as Verified

Open SPI Interface

Third-party plugin developers can expose their features to AI via the Skill SPI interface:

  • API JAR only 5 KB (compileOnly dependency)
  • Implement SkillProvider interface to register custom Skills
  • Built-in error isolation — third-party Skill exceptions don't affect core functionality

See Skill SPI Integration Guide.


Commands & Permissions

Command List

CommandPermissionDescription
/kilacraft <message>NoneChat with AI
/kila /ai /zmNoneAliases
/kilacraft chatNoneToggle continuous chat mode
/kilacraft clearkilacraft.clear.selfClear own chat history
/kilacraft clear <player>kilacraft.clear.otherClear specified player's history
/kilacraft reloadkilacraft.reloadReload config
/kilacraft knowledge reloadkilacraft.knowledgeReload knowledge base
/kilacraft personalities reloadkilacraft.personalitiesReload personality config
/kilacraft afkkilacraft.afkView AFK tasks
/kilacraft afk cancelkilacraft.afkCancel AFK task
/kilacraft taskskilacraft.tasksView scheduled task status (default OP)
/kilacraft profile start [seconds]kilacraft.admin.healthStart manual profiling
/kilacraft profile statuskilacraft.admin.healthView profiling status
/kilacraft profile stopkilacraft.admin.healthAbort profiling and discard
/kilacraft notify testkilacraft.admin.healthTest external notification channels
/kilacraft plugins ...Console onlyThird-party plugin integration

Skill Permissions

Permission NodeDefaultDescription
kilacraft.api.player.inventorytrueQuery player inventory
kilacraft.api.player.statustrueQuery player status
kilacraft.api.player.infotrueQuery player info
kilacraft.api.world.infotrueQuery world info
kilacraft.api.server.infotrueQuery server info
kilacraft.cmi.querytrueCMI info queries
kilacraft.cmi.teleporttrueCMI teleportation
kilacraft.bukkit_fxtrueSound & particle effects
kilacraft.bukkit_statstrueVanilla stats queries
kilacraft.command.executeopCommand execution (OP only by default)
kilacraft.tasksopView scheduled task status (OP by default)
kilacraft.admin.healthopServer health monitoring
kilacraft.admin.playeropPlayer behavior analysis
kilacraft.admin.auditopAudit log query
kilacraft.admin.*opAll admin features

Wildcards kilacraft.api.* and kilacraft.cmi.* include all sub-permissions respectively.


FAQ

Q: Is the API expensive?

With DeepSeek as an example, a single conversation costs approximately ¥0.001-0.002. Setting cooldown time (default 5 seconds) effectively controls costs.

Q: Which LLMs are supported?

All OpenAI-compatible providers. Regular conversations do not support thinking/reasoning models (like deepseek-reasoner, o1), but the admin features' AI diagnostics support configuring a reasoning model (in admin.yml).

Q: Will it lag the server?

No. All API requests are async. Memory usage 8-50 MB, HTTP connection pool reuse, supports streaming to reduce latency.

Q: How to update?

Back up plugins/Kilacraft-AI/ to preserve configs, replace the JAR, restart the server.


Community & Resources

Source Code

GitHub

Community

Discord

Documentation

English Wiki Skill Registry

Contributing

Issues PR

MIT License — If you find this useful, a ⭐ Star would be appreciated!

Галерея

Kilacraft-AIKilacraft-AI Logo

Последние версии

Все версии →
release

Web scraping, Chat RecSys, Cache hit analysis (cost-saving)

2.2.0
8 авг. 2026 г.144Minecraft: 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2bukkit, folia, paper, purpur, spigot
Скачать
Что нового
## v2.2.0 - Web Search & Fetch, Chat Suggestions, Command Execution Skill, Player Custom Watches, Cross-Player Subscriptions, LLM Budget Governance & Cache Hit-Rate Analytics ### ✨ New Features - **Web Search (highlight of this release)**: The in-game AI can now look up real-time information on the internet — version updates, mod recommendations, today's gold price / exchange rates, sports scores, wiki entries — no longer limited by training-data cutoff. **9 search-engine providers** built in (China: Zhipu/Baidu Qianfan/Doubao/Qiniu/Alibaba IQS; international: Tavily/Brave/Exa/You.com), auto-selected by server language, most with free tiers. Server owners fill in one API Key in `web.yml` to start; `provider: auto` routes by language. Supports time-range filtering and automatic multi-step search (complex questions split into up to 5 sub-searches). Requires `kilacraft.websearch` permission (default: all players, but needs an API Key to function) - **Chat Suggestions (highlight of this release)**: After the AI replies, 1–5 clickable "you may also want to ask" follow-ups are appended below the chat — click to send, no typing, like the "suggested questions" in chat apps. Generated from multi-turn history + available skill summaries with a strict "quality over quantity" rule, **doubling as a way to discover what else the AI can do** (web search, watches, command execution can all appear). **Triggers only in command mode, never in continuous-chat mode**, preserving the natural feel. Players can `/kila suggestion off` (default on, no permission needed); the list wraps intelligently to actual chat-box width - **Command Execution Skill (CommandSkill, highlight of this release)**: Players can ask the AI in natural language to execute server commands — "teleport to spawn", "claim daily reward", "clear my chat history" — translated into the actual command **run as that player** (gated by server permissions, so the AI never exceeds the player's own). Three major upgrades this version: - **On by default for all players**: previously required `command_skill.enabled: true` in `config.yml` and was OP-only; the toggle is removed and unified under the `kilacraft.command.execute` permission node (default: all players). Disable by revoking via your permission plugin (e.g. LuckPerms) - **Command knowledge-base document**: a new `commands/commands.md` (zh + en) serves as the AI's command-recognition knowledge base, shipping with all of Kilacraft-AI's own commands (description/examples/permissions/keywords); server owners can **append third-party plugin commands** (e.g. Essentials `home`/`tpa`) using the template. `/kila reload` refreshes, `/kila doctor` checks health - **Permission-aware dynamic filtering**: the command list the AI sees is filtered by the current player's permissions — commands the player can't use never appear, so the AI only suggests/executes what the player actually can - **Player Custom Watches (WatchSkill)**: Set an "auto-watch" with a single natural-language sentence; when the condition is met or the event fires, the AI proactively notifies you. Replaces the removed AFK-task system with stronger, safer capabilities: - **Condition watch**: watch a number/state — "watch my iron ingots until 64", "remind me when health drops below 30%". Supports read-only queries of built-in skills (Bukkit stats, CMI, market, vanilla API), auto-detecting value type at runtime - **Event watch**: watch 11 high-value game events — furnace smelt complete, crop mature, boss kill, nearby entity spawn, player death, teleport, XP level-up, world change, block break, fishing, chat keyword - On trigger it **only notifies the AI, never auto-executes** (safer than old AFK tasks); brief disconnect (within 5 min) and reconnect auto-restores watches - **Watchable scope**: the AI only creates watches from the built-in watchable list; items outside it (e.g. internet-only gold price/rates) are declined upfront, and AI mis-picks are rejected at the system boundary, leaving no invalid watch - Requires `kilacraft.watch` permission (default: all players). Per-player cap: 3 condition / 5 event / 200 server-wide - **Cross-Player Online/Offline Subscription (PlayerWatchSkill)**: Subscribe to friends' login/logout notifications in natural language — "tell me when Steve logs in", "notify me on both for Alex". Replaces the same-named capability in the old AFK-task system and is **stronger**: supports multiple targets at once (old system tracked one), has anti-reordering (a logout cancels an un-sent login notification), and delays login notifications by 2 seconds so the player is fully loaded. Subscriptions are in-memory only, auto-clearing when the subscriber goes offline. Requires `kilacraft.player_watch` permission (default: all players), per-player cap 5 - **Web Fetch**: Hand the AI a specific URL and it fetches the page body, reads it, and answers questions about that page — "what does this tutorial page say", "what's the crafting recipe on this mod's wiki". Complementary to Web Search: search gives keywords → page list; fetch gives a URL → reads the body. **Zero-config, no API Key**, with enterprise-grade security built in (see "Security Hardening" below). Requires `kilacraft.webfetch` permission (default: all players) - **LLM Budget Governance**: A safety net across all LLM entry points. Tracks per-player hourly calls; exceeding the threshold (default 200/hour/player, configurable in `llm.yml`) triggers a 1-hour circuit break. **Binary breaking** — player-initiated requests never trip; passive calls (greeting/suggestion/reminder/plugin callbacks) are rejected over budget. Normal use never notices it (200/hour is unreachable); it only kicks in under abnormal conditions — **prioritizing player experience and the server owner's wallet**. Set to 0 or negative to disable - **LLM Cache Hit-Rate Statistics (`/kila cache`)**: A new command to view LLM prompt-cache hit rate in real time, broken down across 10 AI call types (two-phase intent recognition, secondary analysis, chat, greeting, profile, suggestion, tool notification, diagnostics), each showing request count and hit rate. Auto-compatible with DeepSeek/OpenAI/Anthropic cache fields, no config needed. In-game bar chart + console aligned table. Data is memory-only, resets on restart; `/kila cache reset` for manual reset. Requires `kilacraft.admin.cache` permission (default: operators only) ### 🔧 Improvements - **AI truthfully reports its capability limits (highlight of this release)**: when a player requests an operation beyond the AI's capabilities (e.g. teleporting to arbitrary coordinates, which is unsupported), the AI now truthfully states that the operation cannot be completed, while still delivering what it can do (e.g. looking up and reporting the location coordinates) — no more false successes like replying "teleported" when it only fetched the coordinates. No configuration required; takes effect automatically - **Knowledge base organization & reliability (key highlight)**: ① the `knowledge/` directory supports arbitrary subfolder organization — mixed Chinese/English files, nothing lost when switching languages; ② the AI no longer "stitches together" answers from irrelevant chunks — when there is no relevant content it answers normally and never fabricates details (no more invented "server restarts at 4 AM"), and servers without knowledge files are completely unaffected; ③ paraphrased or tangentially related questions are more likely to be matched - **Intent-recognition failure anti-hallucination (highlight of this release)**: when the skill path is attempted but fails (invalid skill name, JSON parse failure, model-call error, etc.), the system now injects a `[FAILURE]` marker when falling back to normal conversation, guiding the AI to honestly say "the skill system could not handle this request" instead of fabricating a plausible-sounding reply from its own knowledge. Pure chit-chat, real-world topics, and other inherently non-skill requests are unaffected and silently fall back to normal conversation - **system prompts made fully static (highlight of this release)**: the system prompt for **all** LLM calls (normal chat, greeting, secondary analysis, etc.) no longer contains any per-player placeholder (including `{player}`); it is now a byte-identical static text shared across all players, with player names, profile, offline events, time and other dynamic data **all moved into the user message**. Providers match prefix cache "from byte 0 onward as a continuous same-prefix"; the `{player}` that used to sit in system broke the prefix right there — staticizing it noticeably raises cache hit rate in multi-player scenarios. A leftover `{player}` in an old config is no longer replaced (stays as a literal, only lowering hit rate, not breaking functionality); if greeting config still has deprecated placeholders, a warning is logged on startup prompting migration - **Comprehensive cache-hit-rate & prompt governance optimization**: a set of coordinated changes around "making the cacheable prefix more stable" — ① per-player dynamic content scattered across AI entry points (command lists, metadata, profile, etc.) extracted into a dedicated injection slot; ② conversation history switched from text-block concatenation to the standard `messages` array, matching native multi-turn formats and clarifying the cache boundary; ③ pending-resume classification system prompt staticized (per-request pending-operation description moved into the user message); ④ the old `analysis_prompt_suffix` merged into `system_prompt`, carried by a single system prompt to reduce config keys and avoid suffix-concatenation hit-rate perturbation; ⑤ all built-in Skill prompts restructured into a three-part format (summary + triggers + boundaries), intent prompts add relative-adjustment rule & parameter-missing handling, secondary-analysis adds result-relevance filtering & wording-fidelity principle, suggestion restructured into a 3-layer framework - **Major config consolidation**: the existing `greeting.yml` plus new suggestion, watch, and utility-notification configs are integrated into a single `behavior.yml` (four sections: greeting / suggestion / watch / utility.prompts), single-file bilingual; `/kila reload` works seamlessly — fewer config files - **Greeting system rebuilt**: login greetings now draw on highlight events from the offline period (kills, boss kills, etc.) and bring them up in a casual, recalling tone instead of reporting raw statistics like playtime or distance traveled; greetings are no longer written into conversation history to avoid affecting subsequent chats; the prompt adds a fact-boundary rule — it states only actual events and never fabricates deeds or puts words in others' mouths based on the profile, stopping hallucinations like "you built an auto-farm" - **Bukkit query skill split**: the single generic Bukkit query skill (`apis.yml`) has been split into 5 independent skills (player info / status / inventory / world / server); all **71 read-only queries remain identical**. Each skill's prompt adds reverse-boundary and disambiguation hints (e.g. "location" = feet coords vs "eye location" = eye coords), so the AI routes queries more accurately - **Server health-monitor alert thresholds optimized**: debounce optimizations to reduce false positives — MSPT moved to "max + median dual gate", CPU to "confirm after 3 consecutive breaches"; thresholds relaxed (MSPT p95 50→100ms, CPU 80%→90%, cooldown 5→30 minutes); new `mspt_median_threshold` and `cpu_consecutive_threshold` config keys added - **Automatic LLM model-name and URL compatibility**: auto-maps legacy DeepSeek model names (`deepseek-chat`→`deepseek-v4-flash`, etc., **in-memory only — config file never touched**), so old configs keep working after upgrade; also auto-completes incomplete API URLs (e.g. entering `/v1` auto-appends `/chat/completions`). Zero-config, transparent to non-DeepSeek setups - **Conversation history management hardened**: three improvements to `settings.max_history` in `config.yml` — ① values clamped to 0-100 (prevents an accidentally huge value from OOM); ② in-memory capacity now tracks the config (previously hardcoded 100); ③ `max_history: 0` fully disables history (no save, no load, reconnect loads nothing). `/kila reload` takes effect immediately - **`/kila doctor` self-check enhanced**: in-game output now uses grouped fold-down summaries (each group shows "X pass, Y warn, Z fail", only failures expanded), dramatically reducing chat spam when healthy; console adds web-search provider status and other metrics; new command-document health check and `health_guardian` check added - **Current time injected into AI context**: the AI can now sense the precise current time (with timezone, to the minute), handling "what time is it" / "search today's news" more accurately; minute-level precision also preserves cache hit rate - **Default context-round counts tuned**: intent-recognition history `intent_history_count` default 5→7, secondary-analysis history `analysis_history_count` default 2→3 — longer history helps the AI resolve pronoun references (e.g. "check that item again") and makes suggestions less likely to repeat - **`/kila reload` enhanced**: now reloads watch/web/suggestion/greeting/utility-notification/command-document configs; budget threshold refreshes immediately - **SkillEntityHelper parameter extraction tool added to SPI**: a new `SkillEntityHelper` static utility (`getString`/`getInt`/`getDouble`/`getBoolean`, etc., zero-exception, returns defaults on failure) eliminates boilerplate `try { parse } catch` blocks. Included in the SPI assembly package for third-party skill developers - **Database table-prefix validation**: `mysql.table_prefix` now validates characters (letters/digits/underscores only); invalid values fall back to the default `kca_` with an error — since the prefix is concatenated directly into SQL, the check prevents misconfiguration or malicious injection - **API request debug logs now tagged with scenario**: when debug mode is on, the start/end of each LLM request log labels the call's scenario (e.g. "Intent Recognition Phase 2", "Secondary Analysis", "Greeting"), making it easier to distinguish log ownership when multiple entry points run concurrently - **Documentation archiving**: the AFK task system's user guide and detailed docs have been archived to `doc/归档/` following the system's removal; the intent recognition prompt configuration guide was updated - **Profile-analysis trigger threshold tuning**: `min_messages_to_trigger` default 10→20, reducing unnecessary LLM analyses triggered by low-quality message spam; `analysis_timeout_seconds` code default aligned with the config at 120 seconds - **Two existing skills renamed**: the sound/particle skill (formerly `bukkit_fx`) and the vanilla statistics skill (formerly `bukkit_stats`) were renamed to `sound_fx`/`player_stats` — shorter, clearer identifiers that improve AI accuracy when recognizing skill names (long mixed-language identifiers were a hotbed of AI spelling errors). The corresponding permission nodes followed the rename (`kilacraft.sound_fx`/`kilacraft.player_stats`, default-available to everyone, usually no action needed) ### 🐛 Bug Fixes - **Security hardening (WebFetch SSRF protection)**: three layers of protection so server owners can enable it with confidence: ① **internal-address blocking**: access to the server's own/LAN addresses (`127.x`/`10.x`/`192.168.x`/`172.16-31.x`) forbidden by default; ② **DNS rebinding protection**: IP validation welded into the DNS resolution step, guaranteeing "the IP that's checked is the IP that's connected", eliminating the check-then-connect window; ③ **forced HTTPS + per-hop re-check**: when protection is on, `http://` is upgraded to `https://`, redirects handled hop-by-hop (max 3) with protocol and IP re-validated each hop. Response bodies read with a hard byte cap (prevents oversized pages from OOM); upstream errors redacted (raw errors go to logs only) - **Entity name localization & typo fixes**: Minecraft entity names (Creeper, Zombie, Skeleton, Wither, etc. — 26 total) are now localized — English servers show Creeper/Zombie/Skeleton, Chinese servers show official translations. Fixed historical typos: the Chinese name of "wither" is unified to the official "凋灵" (previously "凋零" — 凋零 is a status effect, 凋灵 is the boss), along with "蠹虫" (previously "蠢虫") and others - **Fixed YAML syntax error in English i18n config**: some translations in `messages_en.yml` contained nested double quotes that broke YAML parsing — English servers may have failed to load greeting/alert text; corrected - **Skill parameter description corrections**: the former `apis.yml` removed the non-existent `yaw`/`pitch` fields from `get_player_location`, and `get_player_open_inventory`'s `inventory_type` was corrected to the actual `raw_result` — previously the wrong field names could cause intent recognition failures - **Stateless hardening of the vanilla-API executor**: the executor's internal mutable "current calling player" field replaced with parameter-only pass-through, making it a stateless component (the current chain is serial with no actual concurrency — purely a defensive measure) - **Fixed bStats skill registry hijacking by renamed forks**: when multiple servers reported the same skill name, a renamed unofficial fork reporting first would override the official skill's identity; now the official source always wins, unofficial entries only contribute to the server count - **Fixed a regression that broke the secondary-analysis history-count config**: `agent.analysis_history_count` in `llm.yml` was accidentally broken by a previous version — the secondary-analysis call passed the full history queue, bypassing the configured round limit; it now truncates to the configured rounds again, avoiding token waste - **Fixed profile-analysis trigger count including AI replies**: the trigger gate `countMessagesSince` previously filtered only by `source` without distinguishing roles, so one player message + one AI reply (2 records) counted as 2, making the threshold effectively "turns × 2" and inflated; now corrected to count only `role='user'` player messages, matching the "player-initiated messages" semantics - **Fixed how-to questions being mistaken for execution requests**: when a player asks "how do I do X", the AI previously might treat it as an execution request and actually perform the action; asking-vs-executing is now strictly distinguished — a question only gets an explanation, while an explicit execution intent triggers the action - **Fixed missing-parameter operations answering incorrectly**: when an operation lacks required information (e.g. an unspecified teleport target), the AI previously might answer irrelevantly or refuse outright; it now automatically queries for the missing information first, then executes — multi-step operations chain automatically ### ⚠️ Compatibility #### 📋 Configuration File Changes The plugin only generates configuration files if they don't already exist — existing files are never overwritten. To get the full configuration optimizations of this version, **it is recommended to delete all of the following files and restart to regenerate**. The following new config files are auto-generated on first start: `behavior.yml` (replaces the former `greeting.yml` and integrates config for suggestions, watches, and utility notifications), `web.yml`, the `commands/` command knowledge-base document, and new skill config files under `skills/`. The following **existing** configuration files have changed in this version: | File | Description of changes | Action | |------|----------------------|--------| | `behavior.yml` | New file replacing `greeting.yml`, integrating four sections (greeting/suggestion/watch/utility.prompts); greeting prompt rewritten, most dynamic placeholders deprecated after system staticization | ❌ Must delete `greeting.yml` then regenerate | | `intent_prompts.yml` / `_en.yml` | Prompt refactor: added rule 10/scenario 7; afk_task callbacks replaced by watch routing; removed history source-tag rule; pending-resume classification staticized | ❌ Must delete (otherwise routes to the deleted afk_task system) | | `skills/` (including removed `skills/afktask/`, `skills/guardian/`) | All Skill prompts restructured into three-part format; generic Bukkit query split into 5 independent skill configs, old `apis.yml` removed; afktask/guardian configs removed with their systems | ❌ Delete the entire `skills/` folder and regenerate | | `language.yml` / `_en.yml` | Added `/kila cache` text; `/kila doctor` now grouped fold-down format; added `kilacraft.admin.cache` permission | 📋 Recommended (otherwise missing text/placeholders or old format) | | `admin.yml` | Health-monitor threshold tweaks: added `mspt_median_threshold`/`cpu_consecutive_threshold`; several thresholds relaxed to reduce false positives | 📋 Recommended (otherwise keeps easily-triggering old thresholds) | | `config.yml` | Removed `afk_task`/`command_skill` sections; `allowed_actions` drops `AFKTask`, adds `player_watch`; `max_history` limited to 0-100 | 📋 Recommended (stale sections linger with no functional impact; if you customized `allowed_actions`, manually add `player_watch`) | | `llm.yml` | Added `budget_per_player_per_hour`; removed `analysis_prompt_suffix` (merged into `system_prompt`); `intent/analysis_history_count` defaults raised; system drops `{player}` | ✅ Optional (leftover suffix section ignored; `{player}` in system lowers hit rate) | | `output.yml` | `afk_callback` scenario merged into `skill_result` | ✅ Optional (no functional impact) | | `greeting.yml` / `_en.yml` | Consolidated into `behavior.yml` | 🗑️ Delete | > Except for ❌ entries, keeping any of the above files will not break functionality — new config keys all have built-in Java-level defaults. However, to get the complete configuration optimizations of this version, **deleting all of the above files and restarting to regenerate is still recommended**. #### Upgrading from v2.1.3 1. Stop server, replace JAR, start; no database migration needed 2. **Removed the AFK task system (breaking change)**: the legacy AFK-task system (`/kila afk query/cancel`, the `afk_task` config section, the `kilacraft.afk` permission) has been removed entirely. Its capabilities are **replaced by two new systems**: - **Player Custom Watches (WatchSkill)**: players set condition/event watches in natural language (watch item counts, watch boss spawns, etc.) — more capable than the old AFK tasks - **Cross-Player Online/Offline Subscription (PlayerWatchSkill)**: subscribe to friends' logins/logouts (replaces the same-named capability in the old system, now supports multiple targets) - If any players relied on the old `/kila afk` command, guide them to the watch capabilities or just tell the AI "watch xxx for me" 3. **Command Execution Skill now on by default (behavior change)**: the Command Execution Skill (which lets the AI execute server commands as the player) is now enabled for all players by default. Previously it required `command_skill.enabled: true` in `config.yml` and was OP-only; this toggle has been removed and control unified under the `kilacraft.command.execute` permission node (default: all players). **If you don't want players to use this capability, revoke the permission via your permission plugin (e.g. LuckPerms).** Server owners are encouraged to edit `commands/commands.md` to append their server's third-party plugin commands so the AI recognizes more commands 4. **Config file changes**: the existing `greeting.yml` has been integrated into the new `behavior.yml` (four sections: greeting / suggestion / watch / utility.prompts), using the single-file bilingual pattern. When upgrading, **delete `greeting.yml` and `greeting_en.yml`**, let the plugin regenerate `behavior.yml`, then migrate your custom greeting values into the `greeting:` section of `behavior.yml` (key paths remain the same, only the file differs; note the old placeholders `{last_location}`/`{summary_section}` have been replaced by `{last_session_highlights}`). The other three sections (suggestion / watch / utility.prompts) are config for new features in this version and are auto-generated with defaults on first start 5. **New permission nodes**: - `kilacraft.watch` (player custom watches) - `kilacraft.player_watch` (cross-player online/offline subscription) - `kilacraft.websearch` (web search — needs server owner to configure an API Key) - `kilacraft.webfetch` (web fetch — zero-config) - `kilacraft.command.execute` (command execution skill — **default: all players**; revoke via permission plugin to disable) - `kilacraft.admin.cache` (view LLM cache hit-rate statistics, default: operators only) 6. **Removed permission node**: `kilacraft.afk` (AFK tasks, replaced by new systems) 7. This is a major feature release: **internet capability + player custom watches + chat suggestions + command execution skill + cache hit-rate analytics**, among other additions. Server owners are encouraged to read this changelog to learn the new possibilities
release

Kilacraft-AI 2.1.3

2.1.3
11 июл. 2026 г.46Minecraft: 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2bukkit, folia, paper, purpur, spigot
Скачать
Что нового
## v2.1.3 - Player Real-Time State Awareness, Greeting System Update Reminders, Version Info Query Skill, Knowledge-Base Retrieval Quality Boost, AI Request Resource Optimization & Security/Stability Hardening ### ✨ New Features - **Built-in CLAUDE.md Reference**: Starting with v2.1.3, the repository root includes a `CLAUDE.md` file for developers using AI coding tools for secondary development. Designed for Claude Code by default (auto-loaded every session), it covers the project architecture, i18n conventions, code conventions, key design constraints, and modification triggers. For other AI code tools (Cline, Cursor, Copilot Chat, etc.), copy the content into that tool's global rules or context file configuration equivalent - **AI Real-Time Player State Awareness**: The AI can now automatically sense the player's current state — coordinates, health and hunger, held items and worn armor, current world, weather, and time of day — without the player having to explain repeatedly or trigger extra skill queries. For state-dependent requests like "take me back", "can this mine diamonds?", or "is there a desert nearby?", the AI responds with context-aware answers and advice. Enabled by default for all players — fully automatic, zero-config, and stores no data - **AI Login Greeting Proactively Notifies of New Versions**: Long-running servers that are never restarted can still learn about plugin updates in time. When an admin with the `kilacraft.admin.info` permission logs in, the AI proactively mentions in the greeting whether a new version is available, stating the exact version number and download URL. Each version is announced to each admin only once — no repeated nagging. Network-check failures are handled silently without disrupting the normal greeting - **Version Info Query Skill**: Admins can now ask the AI about plugin version info in natural language — "is there a new version", "what did the latest version update", "what is the download URL", "what features does v2.1.0 have". The AI fetches version info from Gitee/GitHub in real time and answers with the version number, release date, download URL, and full changelog. Requires the `kilacraft.admin.info` permission (default OP) ### 🔧 Improvements - **More Accurate Knowledge-Base Retrieval (highlight of this release)**: The BM25 algorithm now includes the IDF (Inverse Document Frequency) weight — rare, specialized keywords that appear in only a few docs rank higher, while ubiquitous generic words like "player" and "command" no longer dilute results. Recall accuracy of the default BM25 mode (used by the vast majority of servers) improves overall - **More Reliable Knowledge-Base Hot Reload**: After switching the server language or toggling Embedding semantic retrieval, `/kila reload` now automatically rebuilds the knowledge-base chunks, statistics, and vector cache — preventing cache/content mismatches that cause retrieval anomalies or slow responses - **AI Request Resource Optimization**: AI requests still in progress are automatically cancelled when a player goes offline, no longer continuing to drain API quota and server threads - **Embedding Cache Concurrency**: Concurrent queries from multiple players no longer serialize and wait on each other (more noticeable on large servers with Embedding enabled) - **More Precise AI Error Hints**: On a 404 error, the hint now distinguishes "model name may be incorrect" from "API URL may be incorrect", so server owners don't troubleshoot in the wrong direction - **Faster Security Cache Cleanup on Huge Servers**: Cleanup of the recent-active-player cache no longer slows down noticeably as the player count grows - **More Traceable AFK Task Callbacks**: When a callback can't be delivered because the player is offline, a console log is now recorded to help diagnose "the task didn't seem to fire" - **Auditable Command-Type Skill Operations**: Command-type skills executed as OP (e.g. `/tpa <target>`) keep their cross-player capability while now also logging an audit trail - **More Reliable Server Anomaly Alert Notifications**: Server performance anomaly alerts are now delivered to every authorized admin via the login greeting, instead of only the first one who comes online. Each alert is announced to each admin only once — no repeated nagging ### 🐛 Bug Fixes - Corrected the comment direction for the retrieval relative threshold (`relative_threshold`) in `knowledge.yml` — the old comment wrongly labeled "raise = stricter" as "raise = more lenient", which could lead server owners to tune in the wrong direction; default value unchanged - Hardened a defensive path that could cause a no-response hang when the secondary analysis hit an extreme exception before calling the AI - Fixed hot-reloading the output config occasionally causing individual replies to briefly land on the wrong display channel - Hardened the concurrency safety of AFK-task creation ### ⚠️ Compatibility #### Upgrading from v2.1.2 1. Stop server, replace JAR, start; no database migration needed 2. **Removed the deprecated console AI-chat entry**: Chatting with the AI directly from the console via `/kila <message>` (an early debugging feature that became unusable as Agent capabilities grew — the console can't use most skills) has been fully removed. The console still keeps `/kila plugins` (third-party plugin integration), `/kila doctor`, `/kila reload`, `/kila knowledge reload`, and other management commands; **the player side is completely unaffected** 3. This is a quality release: **no new config entries, no permission changes, no database changes** — fully backward compatible 4. If you customized the `knowledge.yml` comments, you may regenerate it to get the corrected threshold notes (comment-only correction, no new config entries)
release

Kilacraft-AI 2.1.2

2.1.2
26 июн. 2026 г.61Minecraft: 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2bukkit, folia, paper, purpur, spigot
Скачать
Что нового
## v2.1.2 - New In-Game Query & Diagnostic Commands (usage / history / memory / skills / run / doctor / about), Knowledge-Base Retrieval Refactor & AI Error Handling ### ✨ New Features - **Corpus Seeding Dictionary**: On startup, automatically scans the knowledge base for command names (e.g. `/back` → `back`) and compound identifiers (e.g. `mob-farm`, `ender-dragon`) and adds them to the HanLP tokenizer dictionary. No manual dictionary maintenance — the knowledge base content server owners write is itself the best tokenization reference - **Knowledge Base Writing Guide**: The official Wiki provides ready-to-use knowledge-base writing templates (Chinese & English) — 7 writing rules + a complete usable sample; filling in per the template yields the best recall - **BM25 Document Length Auto-Statistics**: On startup, automatically computes the actual average length of knowledge-base chunks so BM25 scores long and short docs more fairly. Advanced users may set a fixed `avg_doc_length` (default 0 = auto) - **In-Game Query & Diagnostic Commands**: A set of commands for server owners and players to track AI usage and troubleshoot - `/kila usage [player|all] [range]`: AI usage stats (conversation turns, skill-call count & success rate, top skills, active players); supports self / specific player / server-wide views - `/kila history [player] [page]`: paginated conversation history - `/kila memory [player]`: view a player's profile (login stats + AI-analyzed 8-dimension profile) - `/kila skills [page]`: list currently available skills - **Force-Execute a Skill**: `/kila run <skill> <prompt>` skips intent recognition and directly executes the named skill; supports multi-step tasks and gracefully falls back to normal chat if the intent can't be parsed - **Configuration Self-Diagnostic**: `/kila doctor` runs 17 config checks (database / LLM connectivity / Spark / AI capability switches, etc.) to quickly locate misconfiguration; prints a redacted full-config dump to the console - **Version & Update Check**: `/kila about` shows current version, latest version, and download URL ### 🔧 Improvements - **Retrieval Filter Refactor (hard threshold → soft/adaptive threshold)**: The old `min_relevance_score` (single hard threshold 30) is replaced by two-stage filtering - **Noise floor**: hard cutoff — anything below is dropped (default 25) - **Relative threshold**: soft cutoff — dropped if below top score × ratio (default 0.3) - Final threshold = max(noise floor, top score × relative threshold); mathematically guarantees at least 1 relevant result is returned — no more "relevant content exists but nothing comes back" - Tunable: lower both → more results (weakly related questions also answered); raise both → stricter (stay silent when unsure) - **BM25 Parameter Tuning**: chunk overlap 30 → 50 chars (longer-doc context more coherent after segmentation); min chunk 25 → 20 chars (fewer short-but-useful paragraphs wrongly dropped); short-doc protection — chunks under 50 chars are exempt from the length penalty (old command-style docs were severely under-scored for being too short) - **Embedding Switches to Fusion Mode**: No longer replaces BM25 with Embedding alone; instead BM25 + Embedding run in parallel and fuse via RRF (Reciprocal Rank Fusion) by rank. Chunks appearing in both paths rank higher, single-path chunks still participate — balancing exact keyword match and semantic understanding - **Custom Dictionary Auto-Syncs with Corpus**: Hot-reloading the knowledge base re-scans the corpus and rebuilds the tokenizer dictionary; new command names / identifiers take effect immediately - **Project Stability**: Fixed several NPE crashes from extreme inputs; hardened defenses against unknown user-authored docs - **AI Error Categorized Hints (highlight of this release)**: When an AI call fails, players now see an actionable, cause-locating hint (e.g. "The model name may be incorrect. Please check the 'model' setting in llm.yml", "API Key is invalid or lacks permission"); the raw error detail is also logged to console WARN for quick troubleshooting. Covers all AI call scenarios: normal chat, skills, tasks, login greeting, AFK notifications, server broadcast - **AI Timeout Friendly Hint**: On response timeout, shows "AI response timed out. Please try again later" instead of exposing technical exception class names to the player - **AFK Task Callback Degradation Hint**: When an AFK task's callback config fails to parse, clearly states the task will run in "notify-only" mode (callback action cannot execute), with the raw content logged for troubleshooting - **Code Standard Cleanup**: Unified utility-class constructor style, removed fully-qualified class names, consolidated redundant method overloads (internal cleanup, no functional impact) - **Complete English Support**: All command output and prompts now fully support Chinese/English bilingual; the English-environment experience is complete - **Permission-Aware Help Menu**: `/kila help` shows only the commands the current player has permission to use - **Granular Query Permissions**: Viewing self / others / server-wide are authorized separately (`kilacraft.query.self`, `kilacraft.usage.other`, etc.) ### 🐛 Bug Fixes - Fixed NPE from missing null defenses in `BM25Scorer.countOccurrences` / `EmbeddingCache.getVector` / `putVector` / `getNorm` - Fixed players getting stuck on "Thinking..." with no error message when an AI call failed due to config errors (wrong model name / Key / URL, rate limiting, server-side failure, etc.) - Fixed AI error hints being mistakenly written into conversation history and polluting subsequent chat context (normal chat, login greeting, plugin-command paths) - Fixed profile analysis writing dirty data and bumping the version number when the AI returned an abnormal structure (added an 8-field whitelist + length cap) - Fixed occasional no-response hang when the AI secondary analysis failed during skill / task execution ### ⚠️ Compatibility #### Upgrading from v2.1.1 1. Stop server, replace JAR, start 2. **Recommended** (for the full retrieval optimization): delete `knowledge.yml` and restart to let the plugin regenerate the latest version with the new config entries, then tweak as needed 3. Works without deleting `knowledge.yml`: the old `min_relevance_score` is ignored (no longer used), and retrieval filtering auto-applies the default soft thresholds (noise_floor=25, relative_threshold=0.3) 4. If you previously hand-maintained command names / identifiers in `custom_dictionary.words`, consider trimming them after upgrade — the new corpus-seeding dictionary auto-extracts these from knowledge-base content 5. **Recommended to delete the language config files** (`language.yml` / `language_en.yml`): the help-menu format was restructured and many command messages were added this build; keeping the old file leaves new command prompts missing and the help menu outdated. Delete and restart to regenerate the latest version, then re-apply your custom text 6. **Server owners using English (en) mode should delete `i18n/messages_en.yml`**: player-facing command text was migrated to the `language.yml` system this build, and the corresponding old keys were removed from `messages_en.yml`; deleting and restarting avoids leftover redundancy
release

Kilacraft-AI 2.1.1

2.1.1
18 июн. 2026 г.27Minecraft: 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2bukkit, folia, paper, purpur, spigot
Скачать
Что нового
## 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 + description` per skill; LLM determines which skill categories are needed; pure small talk returns `null` directly, 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_name` against 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 - **Skill SPI Structured Response Architecture (new `needInfo` secondary 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 - `SkillResult` adds a typed `SkillStatus` enum (SUCCESS/FAILURE/NEED_INFO) + `getStatus()`; a new normalization layer `SkillResultFormatter` uniformly 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 `SkillStatus` class (6th class) - **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 sharing `max_tokens` budget 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.yml` has no reasoning model configured, auto-falls back to `llm.yml` base 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**: `loadFromDB` limit changed from `maxHistory×2` to `maxHistory` (default 20), reducing redundant loading - **AFK Task String Condition Value Display Optimization**: `EvaluationResult` adds `actualValueStr`; 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 set `max_tokens`, preventing complex JSON truncation; GenericBukkitAPI description enhanced to improve Phase 1 classification accuracy - **Concurrency & Thread Safety**: `ConversationManager` history queue upgraded to `ConcurrentLinkedDeque` + auto trim (MAX_HISTORY_SIZE=100); `AFKTaskManager` atomic registration prevents overflow; `ProfileManager.flushAllProfiles` single-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**: `PersonalitiesConfigManager` switched to snapshot replacement pattern, `LLMConfigManager` fields fully `volatile` - **Embedding Retrieval Optimization**: chunk vector norm precomputed and cached, cosine similarity computation reduced by 2/3 - **`reconcileOnlineProfiles` Single-Connection Batch**: aligned with `flushAllProfiles` pattern - **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; `TaskExecutor` multi-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.yml` system prompt uniformly documents marker semantics; `messages_en.yml` strips marker prefixes embedded in keys/values and fixes a duplicate key; `Skill-SPI-Integration-Guide.md` (zh+en) fully rewritten ### 🐛 Bug Fixes - Fixed `BM25Scorer.countOccurrences` infinite loop on empty keyword causing `mvn test` to hang forever - Fixed `KnowledgeRetriever.splitByFixedSize` off-by-one where content exactly at MAX_CHUNK_SIZE was split into an extra trailing chunk by the overlap rollback logic - Fixed `ConversationPersistenceService.mergeLoadedHistory` clearing itself when `loadedHistory` and `playerHistory` are the same object via `clear()`, causing history loss (triggered when a player sends a message for the second time or later with valid in-memory history, via `/ai` command 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_plan` null NPE, shutdown `flushAllProfiles` connection exception cascade failure, `ConversationManager` non-thread-safe `ArrayDeque` concurrent 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 1. Stop server, replace JAR, start 2. **MUST remove `intent_prompts.yml` / `intent_prompts_en.yml`**: the two-phase architecture + prompt system restructuring changed this file's structure significantly (new `phase1` section, 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** 3. **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.yml` - `llm.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` (new `security.player_isolation.offline_cache` section, recent active player cache) - `database.yml` (new `h2.tcp` section, H2 TCP Server access control; profile analysis prompt temporal optimization, old config overrides the built-in new version, update or delete to regenerate) 4. Except for the `intent_prompts.yml` in step 2, all other config entries have code-level default fallbacks — **works without deleting them** 5. **Lower diagnostic feature barrier**: when no `admin.yml` reasoning model is configured, health monitoring auto-falls back to `llm.yml`, usable without extra config (diagnostic quota still controlled by `admin.yml`, no conflict with normal conversation) 6. **Skill SPI fully backward compatible**: `SkillResult` changes 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 new `SkillResult` provides and auto-fills `status` (the SPI Jar is compile-time only, not packaged into third-party plugins). Old Skills need no changes; to use new capabilities like `needInfo`, recompile against the 2.1.1+ SPI Jar
release

Kilacraft-AI 2.0.2

2.0.2
14 мая 2026 г.49Minecraft: 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2bukkit, folia, paper, purpur, spigot
Скачать
Что нового
## v2.0.2 - Group Server Data Isolation, Skill Permission Pre-Filter, Incremental Profile Analysis, Profile Historical Snapshots, Placeholder Arithmetic, JSON Auto-Repair ### ✨ New Features - **Incremental Profile Analysis**: Profile analysis upgraded from "generate fresh each time" to "old profile + new conversations fusion update", long-term player traits are not overridden by short-term fluctuations - Prompts support Chinese/English bilingual configuration (first analysis / incremental analysis configured separately), supports hot-reload - **Profile Historical Snapshots**: New `kca_profile_snapshot` table, automatically saves a profile snapshot after each analysis, supports tracing any version's profile content and analysis time range, permanently retained - **Group Server Data Isolation**: Supports BungeeCord/Velocity cross-server data sharing and isolation - `database.yml` adds `group.server_id` config, requires deleting old config file to regenerate - Conversation history, server events, skill audit logs isolated by `server_id`; player profiles & social relations are inherently cross-server shared (no `server_id` field, not configurable) - Schema upgraded to v2, auto-creates `server_id` indexes (H2 / MySQL compatible) - Supports group config hot-reload - **Skill Permission Pre-Filter**: Dynamically filters available skills by player permissions during intent recognition; unauthorized skills excluded from LLM candidates - `Skill` interface adds `getRequiredPermission()`, all built-in Skills implement permission declaration - `PluginPermissionEnum` adds 8 Skill-level permission enums - **Placeholder Arithmetic Expressions**: Multi-step tasks support `{step_x.field + 10}` style arithmetic - **LLM JSON Auto-Repair**: Auto-completes missing closing braces in AFK task callback JSON ### 🐛 Bug Fixes - Fixed API_KEY unconfigured prompt pointing to wrong config file (`config.yml` → `llm.yml`) - Fixed `getBoolean()` silently returning default for `"shared"`/`"isolated"` string values (Critical) - Fixed `DatabaseManager.reload()` not updating `currentConfig` on hot-reload - Fixed enchanted golden apple event name exceeding length limit - Fixed SQL syntax incompatibility in expired conversation/event/audit log cleanup using derived table syntax - Fixed `ProfileManager` not rebuilding DAO on hot-reload, causing `table_prefix` changes to not take effect - Fixed `update()` overwriting profile analysis fields with cached stale values: `profile_data` / `profile_analyzed_at` now exclusively written by `updateProfileData()`, runtime state updates no longer overwrite AI analysis results - Fixed `/ai clear` not preventing DB history reload on next conversation: introduced one-time `cleared` marker to skip DB loading in `loadHistoryIfNeeded` - Fixed AI greeting writing to memory history causing `loadHistoryIfNeeded` to skip DB load: empty check now excludes assistant-only history - Fixed AI request errors being silently swallowed without console output - Unified AI call timeout settings, fixed profile analysis timeout inconsistency with other AI calls ### 🔧 Improvements - Distributed scheduled task race safety: watermark markers + `SELECT FOR UPDATE` row locks for distributed mutual exclusion - `database.yml` group config section moved up + unified comment style - Removed `DataCleanupService.serverId` dead code - Improved key field length documentation comments - Removed unused parameter from social relation interaction type enum - ConditionPlan operator descriptions migrated to `I18nService.tr()` system - Profile injection extended to all player-facing LLM output paths (secondary analysis, stage notifications, broadcast) with unified `ProfileManager.injectProfileSummary()` API - Player profile dimensions expanded from 5 to 8 (added interests/boundaries/communication/spatial/facts), profile injection wording changed to "reference context" to avoid interfering with AI conversation judgment, incremental analysis auto-migrates legacy fields - Incremental profile analysis now filters out `version`/`analyzed_at` metadata fields when injecting old profile, preventing LLM misinterpretation - SPI integration guide, database config guide, and player profile & social relations system guide updated in both Chinese and English (corrected table field descriptions to match actual DDL, added incremental analysis workflow and snapshot mechanism) - Intent recognition prompt global optimization: strengthened skill semantic matching standard, clarified "data retrieved could help answer" ≠ "skill matches user intent", constrained question decomposition to user's explicitly stated information needs - BukkitStatsSkill prompt narrowed: limited to Minecraft vanilla statistics only, prohibited guessing or fabricating enum names - CommandSkill prompt optimization: clarified matching boundary between "executable action" and "information query", removed examples unsuitable for survival players - LLM secondary analysis prompt enhanced with boundary constraints, reducing hallucination and unreasonable inference - Third-party Skill registration adds compatibility pre-check mechanism, registration failure does not affect main process ### ⚠️ Compatibility #### Upgrading from v2.0.1 1. Stop server, replace JAR, start — defaults to standalone mode, no config changes needed 2. Database Schema auto-upgrades to v2 (adds `profile_snapshot` table + 3 `server_id` indexes), no manual migration needed 3. All new config entries have code-level default values — **the plugin works correctly even without deleting any config files** 4. **Recommended** (to get the full v2.0.2 prompt optimization effects): delete the following config files and restart the server to let the plugin regenerate the latest versions: - `intent_prompts.yml` / `intent_prompts_en.yml` (intent recognition prompts strengthened with semantic matching standards) - `skills/bukkit/BukkitStatsSkill.yml` / `BukkitStatsSkill_en.yml` (narrowed stats query matching scope) - `skills/command/CommandSkill.yml` / `CommandSkill_en.yml` (optimized command matching boundary) - `llm.yml` (strengthened prohibition on exposing statistics, old version has similar rules but weaker wording, optional) - `database.yml` (new group server config section + incremental profile prompts + profile dimensions upgraded to 8 + profile timeout adjustment, can manually add or delete to regenerate) 5. For group server mode, add `group.server_id` config to `database.yml` (leave empty for single-server) 6. v2.0.2 adds `profile.incremental_system_prompt` / `incremental_system_prompt_en` config entries (incremental analysis prompt when existing profile is present), leave empty to use built-in defaults #### Upgrading from v2.0.0 1. Follow the "Upgrading from v2.0.1" steps above first 2. v2.0.1 added configurable profile analysis prompts (`profile.analysis_system_prompt` etc. in `database.yml`), delete `database.yml` to regenerate if you want to customize prompts 3. If using English mode (`language: en`), a `greeting_en.yml` English greeting config file will be auto-generated on first startup #### Upgrading from versions before v2.0.0 1. **You must read the v2.0.0 compatibility section first** — that version introduced database persistence, config architecture refactoring, and other major changes 2. Upgrade steps: - **Stop server and backup** the entire `plugins/Kilacraft-AI/` directory - Replace `Kilacraft-AI.jar` with the new version - On **first startup**, the plugin will auto-create new config files and database tables (Schema auto-upgrades to v2); old config files will not be deleted - Follow log prompts to manually migrate custom settings from the old `config.yml` to new config files (`llm:` → `llm.yml`, `agent:` → `llm.yml`, `output:` → `output.yml`, `knowledge:` → `knowledge.yml`) - If using MySQL, create the database in advance and configure `database.yml` - **Strongly recommended** to delete `intent_prompts.yml` / `intent_prompts_en.yml` and Skill config files under `skills/` directory to let the plugin regenerate the latest versions 3. Conversation history in versions <2.0.0 was stored in memory only — there is no historical data to migrate, data accumulation starts fresh after upgrade #### New Permission Nodes - `kilacraft.afk.task` / `kilacraft.bukkit_fx` / `kilacraft.bukkit_stats` / `kilacraft.bukkit_api` (default true) - `kilacraft.cmi` / `kilacraft.command.execute` / `kilacraft.market.action` (default OP) - `kilacraft.market.query` / `kilacraft.utility` (default true) #### Version Recommendation > Versions prior to v2.0.2 (including all v1.x releases) are no longer available for direct download. All users are recommended to upgrade to v2.0.2 for better system stability, security, and lower token consumption.