KWin Scripting not exposing signals as documented (eg. clientAdded)

The signals on the workspace variable are not defined at runtime, at least not on KDE 6.2.3.

Here is debug print from my script:

Workspace properties:
workspace.desktopPresenceChanged NOT DEFINED
workspace.currentDesktopChanged defined
workspace.clientAdded NOT DEFINED
workspace.clientRemoved NOT DEFINED
workspace.clientManaging NOT DEFINED
workspace.clientMinimized NOT DEFINED
workspace.clientUnminimized NOT DEFINED
workspace.clientRestored NOT DEFINED
workspace.clientMaximizeSet NOT DEFINED
workspace.killWindowCalled NOT DEFINED
workspace.clientActivated NOT DEFINED
workspace.clientFullScreenSet NOT DEFINED
workspace.clientSetKeepAbove NOT DEFINED
workspace.numberDesktopsChanged NOT DEFINED
workspace.desktopLayoutChanged defined
workspace.clientDemandsAttentionChanged NOT DEFINED
workspace.numberScreensChanged NOT DEFINED
workspace.screenResized NOT DEFINED
workspace.currentActivityChanged defined
workspace.activitiesChanged defined
workspace.activityAdded defined
workspace.activityRemoved defined
workspace.virtualScreenSizeChanged defined
workspace.virtualScreenGeometryChanged defined

I’m running into the same issue on my recently upgraded Fedora 41 system (before I was running on Fedora 39, kde 5 something).

My kde version is 6.2.4 and I try to use the function

workspace.clientList()

The journal prints this error message:

kwin_wayland[1560]: kwin_scripting: /home/goudsmid/.local/share/plasma-interactiveconsole/interactiveconsoleautosave.js:3: error: Property 'clientList' of object KWin::QtScriptWorkspaceWrapper(0x556298c2bb10) is not a function

I have searched a bit on the bug tracker and I found this bug. That’s reported against kde 6.0.4 and hasn’t received any feedback from the developers so far…

Hi - it looks like you did find some leads on that and shared them in the Bugzilla ticket that you linked, which definitely looks helpful!

Not an expert by any means myself, but what you were working through in that last comment sounds like it might be helped by bouncing ideas off of the folks working closely with KWin. There’s a dedicated chat room on Matrix, #kwin:kde.org , that could be a good spot for that.