@kiberon-labs/behave-graph-flow 2.0.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. package/.storybook/manager.ts +6 -0
  2. package/.storybook/preview.ts +49 -1
  3. package/.storybook/styles.css +9 -3
  4. package/.turbo/turbo-build.log +1 -1
  5. package/CHANGELOG.md +368 -0
  6. package/dist/AnyControlImpl-Ds-CShIB.js +20 -0
  7. package/dist/AnyControlImpl-Ds-CShIB.js.map +1 -0
  8. package/dist/DocumentationBrowserPanelImpl-deZNzFX8.js +166 -0
  9. package/dist/DocumentationBrowserPanelImpl-deZNzFX8.js.map +1 -0
  10. package/dist/index.css +36 -33
  11. package/dist/index.css.map +1 -1
  12. package/dist/index.d.ts +1865 -550
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +14357 -11221
  15. package/dist/index.js.map +1 -1
  16. package/dist/noteImpl-KkrrWgJd.js +242 -0
  17. package/dist/noteImpl-KkrrWgJd.js.map +1 -0
  18. package/dist/styles.module-CvmpDkZj.css +3 -0
  19. package/dist/styles.module-CvmpDkZj.css.map +1 -0
  20. package/dist/styles.module-DZxg8aW9.js +271 -0
  21. package/dist/styles.module-DZxg8aW9.js.map +1 -0
  22. package/dist/useChangeNodeData-ChQGK7AI.js +23 -0
  23. package/dist/useChangeNodeData-ChQGK7AI.js.map +1 -0
  24. package/docs/protocol.md +43 -20
  25. package/package.json +5 -9
  26. package/src/components/FloatingToolbar/index.module.css +5 -13
  27. package/src/components/FloatingToolbar/index.tsx +9 -9
  28. package/src/components/Flow.tsx +34 -23
  29. package/src/components/contextMenus/DynamicContextMenu.tsx +85 -0
  30. package/src/components/contextMenus/NodePicker.module.css +13 -13
  31. package/src/components/contextMenus/edge.tsx +9 -95
  32. package/src/components/contextMenus/node.tsx +9 -149
  33. package/src/components/contextMenus/selection.tsx +5 -71
  34. package/src/components/controls/any/AnyControlImpl.tsx +14 -0
  35. package/src/components/controls/any/index.tsx +13 -2
  36. package/src/components/edges/index.tsx +75 -69
  37. package/src/components/layoutController/index.module.css +3 -0
  38. package/src/components/layoutController/index.tsx +24 -1
  39. package/src/components/layoutController/utils.ts +46 -3
  40. package/src/components/menubar/defaults.tsx +55 -19
  41. package/src/components/menubar/menuItem.module.css +18 -3
  42. package/src/components/menubar/menuItem.tsx +34 -1
  43. package/src/components/nodes/behave/NodeContainer.module.css +26 -25
  44. package/src/components/nodes/group/index.tsx +3 -3
  45. package/src/components/nodes/wrapper/styles.module.css +6 -32
  46. package/src/components/panels/alignment/index.module.css +0 -10
  47. package/src/components/panels/alignment/index.tsx +4 -4
  48. package/src/components/panels/base/styles.module.css +2 -2
  49. package/src/components/panels/common/PanelHeader.module.css +24 -0
  50. package/src/components/panels/common/PanelHeader.tsx +22 -0
  51. package/src/components/panels/common/SectionTitle.module.css +13 -0
  52. package/src/components/panels/common/SectionTitle.tsx +10 -0
  53. package/src/components/panels/events/EditEventPanel.tsx +14 -5
  54. package/src/components/panels/events/ManageEventsPanel.tsx +11 -8
  55. package/src/components/panels/events/styles.module.css +6 -64
  56. package/src/components/panels/graphProperties/index.tsx +125 -0
  57. package/src/components/panels/history/index.tsx +2 -2
  58. package/src/components/panels/history/styles.module.css +0 -9
  59. package/src/components/panels/keymaps/index.module.css +3 -13
  60. package/src/components/panels/keymaps/index.tsx +1 -2
  61. package/src/components/panels/layers/index.tsx +20 -15
  62. package/src/components/panels/layers/styles.module.css +9 -12
  63. package/src/components/panels/legend/index.tsx +1 -1
  64. package/src/components/panels/logs/index.module.css +25 -19
  65. package/src/components/panels/logs/index.tsx +7 -7
  66. package/src/components/panels/nodeInputs/InputsGroup.tsx +1 -0
  67. package/src/components/panels/nodeInputs/NodeSettings.tsx +2 -2
  68. package/src/components/panels/nodeInputs/NodeTitleEditor.tsx +1 -1
  69. package/src/components/panels/nodeInputs/OutputsGroup.tsx +2 -12
  70. package/src/components/panels/nodeInputs/index.module.css +99 -75
  71. package/src/components/panels/nodeInputs/index.tsx +21 -11
  72. package/src/components/panels/nodeInputs/useNodeHandlers.ts +2 -2
  73. package/src/components/panels/nodeInputs/useNodeInputsData.ts +23 -43
  74. package/src/components/panels/nodePicker/index.tsx +8 -8
  75. package/src/components/panels/panel/index.module.css +7 -7
  76. package/src/components/panels/search/index.module.css +0 -50
  77. package/src/components/panels/search/index.tsx +2 -2
  78. package/src/components/panels/systemSettings/ConversionsSettings.tsx +203 -0
  79. package/src/components/panels/systemSettings/index.tsx +221 -176
  80. package/src/components/panels/systemSettings/styles.module.css +135 -8
  81. package/src/components/panels/traces/GridLines.tsx +1 -1
  82. package/src/components/panels/traces/TimeGrid.tsx +3 -3
  83. package/src/components/panels/traces/TraceLane.tsx +1 -1
  84. package/src/components/panels/traces/index.module.css +1 -8
  85. package/src/components/panels/traces/index.tsx +8 -4
  86. package/src/components/panels/traces/useDerivedSpans.ts +241 -146
  87. package/src/components/panels/traces/utils.ts +8 -0
  88. package/src/components/panels/variables/CreateVariableScreen.tsx +3 -3
  89. package/src/components/panels/variables/ManageVariablesScreen.tsx +12 -9
  90. package/src/components/panels/variables/index.tsx +2 -2
  91. package/src/components/panels/variables/styles.module.css +4 -91
  92. package/src/components/primitives/icon.module.css +4 -4
  93. package/src/components/sockets/input/index.tsx +9 -2
  94. package/src/components/sockets/input/styles.module.css +2 -3
  95. package/src/components/sockets/output/index.tsx +10 -3
  96. package/src/components/sockets/output/styles.module.css +1 -6
  97. package/src/css/notes.css +135 -0
  98. package/src/css/prosemirror.css +3 -3
  99. package/src/css/rc-dock.css +143 -43
  100. package/src/css/rc-menu.css +56 -55
  101. package/src/css/themes/kiberon.css +127 -0
  102. package/src/css/vars.css +197 -13
  103. package/src/css/vscode-elements.css +124 -0
  104. package/src/generators/CallSubgraphGenerator.tsx +136 -0
  105. package/src/generators/CustomEventOnTriggeredGenerator.tsx +2 -2
  106. package/src/generators/GraphBoundaryGenerator.module.css +32 -0
  107. package/src/generators/GraphBoundaryGenerator.tsx +193 -0
  108. package/src/generators/SequenceGenerator.tsx +2 -2
  109. package/src/generators/SwitchOnIntegerGenerator.tsx +2 -2
  110. package/src/generators/SwitchOnStringGenerator.tsx +2 -2
  111. package/src/generators/callSubgraphSync.ts +126 -0
  112. package/src/generators/registerDefaultGenerators.ts +21 -0
  113. package/src/generators/registerDefaults.ts +26 -0
  114. package/src/hooks/useBehaveGraphFlow.ts +2 -2
  115. package/src/hooks/useFlowHandlers.ts +47 -9
  116. package/src/hooks/useWasdPan.ts +26 -4
  117. package/src/index.css +4 -16
  118. package/src/index.ts +17 -0
  119. package/src/manifest/contributionRegistry.ts +93 -0
  120. package/src/manifest/index.ts +4 -0
  121. package/src/manifest/loadManifest.ts +82 -0
  122. package/src/manifest/manifestPlugin.ts +29 -0
  123. package/src/manifest/passthroughValueType.ts +40 -0
  124. package/src/plugin/alignment/index.ts +22 -12
  125. package/src/plugin/autosave/controller.ts +366 -0
  126. package/src/plugin/autosave/index.tsx +114 -0
  127. package/src/plugin/autosave/panel/BackupPanel.tsx +141 -0
  128. package/src/plugin/autosave/panel/index.tsx +1 -0
  129. package/src/plugin/autosave/panel/styles.module.css +56 -0
  130. package/src/plugin/autosave/settings.ts +65 -0
  131. package/src/plugin/autosave/storage.ts +147 -0
  132. package/src/plugin/docs/index.tsx +2 -4
  133. package/src/plugin/docs/panel/DocumentationBrowserPanelImpl.tsx +200 -0
  134. package/src/plugin/docs/panel/index.tsx +15 -194
  135. package/src/plugin/docs/panel/styles.module.css +8 -8
  136. package/src/plugin/graphrunner/actions.ts +258 -185
  137. package/src/plugin/graphrunner/buttons.tsx +34 -26
  138. package/src/plugin/graphrunner/client.ts +4 -1
  139. package/src/plugin/graphrunner/index.tsx +29 -100
  140. package/src/plugin/graphrunner/panel.tsx +2 -2
  141. package/src/plugin/graphrunner/runController.ts +283 -0
  142. package/src/plugin/graphrunner/runner.ts +21 -192
  143. package/src/plugin/graphrunner/store.ts +14 -24
  144. package/src/plugin/graphrunner/styles.module.css +17 -57
  145. package/src/plugin/graphrunner/transport.ts +26 -0
  146. package/src/plugin/graphrunner/types.ts +21 -0
  147. package/src/plugin/graphrunner-local/execution-utils.ts +260 -80
  148. package/src/plugin/graphrunner-local/index.tsx +8 -2
  149. package/src/plugin/graphrunner-local/panel.tsx +131 -175
  150. package/src/plugin/graphrunner-local/styles.module.css +57 -76
  151. package/src/plugin/graphrunner-local/transport.ts +151 -184
  152. package/src/plugin/graphrunner-webworker/graph-executor.worker.ts +2 -0
  153. package/src/plugin/graphrunner-webworker/index.tsx +4 -10
  154. package/src/plugin/graphrunner-webworker/store.ts +9 -0
  155. package/src/plugin/kitchen-sink/index.ts +38 -0
  156. package/src/{layout/dagre.tsx → plugin/layout/dagre.ts} +17 -5
  157. package/src/{layout → plugin/layout}/elk.ts +22 -6
  158. package/src/plugin/layout/index.ts +80 -0
  159. package/src/plugin/notes/FormatToolbar.tsx +200 -0
  160. package/src/plugin/notes/index.tsx +191 -0
  161. package/src/plugin/notes/nodeActions.ts +100 -0
  162. package/src/plugin/notes/note.tsx +20 -0
  163. package/src/plugin/notes/noteImpl.tsx +89 -0
  164. package/src/plugin/realtime/realtimeRunner.ts +58 -4
  165. package/src/specifics/CustomEventOnTriggeredSpecific.tsx +2 -2
  166. package/src/specifics/CustomEventTriggerSpecific.tsx +2 -2
  167. package/src/specifics/VariableGetSpecific.tsx +2 -2
  168. package/src/specifics/VariableSetSpecific.tsx +2 -2
  169. package/src/store/actions.tsx +5 -5
  170. package/src/store/commands.ts +278 -0
  171. package/src/store/contextMenu.ts +192 -0
  172. package/src/store/conversions.ts +47 -0
  173. package/src/store/flow.tsx +23 -38
  174. package/src/store/graphMeta.ts +39 -0
  175. package/src/store/hotKeys.tsx +301 -260
  176. package/src/store/layers.ts +3 -3
  177. package/src/store/registry.ts +12 -4
  178. package/src/store/selection.ts +3 -3
  179. package/src/store/settings.ts +82 -82
  180. package/src/store/settingsSchema.ts +210 -0
  181. package/src/store/tabs.ts +5 -1
  182. package/src/store/traces.ts +3 -3
  183. package/src/system/graph.ts +11 -14
  184. package/src/system/graphSession.ts +172 -0
  185. package/src/system/index.ts +3 -0
  186. package/src/system/notifications.ts +13 -0
  187. package/src/system/persistence.ts +82 -0
  188. package/src/system/plugin.ts +28 -0
  189. package/src/system/provider.tsx +64 -0
  190. package/src/system/system.ts +518 -88
  191. package/src/system/tabLoader.tsx +70 -32
  192. package/src/system/undoRedo.ts +1 -1
  193. package/src/transformers/Uigraph.ts +5 -4
  194. package/src/transformers/contract.ts +87 -0
  195. package/src/transformers/flowToBehave.ts +13 -5
  196. package/src/types/nodes.ts +8 -3
  197. package/src/types.ts +2 -0
  198. package/src/util/autoConvert.ts +200 -0
  199. package/src/util/isValidConnection.ts +23 -2
  200. package/stories/defaults/defaultStoryProvider.tsx +17 -14
  201. package/stories/defaults/systemGenerator.ts +6 -1
  202. package/stories/{components/nodes/comment.stories.tsx → plugins/notes.stories.tsx} +24 -30
  203. package/tests/autoConvert.test.ts +329 -0
  204. package/tests/autosavePlugin.test.ts +204 -0
  205. package/tests/callSubgraphSync.test.ts +148 -0
  206. package/tests/commandRegistry.test.ts +137 -0
  207. package/tests/contract.test.ts +51 -0
  208. package/tests/contractSerialize.test.ts +62 -0
  209. package/tests/deriveSpans.test.ts +71 -0
  210. package/tests/flowToBehave.test.ts +2 -1
  211. package/tests/hotkeys.test.ts +79 -0
  212. package/tests/keepAliveLifecycle.test.ts +167 -0
  213. package/tests/loadManifest.test.ts +113 -0
  214. package/tests/noteMarkdown.test.ts +65 -0
  215. package/tests/notesPlugin.test.ts +162 -0
  216. package/tests/persistence.test.ts +51 -0
  217. package/tests/saveLoad.test.ts +7 -6
  218. package/tests/settings.test.ts +178 -0
  219. package/tests/traceStore.test.ts +46 -0
  220. package/tests/visual/README.md +2 -2
  221. package/tests/visual/__screenshots__/panels.visual.test.tsx/panel-conversation-chromium-win32.png +0 -0
  222. package/tests/visual/__screenshots__/panels.visual.test.tsx/panel-events-chromium-win32.png +0 -0
  223. package/tests/visual/__screenshots__/panels.visual.test.tsx/panel-history-chromium-win32.png +0 -0
  224. package/tests/visual/__screenshots__/panels.visual.test.tsx/panel-keymaps-chromium-win32.png +0 -0
  225. package/tests/visual/__screenshots__/panels.visual.test.tsx/panel-layers-chromium-win32.png +0 -0
  226. package/tests/visual/__screenshots__/panels.visual.test.tsx/panel-legend-chromium-win32.png +0 -0
  227. package/tests/visual/__screenshots__/panels.visual.test.tsx/panel-localGraphRunner-chromium-win32.png +0 -0
  228. package/tests/visual/__screenshots__/panels.visual.test.tsx/panel-logs-chromium-win32.png +0 -0
  229. package/tests/visual/__screenshots__/panels.visual.test.tsx/panel-nodeInputs-chromium-win32.png +0 -0
  230. package/tests/visual/__screenshots__/panels.visual.test.tsx/panel-nodePicker-chromium-win32.png +0 -0
  231. package/tests/visual/__screenshots__/panels.visual.test.tsx/panel-panel-chromium-win32.png +0 -0
  232. package/tests/visual/__screenshots__/panels.visual.test.tsx/panel-search-chromium-win32.png +0 -0
  233. package/tests/visual/__screenshots__/panels.visual.test.tsx/panel-systemSettings-chromium-win32.png +0 -0
  234. package/tests/visual/__screenshots__/panels.visual.test.tsx/panel-variables-chromium-win32.png +0 -0
  235. package/tests/visual/panels.visual.test.tsx +3 -3
  236. package/tests/wasdPan.test.ts +71 -0
  237. package/vitest.config.ts +1 -1
  238. package/vitest.visual.config.ts +7 -0
  239. package/.storybook/vscode.css +0 -814
  240. package/src/components/nodes/comment/FormatToolbar.tsx +0 -118
  241. package/src/components/nodes/comment/comment.tsx +0 -103
  242. package/src/components/nodes/comment/styles.module.css +0 -150
  243. package/src/components/panels/conversation/index.module.css +0 -151
  244. package/src/components/panels/conversation/index.tsx +0 -162
  245. package/src/components/panels/events/CustomEventsEditor.tsx +0 -384
  246. package/src/css/vscode.css +0 -13
  247. package/src/hooks/useDetachNodes.ts +0 -39
  248. package/src/plugin/graphrunner-webworker/types.ts +0 -17
  249. package/src/specifics/registerDefaultSpecifics.ts +0 -5
  250. package/src/store/chat.ts +0 -73
  251. package/src/store/graphRunnerClient.ts +0 -110
