@codesys/mcp-toolkit 2.6.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/README.md +2 -2
- package/README.zh-CN.md +2 -2
- package/dist/codesys/recipes.d.ts +45 -0
- package/dist/codesys/recipes.js +130 -0
- package/dist/codesys/recipes.js.map +1 -0
- package/dist/hmi/native.d.ts +1 -1
- package/dist/hmi/native.js +20 -1
- package/dist/hmi/native.js.map +1 -1
- package/dist/hmi/render.d.ts +4 -0
- package/dist/hmi/render.js +13 -1
- package/dist/hmi/render.js.map +1 -1
- package/dist/hmi/service.d.ts +3 -0
- package/dist/hmi/service.js +29 -2
- package/dist/hmi/service.js.map +1 -1
- package/dist/hmi/spec.d.ts +18 -0
- package/dist/hmi/spec.js +45 -0
- package/dist/hmi/spec.js.map +1 -1
- package/dist/hmi/tools.js +50 -5
- package/dist/hmi/tools.js.map +1 -1
- package/dist/hmi/value.js +3 -0
- package/dist/hmi/value.js.map +1 -1
- package/dist/panel/hmi.js +66 -61
- package/dist/panel.js +1 -1
- package/dist/panel.js.map +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +1 -1
- package/dist/tools.d.ts +2 -0
- package/dist/tools.js +34 -1
- package/dist/tools.js.map +1 -1
- package/package.json +1 -1
- package/watcher/mcp_alarms.py +42 -0
- package/watcher/mcp_caps.py +66 -0
- package/watcher/mcp_lang.py +13 -1
- package/watcher/watcher.py +2 -0
package/watcher/mcp_lang.py
CHANGED
|
@@ -101,7 +101,19 @@ def _signature(lmm, c, sig):
|
|
|
101
101
|
ins = set(to_text(_get(v, "OrgName")) for v in (_get(sig, "Inputs") or []))
|
|
102
102
|
outs = set(to_text(_get(v, "OrgName")) for v in (_get(sig, "Outputs") or []))
|
|
103
103
|
variables = []
|
|
104
|
-
|
|
104
|
+
found = list(lmm.GetAllVariables(sig, c.app.guid) or [])
|
|
105
|
+
if not found:
|
|
106
|
+
# A method of a library FB: the language model keeps its variables on the signature.
|
|
107
|
+
for prop in ("All", "Variables", "AllVariables"):
|
|
108
|
+
vs = _get(sig, prop)
|
|
109
|
+
if vs:
|
|
110
|
+
try:
|
|
111
|
+
found = list(vs)
|
|
112
|
+
except Exception:
|
|
113
|
+
found = []
|
|
114
|
+
if found:
|
|
115
|
+
break
|
|
116
|
+
for v in found:
|
|
105
117
|
n = to_text(_get(v, "OrgName"))
|
|
106
118
|
variables.append(_var(v, "input" if n in ins else "output" if n in outs else "other"))
|
|
107
119
|
subs = []
|
package/watcher/watcher.py
CHANGED
|
@@ -260,6 +260,7 @@ def main(ui=False):
|
|
|
260
260
|
import mcp_debug # noqa: F401 (adds breakpoints and stepping)
|
|
261
261
|
import mcp_devices # noqa: F401 (adds device search and add)
|
|
262
262
|
import mcp_alarms # noqa: F401 (adds alarm management and visu user groups)
|
|
263
|
+
import mcp_caps # noqa: F401 (adds the capability check)
|
|
263
264
|
prompts = setup_prompts(se)
|
|
264
265
|
log(prompts)
|
|
265
266
|
if not hasattr(se, "FAKE"):
|
|
@@ -311,6 +312,7 @@ def main_attach():
|
|
|
311
312
|
import mcp_debug # noqa: F401 (adds breakpoints and stepping)
|
|
312
313
|
import mcp_devices # noqa: F401 (adds device search and add)
|
|
313
314
|
import mcp_alarms # noqa: F401 (adds alarm management and visu user groups)
|
|
315
|
+
import mcp_caps # noqa: F401 (adds the capability check)
|
|
314
316
|
prompts = setup_prompts(se)
|
|
315
317
|
log(prompts)
|
|
316
318
|
old = getattr(__builtin__, "_mcp_attach_timer", None)
|