puffinflow 2.dev0__tar.gz → 2.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 (390) hide show
  1. puffinflow-2.1.0/.dockerignore +17 -0
  2. {puffinflow-2.dev0 → puffinflow-2.1.0}/.github/workflows/ci-cd.yml +112 -22
  3. {puffinflow-2.dev0 → puffinflow-2.1.0}/.github/workflows/compliance.yml +9 -0
  4. {puffinflow-2.dev0 → puffinflow-2.1.0}/.github/workflows/dependency-audit.yml +6 -0
  5. {puffinflow-2.dev0 → puffinflow-2.1.0}/.github/workflows/performance.yml +9 -0
  6. {puffinflow-2.dev0 → puffinflow-2.1.0}/.gitignore +14 -1
  7. {puffinflow-2.dev0 → puffinflow-2.1.0}/.pre-commit-config.yaml +1 -1
  8. puffinflow-2.1.0/BENCHMARKS.md +193 -0
  9. puffinflow-2.1.0/CLAUDE.md +73 -0
  10. puffinflow-2.1.0/Cargo.lock +212 -0
  11. puffinflow-2.1.0/Cargo.toml +19 -0
  12. {puffinflow-2.dev0 → puffinflow-2.1.0}/Makefile +6 -29
  13. puffinflow-2.1.0/PKG-INFO +477 -0
  14. puffinflow-2.1.0/README.md +339 -0
  15. puffinflow-2.1.0/benchmarks/Dockerfile +22 -0
  16. puffinflow-2.1.0/benchmarks/README.md +29 -0
  17. puffinflow-2.1.0/benchmarks/benchmark.py +956 -0
  18. {puffinflow-2.dev0 → puffinflow-2.1.0}/examples/basic_agent.py +10 -13
  19. {puffinflow-2.dev0 → puffinflow-2.1.0}/examples/coordination_examples.py +12 -9
  20. {puffinflow-2.dev0 → puffinflow-2.1.0}/examples/reliability_patterns.py +6 -8
  21. {puffinflow-2.dev0 → puffinflow-2.1.0}/examples/resource_management.py +2 -2
  22. {puffinflow-2.dev0 → puffinflow-2.1.0}/examples/run_all_examples.py +5 -5
  23. {puffinflow-2.dev0 → puffinflow-2.1.0}/pyproject.toml +44 -19
  24. {puffinflow-2.dev0 → puffinflow-2.1.0}/run_tests.py +5 -5
  25. puffinflow-2.1.0/rust/src/agent_core.rs +636 -0
  26. puffinflow-2.1.0/rust/src/bitset.rs +129 -0
  27. puffinflow-2.1.0/rust/src/core.rs +272 -0
  28. puffinflow-2.1.0/rust/src/error.rs +10 -0
  29. puffinflow-2.1.0/rust/src/heap.rs +166 -0
  30. puffinflow-2.1.0/rust/src/lib.rs +21 -0
  31. puffinflow-2.1.0/rust/src/metadata.rs +52 -0
  32. puffinflow-2.1.0/src/puffinflow/__init__.py +245 -0
  33. puffinflow-2.1.0/src/puffinflow/core/__init__.py +49 -0
  34. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/agent/__init__.py +124 -91
  35. puffinflow-2.1.0/src/puffinflow/core/agent/_core.py +20 -0
  36. puffinflow-2.1.0/src/puffinflow/core/agent/_fallback_agent_core.py +417 -0
  37. puffinflow-2.1.0/src/puffinflow/core/agent/_fallback_core.py +257 -0
  38. puffinflow-2.1.0/src/puffinflow/core/agent/base.py +3289 -0
  39. puffinflow-2.1.0/src/puffinflow/core/agent/checkpoint.py +163 -0
  40. puffinflow-2.1.0/src/puffinflow/core/agent/checkpoint_backends.py +530 -0
  41. puffinflow-2.1.0/src/puffinflow/core/agent/checkpoint_serializer.py +175 -0
  42. puffinflow-2.1.0/src/puffinflow/core/agent/command.py +43 -0
  43. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/agent/context.py +182 -45
  44. puffinflow-2.1.0/src/puffinflow/core/agent/decorators/__init__.py +99 -0
  45. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/agent/decorators/flexible.py +72 -41
  46. puffinflow-2.1.0/src/puffinflow/core/agent/drain.py +196 -0
  47. puffinflow-2.1.0/src/puffinflow/core/agent/reducers.py +59 -0
  48. puffinflow-2.1.0/src/puffinflow/core/agent/scheduling/__init__.py +43 -0
  49. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/agent/scheduling/builder.py +3 -3
  50. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/agent/state.py +29 -11
  51. puffinflow-2.1.0/src/puffinflow/core/agent/streaming.py +125 -0
  52. puffinflow-2.1.0/src/puffinflow/core/agent/streaming_endpoint.py +306 -0
  53. puffinflow-2.1.0/src/puffinflow/core/agent/subgraph.py +90 -0
  54. puffinflow-2.1.0/src/puffinflow/core/config.py +111 -0
  55. puffinflow-2.1.0/src/puffinflow/core/coordination/__init__.py +145 -0
  56. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/coordination/agent_team.py +1 -1
  57. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/coordination/coordinator.py +2 -4
  58. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/coordination/primitives.py +17 -3
  59. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/coordination/rate_limiter.py +25 -6
  60. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/observability/agent.py +23 -3
  61. puffinflow-2.1.0/src/puffinflow/core/reliability/__init__.py +50 -0
  62. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/reliability/circuit_breaker.py +11 -1
  63. puffinflow-2.1.0/src/puffinflow/core/resources/__init__.py +86 -0
  64. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/resources/allocation.py +24 -8
  65. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/resources/pool.py +4 -2
  66. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/resources/quotas.py +23 -10
  67. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/resources/requirements.py +6 -3
  68. puffinflow-2.1.0/src/puffinflow/core/store/__init__.py +17 -0
  69. puffinflow-2.1.0/src/puffinflow/core/store/base.py +123 -0
  70. puffinflow-2.1.0/src/puffinflow/core/store/sqlite.py +157 -0
  71. puffinflow-2.1.0/src/puffinflow/version.py +33 -0
  72. puffinflow-2.1.0/studio/api/config.py +20 -0
  73. puffinflow-2.1.0/studio/api/db.py +24 -0
  74. puffinflow-2.1.0/studio/api/main.py +47 -0
  75. puffinflow-2.1.0/studio/api/models.py +137 -0
  76. puffinflow-2.1.0/studio/api/routes/codegen.py +96 -0
  77. puffinflow-2.1.0/studio/api/routes/deploy.py +84 -0
  78. puffinflow-2.1.0/studio/api/routes/eval.py +266 -0
  79. puffinflow-2.1.0/studio/api/routes/projects.py +116 -0
  80. puffinflow-2.1.0/studio/api/routes/workflows.py +189 -0
  81. puffinflow-2.1.0/studio/api/services/codegen_service.py +51 -0
  82. puffinflow-2.1.0/studio/api/services/deploy_service.py +84 -0
  83. puffinflow-2.1.0/studio/api/services/eval_service.py +134 -0
  84. puffinflow-2.1.0/studio/cli/main.py +308 -0
  85. puffinflow-2.1.0/studio/cli/scaffold.py +278 -0
  86. puffinflow-2.1.0/studio/codegen/compilers.py +317 -0
  87. puffinflow-2.1.0/studio/codegen/deploy/base.py +27 -0
  88. puffinflow-2.1.0/studio/codegen/deploy/docker_gen.py +95 -0
  89. puffinflow-2.1.0/studio/codegen/deploy/modal_gen.py +61 -0
  90. puffinflow-2.1.0/studio/codegen/formatter.py +15 -0
  91. puffinflow-2.1.0/studio/codegen/generator.py +198 -0
  92. puffinflow-2.1.0/studio/codegen/ir.py +188 -0
  93. puffinflow-2.1.0/studio/codegen/reverse_parser.py +372 -0
  94. puffinflow-2.1.0/studio/eval/engine.py +210 -0
  95. puffinflow-2.1.0/studio/eval/scorers.py +118 -0
  96. puffinflow-2.1.0/studio/eval/suite.py +47 -0
  97. puffinflow-2.1.0/studio/web/next-env.d.ts +6 -0
  98. puffinflow-2.1.0/studio/web/next.config.ts +14 -0
  99. puffinflow-2.1.0/studio/web/package-lock.json +6418 -0
  100. puffinflow-2.1.0/studio/web/package.json +33 -0
  101. puffinflow-2.1.0/studio/web/postcss.config.js +6 -0
  102. puffinflow-2.1.0/studio/web/src/app/deploy/[id]/page.tsx +93 -0
  103. puffinflow-2.1.0/studio/web/src/app/editor/[id]/page.tsx +110 -0
  104. puffinflow-2.1.0/studio/web/src/app/eval/[id]/page.tsx +182 -0
  105. puffinflow-2.1.0/studio/web/src/app/globals.css +55 -0
  106. puffinflow-2.1.0/studio/web/src/app/layout.tsx +53 -0
  107. puffinflow-2.1.0/studio/web/src/app/page.tsx +106 -0
  108. puffinflow-2.1.0/studio/web/src/app/projects/[id]/page.tsx +162 -0
  109. puffinflow-2.1.0/studio/web/src/components/deploy/DeployPanel.tsx +98 -0
  110. puffinflow-2.1.0/studio/web/src/components/deploy/LogViewer.tsx +28 -0
  111. puffinflow-2.1.0/studio/web/src/components/editor/CodePreview.tsx +16 -0
  112. puffinflow-2.1.0/studio/web/src/components/editor/EditorToolbar.tsx +81 -0
  113. puffinflow-2.1.0/studio/web/src/components/editor/NodePalette.tsx +44 -0
  114. puffinflow-2.1.0/studio/web/src/components/editor/PropertiesPanel.tsx +526 -0
  115. puffinflow-2.1.0/studio/web/src/components/editor/WorkflowCanvas.tsx +195 -0
  116. puffinflow-2.1.0/studio/web/src/components/eval/EvalCaseForm.tsx +78 -0
  117. puffinflow-2.1.0/studio/web/src/components/eval/EvalResultsTable.tsx +65 -0
  118. puffinflow-2.1.0/studio/web/src/components/eval/EvalSuiteEditor.tsx +67 -0
  119. puffinflow-2.1.0/studio/web/src/components/nodes/ConditionalNode.tsx +49 -0
  120. puffinflow-2.1.0/studio/web/src/components/nodes/FanOutNode.tsx +35 -0
  121. puffinflow-2.1.0/studio/web/src/components/nodes/FunctionNode.tsx +35 -0
  122. puffinflow-2.1.0/studio/web/src/components/nodes/InputNode.tsx +41 -0
  123. puffinflow-2.1.0/studio/web/src/components/nodes/LLMNode.tsx +42 -0
  124. puffinflow-2.1.0/studio/web/src/components/nodes/MemoryNode.tsx +37 -0
  125. puffinflow-2.1.0/studio/web/src/components/nodes/MergeNode.tsx +35 -0
  126. puffinflow-2.1.0/studio/web/src/components/nodes/OutputNode.tsx +42 -0
  127. puffinflow-2.1.0/studio/web/src/components/nodes/SubgraphNode.tsx +32 -0
  128. puffinflow-2.1.0/studio/web/src/components/nodes/ToolNode.tsx +37 -0
  129. puffinflow-2.1.0/studio/web/src/components/nodes/index.ts +10 -0
  130. puffinflow-2.1.0/studio/web/src/components/ui/Badge.tsx +30 -0
  131. puffinflow-2.1.0/studio/web/src/components/ui/Button.tsx +49 -0
  132. puffinflow-2.1.0/studio/web/src/components/ui/Card.tsx +54 -0
  133. puffinflow-2.1.0/studio/web/src/components/ui/Dialog.tsx +121 -0
  134. puffinflow-2.1.0/studio/web/src/components/ui/Input.tsx +24 -0
  135. puffinflow-2.1.0/studio/web/src/components/ui/Label.tsx +18 -0
  136. puffinflow-2.1.0/studio/web/src/components/ui/Select.tsx +34 -0
  137. puffinflow-2.1.0/studio/web/src/components/ui/Tabs.tsx +102 -0
  138. puffinflow-2.1.0/studio/web/src/components/ui/Textarea.tsx +23 -0
  139. puffinflow-2.1.0/studio/web/src/hooks/useApi.ts +48 -0
  140. puffinflow-2.1.0/studio/web/src/hooks/useCodegen.ts +70 -0
  141. puffinflow-2.1.0/studio/web/src/stores/workflowStore.ts +156 -0
  142. puffinflow-2.1.0/studio/web/tailwind.config.ts +49 -0
  143. puffinflow-2.1.0/studio/web/tsconfig.json +23 -0
  144. puffinflow-2.1.0/tests/docs_examples/__init__.py +1 -0
  145. puffinflow-2.1.0/tests/docs_examples/test_all_documentation_examples.py +527 -0
  146. puffinflow-2.1.0/tests/docs_examples/test_api_reference_examples.py +252 -0
  147. puffinflow-2.1.0/tests/docs_examples/test_best_practices_examples.py +159 -0
  148. puffinflow-2.1.0/tests/docs_examples/test_checkpointing_examples.py +331 -0
  149. puffinflow-2.1.0/tests/docs_examples/test_context_and_data_examples.py +448 -0
  150. puffinflow-2.1.0/tests/docs_examples/test_coordination_examples.py +114 -0
  151. puffinflow-2.1.0/tests/docs_examples/test_error_handling_examples.py +238 -0
  152. puffinflow-2.1.0/tests/docs_examples/test_getting_started_examples.py +997 -0
  153. puffinflow-2.1.0/tests/docs_examples/test_introduction_examples.py +268 -0
  154. puffinflow-2.1.0/tests/docs_examples/test_multiagent_examples.py +118 -0
  155. puffinflow-2.1.0/tests/docs_examples/test_observability_examples.py +369 -0
  156. puffinflow-2.1.0/tests/docs_examples/test_reliability_examples.py +509 -0
  157. puffinflow-2.1.0/tests/docs_examples/test_resource_management_examples.py +265 -0
  158. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/integration/test_resource_reliability.py +54 -54
  159. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/integration/test_working_agents.py +4 -4
  160. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/agent/decorators/test_init.py +3 -6
  161. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/agent/scheduling/test_builder.py +2 -2
  162. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/agent/scheduling/test_init.py +3 -3
  163. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/agent/scheduling/test_parser.py +3 -3
  164. puffinflow-2.1.0/tests/unit/agent/test_agent_core.py +525 -0
  165. puffinflow-2.1.0/tests/unit/agent/test_auto_discovery.py +256 -0
  166. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/agent/test_base.py +61 -39
  167. puffinflow-2.1.0/tests/unit/agent/test_checkpoint_backends.py +242 -0
  168. puffinflow-2.1.0/tests/unit/agent/test_checkpoint_serializer.py +212 -0
  169. puffinflow-2.1.0/tests/unit/agent/test_command.py +222 -0
  170. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/agent/test_context.py +8 -7
  171. puffinflow-2.1.0/tests/unit/agent/test_core.py +366 -0
  172. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/agent/test_decorators.py +14 -14
  173. puffinflow-2.1.0/tests/unit/agent/test_drain.py +142 -0
  174. puffinflow-2.1.0/tests/unit/agent/test_durable_execution.py +189 -0
  175. puffinflow-2.1.0/tests/unit/agent/test_execution_modes.py +317 -0
  176. puffinflow-2.1.0/tests/unit/agent/test_reducers.py +199 -0
  177. puffinflow-2.1.0/tests/unit/agent/test_send.py +258 -0
  178. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/agent/test_state.py +12 -11
  179. puffinflow-2.1.0/tests/unit/agent/test_streaming.py +241 -0
  180. puffinflow-2.1.0/tests/unit/agent/test_streaming_endpoint.py +137 -0
  181. puffinflow-2.1.0/tests/unit/agent/test_subgraph.py +328 -0
  182. puffinflow-2.1.0/tests/unit/agent/test_validation.py +271 -0
  183. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/coordination/test_init.py +9 -9
  184. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/coordination/test_rate_limiter.py +1 -1
  185. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/observability/test_agent.py +7 -2
  186. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/observability/test_init.py +9 -9
  187. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/observability/test_tracing.py +12 -10
  188. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/reliability/test_init.py +12 -12
  189. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/resources/test_allocation.py +3 -3
  190. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/resources/test_init.py +12 -12
  191. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/resources/test_quotas.py +1 -1
  192. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/resources/test_requirements.py +12 -12
  193. puffinflow-2.1.0/tests/unit/store/__init__.py +0 -0
  194. puffinflow-2.1.0/tests/unit/store/test_store.py +297 -0
  195. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/test_config.py +3 -3
  196. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/test_init.py +12 -12
  197. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/test_version.py +7 -2
  198. puffinflow-2.dev0/.idea/.gitignore +0 -8
  199. puffinflow-2.dev0/.idea/inspectionProfiles/Project_Default.xml +0 -6
  200. puffinflow-2.dev0/.idea/inspectionProfiles/profiles_settings.xml +0 -6
  201. puffinflow-2.dev0/.idea/misc.xml +0 -7
  202. puffinflow-2.dev0/.idea/modules.xml +0 -8
  203. puffinflow-2.dev0/.idea/puffinflow-main.iml +0 -11
  204. puffinflow-2.dev0/.idea/vcs.xml +0 -6
  205. puffinflow-2.dev0/PKG-INFO +0 -334
  206. puffinflow-2.dev0/README.md +0 -213
  207. puffinflow-2.dev0/benchmark_results/benchmark_results_20250707_120316.json +0 -48
  208. puffinflow-2.dev0/benchmarks/README.md +0 -299
  209. puffinflow-2.dev0/benchmarks/benchmark_coordination.py +0 -480
  210. puffinflow-2.dev0/benchmarks/benchmark_core_agent.py +0 -304
  211. puffinflow-2.dev0/benchmarks/benchmark_observability.py +0 -526
  212. puffinflow-2.dev0/benchmarks/benchmark_resource_management.py +0 -392
  213. puffinflow-2.dev0/benchmarks/run_all_benchmarks.py +0 -401
  214. puffinflow-2.dev0/benchmarks/simple_benchmark.py +0 -238
  215. puffinflow-2.dev0/debug_integration_failure.py +0 -116
  216. puffinflow-2.dev0/doc-site/.gitignore +0 -24
  217. puffinflow-2.dev0/doc-site/App.tsx +0 -188
  218. puffinflow-2.dev0/doc-site/README.md +0 -14
  219. puffinflow-2.dev0/doc-site/components/CodeBlock.tsx +0 -30
  220. puffinflow-2.dev0/doc-site/components/CodeWindow.tsx +0 -59
  221. puffinflow-2.dev0/doc-site/components/Comparison.tsx +0 -60
  222. puffinflow-2.dev0/doc-site/components/CtaSection.tsx +0 -50
  223. puffinflow-2.dev0/doc-site/components/DocsPage.tsx +0 -3143
  224. puffinflow-2.dev0/doc-site/components/Footer.tsx +0 -54
  225. puffinflow-2.dev0/doc-site/components/Header.tsx +0 -40
  226. puffinflow-2.dev0/doc-site/components/Hero.tsx +0 -82
  227. puffinflow-2.dev0/doc-site/components/Icons.tsx +0 -82
  228. puffinflow-2.dev0/doc-site/components/ProductionGap.tsx +0 -72
  229. puffinflow-2.dev0/doc-site/components/PuffinLogo.tsx +0 -18
  230. puffinflow-2.dev0/doc-site/components/QuickStart.tsx +0 -60
  231. puffinflow-2.dev0/doc-site/components/ScalingProblem.tsx +0 -70
  232. puffinflow-2.dev0/doc-site/components/UseCases.tsx +0 -67
  233. puffinflow-2.dev0/doc-site/components/WhyPuffinflow.tsx +0 -158
  234. puffinflow-2.dev0/doc-site/components/docs/checkpointing.ts +0 -483
  235. puffinflow-2.dev0/doc-site/components/docs/context-and-data.ts +0 -239
  236. puffinflow-2.dev0/doc-site/components/docs/error-handling.ts +0 -1335
  237. puffinflow-2.dev0/doc-site/components/docs/getting-started.ts +0 -487
  238. puffinflow-2.dev0/doc-site/components/docs/introduction.ts +0 -86
  239. puffinflow-2.dev0/doc-site/components/docs/rag-recipe.ts +0 -742
  240. puffinflow-2.dev0/doc-site/components/docs/resource-management.ts +0 -1361
  241. puffinflow-2.dev0/doc-site/components/logo.png +0 -0
  242. puffinflow-2.dev0/doc-site/index.html +0 -470
  243. puffinflow-2.dev0/doc-site/index.tsx +0 -16
  244. puffinflow-2.dev0/doc-site/metadata.json +0 -6
  245. puffinflow-2.dev0/doc-site/package-lock.json +0 -1032
  246. puffinflow-2.dev0/doc-site/package.json +0 -20
  247. puffinflow-2.dev0/doc-site/tsconfig.json +0 -30
  248. puffinflow-2.dev0/doc-site/vite.config.ts +0 -17
  249. puffinflow-2.dev0/puffinflow-visual-editor/.vite/deps/_metadata.json +0 -8
  250. puffinflow-2.dev0/puffinflow-visual-editor/.vite/deps/package.json +0 -3
  251. puffinflow-2.dev0/setup.cfg +0 -4
  252. puffinflow-2.dev0/src/puffinflow/__init__.py +0 -132
  253. puffinflow-2.dev0/src/puffinflow/core/__init__.py +0 -110
  254. puffinflow-2.dev0/src/puffinflow/core/agent/base.py +0 -1635
  255. puffinflow-2.dev0/src/puffinflow/core/agent/checkpoint.py +0 -50
  256. puffinflow-2.dev0/src/puffinflow/core/agent/decorators/__init__.py +0 -90
  257. puffinflow-2.dev0/src/puffinflow/core/agent/scheduling/__init__.py +0 -21
  258. puffinflow-2.dev0/src/puffinflow/core/config.py +0 -62
  259. puffinflow-2.dev0/src/puffinflow/core/coordination/__init__.py +0 -137
  260. puffinflow-2.dev0/src/puffinflow/core/reliability/__init__.py +0 -27
  261. puffinflow-2.dev0/src/puffinflow/core/resources/__init__.py +0 -77
  262. puffinflow-2.dev0/src/puffinflow/version.py +0 -21
  263. puffinflow-2.dev0/src/puffinflow.egg-info/PKG-INFO +0 -334
  264. puffinflow-2.dev0/src/puffinflow.egg-info/SOURCES.txt +0 -243
  265. puffinflow-2.dev0/src/puffinflow.egg-info/dependency_links.txt +0 -1
  266. puffinflow-2.dev0/src/puffinflow.egg-info/entry_points.txt +0 -3
  267. puffinflow-2.dev0/src/puffinflow.egg-info/requires.txt +0 -97
  268. puffinflow-2.dev0/src/puffinflow.egg-info/top_level.txt +0 -1
  269. {puffinflow-2.dev0 → puffinflow-2.1.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  270. {puffinflow-2.dev0 → puffinflow-2.1.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  271. {puffinflow-2.dev0 → puffinflow-2.1.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  272. {puffinflow-2.dev0 → puffinflow-2.1.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  273. {puffinflow-2.dev0 → puffinflow-2.1.0}/.github/ISSUE_TEMPLATE/question.md +0 -0
  274. {puffinflow-2.dev0 → puffinflow-2.1.0}/.github/ISSUE_TEMPLATE/security_vulnerability.yml +0 -0
  275. {puffinflow-2.dev0 → puffinflow-2.1.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  276. {puffinflow-2.dev0 → puffinflow-2.1.0}/.github/dependabot.yml +0 -0
  277. {puffinflow-2.dev0 → puffinflow-2.1.0}/.trufflehog.yml +0 -0
  278. {puffinflow-2.dev0 → puffinflow-2.1.0}/CONTRIBUTING.md +0 -0
  279. {puffinflow-2.dev0 → puffinflow-2.1.0}/LICENSE +0 -0
  280. {puffinflow-2.dev0 → puffinflow-2.1.0}/SECURITY.md +0 -0
  281. {puffinflow-2.dev0 → puffinflow-2.1.0}/benchmarks/__init__.py +0 -0
  282. {puffinflow-2.dev0 → puffinflow-2.1.0}/docs/CI-CD.md +0 -0
  283. {puffinflow-2.dev0 → puffinflow-2.1.0}/docs/Makefile +0 -0
  284. {puffinflow-2.dev0 → puffinflow-2.1.0}/docs/README.md +0 -0
  285. {puffinflow-2.dev0 → puffinflow-2.1.0}/docs/requirements.txt +0 -0
  286. {puffinflow-2.dev0 → puffinflow-2.1.0}/docs/source/_static/custom.css +0 -0
  287. {puffinflow-2.dev0 → puffinflow-2.1.0}/docs/source/api/agent.rst +0 -0
  288. {puffinflow-2.dev0 → puffinflow-2.1.0}/docs/source/api/coordination.rst +0 -0
  289. {puffinflow-2.dev0 → puffinflow-2.1.0}/docs/source/api/index.rst +0 -0
  290. {puffinflow-2.dev0 → puffinflow-2.1.0}/docs/source/api/observability.rst +0 -0
  291. {puffinflow-2.dev0 → puffinflow-2.1.0}/docs/source/api/reliability.rst +0 -0
  292. {puffinflow-2.dev0 → puffinflow-2.1.0}/docs/source/api/resources.rst +0 -0
  293. {puffinflow-2.dev0 → puffinflow-2.1.0}/docs/source/changelog.rst +0 -0
  294. {puffinflow-2.dev0 → puffinflow-2.1.0}/docs/source/conf.py +0 -0
  295. {puffinflow-2.dev0 → puffinflow-2.1.0}/docs/source/contributing.rst +0 -0
  296. {puffinflow-2.dev0 → puffinflow-2.1.0}/docs/source/guides/advanced.rst +0 -0
  297. {puffinflow-2.dev0 → puffinflow-2.1.0}/docs/source/guides/examples.rst +0 -0
  298. {puffinflow-2.dev0 → puffinflow-2.1.0}/docs/source/guides/migration.rst +0 -0
  299. {puffinflow-2.dev0 → puffinflow-2.1.0}/docs/source/guides/quickstart.rst +0 -0
  300. {puffinflow-2.dev0 → puffinflow-2.1.0}/docs/source/index.rst +0 -0
  301. {puffinflow-2.dev0 → puffinflow-2.1.0}/docs/source/security.rst +0 -0
  302. {puffinflow-2.dev0 → puffinflow-2.1.0}/examples/README.md +0 -0
  303. {puffinflow-2.dev0 → puffinflow-2.1.0}/examples/__init__.py +0 -0
  304. {puffinflow-2.dev0 → puffinflow-2.1.0}/examples/advanced_workflows.py +0 -0
  305. {puffinflow-2.dev0 → puffinflow-2.1.0}/examples/monitoring_example.py +0 -0
  306. {puffinflow-2.dev0 → puffinflow-2.1.0}/examples/observability_demo.py +0 -0
  307. {puffinflow-2.dev0 → puffinflow-2.1.0}/examples/test_examples.py +0 -0
  308. {puffinflow-2.dev0 → puffinflow-2.1.0}/pytest.ini +0 -0
  309. {puffinflow-2.dev0 → puffinflow-2.1.0}/scripts/run-security-scan.bat +0 -0
  310. {puffinflow-2.dev0 → puffinflow-2.1.0}/scripts/run-security-scan.py +0 -0
  311. {puffinflow-2.dev0 → puffinflow-2.1.0}/scripts/test-trufflehog.py +0 -0
  312. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/agent/decorators/builder.py +0 -0
  313. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/agent/decorators/inspection.py +0 -0
  314. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/agent/dependencies.py +0 -0
  315. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/agent/scheduling/exceptions.py +0 -0
  316. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/agent/scheduling/inputs.py +0 -0
  317. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/agent/scheduling/parser.py +0 -0
  318. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/agent/scheduling/scheduler.py +0 -0
  319. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/coordination/agent_group.py +0 -0
  320. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/coordination/agent_pool.py +0 -0
  321. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/coordination/deadlock.py +0 -0
  322. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/coordination/fluent_api.py +0 -0
  323. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/observability/__init__.py +0 -0
  324. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/observability/alerting.py +0 -0
  325. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/observability/config.py +0 -0
  326. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/observability/context.py +0 -0
  327. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/observability/core.py +0 -0
  328. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/observability/decorators.py +0 -0
  329. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/observability/events.py +0 -0
  330. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/observability/interfaces.py +0 -0
  331. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/observability/metrics.py +0 -0
  332. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/observability/tracing.py +0 -0
  333. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/reliability/bulkhead.py +0 -0
  334. {puffinflow-2.dev0 → puffinflow-2.1.0}/src/puffinflow/core/reliability/leak_detector.py +0 -0
  335. {puffinflow-2.dev0/tests → puffinflow-2.1.0/studio}/__init__.py +0 -0
  336. {puffinflow-2.dev0/tests/unit → puffinflow-2.1.0/studio/api}/__init__.py +0 -0
  337. {puffinflow-2.dev0/tests/unit/agent → puffinflow-2.1.0/studio/api/routes}/__init__.py +0 -0
  338. {puffinflow-2.dev0/tests/unit/reliability → puffinflow-2.1.0/studio/api/services}/__init__.py +0 -0
  339. {puffinflow-2.dev0/tests/unit/resources → puffinflow-2.1.0/studio/cli}/__init__.py +0 -0
  340. /puffinflow-2.dev0/doc-site/components/Faq.tsx → /puffinflow-2.1.0/studio/codegen/__init__.py +0 -0
  341. /puffinflow-2.dev0/doc-site/components/Features.tsx → /puffinflow-2.1.0/studio/codegen/deploy/__init__.py +0 -0
  342. /puffinflow-2.dev0/doc-site/components/HowItWorks.tsx → /puffinflow-2.1.0/studio/eval/__init__.py +0 -0
  343. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/README.md +0 -0
  344. /puffinflow-2.dev0/doc-site/components/Pricing.tsx → /puffinflow-2.1.0/tests/__init__.py +0 -0
  345. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/conftest.py +0 -0
  346. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/e2e/__init__.py +0 -0
  347. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/e2e/test_complete_workflows.py +0 -0
  348. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/e2e/test_microservices_scenarios.py +0 -0
  349. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/integration/__init__.py +0 -0
  350. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/integration/test_agent_coordination.py +0 -0
  351. /puffinflow-2.dev0/doc-site/components/SocialProof.tsx → /puffinflow-2.1.0/tests/unit/__init__.py +0 -0
  352. /puffinflow-2.dev0/doc-site/components/Testimonials.tsx → /puffinflow-2.1.0/tests/unit/agent/__init__.py +0 -0
  353. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/agent/decorators/__init__.py +0 -0
  354. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/agent/decorators/test_builder.py +0 -0
  355. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/agent/decorators/test_flexible.py +0 -0
  356. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/agent/decorators/test_inspection.py +0 -0
  357. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/agent/scheduling/__init__.py +0 -0
  358. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/agent/scheduling/test_exceptions.py +0 -0
  359. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/agent/scheduling/test_inputs.py +0 -0
  360. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/agent/scheduling/test_scheduler.py +0 -0
  361. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/agent/test_builder.py +0 -0
  362. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/agent/test_checkpoint.py +0 -0
  363. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/agent/test_dependencies.py +0 -0
  364. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/agent/test_init.py +0 -0
  365. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/agent/test_scheduling.py +0 -0
  366. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/coordination/__init__.py +0 -0
  367. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/coordination/test_agent_group.py +0 -0
  368. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/coordination/test_agent_pool.py +0 -0
  369. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/coordination/test_agent_team.py +0 -0
  370. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/coordination/test_coordinator.py +0 -0
  371. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/coordination/test_deadlock.py +0 -0
  372. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/coordination/test_fluent_api.py +0 -0
  373. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/coordination/test_primitives.py +0 -0
  374. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/core/__init__.py +0 -0
  375. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/core/test_init.py +0 -0
  376. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/observability/__init__.py +0 -0
  377. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/observability/test_alerting.py +0 -0
  378. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/observability/test_config.py +0 -0
  379. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/observability/test_context.py +0 -0
  380. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/observability/test_core.py +0 -0
  381. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/observability/test_decorators.py +0 -0
  382. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/observability/test_events.py +0 -0
  383. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/observability/test_interfaces.py +0 -0
  384. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/observability/test_metrics.py +0 -0
  385. /puffinflow-2.dev0/doc-site/constants.tsx → /puffinflow-2.1.0/tests/unit/reliability/__init__.py +0 -0
  386. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/reliability/test_bulkhead.py +0 -0
  387. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/reliability/test_circuit_breaker.py +0 -0
  388. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/reliability/test_leak_detector.py +0 -0
  389. /puffinflow-2.dev0/doc-site/types.ts → /puffinflow-2.1.0/tests/unit/resources/__init__.py +0 -0
  390. {puffinflow-2.dev0 → puffinflow-2.1.0}/tests/unit/resources/test_pool.py +0 -0
@@ -0,0 +1,17 @@
1
+ .git
2
+ .github
3
+ .mypy_cache
4
+ .pytest_cache
5
+ .ruff_cache
6
+ __pycache__
7
+ *.pyc
8
+ *.pyo
9
+ *.egg-info
10
+ build/
11
+ dist/
12
+ htmlcov/
13
+ docs/
14
+ .venv
15
+ venv/
16
+ .env
17
+ *.log
@@ -126,6 +126,9 @@ jobs:
126
126
  with:
127
127
  python-version: ${{ env.PYTHON_VERSION }}
128
128
 
129
+ - name: Install Rust toolchain
130
+ uses: dtolnay/rust-toolchain@stable
131
+
129
132
  - name: Install dependencies
130
133
  run: |
131
134
  python -m pip install --upgrade pip
@@ -171,6 +174,9 @@ jobs:
171
174
  with:
172
175
  python-version: ${{ matrix.python-version }}
173
176
 
177
+ - name: Install Rust toolchain
178
+ uses: dtolnay/rust-toolchain@stable
179
+
174
180
  - name: Install dependencies
175
181
  run: |
176
182
  python -m pip install --upgrade pip
@@ -203,6 +209,8 @@ jobs:
203
209
  name: Documentation
204
210
  runs-on: ubuntu-latest
205
211
  if: github.event_name != 'schedule' && (contains(github.event.head_commit.message, '[docs]') || github.event_name == 'pull_request' || github.ref == 'refs/heads/main')
212
+ permissions:
213
+ contents: write
206
214
  steps:
207
215
  - uses: actions/checkout@v4
208
216
  with:
@@ -214,6 +222,9 @@ jobs:
214
222
  python-version: ${{ env.PYTHON_VERSION }}
215
223
  cache: 'pip'
216
224
 
225
+ - name: Install Rust toolchain
226
+ uses: dtolnay/rust-toolchain@stable
227
+
217
228
  - name: Install dependencies
218
229
  run: |
219
230
  python -m pip install --upgrade pip
@@ -301,35 +312,112 @@ jobs:
301
312
  github_token: ${{ secrets.GITHUB_TOKEN }}
302
313
  publish_dir: docs/_build/html
303
314
 
304
- # Build package
305
- build:
306
- name: Build Package
307
- runs-on: ubuntu-latest
315
+ # Build wheels for each platform using maturin
316
+ build-wheels:
317
+ name: Build wheels (${{ matrix.os }}, ${{ matrix.target }})
318
+ runs-on: ${{ matrix.os }}
308
319
  needs: [security-scan, lint-and-format, test]
309
- if: github.event_name != 'schedule' && !failure()
320
+ if: github.event_name != 'schedule' && !cancelled() && needs.lint-and-format.result == 'success'
321
+ strategy:
322
+ fail-fast: false
323
+ matrix:
324
+ include:
325
+ # Linux x86_64
326
+ - os: ubuntu-latest
327
+ target: x86_64
328
+ manylinux: auto
329
+ # Linux aarch64 (cross-compiled via QEMU)
330
+ - os: ubuntu-latest
331
+ target: aarch64
332
+ manylinux: auto
333
+ # macOS x86_64 (cross-compiled from ARM runner)
334
+ - os: macos-14
335
+ target: x86_64
336
+ # macOS Apple Silicon
337
+ - os: macos-14
338
+ target: aarch64
339
+ # Windows x86_64
340
+ - os: windows-latest
341
+ target: x64
310
342
  steps:
311
343
  - name: Checkout code
312
344
  uses: actions/checkout@v4
313
345
  with:
314
- fetch-depth: 0 # Needed for setuptools_scm
346
+ fetch-depth: 0
347
+
348
+ - name: Set up QEMU (for Linux cross-compilation)
349
+ if: matrix.target == 'aarch64' && runner.os == 'Linux'
350
+ uses: docker/setup-qemu-action@v3
351
+ with:
352
+ platforms: arm64
315
353
 
316
354
  - name: Set up Python
317
355
  uses: actions/setup-python@v5
318
356
  with:
319
357
  python-version: ${{ env.PYTHON_VERSION }}
320
358
 
321
- - name: Install build dependencies
322
- run: |
323
- python -m pip install --upgrade pip
324
- pip install build twine setuptools_scm
359
+ - name: Build wheels with maturin
360
+ uses: PyO3/maturin-action@v1
361
+ with:
362
+ target: ${{ matrix.target }}
363
+ args: --release --out dist --interpreter 3.9 3.10 3.11 3.12 3.13
364
+ manylinux: ${{ matrix.manylinux || 'auto' }}
365
+
366
+ - name: Upload wheel artifacts
367
+ uses: actions/upload-artifact@v4
368
+ with:
369
+ name: wheels-${{ matrix.os }}-${{ matrix.target }}
370
+ path: dist/*.whl
371
+ retention-days: 90
372
+
373
+ # Build source distribution
374
+ build-sdist:
375
+ name: Build sdist
376
+ runs-on: ubuntu-latest
377
+ needs: [security-scan, lint-and-format, test]
378
+ if: github.event_name != 'schedule' && !cancelled() && needs.lint-and-format.result == 'success'
379
+ steps:
380
+ - name: Checkout code
381
+ uses: actions/checkout@v4
382
+ with:
383
+ fetch-depth: 0
325
384
 
326
- - name: Build package
327
- run: python -m build
385
+ - name: Build sdist with maturin
386
+ uses: PyO3/maturin-action@v1
387
+ with:
388
+ command: sdist
389
+ args: --out dist
328
390
 
329
- - name: Check package
330
- run: twine check dist/*
391
+ - name: Upload sdist artifact
392
+ uses: actions/upload-artifact@v4
393
+ with:
394
+ name: sdist
395
+ path: dist/*.tar.gz
396
+ retention-days: 90
331
397
 
332
- - name: Upload build artifacts
398
+ # Merge all build artifacts into a single dist directory
399
+ merge-artifacts:
400
+ name: Merge Build Artifacts
401
+ runs-on: ubuntu-latest
402
+ needs: [build-wheels, build-sdist]
403
+ steps:
404
+ - name: Download all wheel artifacts
405
+ uses: actions/download-artifact@v4
406
+ with:
407
+ pattern: wheels-*
408
+ path: dist
409
+ merge-multiple: true
410
+
411
+ - name: Download sdist artifact
412
+ uses: actions/download-artifact@v4
413
+ with:
414
+ name: sdist
415
+ path: dist
416
+
417
+ - name: List artifacts
418
+ run: ls -lh dist/
419
+
420
+ - name: Upload merged dist
333
421
  uses: actions/upload-artifact@v4
334
422
  with:
335
423
  name: dist
@@ -340,8 +428,10 @@ jobs:
340
428
  release:
341
429
  name: Create Release
342
430
  runs-on: ubuntu-latest
343
- needs: [build]
431
+ needs: [merge-artifacts]
344
432
  if: startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'workflow_dispatch' && github.event.inputs.version)
433
+ permissions:
434
+ contents: write
345
435
  outputs:
346
436
  version: ${{ steps.get-version.outputs.version }}
347
437
  is-prerelease: ${{ steps.check-prerelease.outputs.is-prerelease }}
@@ -441,7 +531,7 @@ jobs:
441
531
  publish-test-pypi:
442
532
  name: Publish to Test PyPI
443
533
  runs-on: ubuntu-latest
444
- needs: [build, release]
534
+ needs: [merge-artifacts, release]
445
535
  if: needs.release.outputs.is-prerelease == 'true'
446
536
  environment:
447
537
  name: test-pypi
@@ -464,7 +554,7 @@ jobs:
464
554
  publish-pypi:
465
555
  name: Publish to PyPI
466
556
  runs-on: ubuntu-latest
467
- needs: [build, release]
557
+ needs: [merge-artifacts, release]
468
558
  if: needs.release.outputs.is-prerelease == 'false' && (startsWith(github.ref, 'refs/tags/v') || github.event_name == 'release')
469
559
  environment:
470
560
  name: pypi
@@ -487,7 +577,7 @@ jobs:
487
577
  notification:
488
578
  name: Workflow Summary
489
579
  runs-on: ubuntu-latest
490
- needs: [security-scan, lint-and-format, test, docs, build, release, publish-test-pypi, publish-pypi]
580
+ needs: [security-scan, lint-and-format, test, docs, build-wheels, build-sdist, merge-artifacts, release, publish-test-pypi, publish-pypi]
491
581
  if: always()
492
582
  steps:
493
583
  - name: Workflow Summary
@@ -530,9 +620,9 @@ jobs:
530
620
  fi
531
621
 
532
622
  # Build Results
533
- if [ "${{ needs.build.result }}" == "success" ]; then
534
- echo "✅ **Package Build**: Successful" >> $GITHUB_STEP_SUMMARY
535
- elif [ "${{ needs.build.result }}" == "skipped" ]; then
623
+ if [ "${{ needs.merge-artifacts.result }}" == "success" ]; then
624
+ echo "✅ **Package Build**: Successful (wheels for all platforms)" >> $GITHUB_STEP_SUMMARY
625
+ elif [ "${{ needs.merge-artifacts.result }}" == "skipped" ]; then
536
626
  echo "⏭️ **Package Build**: Skipped" >> $GITHUB_STEP_SUMMARY
537
627
  else
538
628
  echo "❌ **Package Build**: Failed" >> $GITHUB_STEP_SUMMARY
@@ -32,6 +32,9 @@ jobs:
32
32
  with:
33
33
  python-version: ${{ env.PYTHON_VERSION }}
34
34
 
35
+ - name: Install Rust toolchain
36
+ uses: dtolnay/rust-toolchain@stable
37
+
35
38
  - name: Install quality analysis tools
36
39
  run: |
37
40
  python -m pip install --upgrade pip
@@ -113,6 +116,9 @@ jobs:
113
116
  with:
114
117
  python-version: ${{ env.PYTHON_VERSION }}
115
118
 
119
+ - name: Install Rust toolchain
120
+ uses: dtolnay/rust-toolchain@stable
121
+
116
122
  - name: Install documentation tools
117
123
  run: |
118
124
  python -m pip install --upgrade pip
@@ -166,6 +172,9 @@ jobs:
166
172
  with:
167
173
  python-version: ${{ env.PYTHON_VERSION }}
168
174
 
175
+ - name: Install Rust toolchain
176
+ uses: dtolnay/rust-toolchain@stable
177
+
169
178
  - name: Install dependencies
170
179
  run: |
171
180
  python -m pip install --upgrade pip
@@ -45,6 +45,9 @@ jobs:
45
45
  python -m pip install --upgrade pip
46
46
  pip install safety pip-audit semgrep cyclonedx-bom
47
47
 
48
+ - name: Install Rust toolchain
49
+ uses: dtolnay/rust-toolchain@stable
50
+
48
51
  - name: Install project dependencies
49
52
  run: |
50
53
  pip install -e ".[dev,test]"
@@ -160,6 +163,9 @@ jobs:
160
163
  python -m pip install --upgrade pip
161
164
  pip install pip-licenses licensecheck
162
165
 
166
+ - name: Install Rust toolchain
167
+ uses: dtolnay/rust-toolchain@stable
168
+
163
169
  - name: Install project dependencies
164
170
  run: pip install -e ".[dev]"
165
171
 
@@ -41,6 +41,9 @@ jobs:
41
41
  with:
42
42
  python-version: ${{ env.PYTHON_VERSION }}
43
43
 
44
+ - name: Install Rust toolchain
45
+ uses: dtolnay/rust-toolchain@stable
46
+
44
47
  - name: Install dependencies
45
48
  run: |
46
49
  python -m pip install --upgrade pip
@@ -86,6 +89,9 @@ jobs:
86
89
  with:
87
90
  python-version: ${{ env.PYTHON_VERSION }}
88
91
 
92
+ - name: Install Rust toolchain
93
+ uses: dtolnay/rust-toolchain@stable
94
+
89
95
  - name: Install dependencies
90
96
  run: |
91
97
  python -m pip install --upgrade pip
@@ -155,6 +161,9 @@ jobs:
155
161
  with:
156
162
  python-version: ${{ env.PYTHON_VERSION }}
157
163
 
164
+ - name: Install Rust toolchain
165
+ uses: dtolnay/rust-toolchain@stable
166
+
158
167
  - name: Install dependencies
159
168
  run: |
160
169
  python -m pip install --upgrade pip
@@ -165,7 +165,7 @@ cython_debug/
165
165
  # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166
166
  # and can be added to the global gitignore or merged into this file. For a more nuclear
167
167
  # option (not recommended) you can uncomment the following to ignore the entire idea folder.
168
- #.idea/
168
+ .idea/
169
169
 
170
170
  # Abstra
171
171
  # Abstra is an AI-powered process automation framework.
@@ -207,3 +207,16 @@ trufflehog-results.json
207
207
  .bandit
208
208
  .safety
209
209
  .semgrep
210
+ .vercel
211
+
212
+ # Marketing (internal only)
213
+ marketing/
214
+
215
+ # Studio build artifacts and database
216
+ studio.db
217
+ studio/web/.next/
218
+ studio/web/node_modules/
219
+
220
+ # Extracted repositories (now separate repos)
221
+ doc-site/
222
+ puffinflow-visual-editor/
@@ -11,7 +11,7 @@ repos:
11
11
  - id: check-toml
12
12
 
13
13
  - repo: https://github.com/astral-sh/ruff-pre-commit
14
- rev: v0.1.8
14
+ rev: v0.15.0
15
15
  hooks:
16
16
  - id: ruff
17
17
  args: [--fix]
@@ -0,0 +1,193 @@
1
+ # PuffinFlow Benchmarks
2
+
3
+ Orchestration overhead measured across workflow frameworks using identical workloads. Only framework overhead differs.
4
+
5
+ ---
6
+
7
+ ## Methodology
8
+
9
+ **Workload:** `sum(i*i for i in range(5000))` — a pure CPU computation used identically across all frameworks. This isolates framework orchestration overhead from application logic.
10
+
11
+ **Setup:**
12
+ - Each test runs 20 times (median reported)
13
+ - 3 warmup iterations before measurement
14
+ - Throughput measured over 3-second window
15
+ - Memory measured with `tracemalloc` across 500 sequential workflow executions
16
+ - Import time measured in isolated subprocess (Python startup time subtracted)
17
+ - All frameworks use async execution where supported
18
+
19
+ **Environment:**
20
+ - Python 3.12+
21
+ - PuffinFlow (Rust core via PyO3)
22
+ - LangGraph (latest)
23
+ - LlamaIndex Workflows (latest)
24
+
25
+ **Reproduce:**
26
+ ```bash
27
+ pip install puffinflow langgraph llama-index-core
28
+ python benchmarks/benchmark.py
29
+ ```
30
+
31
+ For JSON output:
32
+ ```bash
33
+ python benchmarks/benchmark.py --json
34
+ ```
35
+
36
+ ---
37
+
38
+ ## Results
39
+
40
+ ### Lightweight Frameworks (async/graph-based)
41
+
42
+ | Test | PuffinFlow | LangGraph | LlamaIndex Workflows |
43
+ |------|-----------|-----------|---------------------|
44
+ | Sequential 3-step | **0.7 ms** | 1.5 ms | 2.0 ms |
45
+ | Sequential 5-step | **1.3 ms** | 2.5 ms | 3.0 ms |
46
+ | Per-step overhead | **0.3 ms** | 0.4 ms | 0.5 ms |
47
+ | Fan-out (3 branches + 1 aggregate) | **1.2 ms** | 3.4 ms | 1.6 ms |
48
+ | Throughput (workflows/sec) | **1,150** | 680 | 430 |
49
+ | Peak memory (500 workflows) | 2.50 MB | 4.93 MB | **0.67 MB** |
50
+ | Import time (cold start) | **252 ms** | 1,000 ms | 1,600 ms |
51
+
52
+ Per-step overhead = `(5-step − 3-step) / 2`. Import time measures `from pkg import ...` with real symbols (e.g. `from puffinflow import Agent, state`) in a cold subprocess, Python startup subtracted.
53
+
54
+ ---
55
+
56
+ ## Key Takeaways
57
+
58
+ ### Latency: 2x faster
59
+
60
+ PuffinFlow's Rust core executes the state machine hot path — transition resolution, state dispatching, context management — in compiled Rust via PyO3. This delivers:
61
+
62
+ - **2x lower latency** on sequential workflows (1.3ms vs 2.5ms for 5 steps)
63
+ - **0.3ms per-step overhead** vs 0.4ms for LangGraph
64
+ - Near-identical performance to raw asyncio for simple chains
65
+
66
+ ### Throughput: 1.7x higher
67
+
68
+ Running workflows back-to-back over a 3-second window:
69
+
70
+ - **PuffinFlow: 1,150 workflows/sec**
71
+ - LangGraph: 680 workflows/sec
72
+ - LlamaIndex: 430 workflows/sec
73
+
74
+ ### Import Time: 4x faster
75
+
76
+ Cold-start import time matters for scripts, tests, notebooks, and CI/CD. The benchmark measures real-world imports with actual symbols (e.g. `from puffinflow import Agent, state`), not bare `import pkg`:
77
+
78
+ - **PuffinFlow: 252ms** (lazy imports — only loads what you use)
79
+ - LangGraph: 1,000ms (nearly 1 second)
80
+ - LlamaIndex: 1,600ms (nearly 2 seconds)
81
+
82
+ PuffinFlow uses a lazy import system (`__getattr__`-based) at every level of the package. Submodules and heavy dependencies like structlog are only imported when first accessed, keeping the import path lean.
83
+
84
+ ### Memory: Competitive
85
+
86
+ PuffinFlow uses 2.50 MB for 500 sequential workflow executions. LlamaIndex is lower at 0.67 MB (lightweight event-driven model). LangGraph uses 4.93 MB. PuffinFlow's memory usage is well-controlled thanks to the Rust core's explicit memory management.
87
+
88
+ ---
89
+
90
+ ## Fan-Out Performance
91
+
92
+ The fan-out benchmark measures a common pattern: one start node dispatching to 3 parallel branches, then aggregating results.
93
+
94
+ | Framework | Fan-out latency |
95
+ |-----------|----------------|
96
+ | **PuffinFlow** | **1.2 ms** |
97
+ | LlamaIndex | 1.6 ms |
98
+ | LangGraph | 3.4 ms |
99
+
100
+ PuffinFlow's `Send` API and reducer system handle parallel dispatch efficiently. The Rust core resolves transitions and merges without Python-level coordination overhead.
101
+
102
+ ---
103
+
104
+ ## What These Numbers Mean in Practice
105
+
106
+ ### For scripts and tests
107
+
108
+ If you import your agent framework 50 times/day (script runs, test runs, notebook restarts):
109
+
110
+ | Framework | Daily import overhead |
111
+ |-----------|---------------------|
112
+ | PuffinFlow | 12.6 seconds |
113
+ | LangGraph | 50.0 seconds |
114
+ | LlamaIndex | 80.0 seconds |
115
+
116
+ ### For CI/CD
117
+
118
+ In CI pipelines, cold-start import time adds directly to build time. PuffinFlow's 252ms import is 4x faster than LangGraph and 6x faster than LlamaIndex.
119
+
120
+ ### For production throughput
121
+
122
+ At 1,150 workflows/sec, PuffinFlow can handle high-frequency agent invocations without becoming a bottleneck. The framework overhead is negligible compared to actual LLM inference time (typically 100ms-10s per call).
123
+
124
+ ---
125
+
126
+ ## Benchmark Architecture
127
+
128
+ ### PuffinFlow benchmark agents
129
+
130
+ ```python
131
+ from puffinflow import Agent, state
132
+
133
+ class SeqAgent(Agent):
134
+ def __init__(self):
135
+ super().__init__("bench-seq")
136
+ for i in range(n_steps):
137
+ name = f"step{i}"
138
+ next_name = f"step{i + 1}" if i < n_steps - 1 else None
139
+
140
+ async def make_fn(ctx, _next=next_name):
141
+ workload()
142
+ return _next
143
+
144
+ make_fn.__name__ = name
145
+ decorated = state()(make_fn)
146
+ self.add_state(name, decorated)
147
+ ```
148
+
149
+ ### LangGraph benchmark graphs
150
+
151
+ ```python
152
+ from langgraph.graph import StateGraph
153
+ from typing_extensions import TypedDict
154
+
155
+ class St(TypedDict):
156
+ value: int
157
+
158
+ builder = StateGraph(St)
159
+ for name in names:
160
+ builder.add_node(name, lambda s: {"value": workload()})
161
+ builder.set_entry_point(names[0])
162
+ for i in range(len(names) - 1):
163
+ builder.add_edge(names[i], names[i + 1])
164
+ builder.set_finish_point(names[-1])
165
+ graph = builder.compile()
166
+ ```
167
+
168
+ Both frameworks execute the same `workload()` function in each step. Only orchestration overhead differs.
169
+
170
+ ---
171
+
172
+ ## Running Your Own Benchmarks
173
+
174
+ ```bash
175
+ # Install all frameworks
176
+ pip install puffinflow langgraph llama-index-core
177
+
178
+ # Run comparison
179
+ python benchmarks/benchmark.py
180
+
181
+ # JSON output (for programmatic analysis)
182
+ python benchmarks/benchmark.py --json
183
+ ```
184
+
185
+ The benchmark source is at [`benchmarks/benchmark.py`](./benchmarks/benchmark.py). It's designed to be transparent and reproducible. Pull requests to improve methodology are welcome.
186
+
187
+ ---
188
+
189
+ ## Notes
190
+
191
+ - **LlamaIndex memory advantage**: LlamaIndex Workflows use a lightweight event-driven model that allocates less per-workflow overhead. This is a genuine strength of their architecture.
192
+ - **Rust core fallback**: If the Rust extension (`_rust_core`) is not available, PuffinFlow falls back to a pure-Python implementation. Performance numbers above are with the Rust core enabled.
193
+ - **Real-world caveat**: In production AI agent workflows, LLM inference time (100ms-10s) dominates total latency. Framework overhead matters most for: (1) high-frequency orchestration, (2) complex multi-step pipelines, (3) CI/CD and testing, (4) import-heavy development workflows.
@@ -0,0 +1,73 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Project Overview
6
+
7
+ PuffinFlow is an async Python workflow orchestration framework for building LLM workflows and multi-agent systems. It uses a src-layout (`src/puffinflow/`) with Python 3.9+ and is built on asyncio, Pydantic v2, and structlog.
8
+
9
+ ## Commands
10
+
11
+ ```bash
12
+ # Install
13
+ pip install -e . # Basic
14
+ pip install -e ".[dev,performance,observability,all]" # Full dev setup
15
+
16
+ # Test
17
+ pytest tests/ -v # All tests
18
+ pytest tests/unit/ -v # Unit tests only
19
+ pytest tests/integration/ -v # Integration tests only
20
+ pytest tests/e2e/ -v # End-to-end tests only
21
+ pytest tests/unit/core/test_agent.py -v # Single file
22
+ pytest tests/unit/core/test_agent.py::TestClass::test_method # Single test
23
+ pytest tests/ --cov=src/puffinflow --cov-report=html # With coverage (85% min)
24
+
25
+ # Lint & Format
26
+ ruff check src/ tests/ benchmarks/ examples/ # Lint
27
+ mypy src/puffinflow/ # Type check (strict mode)
28
+ black src/ tests/ benchmarks/ examples/ # Format
29
+ ruff check --fix src/ tests/ benchmarks/ examples/ # Auto-fix lint issues
30
+
31
+ # Benchmarks
32
+ python benchmarks/benchmark.py # Multi-framework comparison
33
+ python benchmarks/benchmark.py --json # JSON output
34
+
35
+ # Makefile shortcuts
36
+ make dev-test # format → lint → test (full cycle)
37
+ make test # pytest tests/ -v
38
+ make lint # ruff + mypy
39
+ make format # black + ruff --fix
40
+ ```
41
+
42
+ ## Architecture
43
+
44
+ ### Core Module Layout (`src/puffinflow/core/`)
45
+
46
+ - **agent/** — Central abstraction. `Agent` is a state machine where each state is an async function decorated with `@state()`. States return the name of the next state to transition to. `Context` carries variables, outputs, metadata, shared state, and a TTL cache between states.
47
+ - **coordination/** — Multi-agent patterns: `AgentTeam` (messaging + coordination), `AgentPool` (dynamic scaling + work queues), `AgentOrchestrator` (staged execution with strategies like PIPELINE, FAN_OUT, CONDITIONAL). Also includes primitives (locks, barriers, events), rate limiting, and deadlock detection.
48
+ - **resources/** — `ResourcePool` manages CPU/memory/GPU/IO/network allocation across agents. States declare requirements via decorators (`@cpu_intensive`, `@memory_intensive`, etc.). Supports allocation strategies: FIRST_FIT, BEST_FIT, PRIORITY, FAIR_SHARE, ROUND_ROBIN, WEIGHTED.
49
+ - **reliability/** — `CircuitBreaker` (three-state failure protection), `Bulkhead` (concurrency isolation), `ResourceLeakDetector`. States have built-in `RetryPolicy` with exponential backoff and dead-letter support.
50
+ - **observability/** — `ObservableAgent` wraps Agent with automatic Prometheus metrics and OpenTelemetry tracing. Includes alerting (webhooks), buffered event processing, and distributed context propagation.
51
+ - **config.py** — Pydantic Settings with environment variable support. `Settings` for resource limits/concurrency, `Features` for feature flags.
52
+
53
+ ### Key Patterns
54
+
55
+ - **State decorators** define resource requirements inline: `@state(cpu=2.0, memory=512.0, priority="high", timeout=30.0)`
56
+ - **Execution modes**: `SEQUENTIAL` (one state at a time) vs `PARALLEL` (all independent states run concurrently)
57
+ - **Context methods**: `context.set_variable()`/`get_variable()` for state-local data, `context.set_state()`/`get_state()` for shared data, `context.set_typed()` for Pydantic-validated data
58
+ - **State functions** return the next state name as a string, or `None` to end
59
+
60
+ ### Test Organization
61
+
62
+ - `tests/unit/` — Fast tests (<1s each), organized mirroring `src/puffinflow/core/` subdirectories
63
+ - `tests/integration/` — Component interaction tests (1-10s)
64
+ - `tests/e2e/` — Full workflow tests (10-60s)
65
+ - Async mode is `auto` — async test functions are detected automatically without needing `@pytest.mark.asyncio`
66
+ - Markers: `unit`, `integration`, `e2e`, `slow`, `benchmark`, `observability`, `tracing`, `metrics`, `alerting`
67
+
68
+ ## Code Style
69
+
70
+ - Black + Ruff formatting, 88-char line length
71
+ - MyPy strict mode (disallow_untyped_defs, no_implicit_optional, strict_equality)
72
+ - Target Python 3.9 — use `from __future__ import annotations` or `typing_extensions` for newer typing features
73
+ - Version is auto-generated by setuptools_scm into `src/puffinflow/version.py` — do not edit manually