@@ -30,6 +30,7 @@ export const OutputsGroup: React.FC<OutputsGroupProps> = ({
30
30
  <div key={output.name} className={styles.inputWithToggle}>
31
31
  {onToggleOutput && (
32
32
  <Icon
33
+ className={styles.inputToggle}
33
34
  onClick={() => onToggleOutput(output.name)}
34
35
  title={isHidden ? 'Show output on node' : 'Hide output on node'}
35
36
  >
@@ -42,18 +43,7 @@ export const OutputsGroup: React.FC<OutputsGroupProps> = ({
42
43
  <div className={styles.inputName} title={output.valueType}>
43
44
  {output.name}
44
45
  </div>
45
- <div className={styles.inputSubtext}>
46
- {output.connected ? 'Connected' : output.valueType}
47
- </div>
48
- </div>
49
- <div>
50
- {output.connected ? (
51
- <div className={styles.connectedMessage}>
52
- Socket is connected
53
- </div>
54
- ) : (
55
- <div className={styles.connectedMessage}>Not connected</div>
56
- )}
46
+ <div className={styles.inputSubtext}>{output.valueType}</div>
57
47
  </div>
58
48
  </div>
59
49
  </div>
@@ -7,17 +7,6 @@
7
7
  padding: 0.5rem;
8
8
  }
9
9
 
10
- .panelScrollable {
11
- display: flex;
12
- flex: 1 1 0%;
13
- flex-direction: column;
14
- gap: 0.5rem;
15
- height: 100%;
16
- margin-bottom: 0.25rem;
17
- overflow: auto;
18
- padding: 0.5rem;
19
- }
20
-
21
10
  .listGap1 {
22
11
  display: flex;
23
12
  flex-direction: column;
@@ -30,15 +19,6 @@
30
19
  gap: 0.5rem;
31
20
  }
32
21
 
33
- .stackCol {
34
- display: flex;
35
- flex-direction: column;
36
- }
37
-
38
- .cardPadding {
39
- padding: 0.5rem;
40
- }
41
-
42
22
  .sectionTitle {
43
23
  font-size: 1.05em;
44
24
  font-weight: 600;
@@ -61,26 +41,30 @@
61
41
  }
62
42
 
63
43
  .emptyState {
64
- font-size: 0.9em;
65
- font-style: italic;
66
- opacity: 0.7;
44
+ font-size: var(--fs-desc, 0.72rem);
45
+ color: var(--ds-fg-muted);
67
46
  text-align: center;
68
- padding: 2rem;
47
+ padding: 2rem 1rem;
48
+ line-height: 1.4;
69
49
  }
70
50
 
71
51
  .panelTitle {
72
- font-size: 1.05em;
73
- text-align: center;
52
+ font-size: 0.95rem;
53
+ text-align: left;
74
54
  font-weight: 600;
75
55
  cursor: text;
76
56
  flex: 1;
57
+ min-width: 0;
58
+ white-space: nowrap;
59
+ overflow: hidden;
60
+ text-overflow: ellipsis;
77
61
  }
78
62
 
79
63
  .panelTitleContainer {
80
64
  display: flex;
81
65
  align-items: center;
82
- justify-content: center;
83
- gap: 0.5rem;
66
+ justify-content: flex-start;
67
+ gap: 0.4rem;
84
68
  position: relative;
85
69
  }
86
70
 
@@ -115,7 +99,7 @@
115
99
  }
116
100
 
117
101
  .infoButton:hover {
118
- background: var(--vscode-button-secondaryBackground, #313131);
102
+ background: var(--ds-button-secondary-bg, #313131);
119
103
  opacity: 1 !important;
120
104
  }
121
105
 
@@ -138,10 +122,13 @@
138
122
  }
139
123
 
140
124
  .panelId {
141
- font-size: 0.6em;
142
- opacity: 0.5;
143
- text-align: center;
125
+ font-size: var(--fs-desc, 0.72rem);
126
+ color: var(--ds-fg-muted);
127
+ opacity: 0.8;
128
+ text-align: left;
144
129
  font-weight: 400;
130
+ font-variant-numeric: tabular-nums;
131
+ margin-bottom: 0.25rem;
145
132
  }
146
133
 
147
134
  .toolbar {
@@ -149,10 +136,9 @@
149
136
  }
150
137
 
151
138
  .noInputs {
152
- font-size: 0.9em;
153
- font-style: italic;
154
- opacity: 0.7;
155
- padding: 0.75rem;
139
+ font-size: var(--fs-desc, 0.72rem);
140
+ color: var(--ds-fg-muted);
141
+ padding: 0.75rem 0.2em;
156
142
  }
157
143
 
158
144
  .stackColPadded {
@@ -162,34 +148,38 @@
162
148
  }
163
149
 
164
150
  .inputRow {
165
- display: grid;
166
- grid-template-columns: minmax(120px, 1fr) minmax(160px, 1fr);
167
- align-items: center;
168
- gap: 0.4em;
169
- padding: 0.2em;
151
+ display: flex;
152
+ flex-direction: column;
153
+ gap: 0.25rem;
154
+ padding: 0.25rem 0.2em;
155
+ }
156
+
157
+ /* Control fills the row width below the label, VSCode-settings style */
158
+ .inputRow > div:last-child {
159
+ width: 100%;
170
160
  }
171
161
 
172
162
  .inputMeta {
173
163
  display: flex;
174
- flex-direction: column;
175
- gap: 2px;
164
+ align-items: baseline;
165
+ gap: 0.4rem;
176
166
  }
177
167
 
178
168
  .inputName {
179
- font-size: 0.9em;
169
+ font-size: var(--fs-label, 0.8rem);
180
170
  font-weight: 600;
181
171
  text-transform: capitalize;
182
172
  }
183
173
 
184
174
  .inputSubtext {
185
- font-size: 0.75em;
186
- opacity: 0.7;
175
+ font-size: var(--fs-desc, 0.72rem);
176
+ color: var(--ds-fg-muted);
177
+ opacity: 0.8;
187
178
  }
188
179
 
189
180
  .connectedMessage {
190
- font-size: 0.85em;
191
- font-style: italic;
192
- opacity: 0.7;
181
+ font-size: var(--fs-desc, 0.72rem);
182
+ color: var(--ds-fg-muted);
193
183
  }
194
184
 
195
185
  .stackGap2Padded {
@@ -199,31 +189,59 @@
199
189
  padding: 0.2em;
200
190
  }
201
191
 
192
+ /* Shared compact uppercase sub-section label for the Settings tab */
193
+ .subTitle {
194
+ font-size: var(--fs-section, 0.7rem);
195
+ font-weight: 600;
196
+ text-transform: uppercase;
197
+ letter-spacing: 0.06em;
198
+ color: var(--ds-fg);
199
+ opacity: 0.65;
200
+ }
201
+
202
202
  .settingsRow {
203
203
  display: flex;
204
204
  justify-content: space-between;
205
205
  gap: 0.4em;
206
+ font-size: var(--fs-label, 0.8rem);
206
207
  }
207
208
 
208
- .annotationsSection {
209
+ .settingsRow > div:first-child {
210
+ color: var(--ds-fg-muted);
211
+ }
212
+
213
+ .settingsRow > div:last-child {
214
+ min-width: 0;
215
+ text-align: right;
216
+ overflow: hidden;
217
+ text-overflow: ellipsis;
218
+ white-space: nowrap;
219
+ font-variant-numeric: tabular-nums;
220
+ }
221
+
222
+ .descriptionSection {
209
223
  display: flex;
210
224
  flex-direction: column;
211
- gap: 0.2em;
225
+ gap: 0.35rem;
212
226
  }
213
227
 
214
- .annotationsTitle {
215
- font-size: 0.95em;
216
- font-weight: 600;
228
+ .descriptionTextarea {
229
+ width: 100%;
230
+ }
231
+
232
+ .annotationsSection {
233
+ display: flex;
234
+ flex-direction: column;
235
+ gap: 0.35rem;
217
236
  }
218
237
 
219
238
  .annotationsEmpty {
220
- font-size: 0.85em;
221
- font-style: italic;
222
- opacity: 0.7;
239
+ font-size: var(--fs-desc, 0.72rem);
240
+ color: var(--ds-fg-muted);
223
241
  }
224
242
 
225
243
  .annotationsValue {
226
- font-size: 0.85em;
244
+ font-size: var(--fs-desc, 0.72rem);
227
245
  }
228
246
 
229
247
  .annotationsList {
@@ -232,16 +250,16 @@
232
250
  }
233
251
 
234
252
  .annotationsListItem {
235
- font-size: 0.85em;
253
+ font-size: var(--fs-desc, 0.72rem);
236
254
  }
237
255
 
238
256
  .annotationsPre {
239
257
  margin: 0;
240
- padding: 0.2em;
258
+ padding: 0.5rem;
241
259
  border: 1px solid var(--color-neutral-stroke-subtle);
242
- border-radius: 0.2em;
260
+ border-radius: var(--component-radii-sm, 4px);
243
261
  background: var(--color-neutral-background-strong);
244
- font-size: 0.8em;
262
+ font-size: var(--fs-desc, 0.72rem);
245
263
  overflow: auto;
246
264
  white-space: pre-wrap;
247
265
  word-break: break-word;
@@ -249,11 +267,22 @@
249
267
 
250
268
  .panelHeader {
251
269
  display: flex;
252
- justify-content: flex-end;
253
- padding: 0.25rem 0.5rem;
270
+ align-items: center;
271
+ justify-content: space-between;
272
+ padding: 0.25rem 0.2em;
273
+ margin-bottom: 0.25rem;
254
274
  border-bottom: 1px solid var(--color-neutral-stroke-subtle);
255
275
  }
256
276
 
277
+ .panelHeaderLabel {
278
+ font-size: var(--fs-section, 0.7rem);
279
+ font-weight: 600;
280
+ text-transform: uppercase;
281
+ letter-spacing: 0.06em;
282
+ color: var(--ds-fg);
283
+ opacity: 0.65;
284
+ }
285
+
257
286
 
258
287
 
259
288
  .inputWithToggle {
@@ -262,19 +291,14 @@
262
291
  gap: 0.25rem;
263
292
  }
264
293
 
265
- .visibilityToggle {
266
- background: transparent;
267
- border: none;
268
- cursor: pointer;
269
- padding: 0.25rem;
270
- font-size: 0.85em;
271
- opacity: 0.5;
272
- transition: opacity 0.2s;
273
- flex-shrink: 0;
274
- margin-top: 0.2em;
294
+ /* Per-input visibility toggle: subtle by default, full strength on row hover */
295
+ .inputToggle {
296
+ opacity: 0.45;
297
+ transition: opacity 0.1s ease;
275
298
  }
276
299
 
277
- .visibilityToggle:hover {
300
+ .inputWithToggle:hover .inputToggle,
301
+ .inputToggle:focus-visible {
278
302
  opacity: 1;
279
303
  }
280
304
 
@@ -1,5 +1,5 @@
1
1
  import React, { useCallback, useMemo } from 'react';
2
- import { useSystem } from '@/system/provider';
2
+ import { useActiveGraph, GraphProvider } from '@/system/provider';
3
3
  import {
4
4
  VscodeTabHeader,
5
5
  VscodeTabPanel,
@@ -27,8 +27,11 @@ import { EyeClosed, EyeSolid } from 'iconoir-react';
27
27
  import { Icon } from '@/components/primitives/icon';
28
28
 
29
29
  export function NodeInputsPanel() {
30
- const system = useSystem();
31
- const documentation = useStore(system.documentationStore, (x) => x.docs);
30
+ const system = useActiveGraph()!;
31
+ const documentation = useStore(
32
+ system.editor.documentationStore,
33
+ (x) => x.docs
34
+ );
32
35
 
33
36
  const {
34
37
  allSpecsJson,
@@ -182,7 +185,7 @@ export function NodeInputsPanel() {
182
185
  system.refStore.getState().setRef('selectedDocumentationType', nodeType);
183
186
 
184
187
  // Open documentation browser panel
185
- const currentLayout = system.tabStore.getState().layout;
188
+ const currentLayout = system.editor.tabStore.getState().layout;
186
189
 
187
190
  // Close existing doc browser if open
188
191
  const existingPanel = findTabInLayout(currentLayout, 'docbrowser');
@@ -203,7 +206,7 @@ export function NodeInputsPanel() {
203
206
  height: 700
204
207
  });
205
208
 
206
- system.tabStore.getState().setLayout(newLayout);
209
+ system.editor.tabStore.getState().setLayout(newLayout);
207
210
  },
208
211
  [system]
209
212
  );
@@ -262,6 +265,7 @@ export function NodeInputsPanel() {
262
265
  <VscodeTabPanel>
263
266
  {inputsWithControls.length > 0 && (
264
267
  <div className={styles.panelHeader}>
268
+ <span className={styles.panelHeaderLabel}>Inputs</span>
265
269
  <Icon
266
270
  onClick={handleToggleAllInputs}
267
271
  title="Toggle all input visibility"
@@ -277,12 +281,17 @@ export function NodeInputsPanel() {
277
281
  </div>
278
282
  )}
279
283
 
280
- {generatorNode && (
281
- <SocketGenerators
282
- generators={matchingGenerators}
283
- generatorNode={generatorNode}
284
- />
285
- )}
284
+ {generatorNode &&
285
+ (
286
+ // Generators read per-graph state via useGraph(); bind them to the
287
+ // active session since this panel lives outside the graph tab.
288
+ <GraphProvider value={system}>
289
+ <SocketGenerators
290
+ generators={matchingGenerators}
291
+ generatorNode={generatorNode}
292
+ />
293
+ </GraphProvider>
294
+ )}
286
295
  {inputsWithControls.length === 0 &&
287
296
  matchingGenerators.length === 0 && (
288
297
  <div className={styles.noInputs}>
@@ -302,6 +311,7 @@ export function NodeInputsPanel() {
302
311
  <VscodeTabPanel>
303
312
  {outputsWithInfo.length > 0 && (
304
313
  <div className={styles.panelHeader}>
314
+ <span className={styles.panelHeaderLabel}>Outputs</span>
305
315
  <Icon
306
316
  onClick={handleToggleAllOutputs}
307
317
  title="Toggle all output visibility"
@@ -1,9 +1,9 @@
1
1
  import { useCallback } from 'react';
2
2
  import type { IBehaveNode } from '@/types/nodes';
3
- import type { System } from '@/system';
3
+ import type { GraphSession } from '@/system/graphSession';
4
4
 
5
5
  export function useNodeHandlers(
6
- system: System,
6
+ system: GraphSession,
7
7
  selectedNode: IBehaveNode | null
8
8
  ) {
9
9
  const handleSaveTitle = useCallback(
@@ -3,9 +3,9 @@ import { useStore } from 'zustand';
3
3
  import { configureSockets } from '@/util/sockets';
4
4
  import { isHandleConnected } from '@/util/isHandleConnected';
5
5
  import type { IBehaveNode } from '@/types/nodes';
6
- import type { System } from '@/system';
6
+ import type { GraphSession } from '@/system/graphSession';
7
7
 
8
- export function useNodeInputsData(system: System) {
8
+ export function useNodeInputsData(system: GraphSession) {
9
9
  const selectedNodeId = useStore(
10
10
  system.selectionStore,
11
11
  (x) => x.selectedNodeId
@@ -14,13 +14,16 @@ export function useNodeInputsData(system: System) {
14
14
  const edges = useStore(system.edgeStore, (x) => x.edges);
15
15
  const controls = useStore(system.controlStore, (x) => x.controls);
16
16
  const defaultControl = useStore(system.controlStore, (x) => x.defaultControl);
17
- const generators = useStore(system.socketGeneratorStore, (s) => s.generators);
17
+ const generators = useStore(
18
+ system.editor.socketGeneratorStore,
19
+ (s) => s.generators
20
+ );
18
21
  const generatorLocation = useStore(
19
- system.systemSettings,
22
+ system.editor.systemSettings,
20
23
  (s) => s.generatorLocation
21
24
  );
22
25
 
23
- const allSpecsJson = useStore(system.specStore, (x) => x.specs);
26
+ const allSpecsJson = useStore(system.editor.specStore, (x) => x.specs);
24
27
 
25
28
  const selectedNodes = useMemo(() => {
26
29
  return nodes.filter(
@@ -97,49 +100,26 @@ export function useNodeInputsData(system: System) {
97
100
  const outputsWithInfo = useMemo(() => {
98
101
  if (!selectedNode || !nodeSpec) return [];
99
102
 
100
- const { pairs, valueOutputs } = configureSockets(
103
+ // `valueOutputs` already contains every non-flow output. (The `pairs` from
104
+ // configureSockets also carry these value outputs in their second slot ,
105
+ // iterating both would render each value output twice and collide on the
106
+ // React key, e.g. `provider` / `agent`.)
107
+ const { valueOutputs } = configureSockets(
101
108
  selectedNode.data.configuration,
102
109
  nodeSpec,
103
110
  selectedNode.data.dynamicPorts
104
111
  );
105
112
 
106
- const outputs: Array<{
107
- name: string;
108
- valueType: string;
109
- connected: boolean;
110
- }> = [];
111
-
112
- // Collect flow-paired outputs (non-flow)
113
- for (const [, output] of pairs) {
114
- if (output && output.valueType !== 'flow') {
115
- outputs.push({
116
- name: output.name,
117
- valueType: output.valueType,
118
- connected: isHandleConnected(
119
- edges,
120
- selectedNode.id,
121
- output.name,
122
- 'source'
123
- )
124
- });
125
- }
126
- }
127
-
128
- // Value-only outputs
129
- for (const output of valueOutputs) {
130
- outputs.push({
131
- name: output.name,
132
- valueType: output.valueType,
133
- connected: isHandleConnected(
134
- edges,
135
- selectedNode.id,
136
- output.name,
137
- 'source'
138
- )
139
- });
140
- }
141
-
142
- return outputs;
113
+ return valueOutputs.map((output) => ({
114
+ name: output.name,
115
+ valueType: output.valueType,
116
+ connected: isHandleConnected(
117
+ edges,
118
+ selectedNode.id,
119
+ output.name,
120
+ 'source'
121
+ )
122
+ }));
143
123
  }, [selectedNode, nodeSpec, edges]);
144
124
 
145
125
  const matchingGenerators = useMemo(() => {
@@ -1,5 +1,5 @@
1
1
  import React, { useCallback, useMemo } from 'react';
2
- import { useSystem } from '@/system/provider';
2
+ import { useActiveGraph } from '@/system/provider';
3
3
  import { useStore } from 'zustand';
4
4
  import { NodePicker } from '@/components/contextMenus/NodePicker';
5
5
  import type { ExtendedNodeSpecJSON } from '@/components/contextMenus/NodePicker';
@@ -12,9 +12,9 @@ import {
12
12
  } from '@/components/layoutController/utils';
13
13
 
14
14
  export function NodePickerPanel() {
15
- const sys = useSystem();
16
- const specJson = useStore(sys.specStore, (x) => x.specs);
17
- const documentation = useStore(sys.documentationStore, (x) => x.docs);
15
+ const sys = useActiveGraph()!;
16
+ const specJson = useStore(sys.editor.specStore, (x) => x.specs);
17
+ const documentation = useStore(sys.editor.documentationStore, (x) => x.docs);
18
18
  const reactflowRef = useStore(sys.refStore, (x) => x.refs.reactflow);
19
19
  const screenPosition = useStore(
20
20
  sys.refStore,
@@ -32,9 +32,9 @@ export function NodePickerPanel() {
32
32
  // For now, we'll use undefined which means no filtering
33
33
  const nodePickFilters = undefined;
34
34
  const closeNodePicker = useCallback(() => {
35
- const currentLayout = sys.tabStore.getState().layout;
35
+ const currentLayout = sys.editor.tabStore.getState().layout;
36
36
  const newLayout = removeTabFromLayout(currentLayout, 'nodepicker');
37
- sys.tabStore.getState().setLayout(newLayout);
37
+ sys.editor.tabStore.getState().setLayout(newLayout);
38
38
  }, [sys]);
39
39
 
40
40
  const handleShowDocumentation = useCallback(
@@ -43,7 +43,7 @@ export function NodePickerPanel() {
43
43
  sys.refStore.getState().setRef('selectedDocumentationType', nodeType);
44
44
 
45
45
  // Open documentation browser panel
46
- const currentLayout = sys.tabStore.getState().layout;
46
+ const currentLayout = sys.editor.tabStore.getState().layout;
47
47
 
48
48
  // Close existing doc browser if open
49
49
  const existingPanel = findTabInLayout(currentLayout, 'docbrowser');
@@ -64,7 +64,7 @@ export function NodePickerPanel() {
64
64
  height: 700
65
65
  });
66
66
 
67
- sys.tabStore.getState().setLayout(newLayout);
67
+ sys.editor.tabStore.getState().setLayout(newLayout);
68
68
  },
69
69
  [sys]
70
70
  );
@@ -10,7 +10,7 @@
10
10
  align-items: center;
11
11
  justify-content: space-between;
12
12
  padding-bottom: 0.5rem;
13
- border-bottom: 1px solid var(--vscode-panel-border);
13
+ border-bottom: 1px solid var(--ds-panel-border);
14
14
  }
15
15
 
16
16
  .title {
@@ -20,7 +20,7 @@
20
20
  }
21
21
 
22
22
  .count {
23
- color: var(--vscode-descriptionForeground);
23
+ color: var(--ds-fg-muted);
24
24
  font-size: 0.9rem;
25
25
  }
26
26
 
@@ -35,14 +35,14 @@
35
35
 
36
36
  .idCell code {
37
37
  font-size: 0.85rem;
38
- color: var(--vscode-textPreformat-foreground);
39
- background-color: var(--vscode-textCodeBlock-background);
38
+ color: var(--ds-preformat-fg);
39
+ background-color: var(--ds-code-bg);
40
40
  padding: 0.125rem 0.375rem;
41
41
  border-radius: 3px;
42
42
  }
43
43
 
44
44
  .groupCell {
45
- color: var(--vscode-descriptionForeground);
45
+ color: var(--ds-fg-muted);
46
46
  font-size: 0.9rem;
47
47
  }
48
48
 
@@ -54,8 +54,8 @@
54
54
  .badge {
55
55
  display: inline-block;
56
56
  padding: 0.125rem 0.5rem;
57
- background-color: var(--vscode-badge-background);
58
- color: var(--vscode-badge-foreground);
57
+ background-color: var(--ds-badge-bg);
58
+ color: var(--ds-badge-fg);
59
59
  border-radius: 10px;
60
60
  font-size: 0.75rem;
61
61
  font-weight: 500;
@@ -1,9 +1,3 @@
1
- .container {
2
- display: flex;
3
- flex-direction: column;
4
- gap: 8px;
5
- }
6
-
7
1
  .searchGroup {
8
2
  display: flex;
9
3
  flex-direction: column;
@@ -19,48 +13,4 @@
19
13
 
20
14
  .fullWidth {
21
15
  width: 100%;
22
- }
23
-
24
- .resultsContainer {
25
- display: flex;
26
- flex-direction: column;
27
- gap: 4px;
28
- margin-top: 8px;
29
- }
30
-
31
- .resultsList {
32
- display: flex;
33
- flex-direction: column;
34
- gap: 4px;
35
- max-height: 400px;
36
- overflow-y: auto;
37
- border: 1px solid var(--vscode-panel-border);
38
- border-radius: 4px;
39
- padding: 8px;
40
- }
41
-
42
- .resultItem {
43
- display: flex;
44
- flex-direction: column;
45
- gap: 4px;
46
- cursor: pointer;
47
- border: 1px solid var(--vscode-panel-border);
48
- border-radius: 4px;
49
- background-color: var(--vscode-list-hoverBackground);
50
- padding: 8px;
51
- transition: all 0.2s;
52
- }
53
-
54
- .resultItem:hover {
55
- background-color: var(--vscode-list-activeSelectionBackground);
56
- }
57
-
58
- .resultId {
59
- font-weight: bold;
60
- font-size: 0.9em;
61
- }
62
-
63
- .resultType {
64
- font-size: 0.8em;
65
- opacity: 0.7;
66
16
  }
@@ -11,7 +11,7 @@ import {
11
11
  VscodeCollapsible,
12
12
  VscodeBadge
13
13
  } from '@vscode-elements/react-elements';
14
- import { useRefFromStore, useSystem } from '@/system';
14
+ import { useRefFromStore, useActiveGraph } from '@/system';
15
15
  import type { Node } from 'reactflow';
16
16
  import { Search } from 'iconoir-react';
17
17
  import Fuse from 'fuse.js';
@@ -36,7 +36,7 @@ export const SearchPanel = () => {
36
36
  const [nodeType, setNodeType] = React.useState('');
37
37
  const [searchResults, setSearchResults] = React.useState<SearchResult[]>([]);
38
38
 
39
- const sys = useSystem();
39
+ const sys = useActiveGraph()!;
40
40
  const graphNodes = useStore(sys.nodeStore, (s) => s.nodes);
41
41
  const reactflow = useRefFromStore(sys.refStore, 'reactflow');
42
42