diff --git a/package.json b/package.json index 32bc927..f11e353 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "codesys-mcp-sp21-plus", - "version": "0.15.1", + "version": "0.15.2", "description": "Codesys-MCP-SP21+ -- fork of luke-harriman/Codesys-MCP carrying CODESYS V3.5 SP22 Patch 1 fixes (and forward-compat with later SPs): script-engine API drift, online/runtime tool auto-login, dual-SHA release classifier, set_pou_code omitted-decl wipe fix, add_library managed-overload, etc. MCP server for CODESYS with persistent UI instance and file-based IPC.", "main": "dist/server.js", "bin": { diff --git a/src/launcher.ts b/src/launcher.ts index efa3f04..b598054 100644 --- a/src/launcher.ts +++ b/src/launcher.ts @@ -91,7 +91,14 @@ export function pathsEqual(a: string, b: string): boolean { s.toLowerCase().replace(/\\/g, '/').replace(/\/+$/, '').trim(); return norm(a) === norm(b); } -const READY_TIMEOUT_MS = 60_000; +// A bare CODESYS install signals ready in ~15-25s. An install launched with +// --additionalfolder that registers a large add-on set (e.g. SP19 P2 with the +// 161-plugin MarinerX07 folder incl. the Script Engine) takes ~70s to boot -- +// measured 2026-07-27: spawned 07:14:53, ready.signal at 07:16:03. 60s cut it +// off just before ready, then the refuse-on-duplicate guard blocked the retry +// against the very instance that had just come up. 150s covers the slow-plugin +// case with headroom without hanging a genuinely dead launch too long. +const READY_TIMEOUT_MS = 150_000; const READY_POLL_MS = 500; const SHUTDOWN_WAIT_MS = 5_000; const HEALTH_CHECK_INTERVAL_MS = 5_000;