project-graph-mcp 2.3.2 → 2.4.1

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 (279) hide show
  1. package/package.json +3 -2
  2. package/src/analysis/analysis-cache.ctx +9 -0
  3. package/src/analysis/analysis-cache.js +1 -1
  4. package/src/analysis/complexity.ctx +6 -0
  5. package/src/analysis/complexity.js +1 -1
  6. package/src/analysis/custom-rules.ctx +14 -0
  7. package/src/analysis/custom-rules.js +1 -1
  8. package/src/analysis/db-analysis.ctx +7 -0
  9. package/src/analysis/db-analysis.js +1 -1
  10. package/src/analysis/dead-code.ctx +6 -0
  11. package/src/analysis/dead-code.js +1 -1
  12. package/src/analysis/full-analysis.ctx +9 -0
  13. package/src/analysis/full-analysis.js +1 -1
  14. package/src/analysis/jsdoc-checker.ctx +10 -0
  15. package/src/analysis/jsdoc-checker.js +1 -1
  16. package/src/analysis/jsdoc-generator.ctx +9 -0
  17. package/src/analysis/jsdoc-generator.js +1 -1
  18. package/src/analysis/large-files.ctx +6 -0
  19. package/src/analysis/large-files.js +1 -1
  20. package/src/analysis/outdated-patterns.ctx +7 -0
  21. package/src/analysis/outdated-patterns.js +1 -1
  22. package/src/analysis/similar-functions.ctx +6 -0
  23. package/src/analysis/similar-functions.js +1 -1
  24. package/src/analysis/test-annotations.ctx +11 -0
  25. package/src/analysis/test-annotations.js +1 -1
  26. package/src/analysis/type-checker.ctx +6 -0
  27. package/src/analysis/type-checker.js +1 -1
  28. package/src/analysis/undocumented.ctx +8 -0
  29. package/src/analysis/undocumented.js +1 -1
  30. package/src/cli/cli-handlers.ctx +7 -0
  31. package/src/cli/cli-handlers.js +1 -1
  32. package/src/cli/cli.ctx +6 -0
  33. package/src/cli/cli.js +1 -1
  34. package/src/compact/ai-context.ctx +6 -0
  35. package/src/compact/ai-context.js +1 -1
  36. package/src/compact/compact-migrate.ctx +8 -0
  37. package/src/compact/compact-migrate.js +1 -1
  38. package/src/compact/compact.ctx +11 -0
  39. package/src/compact/compact.js +1 -1
  40. package/src/compact/compress.ctx +7 -0
  41. package/src/compact/compress.js +1 -1
  42. package/src/compact/ctx-resolver.ctx +2 -0
  43. package/src/compact/ctx-resolver.js +1 -1
  44. package/src/compact/ctx-to-jsdoc.ctx +11 -0
  45. package/src/compact/ctx-to-jsdoc.js +1 -1
  46. package/src/compact/doc-dialect.ctx +11 -0
  47. package/src/compact/doc-dialect.js +2 -2
  48. package/src/compact/expand.ctx +14 -0
  49. package/src/compact/expand.js +1 -1
  50. package/src/compact/framework-references.ctx +7 -0
  51. package/src/compact/framework-references.js +1 -1
  52. package/src/compact/instructions.ctx +6 -0
  53. package/src/compact/instructions.js +1 -1
  54. package/src/compact/jsdoc-builder.ctx +4 -0
  55. package/src/compact/jsdoc-builder.js +1 -1
  56. package/src/compact/mode-config.ctx +8 -0
  57. package/src/compact/mode-config.js +1 -1
  58. package/src/compact/split-declarations.ctx +6 -0
  59. package/src/compact/split-declarations.js +1 -1
  60. package/src/compact/validate-pipeline.ctx +12 -0
  61. package/src/compact/validate-pipeline.js +1 -1
  62. package/src/core/event-bus.ctx +9 -0
  63. package/src/core/event-bus.js +1 -1
  64. package/src/core/file-walker.ctx +1 -0
  65. package/src/core/file-walker.js +1 -1
  66. package/src/core/filters.ctx +12 -0
  67. package/src/core/filters.js +1 -1
  68. package/src/core/graph-builder.ctx +7 -0
  69. package/src/core/graph-builder.js +1 -1
  70. package/src/core/parser.ctx +12 -0
  71. package/src/core/parser.js +1 -1
  72. package/src/core/utils.ctx +1 -0
  73. package/src/core/utils.js +1 -1
  74. package/src/core/workspace.ctx +7 -0
  75. package/src/core/workspace.js +1 -1
  76. package/src/lang/lang-go.ctx +8 -0
  77. package/src/lang/lang-go.js +1 -1
  78. package/src/lang/lang-python.ctx +5 -0
  79. package/src/lang/lang-python.js +1 -1
  80. package/src/lang/lang-sql.ctx +10 -0
  81. package/src/lang/lang-sql.js +1 -1
  82. package/src/lang/lang-typescript.ctx +6 -0
  83. package/src/lang/lang-typescript.js +1 -1
  84. package/src/lang/lang-utils.ctx +5 -0
  85. package/src/lang/lang-utils.js +1 -1
  86. package/src/mcp/mcp-server.ctx +6 -0
  87. package/src/mcp/mcp-server.js +1 -1
  88. package/src/mcp/tool-defs.ctx +2 -0
  89. package/src/mcp/tool-defs.js +1 -1
  90. package/src/mcp/tools.ctx +13 -0
  91. package/src/mcp/tools.js +1 -1
  92. package/src/network/backend-lifecycle.ctx +10 -0
  93. package/src/network/backend-lifecycle.js +1 -1
  94. package/src/network/backend.ctx +5 -0
  95. package/src/network/backend.js +1 -1
  96. package/src/network/local-gateway.ctx +9 -0
  97. package/src/network/local-gateway.js +1 -1
  98. package/src/network/mdns.ctx +6 -0
  99. package/src/network/mdns.js +1 -1
  100. package/src/network/server.ctx +2 -0
  101. package/src/network/server.js +2 -2
  102. package/src/network/web-server.ctx +17 -0
  103. package/src/network/web-server.js +2 -2
  104. package/web/follow-controller.js +94 -25
  105. package/web/panels/dep-graph.js +207 -21
  106. package/project-graph-mcp-2.3.0.tgz +0 -0
  107. package/vendor/symbiote-node/CHANGELOG.md +0 -31
  108. package/vendor/symbiote-node/LICENSE +0 -21
  109. package/vendor/symbiote-node/README.md +0 -206
  110. package/vendor/symbiote-node/canvas/AutoLayout.js +0 -725
  111. package/vendor/symbiote-node/canvas/Breadcrumb/Breadcrumb.css.js +0 -73
  112. package/vendor/symbiote-node/canvas/Breadcrumb/Breadcrumb.js +0 -93
  113. package/vendor/symbiote-node/canvas/Breadcrumb/Breadcrumb.tpl.js +0 -9
  114. package/vendor/symbiote-node/canvas/CanvasConnectionRenderer.js +0 -962
  115. package/vendor/symbiote-node/canvas/ConnectionRenderer.js +0 -1468
  116. package/vendor/symbiote-node/canvas/FlowSimulator.js +0 -323
  117. package/vendor/symbiote-node/canvas/ForceLayout.js +0 -189
  118. package/vendor/symbiote-node/canvas/ForceWorker.js +0 -1325
  119. package/vendor/symbiote-node/canvas/GraphTabs/GraphTabs.css.js +0 -97
  120. package/vendor/symbiote-node/canvas/GraphTabs/GraphTabs.js +0 -176
  121. package/vendor/symbiote-node/canvas/GraphTabs/GraphTabs.tpl.js +0 -12
  122. package/vendor/symbiote-node/canvas/LODManager.js +0 -88
  123. package/vendor/symbiote-node/canvas/Minimap/Minimap.css.js +0 -71
  124. package/vendor/symbiote-node/canvas/Minimap/Minimap.js +0 -207
  125. package/vendor/symbiote-node/canvas/Minimap/Minimap.tpl.js +0 -9
  126. package/vendor/symbiote-node/canvas/NodeCanvas/NodeCanvas.css.js +0 -261
  127. package/vendor/symbiote-node/canvas/NodeCanvas/NodeCanvas.js +0 -1840
  128. package/vendor/symbiote-node/canvas/NodeCanvas/NodeCanvas.tpl.js +0 -22
  129. package/vendor/symbiote-node/canvas/NodeSearch/NodeSearch.css.js +0 -97
  130. package/vendor/symbiote-node/canvas/NodeSearch/NodeSearch.js +0 -132
  131. package/vendor/symbiote-node/canvas/NodeSearch/NodeSearch.tpl.js +0 -21
  132. package/vendor/symbiote-node/canvas/NodeViewManager.js +0 -584
  133. package/vendor/symbiote-node/canvas/PinExpansion.js +0 -131
  134. package/vendor/symbiote-node/canvas/PseudoConnection.js +0 -80
  135. package/vendor/symbiote-node/canvas/SubgraphManager.js +0 -201
  136. package/vendor/symbiote-node/canvas/SubgraphRouter.js +0 -443
  137. package/vendor/symbiote-node/canvas/ViewportActions.js +0 -446
  138. package/vendor/symbiote-node/core/Connection.js +0 -45
  139. package/vendor/symbiote-node/core/Editor.js +0 -451
  140. package/vendor/symbiote-node/core/Frame.js +0 -31
  141. package/vendor/symbiote-node/core/GraphMermaid.js +0 -348
  142. package/vendor/symbiote-node/core/GraphText.js +0 -210
  143. package/vendor/symbiote-node/core/Node.js +0 -143
  144. package/vendor/symbiote-node/core/Portal.js +0 -104
  145. package/vendor/symbiote-node/core/Socket.js +0 -185
  146. package/vendor/symbiote-node/core/SubgraphNode.js +0 -125
  147. package/vendor/symbiote-node/engine/AgentUICommands.js +0 -100
  148. package/vendor/symbiote-node/engine/Executor.js +0 -371
  149. package/vendor/symbiote-node/engine/Graph.js +0 -314
  150. package/vendor/symbiote-node/engine/GraphServer.js +0 -353
  151. package/vendor/symbiote-node/engine/HandlerLoader.js +0 -145
  152. package/vendor/symbiote-node/engine/History.js +0 -83
  153. package/vendor/symbiote-node/engine/Lifecycle.js +0 -118
  154. package/vendor/symbiote-node/engine/Persistence.js +0 -84
  155. package/vendor/symbiote-node/engine/Registry.js +0 -264
  156. package/vendor/symbiote-node/engine/SocketTypes.js +0 -79
  157. package/vendor/symbiote-node/engine/cli.js +0 -404
  158. package/vendor/symbiote-node/engine/index.js +0 -56
  159. package/vendor/symbiote-node/engine/nanoid.js +0 -28
  160. package/vendor/symbiote-node/engine/package.json +0 -26
  161. package/vendor/symbiote-node/engine/packs/ai/beat-detect.handler.js +0 -215
  162. package/vendor/symbiote-node/engine/packs/ai/content-adapt.handler.js +0 -238
  163. package/vendor/symbiote-node/engine/packs/ai/face-detect.handler.js +0 -287
  164. package/vendor/symbiote-node/engine/packs/ai/grok-generate.handler.js +0 -565
  165. package/vendor/symbiote-node/engine/packs/ai/kling-lipsync.handler.js +0 -414
  166. package/vendor/symbiote-node/engine/packs/ai/lesson-generate.handler.js +0 -343
  167. package/vendor/symbiote-node/engine/packs/ai/opencode.handler.js +0 -164
  168. package/vendor/symbiote-node/engine/packs/ai/replicate-lipsync.handler.js +0 -341
  169. package/vendor/symbiote-node/engine/packs/ai/tts.handler.js +0 -241
  170. package/vendor/symbiote-node/engine/packs/ai/whisper.handler.js +0 -191
  171. package/vendor/symbiote-node/engine/packs/data/db-query.handler.js +0 -67
  172. package/vendor/symbiote-node/engine/packs/data/news-accumulate.handler.js +0 -281
  173. package/vendor/symbiote-node/engine/packs/data/personas.handler.js +0 -160
  174. package/vendor/symbiote-node/engine/packs/data/prompt-loader.handler.js +0 -193
  175. package/vendor/symbiote-node/engine/packs/data/roles.handler.js +0 -216
  176. package/vendor/symbiote-node/engine/packs/data/rss-feed.handler.js +0 -244
  177. package/vendor/symbiote-node/engine/packs/debug/inject.handler.js +0 -52
  178. package/vendor/symbiote-node/engine/packs/flow/agent.handler.js +0 -73
  179. package/vendor/symbiote-node/engine/packs/flow/if.handler.js +0 -107
  180. package/vendor/symbiote-node/engine/packs/flow/loop.handler.js +0 -58
  181. package/vendor/symbiote-node/engine/packs/flow/merge.handler.js +0 -60
  182. package/vendor/symbiote-node/engine/packs/flow/retry.handler.js +0 -65
  183. package/vendor/symbiote-node/engine/packs/flow/switch.handler.js +0 -64
  184. package/vendor/symbiote-node/engine/packs/flow/wait-all.handler.js +0 -39
  185. package/vendor/symbiote-node/engine/packs/io/http-request.handler.js +0 -82
  186. package/vendor/symbiote-node/engine/packs/io/read-file.handler.js +0 -60
  187. package/vendor/symbiote-node/engine/packs/io/write-file.handler.js +0 -63
  188. package/vendor/symbiote-node/engine/packs/transform/anchor-match.handler.js +0 -494
  189. package/vendor/symbiote-node/engine/packs/transform/effects-skeleton.handler.js +0 -417
  190. package/vendor/symbiote-node/engine/packs/transform/json-parse.handler.js +0 -43
  191. package/vendor/symbiote-node/engine/packs/transform/lipsync-select.handler.js +0 -339
  192. package/vendor/symbiote-node/engine/packs/transform/riopla-adapt.handler.js +0 -432
  193. package/vendor/symbiote-node/engine/packs/transform/set.handler.js +0 -57
  194. package/vendor/symbiote-node/engine/packs/transform/template-builder.handler.js +0 -134
  195. package/vendor/symbiote-node/engine/packs/transform/template.handler.js +0 -79
  196. package/vendor/symbiote-node/engine/packs/transform/timeline-build.handler.js +0 -399
  197. package/vendor/symbiote-node/engine/packs/util/delay.handler.js +0 -39
  198. package/vendor/symbiote-node/engine/packs/util/log.handler.js +0 -44
  199. package/vendor/symbiote-node/engine/packs/video-pack.js +0 -323
  200. package/vendor/symbiote-node/index.js +0 -103
  201. package/vendor/symbiote-node/inspector/InspectorPanel/InspectorPanel.css.js +0 -361
  202. package/vendor/symbiote-node/inspector/InspectorPanel/InspectorPanel.js +0 -332
  203. package/vendor/symbiote-node/inspector/InspectorPanel/InspectorPanel.tpl.js +0 -96
  204. package/vendor/symbiote-node/inspector/TemplatePreview/TemplatePreview.css.js +0 -104
  205. package/vendor/symbiote-node/inspector/TemplatePreview/TemplatePreview.js +0 -133
  206. package/vendor/symbiote-node/inspector/TemplatePreview/TemplatePreview.tpl.js +0 -33
  207. package/vendor/symbiote-node/interactions/ConnectFlow.js +0 -307
  208. package/vendor/symbiote-node/interactions/Drag.js +0 -102
  209. package/vendor/symbiote-node/interactions/Selector.js +0 -132
  210. package/vendor/symbiote-node/interactions/SnapGrid.js +0 -65
  211. package/vendor/symbiote-node/interactions/Zoom.js +0 -140
  212. package/vendor/symbiote-node/layout/ActionZone/ActionZone.css.js +0 -88
  213. package/vendor/symbiote-node/layout/ActionZone/ActionZone.js +0 -254
  214. package/vendor/symbiote-node/layout/ActionZone/ActionZone.tpl.js +0 -11
  215. package/vendor/symbiote-node/layout/Layout/Layout.css.js +0 -88
  216. package/vendor/symbiote-node/layout/Layout/Layout.js +0 -622
  217. package/vendor/symbiote-node/layout/Layout/Layout.tpl.js +0 -25
  218. package/vendor/symbiote-node/layout/LayoutNode/LayoutNode.css.js +0 -293
  219. package/vendor/symbiote-node/layout/LayoutNode/LayoutNode.js +0 -467
  220. package/vendor/symbiote-node/layout/LayoutNode/LayoutNode.tpl.js +0 -33
  221. package/vendor/symbiote-node/layout/LayoutPreview/LayoutPreview.css.js +0 -46
  222. package/vendor/symbiote-node/layout/LayoutPreview/LayoutPreview.js +0 -102
  223. package/vendor/symbiote-node/layout/LayoutPreview/LayoutPreview.tpl.js +0 -6
  224. package/vendor/symbiote-node/layout/LayoutRouter/LayoutRouter.js +0 -156
  225. package/vendor/symbiote-node/layout/LayoutRouter/routerSync.js +0 -250
  226. package/vendor/symbiote-node/layout/LayoutSidebar/LayoutSidebar.css.js +0 -379
  227. package/vendor/symbiote-node/layout/LayoutSidebar/LayoutSidebar.js +0 -263
  228. package/vendor/symbiote-node/layout/LayoutSidebar/LayoutSidebar.tpl.js +0 -20
  229. package/vendor/symbiote-node/layout/LayoutSidebar/SidebarSection.js +0 -183
  230. package/vendor/symbiote-node/layout/LayoutTree.js +0 -246
  231. package/vendor/symbiote-node/layout/PanelMenu/PanelMenu.css.js +0 -43
  232. package/vendor/symbiote-node/layout/PanelMenu/PanelMenu.js +0 -89
  233. package/vendor/symbiote-node/layout/PanelMenu/PanelMenu.tpl.js +0 -14
  234. package/vendor/symbiote-node/layout/index.js +0 -16
  235. package/vendor/symbiote-node/menu/ContextMenu/ContextMenu.css.js +0 -61
  236. package/vendor/symbiote-node/menu/ContextMenu/ContextMenu.js +0 -79
  237. package/vendor/symbiote-node/menu/ContextMenu/ContextMenu.tpl.js +0 -19
  238. package/vendor/symbiote-node/node/CtrlItem/CtrlItem.css.js +0 -41
  239. package/vendor/symbiote-node/node/CtrlItem/CtrlItem.js +0 -24
  240. package/vendor/symbiote-node/node/CtrlItem/CtrlItem.tpl.js +0 -16
  241. package/vendor/symbiote-node/node/GraphFrame/GraphFrame.css.js +0 -65
  242. package/vendor/symbiote-node/node/GraphFrame/GraphFrame.js +0 -29
  243. package/vendor/symbiote-node/node/GraphFrame/GraphFrame.tpl.js +0 -13
  244. package/vendor/symbiote-node/node/GraphNode/GraphNode.css.js +0 -683
  245. package/vendor/symbiote-node/node/GraphNode/GraphNode.js +0 -92
  246. package/vendor/symbiote-node/node/GraphNode/GraphNode.tpl.js +0 -17
  247. package/vendor/symbiote-node/node/NodeSocket/NodeSocket.js +0 -25
  248. package/vendor/symbiote-node/node/NodeSocket/NodeSocket.tpl.js +0 -7
  249. package/vendor/symbiote-node/node/PortItem/PortItem.css.js +0 -90
  250. package/vendor/symbiote-node/node/PortItem/PortItem.js +0 -87
  251. package/vendor/symbiote-node/node/PortItem/PortItem.tpl.js +0 -10
  252. package/vendor/symbiote-node/package.json +0 -59
  253. package/vendor/symbiote-node/palette/PaletteBrowser/PaletteBrowser.css.js +0 -143
  254. package/vendor/symbiote-node/palette/PaletteBrowser/PaletteBrowser.js +0 -131
  255. package/vendor/symbiote-node/palette/PaletteBrowser/PaletteBrowser.tpl.js +0 -16
  256. package/vendor/symbiote-node/plugins/History.js +0 -384
  257. package/vendor/symbiote-node/plugins/Readonly.js +0 -59
  258. package/vendor/symbiote-node/shapes/CircleShape.js +0 -80
  259. package/vendor/symbiote-node/shapes/CommentShape.js +0 -35
  260. package/vendor/symbiote-node/shapes/DiamondShape.js +0 -115
  261. package/vendor/symbiote-node/shapes/NodeShape.js +0 -80
  262. package/vendor/symbiote-node/shapes/PillShape.js +0 -91
  263. package/vendor/symbiote-node/shapes/RectShape.js +0 -72
  264. package/vendor/symbiote-node/shapes/SVGShape.js +0 -494
  265. package/vendor/symbiote-node/shapes/index.js +0 -53
  266. package/vendor/symbiote-node/themes/Palette.js +0 -32
  267. package/vendor/symbiote-node/themes/Skin.js +0 -113
  268. package/vendor/symbiote-node/themes/Theme.js +0 -84
  269. package/vendor/symbiote-node/themes/carbon.js +0 -137
  270. package/vendor/symbiote-node/themes/dark.js +0 -137
  271. package/vendor/symbiote-node/themes/ebook.js +0 -138
  272. package/vendor/symbiote-node/themes/grey.js +0 -137
  273. package/vendor/symbiote-node/themes/light.js +0 -137
  274. package/vendor/symbiote-node/themes/neon.js +0 -138
  275. package/vendor/symbiote-node/themes/pcb.js +0 -273
  276. package/vendor/symbiote-node/themes/synthwave.js +0 -137
  277. package/vendor/symbiote-node/toolbar/QuickToolbar/QuickToolbar.css.js +0 -86
  278. package/vendor/symbiote-node/toolbar/QuickToolbar/QuickToolbar.js +0 -128
  279. package/vendor/symbiote-node/toolbar/QuickToolbar/QuickToolbar.tpl.js +0 -29
