Files
talemate/docs/user-guide/node-editor/reference/nodes/websocket.md
veguAI 89e01ac138 Node editor node reference glossary (#107) (#111)
* docs: complete node editor node reference glossary (#107) - generated by new nodes.tools glossary subcommand, 47 categorized pages covering all 403 nodes, docstring gap fixes, help-agent docs-index entries

* docs: fix Jinja2 Format discoverability - document dynamic-input template variables, move node to string page, link key inference from dynamic-input notes, strip links from index summaries

* help agent: keep node reference out of the chat prompt - collapse glossary entries to one pointer line (~19k chars saved), agent retrieves node info via search_docs/read_doc tool calls

* help agent: replace in-prompt docs index with find_docs lookup tool - prompt carries a 13-line section overview (~1.5k chars vs ~66k), pages located via keyword-scored find_docs at runtime

* changelog: help agent prompt slimming + find_docs lookup

* docs: sort node reference index and nav alphabetically by page title

* review: move module constants into top-of-file constant blocks (glossary MAX_DEFAULT_LENGTH; docs SECTION_DESCRIPTIONS, _FIND_STOPWORDS, FIND_DOCS_LIMIT)

* review: word-boundary find_docs scoring with plural/-ing folds, find_docs+section_overview unit tests, jinja2 template field description override

* docs: help agent overview no longer claims an in-prompt index of all documentation pages

* docs: full node docstring audit pass - 335 classes audited by 5 agents, ~89 accuracy fixes (nonexistent/misnamed sockets, wrong behavior claims), ~94 expansions, 5 factually-wrong PropertyField descriptions corrected, glossary regenerated
2026-07-20 01:49:33 +03:00

4.8 KiB

Websocket Nodes

Plumbing for module-defined websocket handlers: route requests, queue responses and signal operation success or failure to the frontend.

4 nodes.

Node Registry path
Get Websocket Router websocket/GetWebsocketRouter
Websocket Operation Done websocket/signals/OperationDone
Websocket Operation Failed websocket/signals/OperationFailed
Websocket Response websocket/WebsocketResponse

Get Websocket Router

websocket/GetWebsocketRouter

Get a websocket router (plugin) by its route name from the active websocket handler.

Raises an error if no plugin is registered for the given route.

Outputs

Output Type Description
router str The route name, passed through
websocket_router websocket_router The websocket router (plugin) instance
websocket_handler websocket_handler The active websocket handler

Properties

Property Type Default Description
router str "" The router to get the websocket plugin for. Choices are generated at runtime.

Websocket Operation Done

websocket/signals/OperationDone

Signal to the frontend that a websocket operation has completed successfully.

Sends an operation_done message through the websocket router, optionally emits a status message and - unless signal_only is set - triggers an auto save of the scene (or marks the scene as unsaved when auto save is off or disallowed).

Inputs

Input Type Description
state any The graph state
websocket_router websocket_router The websocket router (plugin) to signal through
signal_only bool If true, only send the signal and skip the save handling (optional)
allow_auto_save bool Whether to allow the scene to auto save after the operation (optional)
emit_status_message str Status message to display in the frontend (optional)

Outputs

Output Type Description
state any The state input, passed through
websocket_router websocket_router The websocket router, passed through

Properties

Property Type Default Description
signal_only bool False Whether to signal only or emit a status
allow_auto_save bool True Whether to allow auto save
emit_status_message str "" The status message to emit

Websocket Operation Failed

websocket/signals/OperationFailed

Signal to the frontend that a websocket operation has failed.

Sends an operation_done message carrying the error through the websocket router and optionally emits an error status message in the frontend.

Inputs

Input Type Description
state any The graph state
websocket_router websocket_router The websocket router (plugin) to signal through
message str The error message (optional)
emit_status bool Whether to also emit an error status message (optional)

Outputs

Output Type Description
state any The state input, passed through
websocket_router websocket_router The websocket router, passed through

Properties

Property Type Default Description
message str "" The message to emit
emit_status bool True Whether to emit a status

Websocket Response

websocket/WebsocketResponse

Queue a message to be sent to the frontend through the websocket.

The message is sent with the router's name as its type, the given action name, and the data dict merged into the message payload.

Inputs

Input Type Description
state any The graph state
websocket_router websocket_router The websocket router (plugin) to send the message through
action str The action name of the message
data dict Dict of additional payload fields merged into the message

Outputs

Output Type Description
state any The state input, passed through
websocket_router websocket_router The websocket router, passed through
action str The action input, passed through
data dict The data input, passed through

Properties

Property Type Default Description
action str "" The action to send to the websocket
data dict {} The data to send to the websocket