graphon 0.1.0__tar.gz

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 (250) hide show
  1. graphon-0.1.0/LICENSE +201 -0
  2. graphon-0.1.0/PKG-INFO +270 -0
  3. graphon-0.1.0/README.md +241 -0
  4. graphon-0.1.0/pyproject.toml +160 -0
  5. graphon-0.1.0/src/graphon/__init__.py +0 -0
  6. graphon-0.1.0/src/graphon/entities/__init__.py +11 -0
  7. graphon-0.1.0/src/graphon/entities/base_node_data.py +187 -0
  8. graphon-0.1.0/src/graphon/entities/exc.py +6 -0
  9. graphon-0.1.0/src/graphon/entities/graph_config.py +23 -0
  10. graphon-0.1.0/src/graphon/entities/graph_init_params.py +25 -0
  11. graphon-0.1.0/src/graphon/entities/pause_reason.py +50 -0
  12. graphon-0.1.0/src/graphon/entities/workflow_execution.py +71 -0
  13. graphon-0.1.0/src/graphon/entities/workflow_node_execution.py +156 -0
  14. graphon-0.1.0/src/graphon/entities/workflow_start_reason.py +8 -0
  15. graphon-0.1.0/src/graphon/enums.py +242 -0
  16. graphon-0.1.0/src/graphon/errors.py +16 -0
  17. graphon-0.1.0/src/graphon/file/__init__.py +28 -0
  18. graphon-0.1.0/src/graphon/file/constants.py +46 -0
  19. graphon-0.1.0/src/graphon/file/enums.py +57 -0
  20. graphon-0.1.0/src/graphon/file/file_factory.py +44 -0
  21. graphon-0.1.0/src/graphon/file/file_manager.py +137 -0
  22. graphon-0.1.0/src/graphon/file/helpers.py +58 -0
  23. graphon-0.1.0/src/graphon/file/models.py +228 -0
  24. graphon-0.1.0/src/graphon/file/protocols.py +62 -0
  25. graphon-0.1.0/src/graphon/file/runtime.py +76 -0
  26. graphon-0.1.0/src/graphon/file/tool_file_parser.py +9 -0
  27. graphon-0.1.0/src/graphon/graph/__init__.py +11 -0
  28. graphon-0.1.0/src/graphon/graph/edge.py +15 -0
  29. graphon-0.1.0/src/graphon/graph/graph.py +459 -0
  30. graphon-0.1.0/src/graphon/graph/graph_template.py +26 -0
  31. graphon-0.1.0/src/graphon/graph/validation.py +142 -0
  32. graphon-0.1.0/src/graphon/graph_engine/__init__.py +4 -0
  33. graphon-0.1.0/src/graphon/graph_engine/_engine_utils.py +16 -0
  34. graphon-0.1.0/src/graphon/graph_engine/command_channels/README.md +32 -0
  35. graphon-0.1.0/src/graphon/graph_engine/command_channels/__init__.py +6 -0
  36. graphon-0.1.0/src/graphon/graph_engine/command_channels/in_memory_channel.py +53 -0
  37. graphon-0.1.0/src/graphon/graph_engine/command_channels/redis_channel.py +159 -0
  38. graphon-0.1.0/src/graphon/graph_engine/command_processing/__init__.py +20 -0
  39. graphon-0.1.0/src/graphon/graph_engine/command_processing/command_handlers.py +65 -0
  40. graphon-0.1.0/src/graphon/graph_engine/command_processing/command_processor.py +87 -0
  41. graphon-0.1.0/src/graphon/graph_engine/config.py +16 -0
  42. graphon-0.1.0/src/graphon/graph_engine/domain/__init__.py +14 -0
  43. graphon-0.1.0/src/graphon/graph_engine/domain/graph_execution.py +248 -0
  44. graphon-0.1.0/src/graphon/graph_engine/domain/node_execution.py +45 -0
  45. graphon-0.1.0/src/graphon/graph_engine/entities/__init__.py +0 -0
  46. graphon-0.1.0/src/graphon/graph_engine/entities/commands.py +66 -0
  47. graphon-0.1.0/src/graphon/graph_engine/error_handler.py +223 -0
  48. graphon-0.1.0/src/graphon/graph_engine/event_management/__init__.py +14 -0
  49. graphon-0.1.0/src/graphon/graph_engine/event_management/event_handlers.py +392 -0
  50. graphon-0.1.0/src/graphon/graph_engine/event_management/event_manager.py +188 -0
  51. graphon-0.1.0/src/graphon/graph_engine/graph_engine.py +405 -0
  52. graphon-0.1.0/src/graphon/graph_engine/graph_state_manager.py +304 -0
  53. graphon-0.1.0/src/graphon/graph_engine/graph_traversal/__init__.py +14 -0
  54. graphon-0.1.0/src/graphon/graph_engine/graph_traversal/edge_processor.py +217 -0
  55. graphon-0.1.0/src/graphon/graph_engine/graph_traversal/skip_propagator.py +96 -0
  56. graphon-0.1.0/src/graphon/graph_engine/layers/README.md +52 -0
  57. graphon-0.1.0/src/graphon/graph_engine/layers/__init__.py +16 -0
  58. graphon-0.1.0/src/graphon/graph_engine/layers/base.py +137 -0
  59. graphon-0.1.0/src/graphon/graph_engine/layers/debug_logging.py +276 -0
  60. graphon-0.1.0/src/graphon/graph_engine/layers/execution_limits.py +168 -0
  61. graphon-0.1.0/src/graphon/graph_engine/manager.py +88 -0
  62. graphon-0.1.0/src/graphon/graph_engine/orchestration/__init__.py +14 -0
  63. graphon-0.1.0/src/graphon/graph_engine/orchestration/dispatcher.py +148 -0
  64. graphon-0.1.0/src/graphon/graph_engine/orchestration/execution_coordinator.py +107 -0
  65. graphon-0.1.0/src/graphon/graph_engine/protocols/command_channel.py +41 -0
  66. graphon-0.1.0/src/graphon/graph_engine/ready_queue/__init__.py +17 -0
  67. graphon-0.1.0/src/graphon/graph_engine/ready_queue/factory.py +37 -0
  68. graphon-0.1.0/src/graphon/graph_engine/ready_queue/in_memory.py +140 -0
  69. graphon-0.1.0/src/graphon/graph_engine/ready_queue/protocol.py +108 -0
  70. graphon-0.1.0/src/graphon/graph_engine/response_coordinator/__init__.py +10 -0
  71. graphon-0.1.0/src/graphon/graph_engine/response_coordinator/coordinator.py +746 -0
  72. graphon-0.1.0/src/graphon/graph_engine/response_coordinator/path.py +35 -0
  73. graphon-0.1.0/src/graphon/graph_engine/response_coordinator/session.py +72 -0
  74. graphon-0.1.0/src/graphon/graph_engine/worker.py +218 -0
  75. graphon-0.1.0/src/graphon/graph_engine/worker_management/__init__.py +12 -0
  76. graphon-0.1.0/src/graphon/graph_engine/worker_management/worker_pool.py +292 -0
  77. graphon-0.1.0/src/graphon/graph_events/__init__.py +84 -0
  78. graphon-0.1.0/src/graphon/graph_events/agent.py +17 -0
  79. graphon-0.1.0/src/graphon/graph_events/base.py +31 -0
  80. graphon-0.1.0/src/graphon/graph_events/graph.py +59 -0
  81. graphon-0.1.0/src/graphon/graph_events/human_input.py +0 -0
  82. graphon-0.1.0/src/graphon/graph_events/iteration.py +40 -0
  83. graphon-0.1.0/src/graphon/graph_events/loop.py +40 -0
  84. graphon-0.1.0/src/graphon/graph_events/node.py +123 -0
  85. graphon-0.1.0/src/graphon/model_runtime/README.md +51 -0
  86. graphon-0.1.0/src/graphon/model_runtime/README_CN.md +64 -0
  87. graphon-0.1.0/src/graphon/model_runtime/__init__.py +0 -0
  88. graphon-0.1.0/src/graphon/model_runtime/callbacks/__init__.py +0 -0
  89. graphon-0.1.0/src/graphon/model_runtime/callbacks/base_callback.py +162 -0
  90. graphon-0.1.0/src/graphon/model_runtime/callbacks/logging_callback.py +189 -0
  91. graphon-0.1.0/src/graphon/model_runtime/entities/__init__.py +49 -0
  92. graphon-0.1.0/src/graphon/model_runtime/entities/common_entities.py +16 -0
  93. graphon-0.1.0/src/graphon/model_runtime/entities/defaults.py +157 -0
  94. graphon-0.1.0/src/graphon/model_runtime/entities/llm_entities.py +225 -0
  95. graphon-0.1.0/src/graphon/model_runtime/entities/message_entities.py +290 -0
  96. graphon-0.1.0/src/graphon/model_runtime/entities/model_entities.py +249 -0
  97. graphon-0.1.0/src/graphon/model_runtime/entities/provider_entities.py +179 -0
  98. graphon-0.1.0/src/graphon/model_runtime/entities/rerank_entities.py +27 -0
  99. graphon-0.1.0/src/graphon/model_runtime/entities/text_embedding_entities.py +47 -0
  100. graphon-0.1.0/src/graphon/model_runtime/errors/__init__.py +0 -0
  101. graphon-0.1.0/src/graphon/model_runtime/errors/invoke.py +41 -0
  102. graphon-0.1.0/src/graphon/model_runtime/errors/validate.py +4 -0
  103. graphon-0.1.0/src/graphon/model_runtime/memory/__init__.py +3 -0
  104. graphon-0.1.0/src/graphon/model_runtime/memory/prompt_message_memory.py +20 -0
  105. graphon-0.1.0/src/graphon/model_runtime/model_providers/__base/__init__.py +0 -0
  106. graphon-0.1.0/src/graphon/model_runtime/model_providers/__base/ai_model.py +287 -0
  107. graphon-0.1.0/src/graphon/model_runtime/model_providers/__base/large_language_model.py +674 -0
  108. graphon-0.1.0/src/graphon/model_runtime/model_providers/__base/moderation_model.py +33 -0
  109. graphon-0.1.0/src/graphon/model_runtime/model_providers/__base/rerank_model.py +79 -0
  110. graphon-0.1.0/src/graphon/model_runtime/model_providers/__base/speech2text_model.py +31 -0
  111. graphon-0.1.0/src/graphon/model_runtime/model_providers/__base/text_embedding_model.py +111 -0
  112. graphon-0.1.0/src/graphon/model_runtime/model_providers/__base/tokenizers/gpt2_tokenizer.py +60 -0
  113. graphon-0.1.0/src/graphon/model_runtime/model_providers/__base/tts_model.py +60 -0
  114. graphon-0.1.0/src/graphon/model_runtime/model_providers/__init__.py +0 -0
  115. graphon-0.1.0/src/graphon/model_runtime/model_providers/_position.yaml +43 -0
  116. graphon-0.1.0/src/graphon/model_runtime/model_providers/model_provider_factory.py +225 -0
  117. graphon-0.1.0/src/graphon/model_runtime/runtime.py +172 -0
  118. graphon-0.1.0/src/graphon/model_runtime/schema_validators/__init__.py +0 -0
  119. graphon-0.1.0/src/graphon/model_runtime/schema_validators/common_validator.py +116 -0
  120. graphon-0.1.0/src/graphon/model_runtime/schema_validators/model_credential_schema_validator.py +31 -0
  121. graphon-0.1.0/src/graphon/model_runtime/schema_validators/provider_credential_schema_validator.py +23 -0
  122. graphon-0.1.0/src/graphon/model_runtime/utils/__init__.py +0 -0
  123. graphon-0.1.0/src/graphon/model_runtime/utils/encoders.py +226 -0
  124. graphon-0.1.0/src/graphon/node_events/__init__.py +48 -0
  125. graphon-0.1.0/src/graphon/node_events/agent.py +18 -0
  126. graphon-0.1.0/src/graphon/node_events/base.py +42 -0
  127. graphon-0.1.0/src/graphon/node_events/iteration.py +36 -0
  128. graphon-0.1.0/src/graphon/node_events/loop.py +36 -0
  129. graphon-0.1.0/src/graphon/node_events/node.py +79 -0
  130. graphon-0.1.0/src/graphon/nodes/__init__.py +3 -0
  131. graphon-0.1.0/src/graphon/nodes/answer/__init__.py +0 -0
  132. graphon-0.1.0/src/graphon/nodes/answer/answer_node.py +82 -0
  133. graphon-0.1.0/src/graphon/nodes/answer/entities.py +69 -0
  134. graphon-0.1.0/src/graphon/nodes/base/__init__.py +15 -0
  135. graphon-0.1.0/src/graphon/nodes/base/entities.py +87 -0
  136. graphon-0.1.0/src/graphon/nodes/base/node.py +837 -0
  137. graphon-0.1.0/src/graphon/nodes/base/template.py +158 -0
  138. graphon-0.1.0/src/graphon/nodes/base/usage_tracking_mixin.py +29 -0
  139. graphon-0.1.0/src/graphon/nodes/base/variable_template_parser.py +143 -0
  140. graphon-0.1.0/src/graphon/nodes/code/__init__.py +3 -0
  141. graphon-0.1.0/src/graphon/nodes/code/code_node.py +570 -0
  142. graphon-0.1.0/src/graphon/nodes/code/entities.py +58 -0
  143. graphon-0.1.0/src/graphon/nodes/code/exc.py +10 -0
  144. graphon-0.1.0/src/graphon/nodes/code/limits.py +13 -0
  145. graphon-0.1.0/src/graphon/nodes/document_extractor/__init__.py +8 -0
  146. graphon-0.1.0/src/graphon/nodes/document_extractor/entities.py +16 -0
  147. graphon-0.1.0/src/graphon/nodes/document_extractor/exc.py +14 -0
  148. graphon-0.1.0/src/graphon/nodes/document_extractor/node.py +850 -0
  149. graphon-0.1.0/src/graphon/nodes/end/__init__.py +0 -0
  150. graphon-0.1.0/src/graphon/nodes/end/end_node.py +54 -0
  151. graphon-0.1.0/src/graphon/nodes/end/entities.py +31 -0
  152. graphon-0.1.0/src/graphon/nodes/http_request/__init__.py +22 -0
  153. graphon-0.1.0/src/graphon/nodes/http_request/config.py +39 -0
  154. graphon-0.1.0/src/graphon/nodes/http_request/entities.py +268 -0
  155. graphon-0.1.0/src/graphon/nodes/http_request/exc.py +26 -0
  156. graphon-0.1.0/src/graphon/nodes/http_request/executor.py +550 -0
  157. graphon-0.1.0/src/graphon/nodes/http_request/node.py +314 -0
  158. graphon-0.1.0/src/graphon/nodes/human_input/__init__.py +0 -0
  159. graphon-0.1.0/src/graphon/nodes/human_input/entities.py +224 -0
  160. graphon-0.1.0/src/graphon/nodes/human_input/enums.py +55 -0
  161. graphon-0.1.0/src/graphon/nodes/human_input/human_input_node.py +327 -0
  162. graphon-0.1.0/src/graphon/nodes/if_else/__init__.py +3 -0
  163. graphon-0.1.0/src/graphon/nodes/if_else/entities.py +29 -0
  164. graphon-0.1.0/src/graphon/nodes/if_else/if_else_node.py +138 -0
  165. graphon-0.1.0/src/graphon/nodes/iteration/__init__.py +5 -0
  166. graphon-0.1.0/src/graphon/nodes/iteration/entities.py +71 -0
  167. graphon-0.1.0/src/graphon/nodes/iteration/exc.py +26 -0
  168. graphon-0.1.0/src/graphon/nodes/iteration/iteration_node.py +755 -0
  169. graphon-0.1.0/src/graphon/nodes/iteration/iteration_start_node.py +22 -0
  170. graphon-0.1.0/src/graphon/nodes/list_operator/__init__.py +3 -0
  171. graphon-0.1.0/src/graphon/nodes/list_operator/entities.py +71 -0
  172. graphon-0.1.0/src/graphon/nodes/list_operator/exc.py +14 -0
  173. graphon-0.1.0/src/graphon/nodes/list_operator/node.py +425 -0
  174. graphon-0.1.0/src/graphon/nodes/llm/__init__.py +17 -0
  175. graphon-0.1.0/src/graphon/nodes/llm/entities.py +108 -0
  176. graphon-0.1.0/src/graphon/nodes/llm/exc.py +45 -0
  177. graphon-0.1.0/src/graphon/nodes/llm/file_saver.py +158 -0
  178. graphon-0.1.0/src/graphon/nodes/llm/llm_utils.py +605 -0
  179. graphon-0.1.0/src/graphon/nodes/llm/node.py +1527 -0
  180. graphon-0.1.0/src/graphon/nodes/llm/protocols.py +23 -0
  181. graphon-0.1.0/src/graphon/nodes/llm/runtime_protocols.py +80 -0
  182. graphon-0.1.0/src/graphon/nodes/loop/__init__.py +6 -0
  183. graphon-0.1.0/src/graphon/nodes/loop/entities.py +107 -0
  184. graphon-0.1.0/src/graphon/nodes/loop/loop_end_node.py +22 -0
  185. graphon-0.1.0/src/graphon/nodes/loop/loop_node.py +525 -0
  186. graphon-0.1.0/src/graphon/nodes/loop/loop_start_node.py +22 -0
  187. graphon-0.1.0/src/graphon/nodes/parameter_extractor/__init__.py +3 -0
  188. graphon-0.1.0/src/graphon/nodes/parameter_extractor/entities.py +139 -0
  189. graphon-0.1.0/src/graphon/nodes/parameter_extractor/exc.py +77 -0
  190. graphon-0.1.0/src/graphon/nodes/parameter_extractor/parameter_extractor_node.py +940 -0
  191. graphon-0.1.0/src/graphon/nodes/parameter_extractor/prompts.py +243 -0
  192. graphon-0.1.0/src/graphon/nodes/protocols.py +60 -0
  193. graphon-0.1.0/src/graphon/nodes/question_classifier/__init__.py +4 -0
  194. graphon-0.1.0/src/graphon/nodes/question_classifier/entities.py +30 -0
  195. graphon-0.1.0/src/graphon/nodes/question_classifier/exc.py +6 -0
  196. graphon-0.1.0/src/graphon/nodes/question_classifier/question_classifier_node.py +445 -0
  197. graphon-0.1.0/src/graphon/nodes/question_classifier/template_prompts.py +133 -0
  198. graphon-0.1.0/src/graphon/nodes/runtime.py +106 -0
  199. graphon-0.1.0/src/graphon/nodes/start/__init__.py +3 -0
  200. graphon-0.1.0/src/graphon/nodes/start/entities.py +16 -0
  201. graphon-0.1.0/src/graphon/nodes/start/start_node.py +73 -0
  202. graphon-0.1.0/src/graphon/nodes/template_transform/__init__.py +3 -0
  203. graphon-0.1.0/src/graphon/nodes/template_transform/entities.py +13 -0
  204. graphon-0.1.0/src/graphon/nodes/template_transform/template_transform_node.py +142 -0
  205. graphon-0.1.0/src/graphon/nodes/tool/__init__.py +3 -0
  206. graphon-0.1.0/src/graphon/nodes/tool/entities.py +106 -0
  207. graphon-0.1.0/src/graphon/nodes/tool/exc.py +18 -0
  208. graphon-0.1.0/src/graphon/nodes/tool/tool_node.py +477 -0
  209. graphon-0.1.0/src/graphon/nodes/tool_runtime_entities.py +105 -0
  210. graphon-0.1.0/src/graphon/nodes/variable_aggregator/__init__.py +3 -0
  211. graphon-0.1.0/src/graphon/nodes/variable_aggregator/entities.py +35 -0
  212. graphon-0.1.0/src/graphon/nodes/variable_aggregator/variable_aggregator_node.py +45 -0
  213. graphon-0.1.0/src/graphon/nodes/variable_assigner/__init__.py +0 -0
  214. graphon-0.1.0/src/graphon/nodes/variable_assigner/common/__init__.py +0 -0
  215. graphon-0.1.0/src/graphon/nodes/variable_assigner/common/exc.py +2 -0
  216. graphon-0.1.0/src/graphon/nodes/variable_assigner/common/helpers.py +57 -0
  217. graphon-0.1.0/src/graphon/nodes/variable_assigner/v1/__init__.py +3 -0
  218. graphon-0.1.0/src/graphon/nodes/variable_assigner/v1/node.py +130 -0
  219. graphon-0.1.0/src/graphon/nodes/variable_assigner/v1/node_data.py +18 -0
  220. graphon-0.1.0/src/graphon/nodes/variable_assigner/v2/__init__.py +3 -0
  221. graphon-0.1.0/src/graphon/nodes/variable_assigner/v2/entities.py +31 -0
  222. graphon-0.1.0/src/graphon/nodes/variable_assigner/v2/enums.py +20 -0
  223. graphon-0.1.0/src/graphon/nodes/variable_assigner/v2/exc.py +40 -0
  224. graphon-0.1.0/src/graphon/nodes/variable_assigner/v2/helpers.py +136 -0
  225. graphon-0.1.0/src/graphon/nodes/variable_assigner/v2/node.py +301 -0
  226. graphon-0.1.0/src/graphon/prompt_entities.py +47 -0
  227. graphon-0.1.0/src/graphon/py.typed +0 -0
  228. graphon-0.1.0/src/graphon/runtime/__init__.py +28 -0
  229. graphon-0.1.0/src/graphon/runtime/graph_runtime_state.py +736 -0
  230. graphon-0.1.0/src/graphon/runtime/graph_runtime_state_protocol.py +79 -0
  231. graphon-0.1.0/src/graphon/runtime/read_only_wrappers.py +84 -0
  232. graphon-0.1.0/src/graphon/runtime/variable_pool.py +311 -0
  233. graphon-0.1.0/src/graphon/template_rendering.py +18 -0
  234. graphon-0.1.0/src/graphon/utils/__init__.py +0 -0
  235. graphon-0.1.0/src/graphon/utils/condition/__init__.py +0 -0
  236. graphon-0.1.0/src/graphon/utils/condition/entities.py +49 -0
  237. graphon-0.1.0/src/graphon/utils/condition/processor.py +495 -0
  238. graphon-0.1.0/src/graphon/utils/json_in_md_parser.py +59 -0
  239. graphon-0.1.0/src/graphon/variable_loader.py +80 -0
  240. graphon-0.1.0/src/graphon/variables/__init__.py +82 -0
  241. graphon-0.1.0/src/graphon/variables/consts.py +9 -0
  242. graphon-0.1.0/src/graphon/variables/exc.py +2 -0
  243. graphon-0.1.0/src/graphon/variables/factory.py +215 -0
  244. graphon-0.1.0/src/graphon/variables/input_entities.py +66 -0
  245. graphon-0.1.0/src/graphon/variables/segment_group.py +22 -0
  246. graphon-0.1.0/src/graphon/variables/segments.py +249 -0
  247. graphon-0.1.0/src/graphon/variables/types.py +284 -0
  248. graphon-0.1.0/src/graphon/variables/utils.py +35 -0
  249. graphon-0.1.0/src/graphon/variables/variables.py +181 -0
  250. graphon-0.1.0/src/graphon/workflow_type_encoder.py +48 -0
