Skip to content

Releases: Krontek/KronEditor

v1.1.2

Choose a tag to compare

@fehimkus fehimkus released this 02 Aug 16:16

KronEditor v1.1.2
🤖 PLC Agent
New: the agent asks instead of guessing. A clarifying question is now a real tool call (ask_user), not prose. It renders as a VSCode-style quick-pick above the input bar (buttons when the model supplies options, a text box when it doesn't, always with a free-text escape), pauses the run until you answer, and asks multiple questions one at a time with an n / total counter. Previously the model dumped a numbered list of questions into a chat bubble and the loop just ended — nothing was actually waiting for you.

Run state you can see and stop. The Stop control moved into the input bar (the send ➤ becomes a red ■; Esc also stops) — it used to live at the bottom of the scrolling conversation, so in a long chat it was below the fold and the agent looked unstoppable. Added a phase label + ticking elapsed timer as proof of life, and stopping is now generation-based, so a stopped run can never resume alongside a new one. Approving a proposal correctly re-arms the running indicator.

Model picker now reads a live catalogue. New POST /api/host/ai/models endpoint proxies each provider's list endpoint; the built-in lists are only an offline fallback. The Model field is a proper (the old free-text combo used its own input as the filter, so a user on claude-opus-4-8 could see only that entry and couldn't reach any other model). Non-chat models (embeddings, tts, image, moderation) are filtered out of OpenAI-shaped lists, and the Connect tab waits for the first fetch instead of showing a stale list. New provider: DeepSeek (deepseek-chat / deepseek-reasoner). Providers are now grouped in the picker by how you authenticate (sign-in / API key / local / custom) rather than by vendor. Provider connection fixes: A named provider always reaches its own host — baseUrl is honored only by custom. A leftover Ollama/custom base URL used to silently redirect every provider (picking Gemini + a valid key POSTed to localhost:11434 and failed with connection refused) and sent the API key as a Bearer token to whatever host that base named. Switching provider in Settings no longer carries apiKey/baseUrl across; credentials are stashed per provider. Gemini: model listing uses the native /v1beta/models route (the OpenAI-compat one 404s unauthenticated), fallback list uses the -latest aliases that can't go stale, and Gemini 3's per-tool-call thought_signature is round-tripped verbatim — without it multi-turn tool use died on turn 2 with a 400. Provider errors are condensed into one actionable sentence (friendlyProviderError); it tells a zero-quota plan apart from an ordinary rate limit, and catches Google's 400 "Please pass a valid API key" which isn't a 401. Ladder/ST authoring correctness: Agent-authored ladder blocks now land on the power rail. They were all emitted at y=0, parking every contact and coil ~75 px above the rail with diagonal wires. On a mixed POU, set_st_code and set_ladder each own only their own language's rungs. Before this, whichever ran last deleted the other's work — authoring a rung then writing ST wiped the ladder. set_ladder now validates contact/coil targets and fails loudly: non-IEC names, non-BOOL targets, unknown subTypes and comparison-ish names (EQ, GT, >=) are rejected with a routing hint instead of being silently normalized into nonsense like counter AND 10. add_variable accepts standard FB types (TON, CTU, MC_Power, …) — the prompt told the model to do exactly this and it was rejected for every standard FB. It also refuses to create a local that shadows a global. read_pou returns the POU's referenced globals, so the model stops re-declaring them as locals. list_blocks documents each FB's trigger pin and power-output pin. An explicit "write it in ladder" now outranks the content-based language heuristic — a "count to 10" request no longer silently comes back as ST. Better weak-model handling: bare JSON arg objects are routed by shape, and POU-target errors name the POUs that actually exist. 🔧 Build & toolchain Build & Send was broken for every armv7 BeagleBone — fixed. The bundled GCC install dir is now located by glob and passed as -B (paths.go LLVMGCCInstallDir). The sysroots name it with a "none" vendor (arm-none-linux-gnueabihf) that clang's candidate list doesn't match for arm, so every -static target build died with cannot open crtbeginT.o / unable to find library -lgcc; aarch64 worked only by luck. Version dirs are compared numerically (9.3.0 vs 10.2.1), covered by a new paths_gcc_test.go. 🔌 HAL — no more fake success Stub _Call bodies that returned DONE = EN / VALUE = 0, ERR_ID = 0 were indistinguishable from a working read, so projects could silently run on invented data. Everything is now either real or reports ERR_ID. BeagleBone HAL is now implemented (was almost entirely TODO): GPIO on both headers, PWM (sysfs), I2C, SPI single-byte + burst, ADC (AM335x IIO, 12-bit / 1.8 V), CAN (SocketCAN dcan0/dcan1), UART/USB device paths corrected to /dev/ttyS*, DI/DO. The BeagleBone P8 pin map was all -1 placeholders — every P8 GPIO silently failed. It now carries the real AM335x line ids from the BBB SRM. PWM was dead on all 12 generic-Linux SBCs. Channels are now flattened across pwmchips (sorted by index) instead of requiring one chip to expose them all — Rockchip/Amlogic boards publish one chip per PWM cell. KRON_PWM_MAX raised to 8, with HAL_Init explicitly setting fds to -1 (a static-zero fd would have made cleanup close stdin). RPi HAL: real single-byte SPI, generic ADC via IIO (honors the driver's _scale), SocketCAN. Jetson: ADC honestly reports ERR_ID=1 (dev kits expose no user ADC), SocketCAN added. 🧩 Board list Raspberry Pi Pico / Pico W removed. The whole product (KronServer agent, /dev/shm IPC, hot-swap dlopen) assumes a Linux userspace — a Cortex-M board could only ever simulate, deploy was always rejected. kronhal_pico.h and the Pico pin renderer are gone. Old projects still targeting a Pico now get a clear "reselect a Linux board in Board Config" error on Build/Deploy/Hot-swap instead of silently building a wrong-arch binary. Peripheral counts corrected against real silicon (a channel count mints blocks in the toolbox, so an optimistic number is a promise the hardware must keep): Jetson Nano's phantom CAN removed (Tegra X1 has no CAN controller), Jetson TX2 → 2 CAN, RK3588 boards (Orange Pi 5 / 5 Plus, ROCK 5B) gained the CAN they really do have via can0-m0/can1-m0 overlays, ODROID-C4 → 6 PWM + 2 header ADC inputs (⚠️ 1.8 V ceiling, not 3.3 V). ✏️ Editor Ctrl+C no longer hijacks a text selection. Selecting text in a plain div — an agent chat bubble, an error message, a diff line — leaves focus on , so every focus guard passed and Ctrl+C replaced the highlighted text with a copied POU. All global clipboard handlers now bail on hasTextSelection(), and the agent panel claims its own editor scope. ⚠️ Upgrade notes If a saved project targets rpi_pico/rpi_pico_w, open Board Config and pick a Linux board. BeagleBone armv7 users: Build & Send works again — no project change needed. No KronServer changes in this release; an existing target agent does not need redeploying.

hot reload added

Choose a tag to compare

@fehimkus fehimkus released this 20 Jul 01:29

KronEditor 1.1.1
First tagged release since 1.0.0. Focus: live editing while running (online change), a real AI agent workflow, and shippable installers.

✨ Highlights
Online change (hot reload). Edit Ladder/ST while the simulation runs and apply it live with a Hot Reload toolbar button — timers, counters and latches survive. Layout-changing edits (adding an FB, a variable, a task) can't hot-reload; they're detected up front and offered as a one-click rebuild + restart that carries over existing variable values (a counter at 35 resumes at 35, not 0). Guarded by two layers: a JS layout pre-check and the C-level plc_state_layout_hash safety net.

Pulse vs Force live writes. Manually writing a live value now offers Pulse (inject for one scan, logic resumes) or Force (hold it pinned). Pulse is the fix for "I set the counter to 0 and it froze" — force pins, pulse seeds.

PLC Agent upgrades.

Manual / Auto mode — review each change as a diff, or let the agent apply directly.
Ask agent from any error: the error popup (now a full, copyable modal) sends the message to the agent for an explanation/fix.
Animated "thinking/working" indicator.
Ollama: the model pill is green only when the daemon is actually running (with a Stop button and auto-recovery), instead of falsely green.
🪜 Ladder editor
Straight wires — the power line is fixed and blocks magnet-snap onto it (measured from the real handle), ending the "kayma"/stepped-wire drift.
Undeclared variables are flagged — a pin wired to an unknown name (e.g. var5) shows a red border + tooltip explaining it, instead of silently failing at build.
Block "How it works" notes — double-click a block to see behaviour notes (subtype-aware), localized in EN/TR/RU.
ANY_NUM pins keep autocomplete after a literal is typed; editable pins work correctly during a running sim.
TIME auto-format — type 500ms or 500, get T#500ms (bare number = milliseconds), in both PT pins and variable initial values.
Ctrl+Shift+Z (redo) now layout-independent.
🔢 Types & validation
64-bit types LINT / ULINT / LREAL / LWORD selectable; host-agent now encodes/decodes BYTE/WORD/DWORD/LWORD too.
Variable names validated as IEC identifiers (no spaces/punctuation).
Same-named locals in different programs no longer wrongly rejected.
📦 Packaging & release
Linux AppImage — build fixed (missing AppRun/desktop assets added); one self-contained file with toolchains.
Windows — portable ZIP plus a real installer: KronEditor-1.1.1-Setup.exe (530 MB, bundles the app + resources + LLVM toolchains → one install, Build & Send works; local simulation is Linux-only).
packaging/requirements.md documents build prerequisites.
Compile/build now shows a spinner + progress cursor.
⚙️ Under the hood
Header/include resolution moved to the shared krontek-include tree.
Loader-host cache keyed by content hash (a stale loader no longer breaks sim cold-start).
Version single-sourced from package.json everywhere.
⚠️ Known limitations
Field hot-swap on real hardware is unverified — online change is proven on the local sim (compile/unit/HTTP verified for the field path), but a physical-device swap + operator safe-state review are still pending. Build & Send (full redeploy + restart) is the reliable target path.
Local simulation is Linux-only (reads /proc//dev/shm); on Windows the editor + Build & Send work, RUN does not.
EtherCAT/motion aren't hot-swap-trampolined — those need a full redeploy.

PLC agent era

Choose a tag to compare

@fehimkus fehimkus released this 31 May 13:23

PLC agent added and will be upgrade

motion, ethercat, axisref

Choose a tag to compare

@fehimkus fehimkus released this 06 Apr 22:40

Motion Control

Added PLCopen Part 1 compliant motion blocks: MC_Power, MC_MoveAbsolute, MC_MoveRelative, MC_Stop, MC_Home.

libkron_nc.a — The static library for the NC engine was compiled separately for all targets (x86_64, aarch64, Cortex-M0/M4/M7).

Added core functions: NC_Init, NC_ProcessOne, NC_ProcessAxes.

HAL (Hardware Abstraction Layer)

Raspberry Pi Pico HAL: Skeleton implementation for GPIO, PWM, SPI, I2C, UART, and ADC.

Raspberry Pi family HAL: gpiod-based implementation for GPIO, PWM, SPI, I2C, and UART.

Simulation HAL (kronhal_sim.h): Added the ability to compile and run on the host without real hardware.

EtherCAT

EtherCAT PDO mapping SDOs are now automatically generated by the transpiler (CTranspilerService).

Updated libkronethercatmaster.a for the aarch64 target.

Build System

Made resource management dynamic — removed hardcoded resource paths from tauri.conf.json.

build.rs now automatically generates placeholder directories for debug and release profiles.

main.rs dynamically locates target resource directories at runtime; headers and libraries are copied to multiple output directories.

Added the KronHAL repository option to Settings.

HMI / Simulation

Managed the HMI server lifecycle (start/stop) when a simulation is launched.

NC Engine stubs are now included in the generated C code.

Added categorized log clearing and message summarization to the Output Panel.

v0.1.0

Choose a tag to compare

@fehimkus fehimkus released this 09 Mar 08:17
dfb9004