Node definition¶
A node definition describes a node class: its pins, how the editor presents it, and — for GPU nodes — what it runs. One file may define several node classes.
Definitions live in Nodes/*.nosnode and are discovered automatically. Do not list them in the
manifest.
Structure¶
{
"nodes": [
{
"class_name": "PrintFloat",
"menu_info": { "...": "how the editor presents it" },
"node": { "...": "what it is" }
}
],
"schema_version": "1.4-v1"
}
The split is deliberate: menu_info is editor presentation, node is the class itself.
Complete example¶
{
"nodes": [
{
"class_name": "LLMGenerate",
"menu_info": {
"category": "AI",
"display_name": "LLM Generate"
},
"node": {
"class_name": "LLMGenerate",
"contents_type": "Job",
"description": "Loads a GGUF model and generates a completion for the given prompt.",
"pins": [
{
"name": "ModelPath",
"type_name": "string",
"show_as": "PROPERTY",
"can_show_as": "INPUT_PIN_OR_PROPERTY",
"visualizers": [
{
"type": "FILE_PICKER",
"file_extensions": ["gguf"],
"file_picker_type": "OPEN"
}
]
},
{
"name": "Temperature",
"type_name": "float",
"show_as": "PROPERTY",
"can_show_as": "INPUT_PIN_OR_PROPERTY",
"data": 0.7
},
{
"name": "Output",
"type_name": "string",
"show_as": "OUTPUT_PIN",
"can_show_as": "OUTPUT_PIN_ONLY"
}
]
}
}
],
"schema_version": "1.4-v1"
}
Node entry¶
class_name— string, required-
The node class name. If it is not already prefixed with the owning module's name, the module name is prepended when the definition is loaded, so
LLMGenerateinnos.llmbecomesnos.llm.LLMGenerate.This is the name that must match
NOS_BIND_NODE_CLASS, fully qualified. menu_info— object- Editor presentation. See below.
node— object, required- The node class itself. See below.
presets— array- Preconfigured variants of the same class, each with its own
menu_infoand aparamslist setting pin values. This is how one genericArithmeticclass provides Add, Sub, Mul, Div and Log menu entries. hide_in_context_menu— bool- Hide from the right-click menu. Useful on a base class that only ships presets.
menu_info¶
category— string- Menu category. Nest with
|, e.g."Math|Addition". display_name— string- Name shown in the editor.
name_aliases— array of strings- Extra search terms.
Addcarries["plus", "sum"]so that searching either finds it. Worth filling in — it is the cheapest usability improvement available to a node author. hide_in_context_menu— bool- Hide from the right-click menu.
node¶
contents_type— string, required"Job"for a node that does work,"Graph"for one containing a subgraph.class_name— string- Class name, repeated. Conventionally present.
display_name— string- Overrides the display name for this class.
description— string- Description shown in the editor.
always_execute— bool, defaultfalse-
Execute every frame even when no input is dirty.
Leave it
falsefor pure transformations. Set ittruefor time-varying sources, per-frame side effects or edge detection, threaded sources, and functions that mutate internal state without writing to a pin. Note thatSetPinValueon an input pin dirties the node on its own, so a callable function usually does not need this. pins— array- Pin definitions. See below.
functions— array- Callable functions — the buttons on a node. Each entry is shaped like a node:
class_name,contents_type, optionalcontentsandpins. Bind them from a staticGetFunctionson the context struct; see Plugin API. contents— object-
What the node runs, for nodes not implemented in your plugin's C++.
"contents": { "type": "nos.sys.vulkan.GPUNode", "options": { "shader": "../Shaders/ColorCorrect.hlsl", "stage": "FRAGMENT" } }typeisnos.sys.vulkan.GPUNodefor a shader node ornos.py.PythonNodefor a Python node. Theshaderpath is relative to the manifest, not to this file.stageisFRAGMENTorCOMPUTE. If the file extension is not.spv,nos.sys.vulkancompiles it with whichever ofglslcanddxcsucceeds. See Write a shader-only node. template_parameters— array- Parameters for generic node classes.
status_messages— array- Predeclared status messages.
meta_data_map— object- Free-form key/value metadata.
Pins¶
Required¶
name— string- Pin name. This is the identity used by
GetPinValue(NOS_NAME("..."))and, for shader nodes, the shader parameter it binds to. type_name— string- Data type. A built-in such as
float,string,uint,bool; a module type such asnos.sys.vulkan.Textureornos.audio.AudioPacket;nos.exefor an execution pin; ornos.Genericfor a pin whose type resolves on connection. See Built-in data types. show_as— string- Initial presentation:
INPUT_PIN,OUTPUT_PINorPROPERTY.
Presentation¶
can_show_as— string- What the user may switch it to. One of
PROPERTY_ONLY,INPUT_PIN_ONLY,INPUT_PIN_OR_PROPERTY,OUTPUT_PIN_OR_PROPERTY,OUTPUT_PIN_ONLY,INPUT_OUTPUT,INPUT_OUTPUT_PROPERTY. display_name— string- Label shown in the editor when it should differ from
name. Use this rather than putting spaces inname. description— string- Tooltip text.
pin_category— string- Groups pins into sections on the node.
advanced_property— bool- Hide behind the advanced disclosure.
readonly— bool- Display only; not user-editable.
Values¶
data— any- Current default value, in the pin's own type.
def— any- The value "reset to default" restores.
min,max— number- Range limits for numeric pins. Enforced by the editor widget.
step— number- Increment for drag and spin widgets.
Behaviour¶
live— bool- Marks the pin as live.
connection_conditions— string- Constrains what may connect. For example
"!resource"on the genericArithmeticpins rejects resource types, so an Add node cannot be handed a texture. visualizers— array-
Editor widgets for the pin.
typePurpose Extra fields FILE_PICKERFile chooser file_extensions,file_picker_type(OPEN/SAVE)FOLDER_PICKERDirectory chooser COLOR_PICKERColour swatch COMBO_BOXDropdown nameof the value setNAMED_VALUENamed value from a registered set name meta_data_map— object- Free-form key/value metadata.
Execution pins¶
Pins of type nos.exe carry no data. They express ordering: that one node runs after another. A
node's execution input is conventionally InExe or Run, and its output Continue or Out.
Execution pins are what connect a node to a thread and a sink, and therefore what makes it run at all. See Scheduling and execution.