vibrante-node 2.5.1__py3-none-any.whl

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.
Files changed (487) hide show
  1. src/core/__init__.py +0 -0
  2. src/core/engine.py +484 -0
  3. src/core/events.py +32 -0
  4. src/core/graph.py +74 -0
  5. src/core/integrity.py +925 -0
  6. src/core/loader.py +56 -0
  7. src/core/manifest.py +910 -0
  8. src/core/models.py +59 -0
  9. src/core/persistence.py +27 -0
  10. src/core/python_to_workflow.py +182 -0
  11. src/core/registry.py +314 -0
  12. src/core/workflow_to_python.py +801 -0
  13. src/main.py +188 -0
  14. src/models/__init__.py +0 -0
  15. src/nodes/__init__.py +0 -0
  16. src/nodes/ai/__init__.py +1 -0
  17. src/nodes/base.py +174 -0
  18. src/nodes/builtins/__init__.py +0 -0
  19. src/nodes/builtins/group_node.py +210 -0
  20. src/nodes/builtins/nodes.py +452 -0
  21. src/nodes/print.py +19 -0
  22. src/nodes/test.py +19 -0
  23. src/ui/__init__.py +0 -0
  24. src/ui/canvas/__init__.py +0 -0
  25. src/ui/canvas/backdrop.py +223 -0
  26. src/ui/canvas/canvas_search_bar.py +222 -0
  27. src/ui/canvas/edge.py +98 -0
  28. src/ui/canvas/mini_map.py +138 -0
  29. src/ui/canvas/node_search_popup.py +270 -0
  30. src/ui/canvas/scene.py +1149 -0
  31. src/ui/canvas/sticky_note.py +123 -0
  32. src/ui/canvas/view.py +285 -0
  33. src/ui/code_editor.py +435 -0
  34. src/ui/export_python_dialog.py +490 -0
  35. src/ui/gemini_api_dialog.py +41 -0
  36. src/ui/gemini_chat.py +370 -0
  37. src/ui/import_python_dialog.py +122 -0
  38. src/ui/library_panel.py +246 -0
  39. src/ui/log_panel.py +315 -0
  40. src/ui/node_builder.py +841 -0
  41. src/ui/node_widget.py +1009 -0
  42. src/ui/port_widget.py +116 -0
  43. src/ui/script_editor.py +53 -0
  44. src/ui/scripting_console.py +270 -0
  45. src/ui/settings_window.py +575 -0
  46. src/ui/window.py +2012 -0
  47. src/utils/color_manager.py +50 -0
  48. src/utils/config_manager.py +71 -0
  49. src/utils/env_manager.py +232 -0
  50. src/utils/highlighter.py +110 -0
  51. src/utils/paths.py +30 -0
  52. src/utils/prism_config.py +300 -0
  53. src/utils/prism_core.py +80 -0
  54. src/utils/qt_compat.py +159 -0
  55. src/utils/runtime.py +80 -0
  56. vibrante_node/CLA.md +96 -0
  57. vibrante_node/COMMERCIAL_LICENSE.md +170 -0
  58. vibrante_node/LICENSE +178 -0
  59. vibrante_node/LICENSES/AGPL-3.0.txt +661 -0
  60. vibrante_node/LICENSES/CC-BY-4.0-SCOPE.md +53 -0
  61. vibrante_node/LICENSES/CC-BY-4.0.txt +396 -0
  62. vibrante_node/LICENSES/GPL-3.0.txt +674 -0
  63. vibrante_node/LICENSES/LGPL-3.0.txt +165 -0
  64. vibrante_node/LICENSES/README.md +65 -0
  65. vibrante_node/THIRD_PARTY_NOTICES.txt +3277 -0
  66. vibrante_node/__init__.py +2 -0
  67. vibrante_node/app.py +60 -0
  68. vibrante_node/docs/AUTOMATION_API.html +785 -0
  69. vibrante_node/docs/DEVELOPER.html +891 -0
  70. vibrante_node/docs/DOCUMENTATION.html +2761 -0
  71. vibrante_node/docs/LICENSE.txt +35 -0
  72. vibrante_node/docs/NODE_BUILDER_API.html +1155 -0
  73. vibrante_node/docs/RELEASE_v1.0.5.html +140 -0
  74. vibrante_node/docs/RELEASE_v1.1.0.html +163 -0
  75. vibrante_node/docs/RELEASE_v1.1.5.html +286 -0
  76. vibrante_node/docs/RELEASE_v1.2.0.html +175 -0
  77. vibrante_node/docs/RELEASE_v1.3.0.html +168 -0
  78. vibrante_node/docs/RELEASE_v1.4.0.html +160 -0
  79. vibrante_node/docs/RELEASE_v1.5.0.html +432 -0
  80. vibrante_node/docs/RELEASE_v1.6.0.html +293 -0
  81. vibrante_node/docs/RELEASE_v1.6.1.html +171 -0
  82. vibrante_node/docs/RELEASE_v1.7.0.html +270 -0
  83. vibrante_node/docs/RELEASE_v1.8.0.html +201 -0
  84. vibrante_node/docs/RELEASE_v1.8.1.html +124 -0
  85. vibrante_node/docs/RELEASE_v1.8.2.html +119 -0
  86. vibrante_node/docs/RELEASE_v1.8.3.html +125 -0
  87. vibrante_node/docs/RELEASE_v1.8.4.html +210 -0
  88. vibrante_node/docs/RELEASE_v1.8.5.html +223 -0
  89. vibrante_node/docs/RELEASE_v2.0.0.html +284 -0
  90. vibrante_node/docs/RELEASE_v2.1.0.html +259 -0
  91. vibrante_node/docs/RELEASE_v2.1.1.html +156 -0
  92. vibrante_node/docs/RELEASE_v2.2.0.html +369 -0
  93. vibrante_node/docs/RELEASE_v2.2.1.html +168 -0
  94. vibrante_node/docs/RELEASE_v2.3.0.html +185 -0
  95. vibrante_node/docs/RELEASE_v2.4.0.html +446 -0
  96. vibrante_node/docs/RELEASE_v2.5.0.html +478 -0
  97. vibrante_node/docs/RELEASE_v2.5.1.html +190 -0
  98. vibrante_node/docs/USER_GUIDE.html +1407 -0
  99. vibrante_node/docs/index.html +103 -0
  100. vibrante_node/docs/portal/01_introduction.html +1177 -0
  101. vibrante_node/docs/portal/02_getting_started.html +1267 -0
  102. vibrante_node/docs/portal/03_user_guide.html +1736 -0
  103. vibrante_node/docs/portal/04_workflow_tutorials.html +1473 -0
  104. vibrante_node/docs/portal/05_node_development.html +1562 -0
  105. vibrante_node/docs/portal/06_backend_architecture.html +1373 -0
  106. vibrante_node/docs/portal/07_frontend_architecture.html +1588 -0
  107. vibrante_node/docs/portal/08_api_reference.html +2336 -0
  108. vibrante_node/docs/portal/09_advanced_topics.html +1664 -0
  109. vibrante_node/docs/portal/10_contribution_guide.html +1263 -0
  110. vibrante_node/docs/portal/11_troubleshooting.html +1108 -0
  111. vibrante_node/docs/portal/12_examples_library.html +1498 -0
  112. vibrante_node/docs/portal/13_general_purpose_automation.html +1472 -0
  113. vibrante_node/docs/portal/14_custom_nodes_api.html +1960 -0
  114. vibrante_node/docs/portal/index.html +605 -0
  115. vibrante_node/docs/portal/integrations_blender.html +605 -0
  116. vibrante_node/docs/portal/integrations_deadline.html +536 -0
  117. vibrante_node/docs/portal/integrations_houdini.html +787 -0
  118. vibrante_node/docs/portal/integrations_maya.html +675 -0
  119. vibrante_node/docs/portal/integrations_prism.html +628 -0
  120. vibrante_node/docs/portal/search.json +1 -0
  121. vibrante_node/docs/validation.json +333 -0
  122. vibrante_node/examples/arnold_lighting/orchestration_notes.md +45 -0
  123. vibrante_node/examples/arnold_lighting/prompt.md +47 -0
  124. vibrante_node/examples/automation/01_linear_chain.py +10 -0
  125. vibrante_node/examples/automation/02_batch_update_prefix.py +8 -0
  126. vibrante_node/examples/automation/03_reset_scene.py +5 -0
  127. vibrante_node/examples/automation/04_batch_execution.py +9 -0
  128. vibrante_node/examples/automation/05_git_backup.py +6 -0
  129. vibrante_node/examples/automation/06_reset_math_nodes.py +12 -0
  130. vibrante_node/examples/automation/07_stress_test_grid.py +8 -0
  131. vibrante_node/examples/automation/08_scene_summary.py +8 -0
  132. vibrante_node/examples/automation/09_toggle_bools.py +8 -0
  133. vibrante_node/examples/automation/10_session_report.py +7 -0
  134. vibrante_node/examples/automation/11_simple_math_node.py +7 -0
  135. vibrante_node/examples/cinematic_camera/orchestration_notes.md +56 -0
  136. vibrante_node/examples/cinematic_camera/prompt.md +50 -0
  137. vibrante_node/examples/cinematic_explosion/orchestration_notes.md +76 -0
  138. vibrante_node/examples/cinematic_explosion/prompt.md +47 -0
  139. vibrante_node/examples/cinematic_explosion/review.md +75 -0
  140. vibrante_node/examples/dust_wave/orchestration_notes.md +43 -0
  141. vibrante_node/examples/dust_wave/prompt.md +40 -0
  142. vibrante_node/examples/nodes/async_delay.py +21 -0
  143. vibrante_node/examples/nodes/connection_logger.py +25 -0
  144. vibrante_node/examples/nodes/data_filter.py +19 -0
  145. vibrante_node/examples/nodes/dict_merge.py +20 -0
  146. vibrante_node/examples/nodes/dict_summary.py +21 -0
  147. vibrante_node/examples/nodes/dropdown_selector.py +29 -0
  148. vibrante_node/examples/nodes/env_reader.py +18 -0
  149. vibrante_node/examples/nodes/list_item_picker.py +85 -0
  150. vibrante_node/examples/nodes/list_stats.py +27 -0
  151. vibrante_node/examples/nodes/logic_threshold.py +23 -0
  152. vibrante_node/examples/nodes/math_square.py +30 -0
  153. vibrante_node/examples/nodes/random_list.py +18 -0
  154. vibrante_node/examples/nodes/reactive_config.py +24 -0
  155. vibrante_node/examples/nodes/safety_reset.py +31 -0
  156. vibrante_node/examples/nodes/string_reverse.py +16 -0
  157. vibrante_node/icons/210429_DeadlineFreeOn10RenderMachines.jpg +0 -0
  158. vibrante_node/icons/README.md +39 -0
  159. vibrante_node/icons/blender_icon.png +0 -0
  160. vibrante_node/icons/braces.png +0 -0
  161. vibrante_node/icons/braces.svg +1 -0
  162. vibrante_node/icons/builder.png +0 -0
  163. vibrante_node/icons/check.png +0 -0
  164. vibrante_node/icons/check.svg +1 -0
  165. vibrante_node/icons/chevron-right.svg +3 -0
  166. vibrante_node/icons/code.png +0 -0
  167. vibrante_node/icons/code.svg +4 -0
  168. vibrante_node/icons/computer-window.png +0 -0
  169. vibrante_node/icons/data.png +0 -0
  170. vibrante_node/icons/data.svg +5 -0
  171. vibrante_node/icons/database-search.png +0 -0
  172. vibrante_node/icons/database-search.svg +5 -0
  173. vibrante_node/icons/database-zap.png +0 -0
  174. vibrante_node/icons/database-zap.svg +5 -0
  175. vibrante_node/icons/database.png +0 -0
  176. vibrante_node/icons/database.svg +5 -0
  177. vibrante_node/icons/dice.png +0 -0
  178. vibrante_node/icons/dice.svg +1 -0
  179. vibrante_node/icons/divide.svg +5 -0
  180. vibrante_node/icons/file-input.svg +6 -0
  181. vibrante_node/icons/file-plus.png +0 -0
  182. vibrante_node/icons/file-plus.svg +6 -0
  183. vibrante_node/icons/file-text.png +0 -0
  184. vibrante_node/icons/file-text.svg +7 -0
  185. vibrante_node/icons/folder-plus.png +0 -0
  186. vibrante_node/icons/folder-plus.svg +5 -0
  187. vibrante_node/icons/folder.png +0 -0
  188. vibrante_node/icons/folder.svg +3 -0
  189. vibrante_node/icons/gear.png +0 -0
  190. vibrante_node/icons/gear.svg +1 -0
  191. vibrante_node/icons/git-branch.svg +6 -0
  192. vibrante_node/icons/hash.png +0 -0
  193. vibrante_node/icons/hash.svg +1 -0
  194. vibrante_node/icons/houdini.svg +4 -0
  195. vibrante_node/icons/houdini_icon.png +0 -0
  196. vibrante_node/icons/http.png +0 -0
  197. vibrante_node/icons/list-check.png +0 -0
  198. vibrante_node/icons/list-check.svg +7 -0
  199. vibrante_node/icons/list-plus.svg +10 -0
  200. vibrante_node/icons/list.png +0 -0
  201. vibrante_node/icons/list.svg +8 -0
  202. vibrante_node/icons/logic.png +0 -0
  203. vibrante_node/icons/logic.svg +7 -0
  204. vibrante_node/icons/math.png +0 -0
  205. vibrante_node/icons/math.svg +4 -0
  206. vibrante_node/icons/maya_icon.jpg +0 -0
  207. vibrante_node/icons/message.png +0 -0
  208. vibrante_node/icons/message.svg +3 -0
  209. vibrante_node/icons/minus.svg +3 -0
  210. vibrante_node/icons/multiply.png +0 -0
  211. vibrante_node/icons/multiply.svg +1 -0
  212. vibrante_node/icons/online-library.png +0 -0
  213. vibrante_node/icons/percentage.svg +5 -0
  214. vibrante_node/icons/plus.png +0 -0
  215. vibrante_node/icons/plus.svg +1 -0
  216. vibrante_node/icons/print.png +0 -0
  217. vibrante_node/icons/print.svg +5 -0
  218. vibrante_node/icons/prism_icon.png +0 -0
  219. vibrante_node/icons/refresh.svg +6 -0
  220. vibrante_node/icons/repeat.svg +6 -0
  221. vibrante_node/icons/scales.png +0 -0
  222. vibrante_node/icons/scales.svg +1 -0
  223. vibrante_node/icons/shuffle.svg +7 -0
  224. vibrante_node/icons/string.png +0 -0
  225. vibrante_node/icons/string.svg +5 -0
  226. vibrante_node/icons/terminal.png +0 -0
  227. vibrante_node/icons/terminal.svg +1 -0
  228. vibrante_node/icons/timer.png +0 -0
  229. vibrante_node/icons/timer.svg +4 -0
  230. vibrante_node/icons/toggle-switch.svg +5 -0
  231. vibrante_node/icons/uppercase.png +0 -0
  232. vibrante_node/icons/uppercase.svg +1 -0
  233. vibrante_node/icons/variable-get.svg +4 -0
  234. vibrante_node/icons/variable-set.svg +6 -0
  235. vibrante_node/icons/variable.png +0 -0
  236. vibrante_node/icons/variable.svg +5 -0
  237. vibrante_node/icons/vibrante-node-icon.png +0 -0
  238. vibrante_node/icons/vibrante-node-logo.png +0 -0
  239. vibrante_node/icons/vibrante-node-main_logo.png +0 -0
  240. vibrante_node/icons/vibrante-node-resize_main_logo.png +0 -0
  241. vibrante_node/logo.png +0 -0
  242. vibrante_node/mcp_cli.py +36 -0
  243. vibrante_node/node_examples/Split_String.json +35 -0
  244. vibrante_node/node_examples/async_delay.json +32 -0
  245. vibrante_node/node_examples/delay_timer.json +29 -0
  246. vibrante_node/node_examples/file_reader.json +29 -0
  247. vibrante_node/node_examples/fruit_selector.json +37 -0
  248. vibrante_node/node_examples/json_parser.json +29 -0
  249. vibrante_node/node_examples/line_counter.json +29 -0
  250. vibrante_node/node_examples/list_append.json +32 -0
  251. vibrante_node/node_examples/list_images_recursive.json +55 -0
  252. vibrante_node/node_examples/logic_and.json +34 -0
  253. vibrante_node/node_examples/logic_compare.json +36 -0
  254. vibrante_node/node_examples/math_abs.json +29 -0
  255. vibrante_node/node_examples/math_add.json +32 -0
  256. vibrante_node/node_examples/reactive_config.json +28 -0
  257. vibrante_node/node_examples/string_uppercase.json +29 -0
  258. vibrante_node/nodes/Dropdown_Selector.json +27 -0
  259. vibrante_node/nodes/add_integers.json +34 -0
  260. vibrante_node/nodes/blender_action_bake_animation.json +23 -0
  261. vibrante_node/nodes/blender_action_custom.json +21 -0
  262. vibrante_node/nodes/blender_action_export_alembic.json +22 -0
  263. vibrante_node/nodes/blender_action_export_fbx.json +23 -0
  264. vibrante_node/nodes/blender_action_export_gltf.json +21 -0
  265. vibrante_node/nodes/blender_action_export_obj.json +19 -0
  266. vibrante_node/nodes/blender_action_export_usd.json +23 -0
  267. vibrante_node/nodes/blender_action_import_alembic.json +18 -0
  268. vibrante_node/nodes/blender_action_import_fbx.json +18 -0
  269. vibrante_node/nodes/blender_action_import_gltf.json +18 -0
  270. vibrante_node/nodes/blender_action_import_obj.json +18 -0
  271. vibrante_node/nodes/blender_action_new_blend.json +18 -0
  272. vibrante_node/nodes/blender_action_open_blend.json +18 -0
  273. vibrante_node/nodes/blender_action_render.json +23 -0
  274. vibrante_node/nodes/blender_action_save_blend.json +18 -0
  275. vibrante_node/nodes/blender_action_scene_info.json +17 -0
  276. vibrante_node/nodes/blender_action_set_frame_range.json +20 -0
  277. vibrante_node/nodes/blender_action_set_render_settings.json +27 -0
  278. vibrante_node/nodes/blender_get_action_result.json +22 -0
  279. vibrante_node/nodes/blender_headless.json +86 -0
  280. vibrante_node/nodes/compare.json +48 -0
  281. vibrante_node/nodes/console_print.json +29 -0
  282. vibrante_node/nodes/create_dictionary.json +18 -0
  283. vibrante_node/nodes/create_folder.json +17 -0
  284. vibrante_node/nodes/create_list.json +18 -0
  285. vibrante_node/nodes/deadline_blender_submit.json +38 -0
  286. vibrante_node/nodes/deadline_houdini_submit.json +38 -0
  287. vibrante_node/nodes/deadline_job_status.json +28 -0
  288. vibrante_node/nodes/deadline_maya_submit.json +40 -0
  289. vibrante_node/nodes/delay_timer.json +26 -0
  290. vibrante_node/nodes/example_random_float.json +35 -0
  291. vibrante_node/nodes/file_append.json +18 -0
  292. vibrante_node/nodes/file_write.json +18 -0
  293. vibrante_node/nodes/for_loop.json +46 -0
  294. vibrante_node/nodes/get_dict_value.json +19 -0
  295. vibrante_node/nodes/get_list_item.json +19 -0
  296. vibrante_node/nodes/houdini_action_bake_animation.json +20 -0
  297. vibrante_node/nodes/houdini_action_custom.json +20 -0
  298. vibrante_node/nodes/houdini_action_export_alembic.json +20 -0
  299. vibrante_node/nodes/houdini_action_export_camera_alembic.json +20 -0
  300. vibrante_node/nodes/houdini_action_export_fbx.json +18 -0
  301. vibrante_node/nodes/houdini_action_import_alembic.json +18 -0
  302. vibrante_node/nodes/houdini_action_import_camera.json +17 -0
  303. vibrante_node/nodes/houdini_action_import_fbx.json +18 -0
  304. vibrante_node/nodes/houdini_action_import_obj.json +18 -0
  305. vibrante_node/nodes/houdini_action_new_hip.json +16 -0
  306. vibrante_node/nodes/houdini_action_open_hip.json +17 -0
  307. vibrante_node/nodes/houdini_action_save_hip.json +17 -0
  308. vibrante_node/nodes/houdini_action_scene_info.json +16 -0
  309. vibrante_node/nodes/houdini_action_set_frame_range.json +18 -0
  310. vibrante_node/nodes/houdini_get_action_result.json +21 -0
  311. vibrante_node/nodes/houdini_headless.json +85 -0
  312. vibrante_node/nodes/houdini_scene_snapshot.json +41 -0
  313. vibrante_node/nodes/http_request.json +76 -0
  314. vibrante_node/nodes/if_condition.json +45 -0
  315. vibrante_node/nodes/list_directory.json +17 -0
  316. vibrante_node/nodes/list_images_recursive.json +41 -0
  317. vibrante_node/nodes/list_item_picker.json +41 -0
  318. vibrante_node/nodes/list_length.json +17 -0
  319. vibrante_node/nodes/logical_gate.json +45 -0
  320. vibrante_node/nodes/loop_body.json +62 -0
  321. vibrante_node/nodes/math_add.json +17 -0
  322. vibrante_node/nodes/math_divide.json +17 -0
  323. vibrante_node/nodes/math_modulo.json +17 -0
  324. vibrante_node/nodes/math_multiply.json +36 -0
  325. vibrante_node/nodes/math_subtract.json +17 -0
  326. vibrante_node/nodes/maya_action_assign_material.json +18 -0
  327. vibrante_node/nodes/maya_action_bake_animation.json +21 -0
  328. vibrante_node/nodes/maya_action_create_render_layer.json +19 -0
  329. vibrante_node/nodes/maya_action_custom.json +20 -0
  330. vibrante_node/nodes/maya_action_export_alembic.json +22 -0
  331. vibrante_node/nodes/maya_action_export_camera_alembic.json +20 -0
  332. vibrante_node/nodes/maya_action_export_fbx.json +18 -0
  333. vibrante_node/nodes/maya_action_import_alembic.json +17 -0
  334. vibrante_node/nodes/maya_action_import_camera.json +17 -0
  335. vibrante_node/nodes/maya_action_import_fbx.json +17 -0
  336. vibrante_node/nodes/maya_action_import_obj.json +17 -0
  337. vibrante_node/nodes/maya_action_list_references.json +16 -0
  338. vibrante_node/nodes/maya_action_new_scene.json +16 -0
  339. vibrante_node/nodes/maya_action_open_scene.json +18 -0
  340. vibrante_node/nodes/maya_action_playblast.json +22 -0
  341. vibrante_node/nodes/maya_action_reference_alembic.json +18 -0
  342. vibrante_node/nodes/maya_action_reference_scene.json +18 -0
  343. vibrante_node/nodes/maya_action_save_scene.json +18 -0
  344. vibrante_node/nodes/maya_action_scene_info.json +16 -0
  345. vibrante_node/nodes/maya_action_set_aovs.json +18 -0
  346. vibrante_node/nodes/maya_action_set_frame_range.json +18 -0
  347. vibrante_node/nodes/maya_action_set_render_settings.json +23 -0
  348. vibrante_node/nodes/maya_get_action_result.json +21 -0
  349. vibrante_node/nodes/maya_headless.json +27 -0
  350. vibrante_node/nodes/mcp_call_tool.json +19 -0
  351. vibrante_node/nodes/mcp_list_tools.json +18 -0
  352. vibrante_node/nodes/mcp_server_init.json +23 -0
  353. vibrante_node/nodes/message_node.json +32 -0
  354. vibrante_node/nodes/prism_add_integration.json +49 -0
  355. vibrante_node/nodes/prism_build_entity.json +45 -0
  356. vibrante_node/nodes/prism_change_project.json +37 -0
  357. vibrante_node/nodes/prism_core_info.json +37 -0
  358. vibrante_node/nodes/prism_core_init.json +46 -0
  359. vibrante_node/nodes/prism_create_category.json +44 -0
  360. vibrante_node/nodes/prism_create_entity.json +60 -0
  361. vibrante_node/nodes/prism_create_playblast.json +56 -0
  362. vibrante_node/nodes/prism_create_product_version.json +64 -0
  363. vibrante_node/nodes/prism_create_project.json +50 -0
  364. vibrante_node/nodes/prism_create_scene_from_preset.json +59 -0
  365. vibrante_node/nodes/prism_eval.json +42 -0
  366. vibrante_node/nodes/prism_get_aovs.json +29 -0
  367. vibrante_node/nodes/prism_get_asset_by_name.json +69 -0
  368. vibrante_node/nodes/prism_get_asset_type_by_name.json +62 -0
  369. vibrante_node/nodes/prism_get_asset_types_by_project.json +55 -0
  370. vibrante_node/nodes/prism_get_assets_by_project.json +41 -0
  371. vibrante_node/nodes/prism_get_assets_by_type.json +69 -0
  372. vibrante_node/nodes/prism_get_config.json +48 -0
  373. vibrante_node/nodes/prism_get_current_scene.json +37 -0
  374. vibrante_node/nodes/prism_get_departments.json +37 -0
  375. vibrante_node/nodes/prism_get_entity_info.json +69 -0
  376. vibrante_node/nodes/prism_get_entity_path.json +69 -0
  377. vibrante_node/nodes/prism_get_export_path.json +26 -0
  378. vibrante_node/nodes/prism_get_latest_product_path.json +34 -0
  379. vibrante_node/nodes/prism_get_media.json +29 -0
  380. vibrante_node/nodes/prism_get_media_versions.json +33 -0
  381. vibrante_node/nodes/prism_get_plugin.json +35 -0
  382. vibrante_node/nodes/prism_get_preset_scenes.json +35 -0
  383. vibrante_node/nodes/prism_get_product_versions.json +33 -0
  384. vibrante_node/nodes/prism_get_products.json +29 -0
  385. vibrante_node/nodes/prism_get_project_by_name.json +55 -0
  386. vibrante_node/nodes/prism_get_project_config_path.json +26 -0
  387. vibrante_node/nodes/prism_get_scene_files.json +45 -0
  388. vibrante_node/nodes/prism_get_scene_path.json +23 -0
  389. vibrante_node/nodes/prism_get_sequence_by_project.json +48 -0
  390. vibrante_node/nodes/prism_get_sequences_by_project.json +41 -0
  391. vibrante_node/nodes/prism_get_shot_by_name.json +62 -0
  392. vibrante_node/nodes/prism_get_shot_by_sequence.json +55 -0
  393. vibrante_node/nodes/prism_get_shot_info.json +69 -0
  394. vibrante_node/nodes/prism_get_shots.json +29 -0
  395. vibrante_node/nodes/prism_get_shots_by_project_sequence.json +48 -0
  396. vibrante_node/nodes/prism_get_shots_by_sequence.json +48 -0
  397. vibrante_node/nodes/prism_get_tasks.json +39 -0
  398. vibrante_node/nodes/prism_import_product.json +37 -0
  399. vibrante_node/nodes/prism_list_plugins.json +25 -0
  400. vibrante_node/nodes/prism_list_projects.json +25 -0
  401. vibrante_node/nodes/prism_login_token.json +33 -0
  402. vibrante_node/nodes/prism_monkey_patch.json +46 -0
  403. vibrante_node/nodes/prism_open_scene.json +33 -0
  404. vibrante_node/nodes/prism_popup.json +40 -0
  405. vibrante_node/nodes/prism_register_callback.json +58 -0
  406. vibrante_node/nodes/prism_save_scene_version.json +90 -0
  407. vibrante_node/nodes/prism_send_cmd.json +54 -0
  408. vibrante_node/nodes/prism_set_config.json +55 -0
  409. vibrante_node/nodes/prism_studio_assign_project.json +43 -0
  410. vibrante_node/nodes/prism_trigger_callback.json +42 -0
  411. vibrante_node/nodes/prism_usd_department_layer_path.json +35 -0
  412. vibrante_node/nodes/prism_usd_entity_path.json +29 -0
  413. vibrante_node/nodes/prism_usd_sublayer_path.json +41 -0
  414. vibrante_node/nodes/prism_usd_update_department_layer.json +33 -0
  415. vibrante_node/nodes/prism_usd_update_sublayer.json +33 -0
  416. vibrante_node/nodes/python_script.json +17 -0
  417. vibrante_node/nodes/scene_intent_extractor.json +25 -0
  418. vibrante_node/nodes/set_dict_value.json +20 -0
  419. vibrante_node/nodes/string_concat.json +47 -0
  420. vibrante_node/nodes/string_length.json +16 -0
  421. vibrante_node/nodes/string_lowercase.json +16 -0
  422. vibrante_node/nodes/string_replace.json +18 -0
  423. vibrante_node/nodes/string_split.json +17 -0
  424. vibrante_node/nodes/string_uppercase.json +16 -0
  425. vibrante_node/nodes/variable_node.json +42 -0
  426. vibrante_node/nodes/while_loop.json +18 -0
  427. vibrante_node/splash.png +0 -0
  428. vibrante_node/vfx_workflows/01_prism_project_overview.json +492 -0
  429. vibrante_node/vfx_workflows/02_maya_asset_publish.json +776 -0
  430. vibrante_node/vfx_workflows/03_multi_shot_alembic_export.json +856 -0
  431. vibrante_node/vfx_workflows/04_deadline_render_pipeline.json +994 -0
  432. vibrante_node/vfx_workflows/05_houdini_fx_pipeline.json +1056 -0
  433. vibrante_node/vfx_workflows/06_blender_multi_format_export.json +1206 -0
  434. vibrante_node/website_examples/database_query.json +69 -0
  435. vibrante_node/website_examples/email_notification.json +104 -0
  436. vibrante_node/website_examples/file_batch_processor.json +62 -0
  437. vibrante_node/website_examples/folder_monitor.json +55 -0
  438. vibrante_node/website_examples/hou_sop_chain.json +69 -0
  439. vibrante_node/website_examples/http_request.json +90 -0
  440. vibrante_node/website_examples/image_resizer.json +90 -0
  441. vibrante_node/website_examples/llm_text_generation.json +90 -0
  442. vibrante_node/website_examples/prism_multi_asset_publisher.json +76 -0
  443. vibrante_node/website_examples/regex_replace.json +69 -0
  444. vibrante_node/workflows/If_condition.json +134 -0
  445. vibrante_node/workflows/Maya_WorkFlow.json +464 -0
  446. vibrante_node/workflows/asset_intelligence_pipeline.json +259 -0
  447. vibrante_node/workflows/concat_string_with_loop.json +262 -0
  448. vibrante_node/workflows/delay_time.json +74 -0
  449. vibrante_node/workflows/example_workflow_maya_prism_demo.json +503 -0
  450. vibrante_node/workflows/example_workflow_prism_demo.json +276 -0
  451. vibrante_node/workflows/example_workflow_prism_demo_02.json +221 -0
  452. vibrante_node/workflows/extract_FPS_from_maya_scene.json +265 -0
  453. vibrante_node/workflows/for_each.json +260 -0
  454. vibrante_node/workflows/get_list_item.json +151 -0
  455. vibrante_node/workflows/hou_mcp_scene_context_demo.json +67 -0
  456. vibrante_node/workflows/list_recursive_images.json +103 -0
  457. vibrante_node/workflows/logic_if_example.json +262 -0
  458. vibrante_node/workflows/logic_if_with_variables.json +210 -0
  459. vibrante_node/workflows/loop_break_example.json +197 -0
  460. vibrante_node/workflows/loop_operation_example.json +382 -0
  461. vibrante_node/workflows/mcp_list_tools_demo.json +90 -0
  462. vibrante_node/workflows/prism_assets_workflow.json +131 -0
  463. vibrante_node/workflows/python_script_node.json +89 -0
  464. vibrante_node/workflows/run_in_sequence.json +158 -0
  465. vibrante_node/workflows/scene_intent_pipeline.json +134 -0
  466. vibrante_node/workflows/scene_planning_pipeline.json +258 -0
  467. vibrante_node/workflows/semantic_scene_intent.json +96 -0
  468. vibrante_node/workflows/setup_maya_scene.json +352 -0
  469. vibrante_node/workflows/tutorial_maya_headless_prism_pipeline.json +593 -0
  470. vibrante_node/workflows/two_way_switch.json +341 -0
  471. vibrante_node/workflows/while_loop_class_example.json +192 -0
  472. vibrante_node/workflows/while_loop_example.json +184 -0
  473. vibrante_node/workflows/while_loop_retry_example.json +276 -0
  474. vibrante_node-2.5.1.dist-info/METADATA +715 -0
  475. vibrante_node-2.5.1.dist-info/RECORD +487 -0
  476. vibrante_node-2.5.1.dist-info/WHEEL +5 -0
  477. vibrante_node-2.5.1.dist-info/entry_points.txt +3 -0
  478. vibrante_node-2.5.1.dist-info/licenses/CLA.md +96 -0
  479. vibrante_node-2.5.1.dist-info/licenses/COMMERCIAL_LICENSE.md +170 -0
  480. vibrante_node-2.5.1.dist-info/licenses/LICENSE +178 -0
  481. vibrante_node-2.5.1.dist-info/licenses/LICENSES/AGPL-3.0.txt +661 -0
  482. vibrante_node-2.5.1.dist-info/licenses/LICENSES/CC-BY-4.0-SCOPE.md +53 -0
  483. vibrante_node-2.5.1.dist-info/licenses/LICENSES/CC-BY-4.0.txt +396 -0
  484. vibrante_node-2.5.1.dist-info/licenses/LICENSES/GPL-3.0.txt +674 -0
  485. vibrante_node-2.5.1.dist-info/licenses/LICENSES/LGPL-3.0.txt +165 -0
  486. vibrante_node-2.5.1.dist-info/licenses/LICENSES/README.md +65 -0
  487. vibrante_node-2.5.1.dist-info/top_level.txt +2 -0