graphon-0.1.0/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 LangGenius, Inc.
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
graphon-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,270 @@
1
+ Metadata-Version: 2.4
2
+ Name: graphon
3
+ Version: 0.1.0
4
+ Summary: Graph execution engine for agentic AI workflows.
5
+ License-Expression: Apache-2.0
6
+ License-File: LICENSE
7
+ Requires-Dist: charset-normalizer>=3.4.4
8
+ Requires-Dist: httpx~=0.28.0
9
+ Requires-Dist: json-repair>=0.55.1
10
+ Requires-Dist: jsonschema>=4.25.1
11
+ Requires-Dist: orjson>=3.10.0,<4.0.0
12
+ Requires-Dist: pandas[excel]~=3.0.1
13
+ Requires-Dist: pydantic~=2.12.5
14
+ Requires-Dist: pydantic-extra-types~=2.11.0
15
+ Requires-Dist: pypdfium2==5.6.0
16
+ Requires-Dist: python-docx~=1.2.0
17
+ Requires-Dist: pyyaml~=6.0.1
18
+ Requires-Dist: tiktoken~=0.12.0
19
+ Requires-Dist: transformers~=5.3.0
20
+ Requires-Dist: typing-extensions>=4.10.0
21
+ Requires-Dist: unstructured[docx,epub,md,ppt,pptx]~=0.21.5
22
+ Requires-Dist: pypandoc~=1.13
23
+ Requires-Dist: webvtt-py~=0.5.1
24
+ Requires-Python: >=3.11
25
+ Project-URL: source, https://github.com/langgenius/graphon
26
+ Project-URL: homepage, https://github.com/langgenius/graphon
27
+ Project-URL: issues, https://github.com/langgenius/graphon/issues
28
+ Description-Content-Type: text/markdown
29
+
30
+ # Graphon (Under Construction)
31
+
32
+ This repository is still being organized.
33
+
34
+ ## Development Workflow
35
+
36
+ By default, use `make` for routine development commands in this repository.
37
+
38
+ That is the recommended path because:
39
+
40
+ - it reflects the repository's intended workflow
41
+ - it keeps formatting, linting, and testing commands consistent
42
+ - it reduces command drift across contributors and CI
43
+
44
+ If you know exactly what you are doing, using `ruff`, `pytest`, or `prek` directly is still your choice. Those tools remain fully available, but they should be treated as the lower-level interface rather than the default one.
45
+
46
+ ## Commit and PR Title Convention
47
+
48
+ All commit messages must follow the
49
+ [Conventional Commits](https://www.conventionalcommits.org/) specification.
50
+
51
+ This is a repository requirement, not a suggestion.
52
+
53
+ The required commit types are:
54
+
55
+ - `feat`
56
+ - `fix`
57
+ - `docs`
58
+ - `style`
59
+ - `refactor`
60
+ - `perf`
61
+ - `test`
62
+ - `build`
63
+ - `ci`
64
+ - `chore`
65
+ - `revert`
66
+
67
+ Use the Conventional Commits structure consistently, for example:
68
+
69
+ ```text
70
+ feat: add graph snapshot export
71
+ fix(runtime): avoid duplicate node completion events
72
+ docs(readme): document development workflow
73
+ refactor(variable-pool): simplify selector lookup
74
+ test(encoders): cover nested dataclass encoding
75
+ feat!: drop legacy workflow payload format
76
+ refactor(api)!: remove deprecated runtime entrypoint
77
+ ```
78
+
79
+ Pull request titles must follow the exact same convention.
80
+
81
+ If a change is breaking, the commit message and the PR title must include `!`.
82
+
83
+ Examples:
84
+
85
+ ```text
86
+ feat!: remove deprecated graph initialization path
87
+ fix(parser)!: change selector parsing semantics
88
+ ```
89
+
90
+ In other words:
91
+
92
+ - every commit message should use Conventional Commits
93
+ - every PR title should also use Conventional Commits
94
+ - every breaking change must be marked with `!`
95
+ - the PR title must stay aligned with the final change being merged
96
+
97
+ Do not use free-form PR titles that diverge from the commit message standard.
98
+
99
+ ## Quick Start
100
+
101
+ ### Prerequisites
102
+
103
+ - `uv`
104
+ - `make`
105
+ - `git`
106
+
107
+ ### Initial Setup
108
+
109
+ This project uses `uv` for dependency and virtual environment management.
110
+
111
+ ```bash
112
+ make dev
113
+ source .venv/bin/activate
114
+ ```
115
+
116
+ `make dev` will:
117
+
118
+ - run `uv sync`
119
+ - ensure `prek` hooks are installed
120
+
121
+ After that, the repository will have a local `.venv`, the project will be installed in editable mode, and Git hooks will be ready.
122
+
123
+ ## Recommended Commands
124
+
125
+ Use these commands by default:
126
+
127
+ ```bash
128
+ make dev
129
+ make format
130
+ make lint
131
+ make check
132
+ make test
133
+ make pre
134
+ ```
135
+
136
+ What they do:
137
+
138
+ - `make dev`: run `uv sync` and ensure `prek` is installed
139
+ - `make format`: run `ruff format`
140
+ - `make lint`: run `ruff check --fix`
141
+ - `make check`: run `ruff format --check && ruff check`
142
+ - `make test`: run `uv run --frozen pytest`
143
+ - `make pre`: run `format`, `lint`, and `test` in sequence
144
+
145
+ Additional targets:
146
+
147
+ - `make build`: build the package
148
+ - `make clean`: remove build artifacts, caches, and `__pycache__`
149
+
150
+ ## Recommended Daily Flow
151
+
152
+ For normal development, the expected flow is:
153
+
154
+ ```bash
155
+ make dev
156
+ make pre
157
+ ```
158
+
159
+ For day-to-day iteration, the usual commands are:
160
+
161
+ ```bash
162
+ make format
163
+ make lint
164
+ make test
165
+ ```
166
+
167
+ ## Tooling Details
168
+
169
+ ### `uv`
170
+
171
+ `uv` is responsible for environment and dependency management.
172
+
173
+ Common commands:
174
+
175
+ ```bash
176
+ uv sync
177
+ uv run pytest
178
+ uv run ruff check
179
+ uv run prek run -a
180
+ ```
181
+
182
+ Use `uv` when you need to:
183
+
184
+ - create or refresh the local virtual environment
185
+ - install project and development dependencies
186
+ - run low-level commands without activating `.venv`
187
+
188
+ ### `make`
189
+
190
+ `make` is the default command surface for this repository.
191
+
192
+ If you are unsure which command to use, start with `make`.
193
+
194
+ This is especially true for:
195
+
196
+ - initial setup
197
+ - formatting
198
+ - linting
199
+ - running the test suite
200
+ - running the standard pre-check flow
201
+
202
+ ### `ruff`
203
+
204
+ `ruff` handles both formatting and linting.
205
+
206
+ Direct usage is supported, but it is secondary to `make`.
207
+
208
+ Common direct commands:
209
+
210
+ ```bash
211
+ ruff format
212
+ ruff check --fix
213
+ ruff format --check
214
+ ruff check
215
+ ```
216
+
217
+ Prefer direct `ruff` usage when:
218
+
219
+ - you want to target a specific file or rule
220
+ - you are debugging a particular lint issue
221
+ - you intentionally want something more precise than the `Makefile` wrapper
222
+
223
+ ### `pytest`
224
+
225
+ `pytest` runs the test suite.
226
+
227
+ Common direct commands:
228
+
229
+ ```bash
230
+ uv run pytest
231
+ uv run pytest tests
232
+ uv run pytest tests/utils/test_condition_processor.py
233
+ uv run pytest -k condition
234
+ ```
235
+
236
+ Notes:
237
+
238
+ - the current default configuration includes `-n auto`
239
+ - `testpaths` is set to `tests`
240
+ - `make test` is the default wrapper and should be preferred unless you need a more specific invocation
241
+
242
+ ### `prek`
243
+
244
+ `prek` manages Git hooks for this repository. Its configuration is stored in `prek.toml`.
245
+
246
+ Common direct commands:
247
+
248
+ ```bash
249
+ uv run prek install
250
+ uv run prek run -a
251
+ uv run prek list
252
+ uv run prek validate-config
253
+ ```
254
+
255
+ Notes:
256
+
257
+ - `uv run prek install`: install Git hooks into `.git/hooks/`
258
+ - `uv run prek run -a`: run hooks against all files in the repository
259
+ - the current configuration mainly includes:
260
+ - built-in cleanup and validation hooks
261
+ - local `make format` / `make lint` hooks
262
+
263
+ ## Direct Tool Usage
264
+
265
+ If you know what you are doing, direct tool usage is completely acceptable.
266
+
267
+ The important distinction is:
268
+
269
+ - default recommendation: use `make`
270
+ - advanced or targeted usage: use `ruff`, `pytest`, or `prek` directly
@@ -0,0 +1,241 @@
1
+ # Graphon (Under Construction)
2
+
3
+ This repository is still being organized.
4
+
5
+ ## Development Workflow
6
+
7
+ By default, use `make` for routine development commands in this repository.
8
+
9
+ That is the recommended path because:
10
+
11
+ - it reflects the repository's intended workflow
12
+ - it keeps formatting, linting, and testing commands consistent
13
+ - it reduces command drift across contributors and CI
14
+
15
+ If you know exactly what you are doing, using `ruff`, `pytest`, or `prek` directly is still your choice. Those tools remain fully available, but they should be treated as the lower-level interface rather than the default one.
16
+
17
+ ## Commit and PR Title Convention
18
+
19
+ All commit messages must follow the
20
+ [Conventional Commits](https://www.conventionalcommits.org/) specification.
21
+
22
+ This is a repository requirement, not a suggestion.
23
+
24
+ The required commit types are:
25
+
26
+ - `feat`
27
+ - `fix`
28
+ - `docs`
29
+ - `style`
30
+ - `refactor`
31
+ - `perf`
32
+ - `test`
33
+ - `build`
34
+ - `ci`
35
+ - `chore`
36
+ - `revert`
37
+
38
+ Use the Conventional Commits structure consistently, for example:
39
+
40
+ ```text
41
+ feat: add graph snapshot export
42
+ fix(runtime): avoid duplicate node completion events
43
+ docs(readme): document development workflow
44
+ refactor(variable-pool): simplify selector lookup
45
+ test(encoders): cover nested dataclass encoding
46
+ feat!: drop legacy workflow payload format
47
+ refactor(api)!: remove deprecated runtime entrypoint
48
+ ```
49
+
50
+ Pull request titles must follow the exact same convention.
51
+
52
+ If a change is breaking, the commit message and the PR title must include `!`.
53
+
54
+ Examples:
55
+
56
+ ```text
57
+ feat!: remove deprecated graph initialization path
58
+ fix(parser)!: change selector parsing semantics
59
+ ```
60
+
61
+ In other words:
62
+
63
+ - every commit message should use Conventional Commits
64
+ - every PR title should also use Conventional Commits
65
+ - every breaking change must be marked with `!`
66
+ - the PR title must stay aligned with the final change being merged
67
+
68
+ Do not use free-form PR titles that diverge from the commit message standard.
69
+
70
+ ## Quick Start
71
+
72
+ ### Prerequisites
73
+
74
+ - `uv`
75
+ - `make`
76
+ - `git`
77
+
78
+ ### Initial Setup
79
+
80
+ This project uses `uv` for dependency and virtual environment management.
81
+
82
+ ```bash
83
+ make dev
84
+ source .venv/bin/activate
85
+ ```
86
+
87
+ `make dev` will:
88
+
89
+ - run `uv sync`
90
+ - ensure `prek` hooks are installed
91
+
92
+ After that, the repository will have a local `.venv`, the project will be installed in editable mode, and Git hooks will be ready.
93
+
94
+ ## Recommended Commands
95
+
96
+ Use these commands by default:
97
+
98
+ ```bash
99
+ make dev
100
+ make format
101
+ make lint
102
+ make check
103
+ make test
104
+ make pre
105
+ ```
106
+
107
+ What they do:
108
+
109
+ - `make dev`: run `uv sync` and ensure `prek` is installed
110
+ - `make format`: run `ruff format`
111
+ - `make lint`: run `ruff check --fix`
112
+ - `make check`: run `ruff format --check && ruff check`
113
+ - `make test`: run `uv run --frozen pytest`
114
+ - `make pre`: run `format`, `lint`, and `test` in sequence
115
+
116
+ Additional targets:
117
+
118
+ - `make build`: build the package
119
+ - `make clean`: remove build artifacts, caches, and `__pycache__`
120
+
121
+ ## Recommended Daily Flow
122
+
123
+ For normal development, the expected flow is:
124
+
125
+ ```bash
126
+ make dev
127
+ make pre
128
+ ```
129
+
130
+ For day-to-day iteration, the usual commands are:
131
+
132
+ ```bash
133
+ make format
134
+ make lint
135
+ make test
136
+ ```
137
+
138
+ ## Tooling Details
139
+
140
+ ### `uv`
141
+
142
+ `uv` is responsible for environment and dependency management.
143
+
144
+ Common commands:
145
+
146
+ ```bash
147
+ uv sync
148
+ uv run pytest
149
+ uv run ruff check
150
+ uv run prek run -a
151
+ ```
152
+
153
+ Use `uv` when you need to:
154
+
155
+ - create or refresh the local virtual environment
156
+ - install project and development dependencies
157
+ - run low-level commands without activating `.venv`
158
+
159
+ ### `make`
160
+
161
+ `make` is the default command surface for this repository.
162
+
163
+ If you are unsure which command to use, start with `make`.
164
+
165
+ This is especially true for:
166
+
167
+ - initial setup
168
+ - formatting
169
+ - linting
170
+ - running the test suite
171
+ - running the standard pre-check flow
172
+
173
+ ### `ruff`
174
+
175
+ `ruff` handles both formatting and linting.
176
+
177
+ Direct usage is supported, but it is secondary to `make`.
178
+
179
+ Common direct commands:
180
+
181
+ ```bash
182
+ ruff format
183
+ ruff check --fix
184
+ ruff format --check
185
+ ruff check
186
+ ```
187
+
188
+ Prefer direct `ruff` usage when:
189
+
190
+ - you want to target a specific file or rule
191
+ - you are debugging a particular lint issue
192
+ - you intentionally want something more precise than the `Makefile` wrapper
193
+
194
+ ### `pytest`
195
+
196
+ `pytest` runs the test suite.
197
+
198
+ Common direct commands:
199
+
200
+ ```bash
201
+ uv run pytest
202
+ uv run pytest tests
203
+ uv run pytest tests/utils/test_condition_processor.py
204
+ uv run pytest -k condition
205
+ ```
206
+
207
+ Notes:
208
+
209
+ - the current default configuration includes `-n auto`
210
+ - `testpaths` is set to `tests`
211
+ - `make test` is the default wrapper and should be preferred unless you need a more specific invocation
212
+
213
+ ### `prek`
214
+
215
+ `prek` manages Git hooks for this repository. Its configuration is stored in `prek.toml`.
216
+
217
+ Common direct commands:
218
+
219
+ ```bash
220
+ uv run prek install
221
+ uv run prek run -a
222
+ uv run prek list
223
+ uv run prek validate-config
224
+ ```
225
+
226
+ Notes:
227
+
228
+ - `uv run prek install`: install Git hooks into `.git/hooks/`
229
+ - `uv run prek run -a`: run hooks against all files in the repository
230
+ - the current configuration mainly includes:
231
+ - built-in cleanup and validation hooks
232
+ - local `make format` / `make lint` hooks
233
+
234
+ ## Direct Tool Usage
235
+
236
+ If you know what you are doing, direct tool usage is completely acceptable.
237
+
238
+ The important distinction is:
239
+
240
+ - default recommendation: use `make`
241
+ - advanced or targeted usage: use `ruff`, `pytest`, or `prek` directly