0
0
Fork 0
Commit graph

13 commits

Author SHA1 Message Date
Karstein Phobic Nyvold Kvistad
2ea39cb9a6 tui: scaffold phobiCS-tui ESM subpackage with ink 2026-04-28 20:52:02 +02:00
Karstein Phobic Nyvold Kvistad
722c09ed70 feat(ssh): restart_runtime_ssh -- restart codesyscontrol over SSH (password auth + sudo -S + port-listen liveness probe)
WHY: an unlicensed CODESYS Control runtime drops out of demo mode every 2
hours. systemctl is-active reports "active" even after the binary has
died, so a TCP probe on the runtime port (default 11740) is the only
honest liveness signal. The new tool gives MCP a one-call path to bring
the runtime back without dropping into a terminal.

Implementation choices:

- ssh2 (npm) instead of spawning ssh/sshpass: sshpass is not on the
  default Windows path, and the target Pi's sshd 10.x rejects pubkey
  signatures from this client environment in practice. ssh2 handles
  password auth + remote stdin + exit-code capture cross-platform.
- sudo -S with the password fed on remote stdin -- avoids a NOPASSWD
  sudoers entry on the PLC.
- After issuing the restart, polls 'ss -tln | grep :<port>' once per
  second until the listen port is up or livenessWaitSeconds expires.
  This is what catches a half-dead runtime that systemctl reports as
  fine.

Defaults match the only Pi we currently target (codesys-pi.local /
karstein / codesys123 / codesyscontrol / port 11740) but every field
is overridable.

Smoke-tested against codesys-pi.local: restart exit 0, port back up
after ~3s.
2026-04-28 16:50:19 +02:00
Karstein Phobic Nyvold Kvistad
4b54fbbd80 release: v0.4.9 -- --inspect, --ssh-version, --for-project, open_project pre-flight, per-project mirror dir, auto-mirror tool wraps, drop CODESYS Git 2026-04-27 22:33:45 +02:00
Karstein Phobic Nyvold Kvistad
f94e63ea8a release: v0.4.8 -- launcher allows multi-install (filter spawn-guard by exe path) 2026-04-27 20:58:00 +02:00
Karstein Phobic Nyvold Kvistad
1145fdc32e release: v0.4.7 -- drop broken postinstall, document the on-demand --print-config flow 2026-04-27 20:46:46 +02:00
Karstein Phobic Nyvold Kvistad
c1eabf08a9 release: v0.4.6 -- postinstall actually prints when installing from a repo cwd 2026-04-27 20:40:03 +02:00
Karstein Phobic Nyvold Kvistad
5c756147c1 release: v0.4.5 -- postinstall banner actually prints (npm 11+) 2026-04-27 20:37:29 +02:00
Karstein Phobic Nyvold Kvistad
7f7abaf996 release: v0.4.4 -- postinstall now tells you WHERE to paste the snippet 2026-04-27 20:32:31 +02:00
Karstein Phobic Nyvold Kvistad
3d75548ba9 release: v0.4.3 -- postinstall banner with .mcp.json snippet 2026-04-27 20:31:22 +02:00
Karstein Phobic Nyvold Kvistad
a11c58062f release: v0.4.2 -- --print-config CLI for auto-generated .mcp.json snippets 2026-04-27 20:23:59 +02:00
Karstein Phobic Nyvold Kvistad
fda997e546 release: v0.4.1 -- README restructure (fork notice, what's-new, npm install) 2026-04-26 22:48:21 +02:00
Karstein Phobic Nyvold Kvistad
0352b6c15e chore: sync lockfile to current name + drop stale branch reference from README 2026-04-26 22:48:11 +02:00
Luke
e374519fe1 Initial release: MCP server for CODESYS with persistent UI instance
v0.3.0 returning-watcher architecture — background thread polls for commands
and marshals execution onto the CODESYS UI thread, keeping the IDE fully
responsive between operations. File-based IPC with atomic writes, async mutex
command serialization, headless fallback, and 35 passing tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:59:16 +10:00