The Server.LLM node owned an interactive chat UI and expected the model to respond with
structured JSON (CREATE_NODES, UPDATE_NODE, etc.) to manipulate the swarm directly —
bypassing verb dispatch. This contradicted every Krill architectural rule: nodes are woken
by sources, not by user taps; state changes flow through ServerNodeManager, not through
model output parsed in a processor.
The original design treated the LLM as a chat surface rather than a transform node. The
processor implemented a bespoke planner schema and emitted raw actions rather than calling
executeSources(). There was no prompt field on LLMMetaData, no RESET verb path, and
no downstream fan-out. The node was architecturally isolated from the rest of Krill’s
source-trigger chain.
ServerLLMProcessor as a pure verb-driven processor: onSourceTrigger(EXECUTE)
runs Ollama inference, appends [user, assistant] to meta.chat, emits an LLM SSE
event, then calls nodeManager.executeSources(). RESET clears the chat without
fan-out. post() and process() are no-ops.LLMMetaData.prompt (krill-sdk 0.0.27) and extended LLMEventPayload with
chatCleared: Boolean so the client can clear its local chat state on RESET.EditLLM.kt to surface prompt, context-node picker, Test Connection button, and
a read-only conversation replay; removed the interactive chat input and planner.POST /api/llm/{nodeId}/test route backed by ServerLLMProcessor.testConnection().LlmApiClient in shared for the client-side Test Connection call, registered via
Koin single<LlmApiClient> in SharedModule.KrillApp.Server.LLM.json with llmRole: "transform" and verb-driven behavior
descriptions; rewrote the LLM blog post to match.onSourceTrigger → executeSources fan-out pattern
should be caught in code review. The pattern is now documented in KrillApp.Server.LLM.json
under llmBehavior and in the blog post, making the contract explicit.ServerLLMProcessorTest cover EXECUTE (chat grows, executeSources
called), RESET (chat cleared, executeSources not called), and Ollama HTTP error (error
state set, no fan-out), preventing a future revert to the old model.