@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.
@@ -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
- for v in lmm.GetAllVariables(sig, c.app.guid):
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 = []
@@ -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)