@@ -0,0 +1,1562 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <meta name="description" content="Vibrante-Node v2.5.1 — Node Development Guide">
7
+ <title>Node Development Guide — Vibrante-Node Docs</title>
8
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlight.js@11.9.0/styles/atom-one-dark.min.css">
9
+ <style>
10
+ /* ── Reset & Variables ─────────────────────────────────────────────────── */
11
+ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
12
+ :root {
13
+ --bg: #1e1e2e;
14
+ --surface: #181825;
15
+ --surface2: #11111b;
16
+ --border: #313244;
17
+ --text: #cdd6f4;
18
+ --subtext: #a6adc8;
19
+ --muted: #6c7086;
20
+ --lavender: #b4befe;
21
+ --blue: #89b4fa;
22
+ --teal: #94e2d5;
23
+ --green: #a6e3a1;
24
+ --yellow: #f9e2af;
25
+ --peach: #fab387;
26
+ --red: #f38ba8;
27
+ --pink: #f5c2e7;
28
+ --mauve: #cba6f7;
29
+ --sidebar-w: 260px;
30
+ --toc-w: 220px;
31
+ --header-h: 56px;
32
+ --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
33
+ --mono: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
34
+ }
35
+
36
+ /* ── Layout ─────────────────────────────────────────────────────────────── */
37
+ html { scroll-behavior: smooth; }
38
+ body {
39
+ font-family: var(--font);
40
+ background: var(--bg);
41
+ color: var(--text);
42
+ line-height: 1.7;
43
+ min-height: 100vh;
44
+ display: grid;
45
+ grid-template-rows: var(--header-h) 1fr;
46
+ grid-template-columns: var(--sidebar-w) 1fr var(--toc-w);
47
+ grid-template-areas:
48
+ "header header header"
49
+ "sidebar content toc";
50
+ }
51
+
52
+ /* ── Header ─────────────────────────────────────────────────────────────── */
53
+ .header {
54
+ grid-area: header;
55
+ position: sticky; top: 0; z-index: 200;
56
+ background: var(--surface2);
57
+ border-bottom: 1px solid var(--border);
58
+ display: flex; align-items: center; gap: 16px;
59
+ padding: 0 24px;
60
+ }
61
+ .header-logo {
62
+ font-weight: 700; font-size: 1.05em;
63
+ color: var(--mauve);
64
+ text-decoration: none;
65
+ white-space: nowrap;
66
+ }
67
+ .header-version {
68
+ font-size: .78em;
69
+ background: var(--border);
70
+ color: var(--subtext);
71
+ padding: 2px 8px; border-radius: 12px;
72
+ }
73
+ .header-spacer { flex: 1; }
74
+ .search-wrap { position: relative; }
75
+ #search-input {
76
+ background: var(--surface);
77
+ border: 1px solid var(--border);
78
+ border-radius: 8px;
79
+ color: var(--text);
80
+ font-family: var(--font);
81
+ font-size: .9em;
82
+ padding: 6px 14px 6px 36px;
83
+ width: 260px;
84
+ outline: none;
85
+ transition: border-color .15s;
86
+ }
87
+ #search-input:focus { border-color: var(--mauve); }
88
+ .search-icon {
89
+ position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
90
+ color: var(--muted); pointer-events: none; font-size: .9em;
91
+ }
92
+ #search-results {
93
+ position: absolute; top: calc(100% + 8px); right: 0;
94
+ width: 380px; max-height: 420px; overflow-y: auto;
95
+ background: var(--surface);
96
+ border: 1px solid var(--border);
97
+ border-radius: 10px;
98
+ box-shadow: 0 8px 32px rgba(0,0,0,.5);
99
+ display: none; z-index: 300;
100
+ }
101
+ #search-results.visible { display: block; }
102
+ .search-result-item {
103
+ padding: 10px 16px;
104
+ border-bottom: 1px solid var(--border);
105
+ cursor: pointer;
106
+ transition: background .1s;
107
+ }
108
+ .search-result-item:last-child { border-bottom: none; }
109
+ .search-result-item:hover { background: var(--bg); }
110
+ .search-result-title { color: var(--blue); font-weight: 600; font-size: .9em; }
111
+ .search-result-excerpt { color: var(--subtext); font-size: .82em; margin-top: 2px; line-height: 1.4; }
112
+ .search-no-results { padding: 16px; color: var(--muted); text-align: center; font-size: .9em; }
113
+
114
+ /* ── Sidebar ─────────────────────────────────────────────────────────────── */
115
+ .sidebar {
116
+ grid-area: sidebar;
117
+ position: sticky; top: var(--header-h);
118
+ height: calc(100vh - var(--header-h));
119
+ overflow-y: auto;
120
+ background: var(--surface);
121
+ border-right: 1px solid var(--border);
122
+ padding: 20px 0;
123
+ scrollbar-width: thin;
124
+ scrollbar-color: var(--border) transparent;
125
+ }
126
+ .sidebar::-webkit-scrollbar { width: 4px; }
127
+ .sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
128
+
129
+ .sidebar-group { margin-bottom: 4px; }
130
+ .sidebar-group-title {
131
+ font-size: .7em;
132
+ text-transform: uppercase;
133
+ letter-spacing: .1em;
134
+ color: var(--muted);
135
+ padding: 10px 20px 4px;
136
+ font-weight: 600;
137
+ }
138
+ .sidebar-link {
139
+ display: flex; align-items: center; gap: 8px;
140
+ padding: 6px 20px;
141
+ color: var(--subtext);
142
+ text-decoration: none;
143
+ font-size: .88em;
144
+ border-left: 3px solid transparent;
145
+ transition: all .12s;
146
+ line-height: 1.3;
147
+ }
148
+ .sidebar-link:hover { color: var(--text); background: var(--bg); }
149
+ .sidebar-link.active {
150
+ color: var(--mauve);
151
+ border-left-color: var(--mauve);
152
+ background: rgba(180,190,254,.06);
153
+ font-weight: 600;
154
+ }
155
+ .sidebar-num {
156
+ font-size: .7em;
157
+ color: var(--muted);
158
+ background: var(--border);
159
+ border-radius: 4px;
160
+ padding: 1px 5px;
161
+ flex-shrink: 0;
162
+ }
163
+ .sidebar-divider {
164
+ border: none;
165
+ border-top: 1px solid var(--border);
166
+ margin: 12px 16px;
167
+ }
168
+
169
+ /* ── Content ─────────────────────────────────────────────────────────────── */
170
+ .content {
171
+ grid-area: content;
172
+ min-width: 0;
173
+ padding: 40px 48px 80px;
174
+ max-width: 860px;
175
+ }
176
+ .content-inner { max-width: 820px; }
177
+
178
+ /* Breadcrumb */
179
+ .breadcrumb {
180
+ font-size: .8em;
181
+ color: var(--muted);
182
+ margin-bottom: 28px;
183
+ display: flex; align-items: center; gap: 6px;
184
+ }
185
+ .breadcrumb a { color: var(--blue); text-decoration: none; }
186
+ .breadcrumb a:hover { text-decoration: underline; }
187
+ .breadcrumb-sep { color: var(--border); }
188
+
189
+ /* Typography */
190
+ h1 { font-size: 2em; color: var(--mauve); border-bottom: 2px solid var(--border); padding-bottom: 12px; margin: 20px 0 20px; }
191
+ h2 { font-size: 1.45em; color: var(--blue); margin: 40px 0 14px; padding-top: 8px; }
192
+ h3 { font-size: 1.15em; color: var(--teal); margin: 28px 0 10px; }
193
+ h4 { font-size: 1em; color: var(--pink); margin: 20px 0 8px; }
194
+ h5 { font-size: .95em; color: var(--yellow); margin: 16px 0 6px; }
195
+ p { margin-bottom: 16px; color: var(--text); }
196
+ a { color: var(--blue); }
197
+ a:hover { text-decoration: underline; }
198
+ strong { color: var(--peach); }
199
+ em { color: var(--yellow); font-style: italic; }
200
+
201
+ ul, ol { margin: 10px 0 16px 24px; }
202
+ li { margin-bottom: 6px; }
203
+ li > ul, li > ol { margin-top: 4px; margin-bottom: 4px; }
204
+
205
+ blockquote {
206
+ border-left: 4px solid var(--mauve);
207
+ padding: 10px 20px;
208
+ margin: 16px 0;
209
+ background: rgba(180,190,254,.05);
210
+ border-radius: 0 8px 8px 0;
211
+ color: var(--subtext);
212
+ }
213
+ blockquote strong { color: var(--mauve); }
214
+
215
+ hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
216
+
217
+ /* Code */
218
+ code {
219
+ background: var(--surface2);
220
+ color: var(--red);
221
+ padding: 2px 7px; border-radius: 5px;
222
+ font-family: var(--mono); font-size: .87em;
223
+ }
224
+ pre {
225
+ background: var(--surface2) !important;
226
+ border: 1px solid var(--border);
227
+ border-radius: 10px;
228
+ padding: 20px 22px;
229
+ overflow-x: auto;
230
+ margin: 16px 0 22px;
231
+ position: relative;
232
+ }
233
+ pre code {
234
+ background: none !important;
235
+ color: inherit !important;
236
+ padding: 0; font-size: .9em;
237
+ border-radius: 0;
238
+ }
239
+ /* Copy button */
240
+ .copy-btn {
241
+ position: absolute; top: 10px; right: 12px;
242
+ background: var(--border);
243
+ color: var(--subtext);
244
+ border: none; border-radius: 5px;
245
+ padding: 3px 10px; font-size: .75em;
246
+ cursor: pointer; transition: all .12s;
247
+ font-family: var(--font);
248
+ }
249
+ .copy-btn:hover { background: var(--mauve); color: var(--surface2); }
250
+ .copy-btn.copied { background: var(--green); color: var(--surface2); }
251
+
252
+ /* Tables */
253
+ table { border-collapse: collapse; width: 100%; margin: 16px 0 22px; font-size: .9em; }
254
+ th { background: var(--border); color: var(--mauve); padding: 10px 14px; text-align: left; font-weight: 600; }
255
+ td { border-top: 1px solid var(--border); padding: 9px 14px; color: var(--text); }
256
+ tr:nth-child(even) td { background: rgba(17,17,27,.4); }
257
+ td code { font-size: .85em; }
258
+
259
+ /* Callout boxes */
260
+ .callout {
261
+ border-radius: 8px;
262
+ padding: 14px 18px;
263
+ margin: 16px 0 22px;
264
+ border-left: 4px solid;
265
+ }
266
+ .callout-note { background: rgba(137,180,250,.08); border-color: var(--blue); }
267
+ .callout-tip { background: rgba(166,227,161,.08); border-color: var(--green); }
268
+ .callout-warning { background: rgba(249,226,175,.08); border-color: var(--yellow); }
269
+ .callout-danger { background: rgba(243,139,168,.08); border-color: var(--red); }
270
+ .callout-title { font-weight: 700; font-size: .85em; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
271
+ .callout-note .callout-title { color: var(--blue); }
272
+ .callout-tip .callout-title { color: var(--green); }
273
+ .callout-warning .callout-title { color: var(--yellow); }
274
+ .callout-danger .callout-title { color: var(--red); }
275
+
276
+ /* Validation badges */
277
+ .val-badge {
278
+ display: inline-block; font-size: .78em; font-weight: 600;
279
+ padding: 4px 12px; border-radius: 20px; margin-bottom: 18px;
280
+ border: 1px solid transparent; letter-spacing: .02em;
281
+ }
282
+ .val-badge-ok { background: rgba(166,227,161,.12); border-color: var(--green); color: var(--green); }
283
+ .val-badge-warn { background: rgba(249,226,175,.12); border-color: var(--yellow); color: var(--yellow); }
284
+ .val-badge-error { background: rgba(243,139,168,.12); border-color: var(--red); color: var(--red); }
285
+ .val-badge-unknown { background: rgba(108,112,134,.12); border-color: #6c7086; color: #6c7086; }
286
+
287
+ /* Prev/Next navigation */
288
+ .page-nav {
289
+ display: flex; justify-content: space-between;
290
+ margin-top: 60px; padding-top: 24px;
291
+ border-top: 1px solid var(--border);
292
+ gap: 16px;
293
+ }
294
+ .page-nav-link {
295
+ display: flex; flex-direction: column;
296
+ text-decoration: none;
297
+ padding: 14px 20px;
298
+ background: var(--surface);
299
+ border: 1px solid var(--border);
300
+ border-radius: 10px;
301
+ min-width: 200px;
302
+ transition: border-color .15s;
303
+ max-width: 48%;
304
+ }
305
+ .page-nav-link:hover { border-color: var(--mauve); }
306
+ .page-nav-label { font-size: .75em; color: var(--muted); margin-bottom: 4px; }
307
+ .page-nav-title { color: var(--blue); font-weight: 600; font-size: .95em; }
308
+ .page-nav-link.prev .page-nav-label::before { content: '← '; }
309
+ .page-nav-link.next { margin-left: auto; text-align: right; }
310
+ .page-nav-link.next .page-nav-label::after { content: ' →'; }
311
+
312
+ /* ── TOC (right panel) ───────────────────────────────────────────────────── */
313
+ .toc {
314
+ grid-area: toc;
315
+ position: sticky; top: var(--header-h);
316
+ height: calc(100vh - var(--header-h));
317
+ overflow-y: auto;
318
+ padding: 28px 16px 28px 8px;
319
+ scrollbar-width: thin;
320
+ scrollbar-color: var(--border) transparent;
321
+ }
322
+ .toc-title {
323
+ font-size: .72em;
324
+ text-transform: uppercase;
325
+ letter-spacing: .1em;
326
+ color: var(--muted);
327
+ font-weight: 600;
328
+ margin-bottom: 12px;
329
+ padding-left: 8px;
330
+ }
331
+ .toc-link {
332
+ display: block;
333
+ padding: 4px 8px;
334
+ color: var(--subtext);
335
+ text-decoration: none;
336
+ font-size: .82em;
337
+ border-left: 2px solid transparent;
338
+ border-radius: 0 4px 4px 0;
339
+ transition: all .12s;
340
+ line-height: 1.35;
341
+ margin-bottom: 1px;
342
+ }
343
+ .toc-link:hover { color: var(--text); border-left-color: var(--border); }
344
+ .toc-link.active { color: var(--mauve); border-left-color: var(--mauve); background: rgba(180,190,254,.05); }
345
+ .toc-link.toc-h3 { padding-left: 20px; font-size: .79em; }
346
+ .toc-link.toc-h4 { padding-left: 32px; font-size: .76em; color: var(--muted); }
347
+
348
+ /* ── Responsive ──────────────────────────────────────────────────────────── */
349
+ @media (max-width: 1100px) {
350
+ body { grid-template-columns: var(--sidebar-w) 1fr 0; }
351
+ .toc { display: none; }
352
+ }
353
+ @media (max-width: 760px) {
354
+ body { grid-template-columns: 0 1fr 0; grid-template-rows: var(--header-h) 1fr; }
355
+ .sidebar { display: none; }
356
+ .content { padding: 24px 20px 60px; }
357
+ #search-input { width: 180px; }
358
+ }
359
+
360
+ /* ── Index / landing page ────────────────────────────────────────────────── */
361
+ .hero { text-align: center; padding: 60px 0 48px; }
362
+ .hero h1 { border: none; font-size: 2.8em; }
363
+ .hero .tagline { color: var(--subtext); font-size: 1.15em; margin-top: 10px; }
364
+ .hero .version-badge {
365
+ display: inline-block;
366
+ background: var(--border); color: var(--mauve);
367
+ padding: 4px 14px; border-radius: 20px; font-size: .85em;
368
+ margin-top: 14px;
369
+ }
370
+ .group-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 16px 0 36px; }
371
+ .doc-card {
372
+ background: var(--surface);
373
+ border: 1px solid var(--border);
374
+ border-radius: 12px;
375
+ padding: 20px 24px;
376
+ text-decoration: none;
377
+ color: var(--text);
378
+ transition: border-color .15s, background .15s;
379
+ display: block;
380
+ }
381
+ .doc-card:hover { border-color: var(--mauve); background: rgba(180,190,254,.04); }
382
+ .doc-card-num { font-size: .72em; color: var(--muted); margin-bottom: 4px; }
383
+ .doc-card-title { color: var(--blue); font-weight: 700; font-size: 1em; margin-bottom: 6px; }
384
+ .doc-card-desc { color: var(--subtext); font-size: .85em; line-height: 1.5; }
385
+ .group-title { color: var(--teal); font-size: 1.1em; font-weight: 600; margin: 32px 0 10px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
386
+ </style>
387
+ <span id="portal-base" data-base="" style="display:none"></span>
388
+ </head>
389
+ <body>
390
+
391
+ <!-- ── Header ─────────────────────────────────────────────────────────── -->
392
+ <header class="header">
393
+ <a class="header-logo" href="index.html">Vibrante-Node</a>
394
+ <span class="header-version">v2.5.1</span>
395
+ <div class="header-spacer"></div>
396
+ <div class="search-wrap">
397
+ <span class="search-icon">&#128269;</span>
398
+ <input id="search-input" type="text" placeholder="Search docs… (/)" autocomplete="off" spellcheck="false">
399
+ <div id="search-results"></div>
400
+ </div>
401
+ </header>
402
+
403
+ <!-- ── Sidebar ────────────────────────────────────────────────────────── -->
404
+ <nav class="sidebar">
405
+ <div class="sidebar-group">
406
+ <div class="sidebar-group-title">Overview</div>
407
+ <a class="sidebar-link" href="01_introduction.html"><span class="sidebar-num">01</span>Introduction</a>
408
+ <a class="sidebar-link" href="02_getting_started.html"><span class="sidebar-num">02</span>Getting Started</a>
409
+ </div>
410
+ <div class="sidebar-group">
411
+ <div class="sidebar-group-title">Using the App</div>
412
+ <a class="sidebar-link" href="03_user_guide.html"><span class="sidebar-num">03</span>User Guide</a>
413
+ <a class="sidebar-link" href="04_workflow_tutorials.html"><span class="sidebar-num">04</span>Workflow Tutorials</a>
414
+ </div>
415
+ <div class="sidebar-group">
416
+ <div class="sidebar-group-title">Developing Nodes</div>
417
+ <a class="sidebar-link active" href="05_node_development.html"><span class="sidebar-num">05</span>Node Development Guide</a>
418
+ <a class="sidebar-link" href="14_custom_nodes_api.html"><span class="sidebar-num">14</span>Custom Nodes API</a>
419
+ <a class="sidebar-link" href="08_api_reference.html"><span class="sidebar-num">08</span>API Reference</a>
420
+ </div>
421
+ <div class="sidebar-group">
422
+ <div class="sidebar-group-title">Architecture</div>
423
+ <a class="sidebar-link" href="06_backend_architecture.html"><span class="sidebar-num">06</span>Backend Architecture</a>
424
+ <a class="sidebar-link" href="07_frontend_architecture.html"><span class="sidebar-num">07</span>Frontend Architecture</a>
425
+ </div>
426
+ <div class="sidebar-group">
427
+ <div class="sidebar-group-title">Advanced</div>
428
+ <a class="sidebar-link" href="09_advanced_topics.html"><span class="sidebar-num">09</span>Advanced Topics</a>
429
+ <a class="sidebar-link" href="10_contribution_guide.html"><span class="sidebar-num">10</span>Contribution Guide</a>
430
+ </div>
431
+ <div class="sidebar-group">
432
+ <div class="sidebar-group-title">Reference</div>
433
+ <a class="sidebar-link" href="11_troubleshooting.html"><span class="sidebar-num">11</span>Troubleshooting</a>
434
+ <a class="sidebar-link" href="12_examples_library.html"><span class="sidebar-num">12</span>Examples Library</a>
435
+ <a class="sidebar-link" href="13_general_purpose_automation.html"><span class="sidebar-num">13</span>General Purpose Automation</a>
436
+ </div>
437
+
438
+ </nav>
439
+
440
+ <!-- ── Main content ───────────────────────────────────────────────────── -->
441
+ <main class="content">
442
+ <div class="content-inner">
443
+ <nav class="breadcrumb"><a href="index.html">Docs</a><span class="breadcrumb-sep">›</span><span>Node Development Guide</span></nav>
444
+ <div class="val-badge val-badge-ok" title="Verified against source code">&#10003; Verified</div>
445
+ <p># Node Development Guide — Vibrante-Node v2.5.0</p>
446
+ <p>This guide walks through everything you need to know to build custom nodes for<br />
447
+ Vibrante-Node, from the simplest string transformer to a fully-async HTTP client<br />
448
+ node with error branches and dynamic ports.</p>
449
+ <hr />
450
+ <h2 id="table-of-contents">Table of Contents</h2>
451
+ <ol>
452
+ <li><a href="#1-node-architecture-overview">Node Architecture Overview</a></li>
453
+ <li><a href="#2-two-ways-to-create-nodes">Two Ways to Create Nodes</a></li>
454
+ <li><a href="#3-step-by-step-your-first-node">Step-by-Step: Your First Node</a></li>
455
+ <li><a href="#4-port-system-deep-dive">Port System Deep-Dive</a></li>
456
+ <li><a href="#5-the-execute-method">The execute() Method</a></li>
457
+ <li><a href="#6-logging">Logging</a></li>
458
+ <li><a href="#7-reactive-output-with-set_output">Reactive Output with set_output()</a></li>
459
+ <li><a href="#8-state-persistence-with-selfparameters">State Persistence with self.parameters</a></li>
460
+ <li><a href="#9-shared-state-with-basenodemory">Shared State with BaseNode.memory</a></li>
461
+ <li><a href="#10-dynamic-ports">Dynamic Ports</a></li>
462
+ <li><a href="#11-dropdown-options">Dropdown Options</a></li>
463
+ <li><a href="#12-file-and-file-save-widgets">File and File-Save Widgets</a></li>
464
+ <li><a href="#13-data-only-nodes-use_execfalse">Data-Only Nodes (use_exec=False)</a></li>
465
+ <li><a href="#14-registering-your-node">Registering Your Node</a></li>
466
+ <li><a href="#15-node-categories-and-the-library-panel">Node Categories and the Library Panel</a></li>
467
+ <li><a href="#16-custom-icons">Custom Icons</a></li>
468
+ <li><a href="#17-testing-and-debugging">Testing and Debugging</a></li>
469
+ <li><a href="#18-performance-considerations">Performance Considerations</a></li>
470
+ <li><a href="#19-common-mistakes">Common Mistakes</a></li>
471
+ <li><a href="#20-complete-example-file-rename-node">Complete Example: File Rename Node</a></li>
472
+ <li><a href="#21-complete-example-http-api-request-node">Complete Example: HTTP API Request Node</a></li>
473
+ </ol>
474
+ <hr />
475
+ <h2 id="1-node-architecture-overview">1. Node Architecture Overview</h2>
476
+ <p>A <strong>node</strong> in Vibrante-Node is a unit of work. Visually it appears as a box on<br />
477
+ the canvas with named connection points (ports) on its left (inputs) and right<br />
478
+ (outputs) sides. Internally it is a Python class that inherits from <code>BaseNode</code><br />
479
+ and implements a single <code>async def execute(self, inputs)</code> method.</p>
480
+ <h3 id="what-a-node-contains">What a node contains</h3>
481
+ <table>
482
+ <thead>
483
+ <tr>
484
+ <th>Component</th>
485
+ <th>Purpose</th>
486
+ </tr>
487
+ </thead>
488
+ <tbody>
489
+ <tr>
490
+ <td><code>inputs</code> dict</td>
491
+ <td>Named <code>Port</code> objects describing data the node receives</td>
492
+ </tr>
493
+ <tr>
494
+ <td><code>outputs</code> dict</td>
495
+ <td>Named <code>Port</code> objects describing data the node produces</td>
496
+ </tr>
497
+ <tr>
498
+ <td><code>parameters</code> dict</td>
499
+ <td>Persistent key/value store — widget values live here</td>
500
+ </tr>
501
+ <tr>
502
+ <td><code>execute()</code></td>
503
+ <td>The async method the engine calls when the node runs</td>
504
+ </tr>
505
+ <tr>
506
+ <td>logging methods</td>
507
+ <td><code>log_info</code>, <code>log_error</code>, <code>log_success</code> — appear in the log panel</td>
508
+ </tr>
509
+ <tr>
510
+ <td><code>set_output()</code></td>
511
+ <td>Push a value to downstream nodes <em>before</em> exec_out fires</td>
512
+ </tr>
513
+ </tbody>
514
+ </table>
515
+ <h3 id="lifecycle-of-a-node-during-a-pipeline-run">Lifecycle of a node during a pipeline run</h3>
516
+ <pre><code>Engine starts
517
+ │
518
+ ▼
519
+ restore_from_parameters(saved_params) ← rebuild dynamic ports from saved state
520
+ │
521
+ ▼
522
+ clear_outputs() ← reset all output port values to defaults
523
+ │
524
+ ▼
525
+ sync parameters from upstream results ← values from connected edges arrive
526
+ │
527
+ ▼
528
+ execute(inputs) ← your code runs here
529
+ │
530
+ ├── await self.set_output(...) ← push values reactively mid-execution
531
+ │
532
+ └── return {port: value, ...} ← final output dict sent to engine
533
+ </code></pre>
534
+ <p>The engine handles all wiring automatically. Your node never needs to reach<br />
535
+ into other nodes — you receive values through the <code>inputs</code> dict and send values<br />
536
+ back through the return dict or <code>set_output()</code>.</p>
537
+ <hr />
538
+ <h2 id="2-two-ways-to-create-nodes">2. Two Ways to Create Nodes</h2>
539
+ <h3 id="method-a-json-file-with-embedded-python-recommended">Method A — JSON file with embedded Python (recommended)</h3>
540
+ <p>Place a <code>.json</code> file anywhere inside the <code>nodes/</code> directory (or a directory<br />
541
+ listed in the <code>v_nodes_dir</code> environment variable). The file bundles the node's<br />
542
+ metadata, port definitions, and Python code into a single self-contained unit.</p>
543
+ <p>This is the preferred approach because:<br />
544
+ - The Node Builder UI can read and write these files directly.<br />
545
+ - Node hot-reload works (Edit → Reload Node Definition).<br />
546
+ - The file is trivially portable — drop it in any project's <code>nodes/</code> folder.</p>
547
+ <h3 id="method-b-pure-python-class-advanced">Method B — Pure Python class (advanced)</h3>
548
+ <p>Write a <code>.py</code> file with a class that inherits from <code>BaseNode</code> and a<br />
549
+ <code>register_node()</code> function. The registry compiles either format identically at<br />
550
+ runtime; the difference is purely organizational.</p>
551
+ <p>Pure Python is useful when:<br />
552
+ - The node has complex helper functions you want in separate methods.<br />
553
+ - You are writing a built-in node bundled with the application itself.<br />
554
+ - You want full IDE autocomplete and static analysis during development.</p>
555
+ <hr />
556
+ <h2 id="3-step-by-step-your-first-node">3. Step-by-Step: Your First Node</h2>
557
+ <p>We will build a simple node that receives a string and outputs it in uppercase.</p>
558
+ <h3 id="step-1-create-the-json-file">Step 1 — Create the JSON file</h3>
559
+ <p>Create <code>nodes/text_upper.json</code>:</p>
560
+ <pre><code class="language-json">{
561
+ &quot;node_id&quot;: &quot;text_upper&quot;,
562
+ &quot;name&quot;: &quot;text_upper&quot;,
563
+ &quot;description&quot;: &quot;Converts a string to uppercase.&quot;,
564
+ &quot;category&quot;: &quot;Text&quot;,
565
+ &quot;icon_path&quot;: null,
566
+ &quot;use_exec&quot;: true,
567
+ &quot;inputs&quot;: [
568
+ { &quot;name&quot;: &quot;text&quot;, &quot;type&quot;: &quot;string&quot;, &quot;widget_type&quot;: &quot;text&quot;, &quot;options&quot;: null, &quot;default&quot;: &quot;&quot; },
569
+ { &quot;name&quot;: &quot;exec_in&quot;, &quot;type&quot;: &quot;any&quot;, &quot;widget_type&quot;: null, &quot;options&quot;: null, &quot;default&quot;: null }
570
+ ],
571
+ &quot;outputs&quot;: [
572
+ { &quot;name&quot;: &quot;result&quot;, &quot;type&quot;: &quot;string&quot;, &quot;widget_type&quot;: null, &quot;options&quot;: null, &quot;default&quot;: null },
573
+ { &quot;name&quot;: &quot;exec_out&quot;, &quot;type&quot;: &quot;any&quot;, &quot;widget_type&quot;: null, &quot;options&quot;: null, &quot;default&quot;: null }
574
+ ],
575
+ &quot;python_code&quot;: &quot;from src.nodes.base import BaseNode\n\nclass Text_Upper(BaseNode):\n name = 'text_upper'\n\n def __init__(self):\n super().__init__()\n # [AUTO-GENERATED-PORTS-START]\n self.add_input('text', 'string', widget_type='text')\n self.add_output('result', 'string')\n # [AUTO-GENERATED-PORTS-END]\n\n async def execute(self, inputs):\n text = inputs.get('text', '')\n return {'result': text.upper(), 'exec_out': True}\n\ndef register_node():\n return Text_Upper&quot;
576
+ }
577
+ </code></pre>
578
+ <h3 id="step-2-restart-or-hot-reload">Step 2 — Restart or hot-reload</h3>
579
+ <p>If the app is already running, open the Node Builder (or use<br />
580
+ Edit → Reload Node Definitions). The "text_upper" node now appears in the<br />
581
+ library under the "Text" category.</p>
582
+ <h3 id="step-3-place-the-node-on-canvas">Step 3 — Place the node on canvas</h3>
583
+ <p>Open the node search popup (Tab key or right-click → Add Node), type "upper",<br />
584
+ and click the result. A node appears on the canvas.</p>
585
+ <h3 id="step-4-wire-it-up">Step 4 — Wire it up</h3>
586
+ <p>Connect a String Literal node's output to <code>text_upper.text</code>. Connect<br />
587
+ <code>text_upper.exec_out</code> to a Console Sink. Run the pipeline — the console shows<br />
588
+ the uppercased string.</p>
589
+ <hr />
590
+ <h2 id="4-port-system-deep-dive">4. Port System Deep-Dive</h2>
591
+ <h3 id="inputs-vs-outputs">Inputs vs. outputs</h3>
592
+ <p>Input ports appear on the <strong>left</strong> side of the node widget. They receive values<br />
593
+ from upstream nodes or display an inline widget when unconnected.</p>
594
+ <p>Output ports appear on the <strong>right</strong> side. They carry results to downstream<br />
595
+ nodes.</p>
596
+ <h3 id="exec-pins">Exec pins</h3>
597
+ <p>When <code>use_exec=True</code> (the default), <code>super().__init__()</code> automatically creates:<br />
598
+ - <code>exec_in</code> — an input of type <code>exec</code>. The node does not run until this fires.<br />
599
+ - <code>exec_out</code> — an output of type <code>exec</code>. Triggers the next node in the chain.</p>
600
+ <p><strong>Do not</strong> add <code>exec_in</code> or <code>exec_out</code> manually inside <code>__init__</code>. They are<br />
601
+ already there.</p>
602
+ <p>You can add <strong>additional</strong> exec outputs (e.g., a failure branch) using<br />
603
+ <code>self.add_exec_output("exec_fail")</code>.</p>
604
+ <h3 id="data-types">Data types</h3>
605
+ <table>
606
+ <thead>
607
+ <tr>
608
+ <th>Type</th>
609
+ <th>Python equivalent</th>
610
+ <th>Notes</th>
611
+ </tr>
612
+ </thead>
613
+ <tbody>
614
+ <tr>
615
+ <td><code>string</code></td>
616
+ <td><code>str</code></td>
617
+ <td>Default value <code>""</code></td>
618
+ </tr>
619
+ <tr>
620
+ <td><code>int</code></td>
621
+ <td><code>int</code></td>
622
+ <td>Default value <code>0</code></td>
623
+ </tr>
624
+ <tr>
625
+ <td><code>float</code></td>
626
+ <td><code>float</code></td>
627
+ <td>Default value <code>0</code></td>
628
+ </tr>
629
+ <tr>
630
+ <td><code>bool</code></td>
631
+ <td><code>bool</code></td>
632
+ <td>Default value <code>False</code></td>
633
+ </tr>
634
+ <tr>
635
+ <td><code>list</code></td>
636
+ <td><code>list</code></td>
637
+ <td>Default value <code>[]</code></td>
638
+ </tr>
639
+ <tr>
640
+ <td><code>dict</code></td>
641
+ <td><code>dict</code></td>
642
+ <td>Default value <code>{}</code></td>
643
+ </tr>
644
+ <tr>
645
+ <td><code>any</code></td>
646
+ <td>any</td>
647
+ <td>No type coercion; used for exec pins and generic data</td>
648
+ </tr>
649
+ </tbody>
650
+ </table>
651
+ <p>The engine does not coerce types automatically. If you declare a port as <code>int</code><br />
652
+ but receive a string <code>"42"</code>, convert it yourself inside <code>execute()</code>.</p>
653
+ <h3 id="widget-types">Widget types</h3>
654
+ <p>Widget types control the inline editor shown on an unconnected input port.</p>
655
+ <table>
656
+ <thead>
657
+ <tr>
658
+ <th><code>widget_type</code></th>
659
+ <th>Appearance</th>
660
+ <th>Best for</th>
661
+ </tr>
662
+ </thead>
663
+ <tbody>
664
+ <tr>
665
+ <td><code>text</code></td>
666
+ <td>Single-line text box</td>
667
+ <td>Short strings, names, paths</td>
668
+ </tr>
669
+ <tr>
670
+ <td><code>text_area</code></td>
671
+ <td>Multi-line text box</td>
672
+ <td>Code, JSON, long text</td>
673
+ </tr>
674
+ <tr>
675
+ <td><code>int</code></td>
676
+ <td>Integer spinner</td>
677
+ <td>Integer parameters</td>
678
+ </tr>
679
+ <tr>
680
+ <td><code>float</code></td>
681
+ <td>Float spinner</td>
682
+ <td>Numeric parameters</td>
683
+ </tr>
684
+ <tr>
685
+ <td><code>bool</code></td>
686
+ <td>Checkbox</td>
687
+ <td>Toggles</td>
688
+ </tr>
689
+ <tr>
690
+ <td><code>dropdown</code></td>
691
+ <td>Combo box</td>
692
+ <td>Enumerated choices</td>
693
+ </tr>
694
+ <tr>
695
+ <td><code>slider</code></td>
696
+ <td>Horizontal slider</td>
697
+ <td>0–100 range values</td>
698
+ </tr>
699
+ <tr>
700
+ <td><code>file</code></td>
701
+ <td>Path box + Browse button</td>
702
+ <td>Input file selection</td>
703
+ </tr>
704
+ <tr>
705
+ <td><code>file_save</code></td>
706
+ <td>Path box + Save dialog button</td>
707
+ <td>Output file selection</td>
708
+ </tr>
709
+ </tbody>
710
+ </table>
711
+ <p>Specifying <code>widget_type=None</code> (the default) means the port has no inline<br />
712
+ widget — it only accepts data through a connected wire.</p>
713
+ <h3 id="adding-ports-in-init">Adding ports in <strong>init</strong></h3>
714
+ <pre><code class="language-python">def __init__(self):
715
+ super().__init__() # adds exec_in + exec_out automatically
716
+ # [AUTO-GENERATED-PORTS-START]
717
+ self.add_input(&quot;name&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;World&quot;)
718
+ self.add_input(&quot;count&quot;, &quot;int&quot;, widget_type=&quot;int&quot;, default=1)
719
+ self.add_input(&quot;enabled&quot;, &quot;bool&quot;, widget_type=&quot;bool&quot;, default=True)
720
+ self.add_input(&quot;items&quot;, &quot;list&quot;) # no widget
721
+ self.add_output(&quot;result&quot;, &quot;string&quot;)
722
+ self.add_output(&quot;count&quot;, &quot;int&quot;)
723
+ # [AUTO-GENERATED-PORTS-END]
724
+ </code></pre>
725
+ <p>The <code># [AUTO-GENERATED-PORTS-START]</code> / <code># [AUTO-GENERATED-PORTS-END]</code> comments<br />
726
+ are markers the Node Builder uses to identify the auto-managed port block. Keep<br />
727
+ your custom ports inside these markers when using the JSON format.</p>
728
+ <hr />
729
+ <h2 id="5-the-execute-method">5. The execute() Method</h2>
730
+ <p><code>execute()</code> is the only method you must implement. It is declared <code>async def</code><br />
731
+ so you can use <code>await</code> for I/O, sleep, or other coroutines without blocking the<br />
732
+ Qt event loop.</p>
733
+ <h3 id="signature">Signature</h3>
734
+ <pre><code class="language-python">async def execute(self, inputs: dict) -&gt; dict:
735
+ </code></pre>
736
+ <h3 id="the-inputs-dict">The <code>inputs</code> dict</h3>
737
+ <p><code>inputs</code> is a snapshot of <code>self.parameters</code> at the moment the node is about to<br />
738
+ run, with values from connected upstream nodes already merged in. Access inputs<br />
739
+ with:</p>
740
+ <pre><code class="language-python">value = inputs.get(&quot;port_name&quot;, default_if_missing)
741
+ </code></pre>
742
+ <p>Prefer <code>inputs.get()</code> over <code>self.parameters.get()</code> — the engine may update<br />
743
+ <code>self.parameters</code> between now and the end of your method if reactive propagation<br />
744
+ fires, so reading from the frozen <code>inputs</code> snapshot is safer.</p>
745
+ <h3 id="the-return-dict">The return dict</h3>
746
+ <p>Return a dict whose keys are output port names. Always include <code>exec_out: True</code><br />
747
+ for exec-flow nodes:</p>
748
+ <pre><code class="language-python">return {
749
+ &quot;result&quot;: computed_value,
750
+ &quot;exec_out&quot;: True,
751
+ }
752
+ </code></pre>
753
+ <p>Returning <code>None</code> or an empty dict is safe (the engine treats it as no outputs).<br />
754
+ Returning <code>exec_out: False</code> means the exec chain is <strong>not</strong> continued — use<br />
755
+ this if you want to halt execution conditionally.</p>
756
+ <h3 id="async-behavior">Async behavior</h3>
757
+ <p>Because <code>execute()</code> is <code>async def</code> you can:<br />
758
+ - <code>await asyncio.sleep(0)</code> to yield control to the event loop (e.g., inside loops)<br />
759
+ - <code>await asyncio.sleep(seconds)</code> to pause without freezing the UI<br />
760
+ - <code>await some_http_client.get(url)</code> to make non-blocking network calls<br />
761
+ - <code>await self.set_output("port", value)</code> to push values reactively mid-execution</p>
762
+ <p>You <strong>cannot</strong> use blocking calls (like <code>requests.get()</code> or <code>time.sleep()</code>)<br />
763
+ without wrapping them in <code>asyncio.to_thread()</code> or the UI will freeze.</p>
764
+ <h3 id="checking-for-cancellation">Checking for cancellation</h3>
765
+ <p>If the user clicks Stop, <code>self.is_stopped()</code> returns <code>True</code>. Check it inside<br />
766
+ long loops:</p>
767
+ <pre><code class="language-python">for item in big_list:
768
+ if self.is_stopped():
769
+ break
770
+ process(item)
771
+ </code></pre>
772
+ <hr />
773
+ <h2 id="6-logging">6. Logging</h2>
774
+ <p>Three logging helpers are available. Messages appear in the log panel with<br />
775
+ color-coded styling.</p>
776
+ <pre><code class="language-python">self.log_info(&quot;Starting operation...&quot;) # white/grey — informational
777
+ self.log_success(&quot;Done! Wrote 42 files.&quot;) # green — positive outcome
778
+ self.log_error(&quot;File not found: /tmp/x.y&quot;) # red — error or warning
779
+ </code></pre>
780
+ <p>All three accept a plain string. They are non-blocking — messages are queued if<br />
781
+ the engine log hook is not yet wired (which can happen in <code>__init__</code>; the queue<br />
782
+ is flushed at execution start).</p>
783
+ <p>Log messages are prefixed with the node's display name in the log panel so the<br />
784
+ user can identify which node produced each message.</p>
785
+ <hr />
786
+ <h2 id="7-reactive-output-with-set_output">7. Reactive Output with set_output()</h2>
787
+ <p>Normally, downstream nodes receive your output values only after <code>execute()</code><br />
788
+ returns. <code>set_output()</code> lets you push a value to downstream nodes <em>immediately</em>,<br />
789
+ before the method returns — this is called <strong>reactive output</strong>.</p>
790
+ <pre><code class="language-python">async def execute(self, inputs):
791
+ for i in range(10):
792
+ await self.set_output(&quot;current_index&quot;, i)
793
+ await self.set_output(&quot;exec_step&quot;, True) # triggers downstream exec chain
794
+ await asyncio.sleep(0) # yield so downstream can run
795
+
796
+ return {&quot;current_index&quot;: 9, &quot;exec_out&quot;: True}
797
+ </code></pre>
798
+ <p>When <code>set_output("exec_step", True)</code> fires and <code>exec_step</code> is an exec-type<br />
799
+ port, the engine immediately kicks off every node connected to <code>exec_step</code>,<br />
800
+ waits for them to finish, and then returns control to your loop.</p>
801
+ <p>This is the foundation of <code>ForEachNode</code>, <code>SequenceNode</code>, and <code>WhileLoopNode</code>.</p>
802
+ <h3 id="set_output-for-data-ports">set_output for data ports</h3>
803
+ <p>You can also push data reactively:</p>
804
+ <pre><code class="language-python">await self.set_output(&quot;progress&quot;, i / total)
805
+ </code></pre>
806
+ <p>Downstream data nodes that read <code>progress</code> will receive the new value the next<br />
807
+ time they execute.</p>
808
+ <h3 id="important-set_output-is-awaitable">Important: set_output is awaitable</h3>
809
+ <p>Always <code>await self.set_output(...)</code>. Omitting <code>await</code> creates a coroutine<br />
810
+ object that is silently discarded — the value never propagates.</p>
811
+ <hr />
812
+ <h2 id="8-state-persistence-with-selfparameters">8. State Persistence with self.parameters</h2>
813
+ <p><code>self.parameters</code> is a plain dict that persists across runs <strong>for the lifetime<br />
814
+ of the node instance</strong> (i.e., as long as the canvas contains this node). It is<br />
815
+ <strong>not</strong> cleared between pipeline runs.</p>
816
+ <p>The engine syncs widget values and incoming connection values into<br />
817
+ <code>self.parameters</code> before calling <code>execute()</code>. After <code>execute()</code>, the results<br />
818
+ dict is merged back into <code>self.parameters</code> as well, so you can read the last<br />
819
+ known output value of any port via:</p>
820
+ <pre><code class="language-python">last_result = self.parameters.get(&quot;result&quot;)
821
+ </code></pre>
822
+ <h3 id="using-parameters-for-internal-state">Using parameters for internal state</h3>
823
+ <p>You can store arbitrary keys:</p>
824
+ <pre><code class="language-python">async def execute(self, inputs):
825
+ run_count = self.parameters.get(&quot;_run_count&quot;, 0) + 1
826
+ self.parameters[&quot;_run_count&quot;] = run_count
827
+ self.log_info(f&quot;This node has run {run_count} times.&quot;)
828
+ return {&quot;exec_out&quot;: True}
829
+ </code></pre>
830
+ <p>By convention, internal-only keys are prefixed with <code>_</code> to distinguish them<br />
831
+ from port names.</p>
832
+ <h3 id="restore_from_parameters">restore_from_parameters</h3>
833
+ <p>When a workflow is loaded from disk, <code>restore_from_parameters(saved_params)</code> is<br />
834
+ called before any execution. Override it to recreate dynamic ports from saved<br />
835
+ state:</p>
836
+ <pre><code class="language-python">def restore_from_parameters(self, parameters):
837
+ count = parameters.get(&quot;_port_count&quot;, 1)
838
+ for i in range(count):
839
+ name = f&quot;input_{i}&quot;
840
+ if name not in self.inputs:
841
+ self.add_input(name, &quot;any&quot;)
842
+ </code></pre>
843
+ <p>The base implementation does nothing (<code>pass</code>). You only need to override this<br />
844
+ if your node adds or removes ports dynamically at runtime.</p>
845
+ <hr />
846
+ <h2 id="9-shared-state-with-basenodememory">9. Shared State with BaseNode.memory</h2>
847
+ <p><code>BaseNode.memory</code> is a <strong>class-level dict</strong> shared by every node instance<br />
848
+ during a single pipeline run. It is cleared to <code>{}</code> at the start of each run by<br />
849
+ the engine.</p>
850
+ <p>Use it for values that multiple nodes need to communicate without explicit<br />
851
+ wiring:</p>
852
+ <pre><code class="language-python"># In SetVariableNode:
853
+ BaseNode.memory[&quot;my_key&quot;] = some_value
854
+
855
+ # In GetVariableNode (elsewhere in the graph):
856
+ value = BaseNode.memory.get(&quot;my_key&quot;)
857
+ </code></pre>
858
+ <p>This is also how <code>SetVariableNode</code> and <code>GetVariableNode</code> work internally.</p>
859
+ <h3 id="when-to-use-memory-vs-wired-connections">When to use memory vs. wired connections</h3>
860
+ <table>
861
+ <thead>
862
+ <tr>
863
+ <th>Scenario</th>
864
+ <th>Use</th>
865
+ </tr>
866
+ </thead>
867
+ <tbody>
868
+ <tr>
869
+ <td>Normal data flow between connected nodes</td>
870
+ <td>Wired connections</td>
871
+ </tr>
872
+ <tr>
873
+ <td>Conditional data shared across branches</td>
874
+ <td><code>BaseNode.memory</code></td>
875
+ </tr>
876
+ <tr>
877
+ <td>Accumulating a list across loop iterations</td>
878
+ <td><code>BaseNode.memory</code></td>
879
+ </tr>
880
+ <tr>
881
+ <td>Long-lived state that must survive across runs</td>
882
+ <td><code>self.parameters</code></td>
883
+ </tr>
884
+ </tbody>
885
+ </table>
886
+ <hr />
887
+ <h2 id="10-dynamic-ports">10. Dynamic Ports</h2>
888
+ <p>Sometimes you don't know the number or names of ports at design time. You can<br />
889
+ add or remove ports during execution or in response to connections.</p>
890
+ <h3 id="adding-ports-at-runtime">Adding ports at runtime</h3>
891
+ <pre><code class="language-python">def on_plug_sync(self, port_name, is_input, other_node, other_port_name):
892
+ &quot;&quot;&quot;Called synchronously when a wire is connected.&quot;&quot;&quot;
893
+ if is_input and port_name == f&quot;input_{self._count - 1}&quot;:
894
+ new_name = f&quot;input_{self._count}&quot;
895
+ self.add_input(new_name, &quot;any&quot;)
896
+ self._count += 1
897
+ self.rebuild_ports() # tells the UI to refresh the port list
898
+ </code></pre>
899
+ <p><code>rebuild_ports()</code> triggers <code>_on_ports_changed</code>, which the UI listens to. Call<br />
900
+ it once after all add/remove operations — not once per port.</p>
901
+ <h3 id="removing-ports">Removing ports</h3>
902
+ <pre><code class="language-python">if port_name in self.inputs:
903
+ del self.inputs[port_name]
904
+ if port_name in self.parameters:
905
+ del self.parameters[port_name]
906
+ self.rebuild_ports()
907
+ </code></pre>
908
+ <h3 id="persisting-dynamic-ports-across-saveload">Persisting dynamic ports across save/load</h3>
909
+ <p>Override <code>restore_from_parameters()</code> to recreate ports from saved parameters:</p>
910
+ <pre><code class="language-python">def restore_from_parameters(self, parameters):
911
+ for key in parameters:
912
+ if key.startswith(&quot;step_&quot;) and key not in self.inputs:
913
+ self.add_input(key, &quot;any&quot;)
914
+ </code></pre>
915
+ <p>See <code>SequenceNode</code> in <code>src/nodes/builtins/nodes.py</code> for a complete example.</p>
916
+ <h3 id="checking-connection-status">Checking connection status</h3>
917
+ <pre><code class="language-python">if self.is_port_connected(&quot;my_port&quot;, is_input=True):
918
+ # port has a wire attached
919
+ pass
920
+ </code></pre>
921
+ <p>This queries the UI via the <code>_is_port_connected</code> hook set by the canvas.</p>
922
+ <hr />
923
+ <h2 id="11-dropdown-options">11. Dropdown Options</h2>
924
+ <p>Use <code>widget_type="dropdown"</code> with a static or dynamic options list.</p>
925
+ <h3 id="static-options-defined-in-init">Static options (defined in <strong>init</strong>)</h3>
926
+ <pre><code class="language-python">self.add_input(
927
+ &quot;mode&quot;, &quot;string&quot;,
928
+ widget_type=&quot;dropdown&quot;,
929
+ options=[&quot;fast&quot;, &quot;balanced&quot;, &quot;slow&quot;],
930
+ default=&quot;balanced&quot;
931
+ )
932
+ </code></pre>
933
+ <h3 id="dynamic-options-updated-at-runtime">Dynamic options (updated at runtime)</h3>
934
+ <p>Call <code>self.set_parameter(name, list_of_strings)</code> to replace the dropdown's<br />
935
+ option list. The current selection is preserved if it still exists in the new<br />
936
+ list; otherwise the first item becomes selected.</p>
937
+ <pre><code class="language-python">async def on_parameter_changed(self, name, value):
938
+ &quot;&quot;&quot;Called when the user changes a widget value.&quot;&quot;&quot;
939
+ if name == &quot;category&quot;:
940
+ new_options = self._get_items_for_category(value)
941
+ self.set_parameter(&quot;item&quot;, new_options) # pass list → updates dropdown
942
+ </code></pre>
943
+ <h3 id="reading-the-dropdown-value-in-execute">Reading the dropdown value in execute</h3>
944
+ <pre><code class="language-python">mode = inputs.get(&quot;mode&quot;, &quot;balanced&quot;)
945
+ </code></pre>
946
+ <p>The dropdown always yields a string matching one of the options.</p>
947
+ <hr />
948
+ <h2 id="12-file-and-file-save-widgets">12. File and File-Save Widgets</h2>
949
+ <p>Use <code>widget_type="file"</code> for inputs where the user selects an existing file:</p>
950
+ <pre><code class="language-python">self.add_input(&quot;input_file&quot;, &quot;string&quot;, widget_type=&quot;file&quot;, default=&quot;&quot;)
951
+ </code></pre>
952
+ <p>Use <code>widget_type="file_save"</code> for outputs/save paths:</p>
953
+ <pre><code class="language-python">self.add_input(&quot;output_path&quot;, &quot;string&quot;, widget_type=&quot;file_save&quot;, default=&quot;&quot;)
954
+ </code></pre>
955
+ <p>Both widgets display a text box with a Browse/Save button. The value is always<br />
956
+ a plain string file path.</p>
957
+ <p>Read the value in <code>execute()</code> as usual:</p>
958
+ <pre><code class="language-python">path = inputs.get(&quot;input_file&quot;, &quot;&quot;)
959
+ if not path:
960
+ self.log_error(&quot;No file selected.&quot;)
961
+ return {&quot;exec_out&quot;: True}
962
+ </code></pre>
963
+ <hr />
964
+ <h2 id="13-data-only-nodes-use_execfalse">13. Data-Only Nodes (use_exec=False)</h2>
965
+ <p>Nodes with <code>use_exec=False</code> have no exec pins. They participate in <strong>data-flow<br />
966
+ execution</strong> — the engine pulls them automatically whenever a downstream<br />
967
+ exec-flow node needs their output, without waiting for an exec trigger.</p>
968
+ <pre><code class="language-python">class Current_Time(BaseNode):
969
+ name = &quot;current_time&quot;
970
+ category = &quot;Utilities&quot;
971
+
972
+ def __init__(self):
973
+ super().__init__(use_exec=False) # no exec pins
974
+ self.add_output(&quot;timestamp&quot;, &quot;string&quot;)
975
+ self.add_output(&quot;unix_epoch&quot;, &quot;float&quot;)
976
+
977
+ async def execute(self, inputs):
978
+ from datetime import datetime
979
+ now = datetime.now()
980
+ return {
981
+ &quot;timestamp&quot;: now.isoformat(),
982
+ &quot;unix_epoch&quot;: now.timestamp(),
983
+ }
984
+ </code></pre>
985
+ <p><strong>When to use <code>use_exec=False</code>:</strong><br />
986
+ - The node is a pure function — same inputs always yield same outputs.<br />
987
+ - The node produces a value that multiple downstream nodes consume.<br />
988
+ - The node has no side effects (does not write files, call APIs, etc.).</p>
989
+ <p><strong>When not to use <code>use_exec=False</code>:</strong><br />
990
+ - The node writes to disk, calls an API, or has any side effect.<br />
991
+ - The order of execution matters relative to other nodes.<br />
992
+ - You want explicit control over when the node runs.</p>
993
+ <p>Data-only nodes can still use <code>self.log_info()</code> and return values normally.<br />
994
+ They simply cannot trigger the exec chain because they have no exec ports.</p>
995
+ <hr />
996
+ <h2 id="14-registering-your-node">14. Registering Your Node</h2>
997
+ <h3 id="json-format-automatic">JSON format (automatic)</h3>
998
+ <p>Drop a <code>.json</code> file in <code>nodes/</code> or any directory listed in the <code>v_nodes_dir</code><br />
999
+ environment variable. The registry scans for <code>.json</code> files recursively.</p>
1000
+ <h3 id="python-file-format">Python file format</h3>
1001
+ <p>Write a <code>.py</code> file with a <code>register_node()</code> function:</p>
1002
+ <pre><code class="language-python">from src.nodes.base import BaseNode
1003
+
1004
+ class My_Node(BaseNode):
1005
+ name = &quot;my_node&quot;
1006
+ category = &quot;MyCategory&quot;
1007
+
1008
+ def __init__(self):
1009
+ super().__init__()
1010
+ self.add_input(&quot;value&quot;, &quot;string&quot;, widget_type=&quot;text&quot;)
1011
+ self.add_output(&quot;result&quot;, &quot;string&quot;)
1012
+
1013
+ async def execute(self, inputs):
1014
+ return {&quot;result&quot;: inputs.get(&quot;value&quot;, &quot;&quot;).strip(), &quot;exec_out&quot;: True}
1015
+
1016
+ def register_node():
1017
+ return My_Node
1018
+ </code></pre>
1019
+ <p>Place the file anywhere inside <code>nodes/</code> or an extra directory. The registry<br />
1020
+ will find and compile it the same way as a JSON node.</p>
1021
+ <h3 id="simplified-format-execute-function-only">Simplified format (execute function only)</h3>
1022
+ <p>For very small nodes you can provide just an <code>execute</code> function without a class:</p>
1023
+ <pre><code class="language-python">async def execute(self, inputs):
1024
+ return {&quot;result&quot;: inputs.get(&quot;value&quot;, &quot;&quot;).upper(), &quot;exec_out&quot;: True}
1025
+ </code></pre>
1026
+ <p>The registry wraps this in a generated <code>DynamicNode</code> class automatically. The<br />
1027
+ downside is you cannot override lifecycle hooks like <code>restore_from_parameters</code><br />
1028
+ or <code>on_parameter_changed</code>.</p>
1029
+ <hr />
1030
+ <h2 id="15-node-categories-and-the-library-panel">15. Node Categories and the Library Panel</h2>
1031
+ <p>The <code>category</code> field groups nodes in the library search panel. Use concise,<br />
1032
+ consistent names:</p>
1033
+ <table>
1034
+ <thead>
1035
+ <tr>
1036
+ <th>Category</th>
1037
+ <th>Purpose</th>
1038
+ </tr>
1039
+ </thead>
1040
+ <tbody>
1041
+ <tr>
1042
+ <td><code>General</code></td>
1043
+ <td>Catch-all for uncategorized nodes</td>
1044
+ </tr>
1045
+ <tr>
1046
+ <td><code>IO</code></td>
1047
+ <td>File reading, writing, network</td>
1048
+ </tr>
1049
+ <tr>
1050
+ <td><code>Text</code></td>
1051
+ <td>String manipulation</td>
1052
+ </tr>
1053
+ <tr>
1054
+ <td><code>Math</code></td>
1055
+ <td>Arithmetic, statistics</td>
1056
+ </tr>
1057
+ <tr>
1058
+ <td><code>Flow</code></td>
1059
+ <td>Execution control (loops, branches)</td>
1060
+ </tr>
1061
+ <tr>
1062
+ <td><code>Logic</code></td>
1063
+ <td>Boolean operations</td>
1064
+ </tr>
1065
+ <tr>
1066
+ <td><code>Memory</code></td>
1067
+ <td>Variables, accumulators</td>
1068
+ </tr>
1069
+ <tr>
1070
+ <td><code>Houdini</code></td>
1071
+ <td>Houdini integration</td>
1072
+ </tr>
1073
+ <tr>
1074
+ <td><code>Maya</code></td>
1075
+ <td>Maya integration</td>
1076
+ </tr>
1077
+ <tr>
1078
+ <td><code>Blender</code></td>
1079
+ <td>Blender integration</td>
1080
+ </tr>
1081
+ <tr>
1082
+ <td><code>Prism</code></td>
1083
+ <td>Prism Pipeline integration</td>
1084
+ </tr>
1085
+ </tbody>
1086
+ </table>
1087
+ <p>You may define any category string you like — a new category appears<br />
1088
+ automatically in the library panel when at least one node uses it.</p>
1089
+ <hr />
1090
+ <h2 id="16-custom-icons">16. Custom Icons</h2>
1091
+ <p>Set <code>icon_path</code> to a path relative to the app root (e.g.,<br />
1092
+ <code>"icons/my_icon.svg"</code>). SVG and PNG are both supported. The icon appears on<br />
1093
+ the node header in the canvas.</p>
1094
+ <pre><code class="language-text">&quot;icon_path&quot;: &quot;icons/houdini.svg&quot;
1095
+ </code></pre>
1096
+ <p>If <code>icon_path</code> is <code>null</code>, no icon is shown.</p>
1097
+ <p>To add a new icon, place the file in <code>icons/</code> and reference it by filename.</p>
1098
+ <hr />
1099
+ <h2 id="17-testing-and-debugging">17. Testing and Debugging</h2>
1100
+ <h3 id="running-a-node-in-isolation">Running a node in isolation</h3>
1101
+ <p>You can instantiate and call any node class directly in a Python script or the<br />
1102
+ Scripting Console:</p>
1103
+ <pre><code class="language-python">import asyncio
1104
+ from src.nodes.base import BaseNode
1105
+
1106
+ # Import your node file (or paste the class here)
1107
+ from nodes.text_upper import Text_Upper # hypothetical import path
1108
+
1109
+ node = Text_Upper()
1110
+ result = asyncio.run(node.execute({&quot;text&quot;: &quot;hello world&quot;}))
1111
+ print(result) # {'result': 'HELLO WORLD', 'exec_out': True}
1112
+ </code></pre>
1113
+ <h3 id="using-the-scripting-console">Using the Scripting Console</h3>
1114
+ <p>Open the Scripting Console (View → Scripting Console) and write:</p>
1115
+ <pre><code class="language-python">from src.core.registry import NodeRegistry
1116
+ cls = NodeRegistry.get_class(&quot;text_upper&quot;)
1117
+ if cls:
1118
+ import asyncio
1119
+ node = cls()
1120
+ result = asyncio.run(node.execute({&quot;text&quot;: &quot;test&quot;}))
1121
+ print(result)
1122
+ </code></pre>
1123
+ <h3 id="live-log-inspection">Live log inspection</h3>
1124
+ <p>Add <code>self.log_info()</code> calls at key points. The log panel (bottom of the main<br />
1125
+ window) shows all messages with timestamps and node names.</p>
1126
+ <h3 id="wire-value-inspector">Wire value inspector</h3>
1127
+ <p>After a pipeline run, hover over any wire in the canvas. A tooltip shows the<br />
1128
+ last value that flowed through it (capped at 300 characters). This is the<br />
1129
+ fastest way to pinpoint where data goes wrong.</p>
1130
+ <hr />
1131
+ <h2 id="18-performance-considerations">18. Performance Considerations</h2>
1132
+ <h3 id="blocking-vs-async-calls">Blocking vs. async calls</h3>
1133
+ <p>Any blocking call inside <code>execute()</code> freezes the Qt UI. Convert blocking code<br />
1134
+ to async using <code>asyncio.to_thread()</code>:</p>
1135
+ <pre><code class="language-python">import asyncio
1136
+
1137
+ async def execute(self, inputs):
1138
+ path = inputs.get(&quot;file_path&quot;, &quot;&quot;)
1139
+
1140
+ # Bad: blocks the event loop
1141
+ # data = open(path).read()
1142
+
1143
+ # Good: runs in a thread pool
1144
+ data = await asyncio.to_thread(open(path).read)
1145
+ return {&quot;data&quot;: data, &quot;exec_out&quot;: True}
1146
+ </code></pre>
1147
+ <p>For HTTP requests, use <code>urllib.request</code> in a thread executor. Vibrante-Node's event loop is QTimer-stepped, not continuously running, so <code>aiohttp</code> and <code>httpx</code> are not compatible. Use the thread pool pattern instead:</p>
1148
+ <pre><code class="language-python">import asyncio
1149
+ import urllib.request
1150
+
1151
+ async def execute(self, inputs):
1152
+ url = inputs.get(&quot;url&quot;, &quot;&quot;)
1153
+ loop = asyncio.get_running_loop()
1154
+
1155
+ def _sync_request():
1156
+ with urllib.request.urlopen(url, timeout=30) as resp:
1157
+ return resp.read().decode(&quot;utf-8&quot;)
1158
+
1159
+ text = await loop.run_in_executor(None, _sync_request)
1160
+ </code></pre>
1161
+ <h3 id="yielding-inside-loops">Yielding inside loops</h3>
1162
+ <p>When a loop iterates thousands of times, yield control periodically so the UI<br />
1163
+ remains responsive:</p>
1164
+ <pre><code class="language-python">for i, item in enumerate(items):
1165
+ process(item)
1166
+ if i % 100 == 0:
1167
+ await asyncio.sleep(0) # yield to event loop every 100 items
1168
+ </code></pre>
1169
+ <h3 id="caching-expensive-operations">Caching expensive operations</h3>
1170
+ <p>Use <code>self.parameters</code> to cache results across runs (if the input hasn't<br />
1171
+ changed):</p>
1172
+ <pre><code class="language-python">async def execute(self, inputs):
1173
+ key = inputs.get(&quot;key&quot;, &quot;&quot;)
1174
+ cached = self.parameters.get(&quot;_cached_key&quot;)
1175
+ if cached == key:
1176
+ return {&quot;result&quot;: self.parameters.get(&quot;_cached_result&quot;), &quot;exec_out&quot;: True}
1177
+
1178
+ result = expensive_operation(key)
1179
+ self.parameters[&quot;_cached_key&quot;] = key
1180
+ self.parameters[&quot;_cached_result&quot;] = result
1181
+ return {&quot;result&quot;: result, &quot;exec_out&quot;: True}
1182
+ </code></pre>
1183
+ <hr />
1184
+ <h2 id="19-common-mistakes">19. Common Mistakes</h2>
1185
+ <h3 id="adding-exec_in-exec_out-manually">Adding exec_in / exec_out manually</h3>
1186
+ <p><code>super().__init__()</code> already adds them. Adding them again creates duplicate<br />
1187
+ ports visible in the UI.</p>
1188
+ <pre><code class="language-python"># Wrong
1189
+ def __init__(self):
1190
+ super().__init__()
1191
+ self.add_input(&quot;exec_in&quot;, &quot;any&quot;) # duplicate!
1192
+ self.add_output(&quot;exec_out&quot;, &quot;any&quot;) # duplicate!
1193
+
1194
+ # Correct
1195
+ def __init__(self):
1196
+ super().__init__() # exec_in + exec_out are already here
1197
+ self.add_input(&quot;my_data&quot;, &quot;string&quot;, widget_type=&quot;text&quot;)
1198
+ </code></pre>
1199
+ <h3 id="forgetting-exec_out-in-the-return-dict">Forgetting exec_out in the return dict</h3>
1200
+ <p>Without <code>exec_out: True</code>, the exec chain stops at this node.</p>
1201
+ <pre><code class="language-python"># Wrong — downstream nodes never run
1202
+ async def execute(self, inputs):
1203
+ return {&quot;result&quot;: &quot;done&quot;}
1204
+
1205
+ # Correct
1206
+ async def execute(self, inputs):
1207
+ return {&quot;result&quot;: &quot;done&quot;, &quot;exec_out&quot;: True}
1208
+ </code></pre>
1209
+ <h3 id="not-awaiting-set_output">Not awaiting set_output</h3>
1210
+ <pre><code class="language-python"># Wrong — value never propagates
1211
+ self.set_output(&quot;result&quot;, value)
1212
+
1213
+ # Correct
1214
+ await self.set_output(&quot;result&quot;, value)
1215
+ </code></pre>
1216
+ <h3 id="using-blocking-io">Using blocking I/O</h3>
1217
+ <pre><code class="language-python"># Wrong — freezes UI
1218
+ import time
1219
+ time.sleep(5)
1220
+
1221
+ # Correct
1222
+ await asyncio.sleep(5)
1223
+ </code></pre>
1224
+ <h3 id="mutating-the-default-list">Mutating the default list</h3>
1225
+ <pre><code class="language-python"># Wrong — all instances share the same list object
1226
+ class My_Node(BaseNode):
1227
+ my_list = [] # class-level mutable default
1228
+
1229
+ # Correct — use self.parameters or a local variable
1230
+ async def execute(self, inputs):
1231
+ items = list(inputs.get(&quot;items&quot;) or [])
1232
+ </code></pre>
1233
+ <h3 id="mismatched-node-name-and-node_id">Mismatched node name and node_id</h3>
1234
+ <p>The <code>name</code> class attribute, <code>node_id</code> in the JSON, and the class name used in<br />
1235
+ <code>register_node()</code> must all be consistent:</p>
1236
+ <pre><code class="language-json">{ &quot;node_id&quot;: &quot;text_upper&quot;, &quot;name&quot;: &quot;text_upper&quot; }
1237
+ </code></pre>
1238
+ <pre><code class="language-python">class Text_Upper(BaseNode):
1239
+ name = &quot;text_upper&quot; # must match node_id
1240
+ </code></pre>
1241
+ <hr />
1242
+ <h2 id="20-complete-example-file-rename-node">20. Complete Example: File Rename Node</h2>
1243
+ <p>This node takes an input file path and a new base name, renames the file on<br />
1244
+ disk, and emits either <code>exec_out</code> (success) or <code>exec_fail</code> (failure).</p>
1245
+ <pre><code class="language-json">{
1246
+ &quot;node_id&quot;: &quot;file_rename&quot;,
1247
+ &quot;name&quot;: &quot;file_rename&quot;,
1248
+ &quot;description&quot;: &quot;Renames a file on disk. Fires exec_fail if the operation fails.&quot;,
1249
+ &quot;category&quot;: &quot;IO&quot;,
1250
+ &quot;icon_path&quot;: &quot;icons/file-input.svg&quot;,
1251
+ &quot;use_exec&quot;: true,
1252
+ &quot;inputs&quot;: [
1253
+ { &quot;name&quot;: &quot;file_path&quot;, &quot;type&quot;: &quot;string&quot;, &quot;widget_type&quot;: &quot;file&quot;, &quot;options&quot;: null, &quot;default&quot;: &quot;&quot; },
1254
+ { &quot;name&quot;: &quot;new_name&quot;, &quot;type&quot;: &quot;string&quot;, &quot;widget_type&quot;: &quot;text&quot;, &quot;options&quot;: null, &quot;default&quot;: &quot;&quot; },
1255
+ { &quot;name&quot;: &quot;exec_in&quot;, &quot;type&quot;: &quot;any&quot;, &quot;widget_type&quot;: null, &quot;options&quot;: null, &quot;default&quot;: null }
1256
+ ],
1257
+ &quot;outputs&quot;: [
1258
+ { &quot;name&quot;: &quot;new_path&quot;, &quot;type&quot;: &quot;string&quot;, &quot;widget_type&quot;: null, &quot;options&quot;: null, &quot;default&quot;: null },
1259
+ { &quot;name&quot;: &quot;exec_out&quot;, &quot;type&quot;: &quot;any&quot;, &quot;widget_type&quot;: null, &quot;options&quot;: null, &quot;default&quot;: null },
1260
+ { &quot;name&quot;: &quot;exec_fail&quot;, &quot;type&quot;: &quot;any&quot;, &quot;widget_type&quot;: null, &quot;options&quot;: null, &quot;default&quot;: null }
1261
+ ],
1262
+ &quot;python_code&quot;: &quot;import os\nfrom src.nodes.base import BaseNode\n\nclass File_Rename(BaseNode):\n name = 'file_rename'\n\n def __init__(self):\n super().__init__()\n # [AUTO-GENERATED-PORTS-START]\n self.add_input('file_path', 'string', widget_type='file')\n self.add_input('new_name', 'string', widget_type='text')\n self.add_output('new_path', 'string')\n self.add_exec_output('exec_fail')\n # [AUTO-GENERATED-PORTS-END]\n\n async def execute(self, inputs):\n src = inputs.get('file_path', '').strip()\n new_name = inputs.get('new_name', '').strip()\n\n if not src or not os.path.isfile(src):\n self.log_error(f'Source file not found: {src}')\n await self.set_output('exec_fail', True)\n return {'new_path': '', 'exec_out': False, 'exec_fail': True}\n\n if not new_name:\n self.log_error('New name is empty.')\n await self.set_output('exec_fail', True)\n return {'new_path': '', 'exec_out': False, 'exec_fail': True}\n\n ext = os.path.splitext(src)[1]\n dest = os.path.join(os.path.dirname(src), new_name + ext)\n\n try:\n os.rename(src, dest)\n self.log_success(f'Renamed to: {dest}')\n await self.set_output('new_path', dest)\n await self.set_output('exec_out', True)\n return {'new_path': dest, 'exec_out': True, 'exec_fail': False}\n except OSError as e:\n self.log_error(f'Rename failed: {e}')\n await self.set_output('exec_fail', True)\n return {'new_path': '', 'exec_out': False, 'exec_fail': True}\n\ndef register_node():\n return File_Rename&quot;
1263
+ }
1264
+ </code></pre>
1265
+ <p>Key patterns in this example:<br />
1266
+ - Two exec output branches: <code>exec_out</code> (success) and <code>exec_fail</code> (failure).<br />
1267
+ - Early guard clauses return immediately with the failure branch.<br />
1268
+ - <code>await self.set_output()</code> pushes the new path before the exec chain fires.<br />
1269
+ - Every code path returns a complete dict with all output keys.</p>
1270
+ <hr />
1271
+ <h2 id="21-complete-example-http-api-request-node">21. Complete Example: HTTP API Request Node</h2>
1272
+ <p>This node makes an async HTTP GET request and returns the JSON body. It uses<br />
1273
+ <code>urllib.request</code> in a thread executor (<code>loop.run_in_executor</code>) for non-blocking I/O.</p>
1274
+ <pre><code class="language-python"># nodes/http_get.py
1275
+ import asyncio
1276
+ from src.nodes.base import BaseNode
1277
+
1278
+ class Http_Get(BaseNode):
1279
+ name = &quot;http_get&quot;
1280
+ description = &quot;Makes an async HTTP GET request and returns the JSON response.&quot;
1281
+ category = &quot;Network&quot;
1282
+ icon_path = None
1283
+
1284
+ def __init__(self):
1285
+ super().__init__()
1286
+ # [AUTO-GENERATED-PORTS-START]
1287
+ self.add_input(&quot;url&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;https://&quot;)
1288
+ self.add_input(&quot;timeout&quot;, &quot;int&quot;, widget_type=&quot;int&quot;, default=30)
1289
+ self.add_input(&quot;headers&quot;, &quot;dict&quot;)
1290
+ self.add_output(&quot;response_json&quot;, &quot;dict&quot;)
1291
+ self.add_output(&quot;status_code&quot;, &quot;int&quot;)
1292
+ self.add_output(&quot;error_message&quot;, &quot;string&quot;)
1293
+ self.add_exec_output(&quot;exec_fail&quot;)
1294
+ # [AUTO-GENERATED-PORTS-END]
1295
+
1296
+ async def execute(self, inputs):
1297
+ url = inputs.get(&quot;url&quot;, &quot;&quot;).strip()
1298
+ timeout = int(inputs.get(&quot;timeout&quot;, 30))
1299
+ headers = inputs.get(&quot;headers&quot;) or {}
1300
+
1301
+ if not url:
1302
+ self.log_error(&quot;URL is empty.&quot;)
1303
+ await self.set_output(&quot;exec_fail&quot;, True)
1304
+ return {
1305
+ &quot;response_json&quot;: {}, &quot;status_code&quot;: 0,
1306
+ &quot;error_message&quot;: &quot;URL is empty&quot;,
1307
+ &quot;exec_out&quot;: False, &quot;exec_fail&quot;: True,
1308
+ }
1309
+
1310
+ import urllib.request
1311
+ import urllib.error
1312
+
1313
+ # HTTP requests must use run_in_executor — aiohttp is not compatible
1314
+ # with Vibrante-Node's QTimer-stepped event loop
1315
+ self.log_info(f&quot;GET {url} (timeout={timeout}s)&quot;)
1316
+
1317
+ def _sync_do():
1318
+ req = urllib.request.Request(url, headers=headers or {}, method=&quot;GET&quot;)
1319
+ try:
1320
+ with urllib.request.urlopen(req, timeout=timeout) as resp:
1321
+ return resp.status, resp.read().decode(&quot;utf-8&quot;)
1322
+ except urllib.error.HTTPError as e:
1323
+ return e.code, e.read().decode(&quot;utf-8&quot;, errors=&quot;replace&quot;)
1324
+
1325
+ loop = asyncio.get_running_loop()
1326
+ try:
1327
+ status, text = await loop.run_in_executor(None, _sync_do)
1328
+ import json as _json
1329
+ try:
1330
+ body = _json.loads(text)
1331
+ except (_json.JSONDecodeError, ValueError):
1332
+ body = {&quot;text&quot;: text}
1333
+
1334
+ self.log_info(f&quot;Response {status}: {len(text)} chars&quot;)
1335
+ await self.set_output(&quot;response_json&quot;, body)
1336
+ await self.set_output(&quot;status_code&quot;, status)
1337
+ await self.set_output(&quot;exec_out&quot;, True)
1338
+ return {
1339
+ &quot;response_json&quot;: body, &quot;status_code&quot;: status,
1340
+ &quot;error_message&quot;: &quot;&quot;,
1341
+ &quot;exec_out&quot;: True, &quot;exec_fail&quot;: False,
1342
+ }
1343
+
1344
+ except Exception as e:
1345
+ msg = str(e)
1346
+ self.log_error(f&quot;HTTP error: {msg}&quot;)
1347
+ await self.set_output(&quot;error_message&quot;, msg)
1348
+ await self.set_output(&quot;exec_fail&quot;, True)
1349
+ return {
1350
+ &quot;response_json&quot;: {}, &quot;status_code&quot;: 0,
1351
+ &quot;error_message&quot;: msg,
1352
+ &quot;exec_out&quot;: False, &quot;exec_fail&quot;: True,
1353
+ }
1354
+
1355
+ def register_node():
1356
+ return Http_Get
1357
+ </code></pre>
1358
+ <p>Key patterns in this example:<br />
1359
+ - Use <code>loop.run_in_executor(None, sync_fn)</code> for any blocking I/O — HTTP, database, subprocess.<br />
1360
+ - <code>asyncio.TimeoutError</code> caught separately from generic exceptions.<br />
1361
+ - <code>await self.set_output("status_code", status)</code> pushes partial data before the<br />
1362
+ rest of the response is read, so the wire value inspector shows it even if<br />
1363
+ parsing fails afterward.<br />
1364
+ - All failure paths include <code>"exec_out": False</code> so the exec chain is not<br />
1365
+ accidentally continued.</p>
1366
+ <hr />
1367
+ <p><em>For the complete API reference covering every BaseNode method and attribute,<br />
1368
+ see <a href="14_custom_nodes_api.md">14_custom_nodes_api.md</a>.</em></p>
1369
+ <p><em>For integration with Houdini via HouBridge, see <a href="08_api_reference.md">08_api_reference.md</a>.</em></p>
1370
+ <nav class="page-nav">
1371
+ <a class="page-nav-link prev" href="04_workflow_tutorials.html"><span class="page-nav-label">Previous</span><span class="page-nav-title">Workflow Tutorials</span></a>
1372
+ <a class="page-nav-link next" href="06_backend_architecture.html"><span class="page-nav-label">Next</span><span class="page-nav-title">Backend Architecture</span></a>
1373
+ </nav>
1374
+ <section class="licence-attribution" style="margin-top:40px;padding-top:14px;border-top:1px solid #313244;font-size:.82em;color:#a6adc8">
1375
+ <p>Documentation &amp;copy; 2024&amp;ndash;2026 Mahmoud Kamal (KamalTD), licensed under
1376
+ <a href="https://creativecommons.org/licenses/by/4.0/" rel="license">CC BY 4.0</a>.
1377
+ <a href="../LICENSE.txt">Full licence notice</a>.</p>
1378
+ <p>Search and syntax highlighting load <a href="https://lunrjs.com/">lunr.js</a> 2.3.9 (MIT)
1379
+ and <a href="https://highlightjs.org/">highlight.js</a> 11.9.0 (BSD-3-Clause) from
1380
+ cdn.jsdelivr.net at view time; neither library is redistributed with these files.</p>
1381
+ </section>
1382
+ </div>
1383
+ </main>
1384
+
1385
+ <!-- ── TOC ────────────────────────────────────────────────────────────── -->
1386
+ <aside class="toc">
1387
+ <div class="toc-title">On this page</div>
1388
+ <a class="toc-link toc-h2" href="#table-of-contents">Table of Contents</a>
1389
+ <a class="toc-link toc-h2" href="#1-node-architecture-overview">1. Node Architecture Overview</a>
1390
+ <a class="toc-link toc-h3" href="#what-a-node-contains">What a node contains</a>
1391
+ <a class="toc-link toc-h3" href="#lifecycle-of-a-node-during-a-pipeline-run">Lifecycle of a node during a pipeline run</a>
1392
+ <a class="toc-link toc-h2" href="#2-two-ways-to-create-nodes">2. Two Ways to Create Nodes</a>
1393
+ <a class="toc-link toc-h3" href="#method-a-json-file-with-embedded-python-recommended">Method A — JSON file with embedded Python (recommended)</a>
1394
+ <a class="toc-link toc-h3" href="#method-b-pure-python-class-advanced">Method B — Pure Python class (advanced)</a>
1395
+ <a class="toc-link toc-h2" href="#3-step-by-step-your-first-node">3. Step-by-Step: Your First Node</a>
1396
+ <a class="toc-link toc-h3" href="#step-1-create-the-json-file">Step 1 — Create the JSON file</a>
1397
+ <a class="toc-link toc-h3" href="#step-2-restart-or-hot-reload">Step 2 — Restart or hot-reload</a>
1398
+ <a class="toc-link toc-h3" href="#step-3-place-the-node-on-canvas">Step 3 — Place the node on canvas</a>
1399
+ <a class="toc-link toc-h3" href="#step-4-wire-it-up">Step 4 — Wire it up</a>
1400
+ <a class="toc-link toc-h2" href="#4-port-system-deep-dive">4. Port System Deep-Dive</a>
1401
+ <a class="toc-link toc-h3" href="#inputs-vs-outputs">Inputs vs. outputs</a>
1402
+ <a class="toc-link toc-h3" href="#exec-pins">Exec pins</a>
1403
+ <a class="toc-link toc-h3" href="#data-types">Data types</a>
1404
+ <a class="toc-link toc-h3" href="#widget-types">Widget types</a>
1405
+ <a class="toc-link toc-h3" href="#adding-ports-in-init">Adding ports in init</a>
1406
+ <a class="toc-link toc-h2" href="#5-the-execute-method">5. The execute() Method</a>
1407
+ <a class="toc-link toc-h3" href="#signature">Signature</a>
1408
+ <a class="toc-link toc-h3" href="#the-inputs-dict">The inputs dict</a>
1409
+ <a class="toc-link toc-h3" href="#the-return-dict">The return dict</a>
1410
+ <a class="toc-link toc-h3" href="#async-behavior">Async behavior</a>
1411
+ <a class="toc-link toc-h3" href="#checking-for-cancellation">Checking for cancellation</a>
1412
+ <a class="toc-link toc-h2" href="#6-logging">6. Logging</a>
1413
+ <a class="toc-link toc-h2" href="#7-reactive-output-with-set_output">7. Reactive Output with set_output()</a>
1414
+ <a class="toc-link toc-h3" href="#set_output-for-data-ports">set_output for data ports</a>
1415
+ <a class="toc-link toc-h3" href="#important-set_output-is-awaitable">Important: set_output is awaitable</a>
1416
+ <a class="toc-link toc-h2" href="#8-state-persistence-with-selfparameters">8. State Persistence with self.parameters</a>
1417
+ <a class="toc-link toc-h3" href="#using-parameters-for-internal-state">Using parameters for internal state</a>
1418
+ <a class="toc-link toc-h3" href="#restore_from_parameters">restore_from_parameters</a>
1419
+ <a class="toc-link toc-h2" href="#9-shared-state-with-basenodememory">9. Shared State with BaseNode.memory</a>
1420
+ <a class="toc-link toc-h3" href="#when-to-use-memory-vs-wired-connections">When to use memory vs. wired connections</a>
1421
+ <a class="toc-link toc-h2" href="#10-dynamic-ports">10. Dynamic Ports</a>
1422
+ <a class="toc-link toc-h3" href="#adding-ports-at-runtime">Adding ports at runtime</a>
1423
+ <a class="toc-link toc-h3" href="#removing-ports">Removing ports</a>
1424
+ <a class="toc-link toc-h3" href="#persisting-dynamic-ports-across-saveload">Persisting dynamic ports across save/load</a>
1425
+ <a class="toc-link toc-h3" href="#checking-connection-status">Checking connection status</a>
1426
+ <a class="toc-link toc-h2" href="#11-dropdown-options">11. Dropdown Options</a>
1427
+ <a class="toc-link toc-h3" href="#static-options-defined-in-init">Static options (defined in init)</a>
1428
+ <a class="toc-link toc-h3" href="#dynamic-options-updated-at-runtime">Dynamic options (updated at runtime)</a>
1429
+ <a class="toc-link toc-h3" href="#reading-the-dropdown-value-in-execute">Reading the dropdown value in execute</a>
1430
+ <a class="toc-link toc-h2" href="#12-file-and-file-save-widgets">12. File and File-Save Widgets</a>
1431
+ <a class="toc-link toc-h2" href="#13-data-only-nodes-use_execfalse">13. Data-Only Nodes (use_exec=False)</a>
1432
+ <a class="toc-link toc-h2" href="#14-registering-your-node">14. Registering Your Node</a>
1433
+ <a class="toc-link toc-h3" href="#json-format-automatic">JSON format (automatic)</a>
1434
+ <a class="toc-link toc-h3" href="#python-file-format">Python file format</a>
1435
+ <a class="toc-link toc-h3" href="#simplified-format-execute-function-only">Simplified format (execute function only)</a>
1436
+ <a class="toc-link toc-h2" href="#15-node-categories-and-the-library-panel">15. Node Categories and the Library Panel</a>
1437
+ <a class="toc-link toc-h2" href="#16-custom-icons">16. Custom Icons</a>
1438
+ <a class="toc-link toc-h2" href="#17-testing-and-debugging">17. Testing and Debugging</a>
1439
+ <a class="toc-link toc-h3" href="#running-a-node-in-isolation">Running a node in isolation</a>
1440
+ <a class="toc-link toc-h3" href="#using-the-scripting-console">Using the Scripting Console</a>
1441
+ <a class="toc-link toc-h3" href="#live-log-inspection">Live log inspection</a>
1442
+ <a class="toc-link toc-h3" href="#wire-value-inspector">Wire value inspector</a>
1443
+ <a class="toc-link toc-h2" href="#18-performance-considerations">18. Performance Considerations</a>
1444
+ <a class="toc-link toc-h3" href="#blocking-vs-async-calls">Blocking vs. async calls</a>
1445
+ <a class="toc-link toc-h3" href="#yielding-inside-loops">Yielding inside loops</a>
1446
+ <a class="toc-link toc-h3" href="#caching-expensive-operations">Caching expensive operations</a>
1447
+ <a class="toc-link toc-h2" href="#19-common-mistakes">19. Common Mistakes</a>
1448
+ <a class="toc-link toc-h3" href="#adding-exec_in-exec_out-manually">Adding exec_in / exec_out manually</a>
1449
+ <a class="toc-link toc-h3" href="#forgetting-exec_out-in-the-return-dict">Forgetting exec_out in the return dict</a>
1450
+ <a class="toc-link toc-h3" href="#not-awaiting-set_output">Not awaiting set_output</a>
1451
+ <a class="toc-link toc-h3" href="#using-blocking-io">Using blocking I/O</a>
1452
+ <a class="toc-link toc-h3" href="#mutating-the-default-list">Mutating the default list</a>
1453
+ <a class="toc-link toc-h3" href="#mismatched-node-name-and-node_id">Mismatched node name and node_id</a>
1454
+ <a class="toc-link toc-h2" href="#20-complete-example-file-rename-node">20. Complete Example: File Rename Node</a>
1455
+ <a class="toc-link toc-h2" href="#21-complete-example-http-api-request-node">21. Complete Example: HTTP API Request Node</a>
1456
+ </aside>
1457
+
1458
+ <script src="https://cdn.jsdelivr.net/npm/highlight.js@11.9.0/highlight.min.js"></script>
1459
+ <script src="https://cdn.jsdelivr.net/npm/lunr@2.3.9/lunr.min.js"></script>
1460
+ <script>
1461
+ // ── Search ──────────────────────────────────────────────────────────────
1462
+ let _idx = null, _docs = [];
1463
+
1464
+ async function initSearch() {
1465
+ try {
1466
+ const base = document.getElementById('portal-base').dataset.base;
1467
+ const resp = await fetch(base + 'search.json');
1468
+ _docs = await resp.json();
1469
+ _idx = lunr(function() {
1470
+ this.ref('id');
1471
+ this.field('title', { boost: 10 });
1472
+ this.field('body');
1473
+ _docs.forEach((d, i) => {
1474
+ this.add({ id: i, title: d.title, body: d.body });
1475
+ });
1476
+ });
1477
+ } catch(e) { console.warn('Search index not available', e); }
1478
+ }
1479
+
1480
+ function doSearch(q) {
1481
+ const box = document.getElementById('search-results');
1482
+ if (!q || q.length < 2) { box.classList.remove('visible'); return; }
1483
+ if (!_idx) { box.innerHTML = '<div class="search-no-results">Search index loading…</div>'; box.classList.add('visible'); return; }
1484
+ const results = _idx.search(q + '~1');
1485
+ if (!results.length) {
1486
+ box.innerHTML = '<div class="search-no-results">No results for "' + q + '"</div>';
1487
+ box.classList.add('visible'); return;
1488
+ }
1489
+ box.innerHTML = results.slice(0, 8).map(r => {
1490
+ const d = _docs[r.ref];
1491
+ const excerpt = d.body.substring(0, 140).replace(/[#*`]/g, '').trim() + '…';
1492
+ return `<a class="search-result-item" href="${d.url}">
1493
+ <div class="search-result-title">${d.title}</div>
1494
+ <div class="search-result-excerpt">${excerpt}</div>
1495
+ </a>`;
1496
+ }).join('');
1497
+ box.classList.add('visible');
1498
+ }
1499
+
1500
+ document.addEventListener('DOMContentLoaded', () => {
1501
+ initSearch();
1502
+ const inp = document.getElementById('search-input');
1503
+ if (inp) {
1504
+ inp.addEventListener('input', e => doSearch(e.target.value));
1505
+ inp.addEventListener('keydown', e => { if (e.key === 'Escape') { e.target.value=''; document.getElementById('search-results').classList.remove('visible'); }});
1506
+ }
1507
+ document.addEventListener('click', e => {
1508
+ if (!e.target.closest('.search-wrap')) document.getElementById('search-results')?.classList.remove('visible');
1509
+ });
1510
+ // Keyboard shortcut: / to focus search
1511
+ document.addEventListener('keydown', e => {
1512
+ if (e.key === '/' && !['INPUT','TEXTAREA'].includes(document.activeElement.tagName)) {
1513
+ e.preventDefault(); document.getElementById('search-input')?.focus();
1514
+ }
1515
+ });
1516
+
1517
+ // ── TOC active section ──────────────────────────────────────────────
1518
+ const tocLinks = document.querySelectorAll('.toc-link');
1519
+ const headings = document.querySelectorAll('h2[id],h3[id],h4[id]');
1520
+ if (tocLinks.length && headings.length) {
1521
+ const obs = new IntersectionObserver(entries => {
1522
+ entries.forEach(entry => {
1523
+ if (entry.isIntersecting) {
1524
+ tocLinks.forEach(l => l.classList.remove('active'));
1525
+ const link = document.querySelector(`.toc-link[href="#${entry.target.id}"]`);
1526
+ if (link) link.classList.add('active');
1527
+ }
1528
+ });
1529
+ }, { rootMargin: '-20% 0px -70% 0px' });
1530
+ headings.forEach(h => obs.observe(h));
1531
+ }
1532
+
1533
+ // ── Copy buttons ────────────────────────────────────────────────────
1534
+ document.querySelectorAll('pre').forEach(pre => {
1535
+ const btn = document.createElement('button');
1536
+ btn.className = 'copy-btn'; btn.textContent = 'Copy';
1537
+ btn.addEventListener('click', () => {
1538
+ const code = pre.querySelector('code');
1539
+ navigator.clipboard.writeText(code ? code.innerText : pre.innerText).then(() => {
1540
+ btn.textContent = 'Copied!'; btn.classList.add('copied');
1541
+ setTimeout(() => { btn.textContent = 'Copy'; btn.classList.remove('copied'); }, 2000);
1542
+ });
1543
+ });
1544
+ pre.style.position = 'relative';
1545
+ pre.appendChild(btn);
1546
+ });
1547
+
1548
+ // ── Sidebar active ──────────────────────────────────────────────────
1549
+ const cur = window.location.pathname.split('/').pop();
1550
+ document.querySelectorAll('.sidebar-link').forEach(l => {
1551
+ if (l.getAttribute('href') === cur || l.getAttribute('href').endsWith(cur)) l.classList.add('active');
1552
+ });
1553
+
1554
+ // ── highlight.js ────────────────────────────────────────────────────
1555
+ if (window.hljs) {
1556
+ hljs.configure({ ignoreUnescapedHTML: true });
1557
+ hljs.highlightAll();
1558
+ }
1559
+ });
1560
+ </script>
1561
+ </body>
1562
+ </html>