@@ -1,52 +0,0 @@
1
- /**
2
- * debug/inject — Manual data injection node.
3
- *
4
- * Provides a textarea for arbitrary JSON data and a Fire button
5
- * to push data downstream. Use for testing any part of a workflow
6
- * by connecting to the target node's input.
7
- *
8
- * @module symbiote-node/packs/debug/inject
9
- */
10
-
11
- export default {
12
- type: 'debug/inject',
13
- category: 'debug',
14
- icon: 'play_circle',
15
-
16
- driver: {
17
- description: 'Inject test data — connect to any node input for manual testing',
18
- capabilities: ['debug', 'trigger'],
19
- inputs: [],
20
- outputs: [
21
- { name: 'data', type: 'exec' },
22
- ],
23
- params: {
24
- label: { type: 'string', default: 'Test Data', description: 'Display label' },
25
- data: { type: 'textarea', default: '{\n "status": "created",\n "region": "RU",\n "smsCount": 100,\n "clientName": "Test Client"\n}', description: 'JSON payload to inject' },
26
- },
27
- /** Mark as fireable — UI shows ▶ Fire button */
28
- fireable: true,
29
- },
30
-
31
- lifecycle: {
32
- validate: (inputs, params) => {
33
- try {
34
- JSON.parse(params.data || '{}');
35
- return true;
36
- } catch {
37
- return false;
38
- }
39
- },
40
-
41
- async execute(inputs, params) {
42
- let payload;
43
- try {
44
- payload = JSON.parse(params.data || '{}');
45
- } catch {
46
- return { data: { error: 'Invalid JSON in inject data' } };
47
- }
48
-
49
- return { data: payload };
50
- },
51
- },
52
- };
@@ -1,73 +0,0 @@
1
- /**
2
- * flow/agent — AI Agent trigger node
3
- *
4
- * Pauses graph execution and invokes an AI agent with prompt + context.
5
- * The agent bridge is injected via params.agentBridge or a global registry.
6
- * Without a bridge, returns a placeholder indicating agent invocation is needed.
7
- *
8
- * @module symbiote-node/packs/flow/agent */
9
-
10
- export default {
11
- type: 'flow/agent',
12
- category: 'flow',
13
- icon: 'smart_toy',
14
-
15
- driver: {
16
- description: 'AI Agent trigger — invoke agent in pipeline',
17
- inputs: [
18
- { name: 'prompt', type: 'string' },
19
- { name: 'context', type: 'any' },
20
- ],
21
- outputs: [
22
- { name: 'result', type: 'any' },
23
- { name: 'error', type: 'string' },
24
- ],
25
- params: {
26
- timeout: { type: 'int', default: 30000, description: 'Agent timeout (ms)' },
27
- allowedTools: { type: 'array', default: [], description: 'Tools the agent can use' },
28
- model: { type: 'string', default: '', description: 'AI model override' },
29
- },
30
- },
31
-
32
- lifecycle: {
33
- validate: (inputs) => {
34
- if (!inputs.prompt) return false;
35
- return true;
36
- },
37
-
38
- cacheKey: (inputs) => `agent:${inputs.prompt}:${JSON.stringify(inputs.context)}`,
39
-
40
- execute: async (inputs, params) => {
41
- const { prompt, context } = inputs;
42
- const { timeout, allowedTools, model } = params;
43
-
44
- // Check if agentBridge is available (injected via params or global)
45
- const bridge = params._agentBridge || globalThis.__symbioteNodeAgentBridge;
46
- if (!bridge) {
47
- // No bridge available — return pending marker
48
- return {
49
- result: {
50
- _agentPending: true,
51
- prompt,
52
- context,
53
- message: 'Agent bridge not connected. Connect via WebSocket (P23) to enable.',
54
- },
55
- error: null,
56
- };
57
- }
58
-
59
- try {
60
- const response = await Promise.race([
61
- bridge.run({ prompt, context, tools: allowedTools, model }),
62
- new Promise((_, reject) =>
63
- setTimeout(() => reject(new Error('Agent timeout')), timeout)
64
- ),
65
- ]);
66
-
67
- return { result: response.data, error: null };
68
- } catch (err) {
69
- return { result: null, error: err.message };
70
- }
71
- },
72
- },
73
- };
@@ -1,107 +0,0 @@
1
- /**
2
- * flow/if — Conditional branching node
3
- *
4
- * Routes data to 'true' or 'false' output based on condition.
5
- * Condition can be a boolean input or a simple expression string.
6
- *
7
- * @module agi-graph/packs/flow/if
8
- */
9
-
10
- /**
11
- * Evaluate a simple condition expression
12
- * Supports: ==, !=, >, <, >=, <=, ===, !==
13
- * @param {*} value - Value to test
14
- * @param {string} expression - Expression string
15
- * @returns {boolean}
16
- */
17
- function evaluateCondition(value, expression) {
18
- if (typeof expression === 'boolean') return expression;
19
- if (typeof expression === 'string') {
20
- const trimmed = expression.trim();
21
-
22
- // Direct boolean strings
23
- if (trimmed === 'true') return true;
24
- if (trimmed === 'false') return false;
25
-
26
- // Null checks
27
- if (trimmed === 'data != null' || trimmed === 'data !== null') return value != null;
28
- if (trimmed === 'data == null' || trimmed === 'data === null') return value == null;
29
-
30
- // Comparison operators
31
- const match = trimmed.match(/^(.+?)\s*(===|!==|==|!=|>=|<=|>|<)\s*(.+)$/);
32
- if (match) {
33
- let [, left, op, right] = match;
34
- left = left.trim();
35
- right = right.trim();
36
-
37
- // Resolve left side
38
- const leftVal = left === 'data' || left === 'value' ? value : parseValueLiteral(left);
39
- const rightVal = parseValueLiteral(right);
40
-
41
- switch (op) {
42
- case '===': return leftVal === rightVal;
43
- case '!==': return leftVal !== rightVal;
44
- case '==': return leftVal == rightVal;
45
- case '!=': return leftVal != rightVal;
46
- case '>': return leftVal > rightVal;
47
- case '<': return leftVal < rightVal;
48
- case '>=': return leftVal >= rightVal;
49
- case '<=': return leftVal <= rightVal;
50
- }
51
- }
52
- }
53
-
54
- // Fallback: truthy check
55
- return !!value;
56
- }
57
-
58
- /**
59
- * Parse a literal value from condition string
60
- * @param {string} str
61
- * @returns {*}
62
- */
63
- function parseValueLiteral(str) {
64
- if (str === 'null') return null;
65
- if (str === 'undefined') return undefined;
66
- if (str === 'true') return true;
67
- if (str === 'false') return false;
68
- if (str.startsWith("'") && str.endsWith("'")) return str.slice(1, -1);
69
- if (str.startsWith('"') && str.endsWith('"')) return str.slice(1, -1);
70
- const num = Number(str);
71
- if (!isNaN(num)) return num;
72
- return str;
73
- }
74
-
75
- export default {
76
- type: 'flow/if',
77
- category: 'flow',
78
- icon: 'call_split',
79
-
80
- driver: {
81
- description: 'Conditional branch — routes data by condition',
82
- inputs: [
83
- { name: 'condition', type: 'any' },
84
- { name: 'data', type: 'any' },
85
- ],
86
- outputs: [
87
- { name: 'true', type: 'any' },
88
- { name: 'false', type: 'any' },
89
- ],
90
- params: {
91
- expression: { type: 'string', default: '', description: 'Condition expression (optional, overrides condition input)' },
92
- },
93
- },
94
-
95
- lifecycle: {
96
- validate: (inputs) => inputs.data !== undefined,
97
- execute: (inputs, params) => {
98
- const condValue = params.expression
99
- ? evaluateCondition(inputs.data, params.expression)
100
- : !!inputs.condition;
101
-
102
- return condValue
103
- ? { true: inputs.data, false: null }
104
- : { true: null, false: inputs.data };
105
- },
106
- },
107
- };
@@ -1,58 +0,0 @@
1
- /**
2
- * flow/loop — Iteration node
3
- *
4
- * Iterates over an array, executing a body function for each item.
5
- * The bodyType param specifies which registered node type to execute per item.
6
- *
7
- * @module agi-graph/packs/flow/loop
8
- */
9
-
10
- import { getNodeType } from '../../Registry.js';
11
-
12
- export default {
13
- type: 'flow/loop',
14
- category: 'flow',
15
- icon: 'loop',
16
-
17
- driver: {
18
- description: 'Iterate over array — execute body per item',
19
- inputs: [
20
- { name: 'items', type: 'array' },
21
- ],
22
- outputs: [
23
- { name: 'results', type: 'array' },
24
- ],
25
- params: {
26
- bodyType: { type: 'string', default: '', description: 'Node type to execute per item' },
27
- },
28
- },
29
-
30
- lifecycle: {
31
- validate: (inputs) => Array.isArray(inputs.items),
32
- execute: async (inputs, params) => {
33
- const { items } = inputs;
34
- const { bodyType } = params;
35
- const results = [];
36
-
37
- if (!bodyType) {
38
- // No body type: return items as-is
39
- return { results: items };
40
- }
41
-
42
- const typeDef = getNodeType(bodyType);
43
- const executeFn = typeDef?.lifecycle?.execute || typeDef?.process;
44
-
45
- if (!executeFn) {
46
- return { results: items };
47
- }
48
-
49
- for (let i = 0; i < items.length; i++) {
50
- const itemInput = { value: items[i], index: i, total: items.length };
51
- const itemResult = await executeFn(itemInput, params);
52
- results.push(itemResult);
53
- }
54
-
55
- return { results };
56
- },
57
- },
58
- };
@@ -1,60 +0,0 @@
1
- /**
2
- * flow/merge — Multi-input data merge node
3
- *
4
- * Combines data from multiple inputs (a, b) into a single output.
5
- * Supports three modes:
6
- * - 'first' (default): returns first non-null input (branch merge after IF)
7
- * - 'combine': Object.assign all non-null inputs (deep merge)
8
- * - 'append': collect all non-null inputs into an array
9
- *
10
- * @module symbiote-node/packs/flow/merge
11
- */
12
-
13
- export default {
14
- type: 'flow/merge',
15
- category: 'flow',
16
- icon: 'merge',
17
-
18
- driver: {
19
- description: 'Merge branches — combine data from multiple inputs',
20
- inputs: [
21
- { name: 'a', type: 'any' },
22
- { name: 'b', type: 'any' },
23
- ],
24
- outputs: [
25
- { name: 'data', type: 'any' },
26
- ],
27
- params: {
28
- mode: {
29
- type: 'string',
30
- default: 'first',
31
- description: 'first = first non-null, combine = Object.assign, append = array',
32
- },
33
- },
34
- },
35
-
36
- lifecycle: {
37
- execute: (inputs, params) => {
38
- const mode = params?.mode || 'first';
39
-
40
- if (mode === 'combine') {
41
- const merged = {};
42
- for (const value of Object.values(inputs)) {
43
- if (value != null && typeof value === 'object') {
44
- Object.assign(merged, value);
45
- }
46
- }
47
- return { data: merged };
48
- }
49
-
50
- if (mode === 'append') {
51
- const items = Object.values(inputs).filter(v => v != null);
52
- return { data: items };
53
- }
54
-
55
- // Default: 'first' — first non-null input
56
- const data = inputs.a != null ? inputs.a : inputs.b;
57
- return { data };
58
- },
59
- },
60
- };
@@ -1,65 +0,0 @@
1
- /**
2
- * flow/retry — Retry on error node
3
- *
4
- * If input has an error, re-invokes the action up to maxRetries times.
5
- * Passes through successful results immediately.
6
- *
7
- * @module agi-graph/packs/flow/retry
8
- */
9
-
10
- export default {
11
- type: 'flow/retry',
12
- category: 'flow',
13
- icon: 'refresh',
14
-
15
- driver: {
16
- description: 'Retry action on error — up to N attempts',
17
- inputs: [
18
- { name: 'action', type: 'any' },
19
- { name: 'error', type: 'any' },
20
- ],
21
- outputs: [
22
- { name: 'result', type: 'any' },
23
- { name: 'error', type: 'string' },
24
- ],
25
- params: {
26
- maxRetries: { type: 'int', default: 3, description: 'Maximum retry attempts' },
27
- delay: { type: 'int', default: 1000, description: 'Delay between retries (ms)' },
28
- },
29
- },
30
-
31
- lifecycle: {
32
- execute: async (inputs, params) => {
33
- // If no error, pass through the action result
34
- if (inputs.error == null && inputs.action != null) {
35
- return { result: inputs.action, error: null };
36
- }
37
-
38
- // If error but no actionFn to retry, propagate error
39
- if (inputs.action?._retryFn) {
40
- const { maxRetries, delay } = params;
41
- let lastError = inputs.error;
42
-
43
- for (let attempt = 1; attempt <= maxRetries; attempt++) {
44
- if (delay > 0 && attempt > 1) {
45
- await new Promise(r => setTimeout(r, delay));
46
- }
47
- try {
48
- const result = await inputs.action._retryFn();
49
- return { result, error: null };
50
- } catch (err) {
51
- lastError = err.message;
52
- }
53
- }
54
-
55
- return { result: null, error: `Failed after ${maxRetries} retries: ${lastError}` };
56
- }
57
-
58
- // No retry function available, pass through with error
59
- return {
60
- result: inputs.action,
61
- error: inputs.error ? String(inputs.error) : null,
62
- };
63
- },
64
- },
65
- };
@@ -1,64 +0,0 @@
1
- /**
2
- * flow/switch — Multi-branch routing node
3
- *
4
- * Routes data to one of N case outputs based on value match.
5
- * Falls back to 'default' output if no case matches.
6
- *
7
- * @module agi-graph/packs/flow/switch
8
- */
9
-
10
- export default {
11
- type: 'flow/switch',
12
- category: 'flow',
13
- icon: 'alt_route',
14
-
15
- driver: {
16
- description: 'Multi-branch routing by value match',
17
- inputs: [
18
- { name: 'value', type: 'any' },
19
- { name: 'data', type: 'any' },
20
- ],
21
- outputs: [
22
- { name: 'default', type: 'any' },
23
- ],
24
- params: {
25
- cases: { type: 'object', default: {}, description: 'Map of value → output name' },
26
- },
27
- },
28
-
29
- lifecycle: {
30
- validate: (inputs) => inputs.data !== undefined,
31
- execute: (inputs, params) => {
32
- const { data } = inputs;
33
- // Auto-extract value from data[field] when no explicit value input
34
- const value = inputs.value !== undefined
35
- ? inputs.value
36
- : (params.field && data ? data[params.field] : undefined);
37
- const cases = params.cases;
38
- const hasCases = cases && Object.keys(cases).length > 0;
39
- const result = { default: null };
40
-
41
- if (hasCases) {
42
- // Explicit cases mode: value → mapped output name
43
- for (const outputName of Object.values(cases)) {
44
- result[outputName] = null;
45
- }
46
- const stringValue = String(value);
47
- const matchedOutput = cases[stringValue];
48
- if (matchedOutput) {
49
- result[matchedOutput] = data;
50
- result.dynamicOutputs = Object.values(cases);
51
- } else {
52
- result.default = data;
53
- }
54
- } else {
55
- // Direct routing: value IS the output name (e.g. 'created' → output 'created')
56
- const outputName = String(value);
57
- result[outputName] = data;
58
- result.dynamicOutputs = [outputName];
59
- }
60
-
61
- return result;
62
- },
63
- },
64
- };
@@ -1,39 +0,0 @@
1
- /**
2
- * flow/wait-all — Barrier node
3
- *
4
- * Waits for all non-null inputs and merges them into a single object.
5
- * Acts as a synchronization point for parallel branches.
6
- *
7
- * @module agi-graph/packs/flow/wait-all
8
- */
9
-
10
- export default {
11
- type: 'flow/wait-all',
12
- category: 'flow',
13
- icon: 'join',
14
-
15
- driver: {
16
- description: 'Barrier — merge all inputs into one object',
17
- inputs: [
18
- { name: 'a', type: 'any' },
19
- { name: 'b', type: 'any' },
20
- { name: 'c', type: 'any' },
21
- ],
22
- outputs: [
23
- { name: 'output', type: 'object' },
24
- ],
25
- params: {},
26
- },
27
-
28
- lifecycle: {
29
- execute: (inputs) => {
30
- const output = {};
31
- for (const [key, val] of Object.entries(inputs)) {
32
- if (val != null) {
33
- output[key] = val;
34
- }
35
- }
36
- return { output };
37
- },
38
- },
39
- };
@@ -1,82 +0,0 @@
1
- /**
2
- * io/http-request — Universal HTTP client node
3
- *
4
- * Performs HTTP requests using native fetch API.
5
- * Supports GET, POST, PUT, DELETE with configurable headers and timeout.
6
- *
7
- * @module agi-graph/packs/io/http-request
8
- */
9
-
10
- export default {
11
- type: 'io/http-request',
12
- category: 'io',
13
- icon: 'http',
14
-
15
- driver: {
16
- description: 'HTTP request (fetch) — GET, POST, PUT, DELETE',
17
- inputs: [
18
- { name: 'url', type: 'string' },
19
- { name: 'body', type: 'any' },
20
- ],
21
- outputs: [
22
- { name: 'response', type: 'any' },
23
- { name: 'status', type: 'number' },
24
- { name: 'error', type: 'string' },
25
- ],
26
- params: {
27
- method: { type: 'string', default: 'GET', description: 'HTTP method' },
28
- headers: { type: 'object', default: {}, description: 'Request headers' },
29
- timeout: { type: 'int', default: 30000, description: 'Timeout (ms)' },
30
- responseType: { type: 'string', default: 'auto', description: 'json | text | auto' },
31
- },
32
- },
33
-
34
- lifecycle: {
35
- validate: (inputs) => {
36
- if (!inputs.url) return false;
37
- return true;
38
- },
39
-
40
- cacheKey: (inputs, params) =>
41
- `http:${params.method}:${inputs.url}:${JSON.stringify(inputs.body)}`,
42
-
43
- execute: async (inputs, params) => {
44
- const { url, body } = inputs;
45
- const { method, headers, timeout, responseType } = params;
46
-
47
- try {
48
- const fetchOptions = {
49
- method: method || 'GET',
50
- headers: { ...headers },
51
- signal: AbortSignal.timeout(timeout),
52
- };
53
-
54
- if (body && method !== 'GET' && method !== 'HEAD') {
55
- if (typeof body === 'object') {
56
- fetchOptions.body = JSON.stringify(body);
57
- fetchOptions.headers['Content-Type'] =
58
- fetchOptions.headers['Content-Type'] || 'application/json';
59
- } else {
60
- fetchOptions.body = String(body);
61
- }
62
- }
63
-
64
- const res = await fetch(url, fetchOptions);
65
-
66
- let response;
67
- const contentType = res.headers.get('content-type') || '';
68
-
69
- if (responseType === 'json' || (responseType === 'auto' && contentType.includes('json'))) {
70
- response = await res.json();
71
- } else {
72
- response = await res.text();
73
- }
74
-
75
- return { response, status: res.status, error: null };
76
-
77
- } catch (err) {
78
- return { response: null, status: 0, error: err.message };
79
- }
80
- },
81
- },
82
- };
@@ -1,60 +0,0 @@
1
- /**
2
- * io/read-file — Read file contents
3
- *
4
- * Reads a file from disk. Auto-parses JSON files.
5
- *
6
- * @module agi-graph/packs/io/read-file
7
- */
8
-
9
- import { promises as fs } from 'fs';
10
-
11
- export default {
12
- type: 'io/read-file',
13
- category: 'io',
14
- icon: 'file_open',
15
-
16
- driver: {
17
- description: 'Read file from disk (auto-parses JSON)',
18
- inputs: [
19
- { name: 'path', type: 'string' },
20
- ],
21
- outputs: [
22
- { name: 'content', type: 'string' },
23
- { name: 'parsed', type: 'any' },
24
- { name: 'error', type: 'string' },
25
- ],
26
- params: {
27
- encoding: { type: 'string', default: 'utf8', description: 'File encoding' },
28
- },
29
- },
30
-
31
- lifecycle: {
32
- validate: (inputs) => {
33
- if (!inputs.path) return false;
34
- return true;
35
- },
36
-
37
- // No caching — file content may change
38
- cacheKey: null,
39
-
40
- execute: async (inputs, params) => {
41
- try {
42
- const content = await fs.readFile(inputs.path, params.encoding || 'utf8');
43
-
44
- let parsed = null;
45
- if (inputs.path.endsWith('.json')) {
46
- try {
47
- parsed = JSON.parse(content);
48
- } catch {
49
- // Not valid JSON
50
- }
51
- }
52
-
53
- return { content, parsed, error: null };
54
-
55
- } catch (err) {
56
- return { content: null, parsed: null, error: err.message };
57
- }
58
- },
59
- },
60
- };