0
0
Fork 0
Codesys-MCP-SP21-plus/package.json
Karstein Phobic Nyvold Kvistad 41818283f4 fix(compile_messages): probe every category + tighten _is_resolved hollow-ref check
Two real bugs surfaced today:

1. compile_project / get_compile_messages reported 0 errors even when
   the IDE's download path saw real compile errors. Root cause: both
   scripts queried get_message_objects() with no category arg, which
   returns only the IDE's last-active message tab (typically "Other"
   for the WATCHER startup messages). Build/Code-Generation errors
   live in a different category and were never queried.

   Fix: enumerate script_engine.system.message_categories AND probe a
   set of well-known V3.5 category GUIDs (Compile, Build, Online,
   LibMan); query target_app.get_message_objects(cat) and
   system.get_message_objects(cat) per category; aggregate dedup'd
   entries (severity, text, object, line). Each entry now carries its
   originating category label.

2. add_library's post-add _is_resolved() check trusted is_placeholder
   == False as proof of resolution. CODESYS lets you call
   add_placeholder(name_str) for a name that is NOT in the installed
   Library Repository -- the resulting reference reports
   is_placeholder=False yet has empty effective_version and the IDE
   shows it with a yellow-warning triangle in Library Manager (no
   Effective Version column populated). Karstein hit this with
   "OPC UA PubSub SL": list_project_libraries reported it as
   [managed] but compile failed because the IDE couldn't resolve it.

   Fix: for the non-placeholder branch, probe effective_version /
   resolved_version / version / resolved_library / managed_library /
   library. ALL must be empty/None for the ref to be considered
   hollow. Logs a DEBUG with the ref's attribute list so the next
   such bug is diagnosable without source spelunking.

Bumped 0.6.2 -> 0.6.3.
2026-04-28 23:35:24 +02:00

54 lines
1.6 KiB
JSON

{
"name": "codesys-mcp-sp21-plus",
"version": "0.6.3",
"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": {
"codesys-mcp-sp21-plus": "dist/bin.js"
},
"files": [
"dist/",
"README.md",
"LICENSE"
],
"scripts": {
"build": "tsc && node -e \"require('fs').cpSync('src/scripts','dist/scripts',{recursive:true})\"",
"test": "vitest --run",
"test:watch": "vitest",
"typecheck": "tsc --noEmit",
"prepublishOnly": "npm run build && npm test"
},
"keywords": [
"codesys",
"mcp",
"plc",
"automation",
"persistent",
"ui"
],
"author": "luke-harriman (upstream); phobicdotno (SP21+ fork)",
"repository": {
"type": "git",
"url": "https://github.com/phobicdotno/Codesys-MCP-SP21-plus.git"
},
"homepage": "https://github.com/phobicdotno/Codesys-MCP-SP21-plus#readme",
"license": "MIT",
"engines": {
"node": ">=18"
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.26.0",
"commander": "^11.1.0",
"ssh2": "^1.17.0",
"uuid": "^9.0.0",
"zod": "^3.24.3"
},
"devDependencies": {
"@types/node": "^20.14.1",
"@types/ssh2": "^1.15.5",
"@types/uuid": "^9.0.0",
"tsx": "^4.21.0",
"typescript": "^5.5.3",
"vitest": "^1.6.0"
}
}