reactifact 0.17.1__tar.gz → 0.20.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 (358) hide show
  1. {reactifact-0.17.1/reactifact.egg-info → reactifact-0.20.0}/PKG-INFO +28 -55
  2. {reactifact-0.17.1 → reactifact-0.20.0}/README.md +26 -54
  3. {reactifact-0.17.1 → reactifact-0.20.0}/pyproject.toml +89 -1
  4. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/__init__.py +15 -1
  5. reactifact-0.20.0/reactifact/_persistence.py +151 -0
  6. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/a2a/remote.py +27 -11
  7. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/a2a/server.py +1 -1
  8. reactifact-0.20.0/reactifact/agent_tool.py +5 -0
  9. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/agents.py +175 -35
  10. reactifact-0.20.0/reactifact/artifacts.py +444 -0
  11. reactifact-0.20.0/reactifact/branching/__init__.py +19 -0
  12. reactifact-0.17.1/reactifact/branching.py → reactifact-0.20.0/reactifact/branching/ops.py +45 -87
  13. reactifact-0.20.0/reactifact/branching/store.py +65 -0
  14. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/chat.py +6 -2
  15. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/commit.py +56 -7
  16. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/commit_log.py +89 -13
  17. reactifact-0.20.0/reactifact/context/__init__.py +16 -0
  18. {reactifact-0.17.1/reactifact → reactifact-0.20.0/reactifact/context}/context.py +223 -275
  19. reactifact-0.20.0/reactifact/context/index.py +80 -0
  20. reactifact-0.20.0/reactifact/context/pending.py +121 -0
  21. reactifact-0.20.0/reactifact/context/serialization.py +303 -0
  22. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/effects.py +8 -7
  23. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/interrupt.py +2 -2
  24. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/llm_agent.py +12 -12
  25. reactifact-0.20.0/reactifact/native_tool_use.py +21 -0
  26. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/operations.py +65 -50
  27. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/patches.py +1 -1
  28. reactifact-0.20.0/reactifact/produce.py +56 -0
  29. reactifact-0.20.0/reactifact/providers/__init__.py +218 -0
  30. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/quick/_shared.py +6 -5
  31. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/quick/agent.py +56 -23
  32. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/quick/rag.py +92 -45
  33. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/quick/tools_agent.py +2 -2
  34. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/recipes/__init__.py +6 -5
  35. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/recipes/cleanup.py +15 -10
  36. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/recipes/conversation.py +34 -16
  37. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/recipes/identity.py +6 -5
  38. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/recipes/memory.py +13 -15
  39. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/recipes/plan_execute.py +22 -18
  40. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/recipes/reflection.py +29 -24
  41. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/recipes/search.py +1 -1
  42. reactifact-0.20.0/reactifact/recipes/status.py +128 -0
  43. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/recipes/supervisor.py +21 -18
  44. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/recipes/tool_loop.py +3 -3
  45. reactifact-0.20.0/reactifact/runtime/__init__.py +19 -0
  46. reactifact-0.20.0/reactifact/runtime/budget.py +112 -0
  47. reactifact-0.20.0/reactifact/runtime/loop.py +35 -0
  48. reactifact-0.20.0/reactifact/runtime/outbox.py +92 -0
  49. reactifact-0.20.0/reactifact/runtime/patch.py +146 -0
  50. {reactifact-0.17.1/reactifact → reactifact-0.20.0/reactifact/runtime}/runtime.py +71 -348
  51. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/skills/reactifact/SKILL.md +55 -54
  52. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/skills/reactifact-agents/SKILL.md +32 -36
  53. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/skills/reactifact-eval/SKILL.md +11 -6
  54. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/skills/reactifact-from-langchain/SKILL.md +13 -9
  55. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/skills/reactifact-llm/SKILL.md +5 -5
  56. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/skills/reactifact-llm/references/tools.md +1 -1
  57. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/skills/reactifact-observability/SKILL.md +11 -6
  58. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/skills/reactifact-rag/SKILL.md +11 -11
  59. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/skills/reactifact-testing/SKILL.md +7 -6
  60. reactifact-0.20.0/reactifact/step/__init__.py +34 -0
  61. reactifact-0.20.0/reactifact/step/annotations.py +61 -0
  62. reactifact-0.20.0/reactifact/step/call.py +112 -0
  63. reactifact-0.20.0/reactifact/step/core.py +466 -0
  64. reactifact-0.20.0/reactifact/step/decorator.py +78 -0
  65. reactifact-0.20.0/reactifact/step/resolve.py +183 -0
  66. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/structured.py +2 -0
  67. reactifact-0.20.0/reactifact/tool_use.py +17 -0
  68. reactifact-0.20.0/reactifact/tools/__init__.py +33 -0
  69. reactifact-0.17.1/reactifact/agent_tool.py → reactifact-0.20.0/reactifact/tools/agent.py +7 -7
  70. reactifact-0.17.1/reactifact/tools.py → reactifact-0.20.0/reactifact/tools/base.py +6 -1
  71. reactifact-0.17.1/reactifact/native_tool_use.py → reactifact-0.20.0/reactifact/tools/native.py +3 -3
  72. reactifact-0.20.0/reactifact/tools/use/__init__.py +13 -0
  73. reactifact-0.20.0/reactifact/tools/use/base.py +126 -0
  74. reactifact-0.20.0/reactifact/tools/use/blocking.py +260 -0
  75. reactifact-0.17.1/reactifact/tool_use.py → reactifact-0.20.0/reactifact/tools/use/hitl.py +49 -389
  76. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/tracing/__init__.py +2 -0
  77. reactifact-0.20.0/reactifact/tracing/_shared.py +149 -0
  78. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/tracing/langfuse.py +6 -4
  79. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/tracing/models.py +17 -7
  80. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/tracing/otlp.py +3 -2
  81. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/tracing/postgres.py +27 -96
  82. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/tracing/store.py +20 -100
  83. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/tracing/templates/app.css +56 -0
  84. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/tracing/templates/ui_run.html +133 -34
  85. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/tracing/tracer.py +30 -9
  86. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/verify.py +14 -11
  87. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/viz.py +23 -9
  88. {reactifact-0.17.1 → reactifact-0.20.0/reactifact.egg-info}/PKG-INFO +28 -55
  89. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact.egg-info/SOURCES.txt +38 -12
  90. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact.egg-info/requires.txt +1 -0
  91. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_absent_consume.py +1 -1
  92. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_agent_tool.py +3 -3
  93. reactifact-0.20.0/tests/test_artifact_store.py +209 -0
  94. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_artifacts.py +23 -20
  95. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_chat_web.py +76 -1
  96. reactifact-0.20.0/tests/test_commit_dag.py +72 -0
  97. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_consumes_produces.py +5 -5
  98. reactifact-0.20.0/tests/test_context_at.py +81 -0
  99. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_context_builder.py +2 -2
  100. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_correlated_consume.py +1 -1
  101. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_debounce.py +1 -1
  102. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_effects.py +2 -11
  103. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_join_consume.py +1 -1
  104. reactifact-0.20.0/tests/test_lazy_providers.py +22 -0
  105. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_outbox.py +1 -3
  106. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_produce_styles.py +19 -10
  107. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_produce_trigger.py +5 -5
  108. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_public_api.py +9 -0
  109. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_reacts_to.py +4 -4
  110. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_recipe_conversation.py +19 -0
  111. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_recipe_supervisor.py +1 -1
  112. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_recipes.py +6 -6
  113. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_repair.py +66 -1
  114. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_replay.py +2 -2
  115. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_repo_agent.py +1 -1
  116. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_runtime_errors.py +2 -2
  117. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_session_append.py +49 -5
  118. reactifact-0.20.0/tests/test_step_annotated.py +111 -0
  119. reactifact-0.20.0/tests/test_step_scope.py +231 -0
  120. reactifact-0.20.0/tests/test_step_watermark.py +118 -0
  121. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_streaming.py +1 -1
  122. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_testing_lab.py +1 -1
  123. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_tools.py +14 -14
  124. reactifact-0.20.0/tests/test_tour.py +55 -0
  125. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_trace_ui.py +11 -2
  126. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_tracing.py +70 -0
  127. reactifact-0.20.0/tests/test_version.py +9 -0
  128. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_viz.py +4 -2
  129. reactifact-0.17.1/reactifact/_persistence.py +0 -78
  130. reactifact-0.17.1/reactifact/artifacts.py +0 -155
  131. reactifact-0.17.1/reactifact/produce.py +0 -369
  132. reactifact-0.17.1/reactifact/providers/__init__.py +0 -153
  133. reactifact-0.17.1/reactifact/recipes/status.py +0 -74
  134. reactifact-0.17.1/tests/test_a2a_example.py +0 -16
  135. reactifact-0.17.1/tests/test_adaptive.py +0 -255
  136. reactifact-0.17.1/tests/test_canonical_ports.py +0 -65
  137. reactifact-0.17.1/tests/test_incident_commander.py +0 -114
  138. reactifact-0.17.1/tests/test_llm_ladder.py +0 -108
  139. reactifact-0.17.1/tests/test_ports.py +0 -110
  140. reactifact-0.17.1/tests/test_research.py +0 -81
  141. reactifact-0.17.1/tests/test_support_copilot.py +0 -52
  142. {reactifact-0.17.1 → reactifact-0.20.0}/LICENSE +0 -0
  143. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/__main__.py +0 -0
  144. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/_extras.py +0 -0
  145. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/_httpx.py +0 -0
  146. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/a2a/__init__.py +0 -0
  147. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/a2a/client.py +0 -0
  148. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/a2a/models.py +0 -0
  149. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/audit.py +0 -0
  150. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/authz.py +0 -0
  151. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/budget.py +0 -0
  152. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/cache.py +0 -0
  153. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/checkpoints.py +0 -0
  154. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/cli/__init__.py +0 -0
  155. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/cli/branch.py +0 -0
  156. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/cli/common.py +0 -0
  157. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/cli/context.py +0 -0
  158. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/cli/eval.py +0 -0
  159. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/cli/graph.py +0 -0
  160. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/cli/replay.py +0 -0
  161. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/cli/scenario.py +0 -0
  162. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/cli/skills.py +0 -0
  163. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/cli/trace.py +0 -0
  164. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/consume.py +0 -0
  165. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/context_builder.py +0 -0
  166. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/eval/__init__.py +0 -0
  167. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/eval/dataset.py +0 -0
  168. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/eval/evaluators.py +0 -0
  169. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/eval/judge.py +0 -0
  170. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/eval/online.py +0 -0
  171. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/eval/runner.py +0 -0
  172. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/eval/scoring.py +0 -0
  173. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/events.py +0 -0
  174. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/guardrails.py +0 -0
  175. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/logging.py +0 -0
  176. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/mcp/__init__.py +0 -0
  177. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/mcp/client.py +0 -0
  178. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/mcp/oauth.py +0 -0
  179. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/mcp/server.py +0 -0
  180. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/metrics.py +0 -0
  181. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/pricing.py +0 -0
  182. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/prompts.py +0 -0
  183. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/providers/_retry.py +0 -0
  184. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/providers/anthropic.py +0 -0
  185. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/providers/azure.py +0 -0
  186. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/providers/cerebras.py +0 -0
  187. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/providers/chat.py +0 -0
  188. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/providers/contracts.py +0 -0
  189. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/providers/deepseek.py +0 -0
  190. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/providers/fake.py +0 -0
  191. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/providers/fireworks.py +0 -0
  192. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/providers/gemini.py +0 -0
  193. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/providers/github_models.py +0 -0
  194. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/providers/groq.py +0 -0
  195. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/providers/image.py +0 -0
  196. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/providers/mistral.py +0 -0
  197. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/providers/nvidia.py +0 -0
  198. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/providers/ollama.py +0 -0
  199. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/providers/openai.py +0 -0
  200. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/providers/openrouter.py +0 -0
  201. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/providers/perplexity.py +0 -0
  202. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/providers/qwen.py +0 -0
  203. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/providers/speech.py +0 -0
  204. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/providers/together.py +0 -0
  205. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/providers/video.py +0 -0
  206. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/providers/xai.py +0 -0
  207. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/providers/zai.py +0 -0
  208. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/py.typed +0 -0
  209. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/quick/__init__.py +0 -0
  210. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/quick/chat.py +0 -0
  211. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/quick/models.py +0 -0
  212. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/quota.py +0 -0
  213. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/recipes/inputs.py +0 -0
  214. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/recipes/resolve.py +0 -0
  215. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/recipes/rollback.py +0 -0
  216. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/recipes/skills.py +0 -0
  217. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/recipes/text.py +0 -0
  218. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/redaction.py +0 -0
  219. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/relations.py +0 -0
  220. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/replay.py +0 -0
  221. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/request.py +0 -0
  222. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/resources.py +0 -0
  223. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/routing.py +0 -0
  224. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/scheduler.py +0 -0
  225. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/session.py +0 -0
  226. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/skills/reactifact/references/effects-and-state.md +0 -0
  227. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/skills/reactifact/references/trust-and-safety.md +0 -0
  228. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/skills/reactifact-agents/references/consume.md +0 -0
  229. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/skills/reactifact-agents/references/effects.md +0 -0
  230. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/skills/reactifact-eval/references/online.md +0 -0
  231. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/skills/reactifact-llm/references/providers.md +0 -0
  232. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/skills/reactifact-rag/references/sources.md +0 -0
  233. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/sources.py +0 -0
  234. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/streaming.py +0 -0
  235. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/testing/__init__.py +0 -0
  236. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/testing/assertions.py +0 -0
  237. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/testing/exceptions.py +0 -0
  238. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/testing/fault.py +0 -0
  239. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/testing/golden.py +0 -0
  240. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/testing/lab.py +0 -0
  241. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/testing/mock.py +0 -0
  242. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/testing/pytest_plugin.py +0 -0
  243. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/testing/record.py +0 -0
  244. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/testing/registry.py +0 -0
  245. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/tracing/_otlp.py +0 -0
  246. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/tracing/columns.py +0 -0
  247. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/tracing/templates/sessions.html +0 -0
  248. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/tracing/templates/ui.html +0 -0
  249. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/tracing/web.py +0 -0
  250. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/triggers.py +0 -0
  251. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/types.py +0 -0
  252. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact/web.py +0 -0
  253. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact.egg-info/dependency_links.txt +0 -0
  254. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact.egg-info/entry_points.txt +0 -0
  255. {reactifact-0.17.1 → reactifact-0.20.0}/reactifact.egg-info/top_level.txt +0 -0
  256. {reactifact-0.17.1 → reactifact-0.20.0}/setup.cfg +0 -0
  257. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_a2a.py +0 -0
  258. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_a2a_interop.py +0 -0
  259. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_anthropic_provider.py +0 -0
  260. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_audit.py +0 -0
  261. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_authz.py +0 -0
  262. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_backbone.py +0 -0
  263. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_branching.py +0 -0
  264. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_budget.py +0 -0
  265. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_cache.py +0 -0
  266. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_chat_example.py +0 -0
  267. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_chat_memory.py +0 -0
  268. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_chat_outbox.py +0 -0
  269. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_checkpoint.py +0 -0
  270. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_checkpoints_concurrency.py +0 -0
  271. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_cli.py +0 -0
  272. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_cli_scenario.py +0 -0
  273. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_commit_log.py +0 -0
  274. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_compaction.py +0 -0
  275. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_concurrency.py +0 -0
  276. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_determinism.py +0 -0
  277. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_devops.py +0 -0
  278. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_devops_online.py +0 -0
  279. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_devops_web.py +0 -0
  280. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_eval.py +0 -0
  281. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_eval_dataset.py +0 -0
  282. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_eval_judge.py +0 -0
  283. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_eval_online.py +0 -0
  284. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_eval_trajectory.py +0 -0
  285. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_fintech_audit.py +0 -0
  286. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_forklab.py +0 -0
  287. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_forklab_web.py +0 -0
  288. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_friendly_api.py +0 -0
  289. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_gemini_provider.py +0 -0
  290. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_golden.py +0 -0
  291. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_guardrails.py +0 -0
  292. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_hitl.py +0 -0
  293. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_image_provider.py +0 -0
  294. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_invalidation.py +0 -0
  295. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_knowledge.py +0 -0
  296. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_knowledge_web.py +0 -0
  297. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_logging.py +0 -0
  298. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_loop_bound_client.py +0 -0
  299. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_mcp.py +0 -0
  300. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_medic_lab.py +0 -0
  301. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_medic_lab_web.py +0 -0
  302. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_metrics.py +0 -0
  303. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_multisource.py +0 -0
  304. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_native_tool_use.py +0 -0
  305. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_openai_provider.py +0 -0
  306. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_patches.py +0 -0
  307. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_pending_actions.py +0 -0
  308. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_prompts.py +0 -0
  309. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_provider_auth.py +0 -0
  310. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_provider_retry.py +0 -0
  311. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_providers_integration.py +0 -0
  312. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_quick.py +0 -0
  313. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_quota.py +0 -0
  314. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_recipe_plan_execute.py +0 -0
  315. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_recipe_reflection.py +0 -0
  316. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_recipe_tool_loop.py +0 -0
  317. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_recipes_inputs.py +0 -0
  318. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_recipes_memory.py +0 -0
  319. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_recipes_skills.py +0 -0
  320. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_redaction.py +0 -0
  321. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_relation_graph.py +0 -0
  322. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_relations.py +0 -0
  323. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_repair_web.py +0 -0
  324. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_request.py +0 -0
  325. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_resources.py +0 -0
  326. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_retry.py +0 -0
  327. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_routing.py +0 -0
  328. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_runtime.py +0 -0
  329. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_scheduler_semantics.py +0 -0
  330. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_sessions.py +0 -0
  331. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_shutdown.py +0 -0
  332. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_skills.py +0 -0
  333. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_sources.py +0 -0
  334. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_sources_search.py +0 -0
  335. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_sources_vector.py +0 -0
  336. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_speech_provider.py +0 -0
  337. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_starter_app.py +0 -0
  338. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_structured.py +0 -0
  339. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_testing_assertions.py +0 -0
  340. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_testing_golden.py +0 -0
  341. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_testing_mock.py +0 -0
  342. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_testing_provenance.py +0 -0
  343. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_testing_pytest_plugin.py +0 -0
  344. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_testing_registry.py +0 -0
  345. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_token_budget.py +0 -0
  346. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_trace_columns.py +0 -0
  347. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_trace_limits.py +0 -0
  348. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_trace_tags.py +0 -0
  349. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_type_registry.py +0 -0
  350. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_vendor_factories.py +0 -0
  351. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_vendor_multimodal_factories.py +0 -0
  352. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_verify.py +0 -0
  353. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_video_provider.py +0 -0
  354. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_view.py +0 -0
  355. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_web_source.py +0 -0
  356. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_workspace.py +0 -0
  357. {reactifact-0.17.1 → reactifact-0.20.0}/tests/test_workspace_with_sources.py +0 -0
  358. {reactifact-0.17.1 → reactifact-0.20.0}/tests/tests_checkpoints_sqlite.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reactifact
3
- Version: 0.17.1
3
+ Version: 0.20.0
4
4
  Summary: Reactive, artifact-driven agent runtime: agents transform versioned, typed, provenance-aware artifacts inside an evolving context
5
5
  License-Expression: MIT
6
6
  Project-URL: Homepage, https://github.com/bzdvdn/reactifact
@@ -29,6 +29,7 @@ Requires-Dist: ruff>=0.8; extra == "dev"
29
29
  Requires-Dist: mypy>=1.11; extra == "dev"
30
30
  Requires-Dist: pytest>=9.1.1; extra == "dev"
31
31
  Requires-Dist: pytest-cov>=7.1.0; extra == "dev"
32
+ Requires-Dist: import-linter>=2.0; extra == "dev"
32
33
  Provides-Extra: web
33
34
  Requires-Dist: fastapi>=0.115; extra == "web"
34
35
  Requires-Dist: uvicorn[standard]>=0.30; extra == "web"
@@ -45,7 +46,7 @@ Requires-Dist: mkdocstrings[python]>=0.27; extra == "docs"
45
46
  Dynamic: license-file
46
47
 
47
48
  <p align="center">
48
- <img src="docs/img/reactifact-hero.png" alt="reactifact — Agents that react to artifacts, not graphs" width="800">
49
+ <img src="docs/img/reactifact-hero.png" alt="reactifact — typed artifacts, reactive steps, auditable state" width="800">
49
50
  </p>
50
51
 
51
52
  **Auditable agents for Python.** Build **knowledge assistants** over docs, spreadsheets and the web — where the path per question isn't a graph you can draw. Every answer is computed, versioned and reproducible — not a string you have to trust.
@@ -61,7 +62,7 @@ Dynamic: license-file
61
62
  > **Is:** a Python library (3 core deps) · single-process · typed, versioned artifacts with provenance · deterministic replay · runs offline, no API key
62
63
  > **Isn't:** a managed platform · a distributed task queue · a pre-built agent/tool marketplace
63
64
 
64
- A question like *"why did infra costs jump in Q2?"* needs a spreadsheet, a policy doc and a page off the web — and the *next* question needs a different subset. That is not one graph you can draw up front. You declare what artifacts exist and what agents can do with them; the runtime derives the order from state.
65
+ A question like *"why did infra costs jump in Q2?"* needs a spreadsheet, a policy doc and a page off the web — and the *next* question needs a different subset. That is not one graph you can draw up front. You declare what artifacts exist and what agents can do with them; the runtime derives the order — and the dependency graph — from state. You don't draw the graph.
65
66
 
66
67
  Every derived artifact then links to what produced it
67
68
  (`Answer —supported_by→ Evidence —extracted_from→ Doc`), so *"why did it say
@@ -97,11 +98,11 @@ a queryable graph (`context.related(answer.id, "supported_by")`), not a log line
97
98
 
98
99
  The number is computed, and its provenance recorded, in plain Python — the model
99
100
  is never the source of truth (trimmed from
100
- [`examples/fintech_audit/produce.py`](examples/fintech_audit/produce.py)):
101
+ [`examples/fintech_audit/steps.py`](examples/fintech_audit/steps.py)):
101
102
 
102
103
  ```python
103
- @produce(Variance, reacts_to=Spend) # wakes when a Spend artifact exists
104
- async def compute_variance(call: ProduceCall) -> None:
104
+ @step(produces=Variance, consumes=Spend) # wakes when a Spend artifact exists
105
+ async def compute_variance(call: StepCall) -> None:
105
106
  spend = call.trigger # the artifact that triggered this run
106
107
  budget = cloud_budget(call.context) # read from budget.csv
107
108
  pct = (spend.data.total - budget) / budget # deterministic — never the model
@@ -144,10 +145,10 @@ derives what runs next from state.
144
145
 
145
146
  | Celery | reactifact |
146
147
  | --- | --- |
147
- | a task | `@produce(Model)` — a unit of work that writes an artifact |
148
+ | a task | `Step` / `@step(produces=Model, consumes=Input)` — a unit of work that writes an artifact |
148
149
  | `delay()` / `apply_async()` | you don't call it: creating the input artifact **is** the trigger |
149
150
  | routing key / queue | `Consume(Type)` — which artifact type wakes the task |
150
- | chain / group / chord | several `consumes` / `produces`; the runtime derives the order |
151
+ | chain / group / chord | several step `Consume`s / `produces`; the runtime derives the order |
151
152
  | result backend | the `Context` — typed, versioned artifacts |
152
153
  | worker | `Runtime` |
153
154
 
@@ -170,7 +171,7 @@ from:
170
171
  ```python
171
172
  from pydantic import BaseModel
172
173
 
173
- from reactifact import Budget, Consume, Context, Runtime, RuntimeResources, create_agent, produce
174
+ from reactifact import Budget, Context, Runtime, RuntimeResources, create_agent, step
174
175
 
175
176
 
176
177
  class Question(BaseModel):
@@ -191,26 +192,22 @@ DOCS = {
191
192
  }
192
193
 
193
194
 
194
- @produce(Evidence)
195
+ @step(produces=Evidence, consumes=Question)
195
196
  async def find_evidence(call):
196
- question = next((a for a in call.inputs if isinstance(a.data, Question)), None)
197
- if question is None:
198
- return None
197
+ question = call.trigger
199
198
  hit = next((v for k, v in DOCS.items() if k in question.data.text.lower()), None)
200
199
  if hit is not None:
201
200
  call.effects.create(Evidence(text=hit))
202
201
 
203
202
 
204
- @produce(Answer)
203
+ @step(produces=Answer, consumes=Evidence)
205
204
  async def answer_from_evidence(call):
206
- evidence = next((a for a in call.inputs if isinstance(a.data, Evidence)), None)
207
- if evidence is None:
208
- return None
205
+ evidence = call.trigger
209
206
  call.effects.create(Answer(text=evidence.data.text)).link("supported_by", evidence)
210
207
 
211
208
 
212
- search_agent = create_agent("search", consumes=[Consume(Question)], produces=[find_evidence])
213
- answer_agent = create_agent("answer", consumes=[Consume(Evidence)], produces=[answer_from_evidence])
209
+ search_agent = create_agent("search", steps=[find_evidence])
210
+ answer_agent = create_agent("answer", steps=[answer_from_evidence])
214
211
 
215
212
  ctx = Context(resources=RuntimeResources())
216
213
  runtime = Runtime(ctx, agents=[search_agent, answer_agent], budget=Budget(max_runs=10))
@@ -230,13 +227,13 @@ print("supported_by:", evidence.data.text) # provenance you can trace, not just
230
227
  ARTIFACT CREATED / UPDATED
231
228
  │
232
229
  ▼
233
- AGENTS REACT ──self.effects──► Effects ──compile──► Patch
230
+ AGENTS REACT ──effects──► Effects ──compile──► Patch
234
231
  ▲ │
235
232
  └──────────────────────────────────────────────────────┘
236
233
  Context v+1
237
234
  ```
238
235
 
239
- A produce writes what should change (`self.effects.create/update/link/ask`) and
236
+ A step writes what should change (`effects.create/update/link/ask`) and
240
237
  returns `None`; the runtime compiles the effect set into one **atomic** `Patch`
241
238
  and moves the context to the next version. The `event` that wakes an agent is
242
239
  *derived* from that same change — the causal chain can never drift from the
@@ -262,31 +259,14 @@ Reactive. Deterministic. Accountable.
262
259
  Full breakdown, including where reactifact is *not* the right choice:
263
260
  [docs/en/comparison.md](docs/en/comparison.md).
264
261
 
265
- **Proof, not a claim** — [`examples/ledger`](examples/ledger) is a 4-artifact
266
- billing calc (`LaborCost`, `Tax`, `Discount`, `Total`) with no LLM, fully
267
- offline. Edit *one* fact and see what actually reruns:
268
-
269
- ```text
270
- >>> editing ONLY TaxRate (0.08 -> 0.12) — a fact nothing about
271
- >>> LaborCost or Discount ever consumed.
272
-
273
- LaborCost value=500.0 version=0 # untouched
274
- Tax value=60.0 version=1 # recomputed
275
- Discount value=25.0 version=0 # untouched
276
- Total value=535.0 version=1 # recomputed
277
- ```
278
-
279
- 2 of 4 artifacts recompute — the 2 that actually depend on `TaxRate` —
280
- because `Artifact.version` tracks real consumption, not a graph edge you drew
281
- by hand. Run it yourself: `uv run python -m examples.ledger.main`.
282
-
283
262
  ## Core primitives
284
263
 
285
264
  - **Context** — versioned working state, git-like commits, `diff`/`rollback`/`merge`.
286
265
  - **Artifact** — a first-class typed object (`Claim`, `Evidence`, `Answer`), not a string blob.
287
- - **Effects** — an agent states its change via `self.effects.create/update/link/ask`; the runtime compiles it.
266
+ - **Effects** — an agent states its change via `effects.create/update/link/ask`; the runtime compiles it.
288
267
  - **Patch** — the compiled, validated change-set applied as one atomic commit.
289
- - **Agent** — a thin container declaring `consumes`/`produces`; logic lives in a `Produce`.
268
+ - **Step** — the unit of work: declares `consumes`/`produces`, returns its output or writes effects.
269
+ - **Agent** — a thin container of `steps`; the runtime derives triggers from their `consume` contracts.
290
270
  - **Source** — retrieval is a capability: vector search is *one* strategy, not the only one; filesystem, CSV, and the web are equally first-class today (direct API, keyword, and SQL sources are on the [roadmap](docs/roadmap.md#next), not yet shipped).
291
271
  - **Provenance** — every derived artifact links to what produced it
292
272
  (`Answer —supported_by→ Claim —derived_from→ Evidence —extracted_from→ Doc`).
@@ -345,31 +325,25 @@ Skills: `reactifact` (mental model), `reactifact-agents`, `reactifact-llm`,
345
325
  Offline-capable, no API keys required (deterministic fallbacks):
346
326
 
347
327
  ```bash
348
- uv run python ./examples/llm_ladder/level1.py # the simplest LLM turn (offline too)
328
+ uv run python ./examples/knowledge/web.py # multi-source RAG + evidence + CSV calc
349
329
  uv run python ./examples/repair/web.py # room renovation: plan, estimate, CSV export
350
330
  uv run python ./examples/devops/web.py # HITL ops assistant + trace dashboard
331
+ uv run python -m examples.starter_app.app # copy-pasteable FastAPI app
351
332
  ```
352
333
 
353
- Classic-pattern ports run as one-liners too:
354
- `python -m examples.{reflection,map_reduce,supervisor,summarize,time_travel,plan_execute,adaptive,ledger,outbox}.main`.
355
-
356
334
  Prefer a notebook? [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/bzdvdn/reactifact/blob/master/examples/quickstart.ipynb)
357
335
  — `examples/quickstart.ipynb` covers the four `quick` cases (`agent`/`rag`/`tools_agent`/`chat_agent`), offline by default.
358
336
 
359
337
  ## Examples (in-repo, not shipped)
360
338
 
339
+ - `starter_app` — copy-pasteable FastAPI app: structured call, RAG, tools, session chat.
361
340
  - `knowledge` — multi-source chat: search → evidence → claim verification → answer, with CSV calculation.
362
- - `research` — goes to the web (`WebSource`): lazy page fetch → evidence → verified claims → answer with URL provenance.
363
- - `medic-lab` — hypothesis laboratory: competing hypotheses scored, HITL steering, honest report.
341
+ - `medic_lab` — hypothesis laboratory: competing hypotheses scored, HITL steering, honest report.
364
342
  - `devops` — HITL tool agents + LLM tool router + trace dashboard.
365
343
  - `repair` — budget-aware replanning (chat/data in Russian by design).
366
344
  - `chat` — minimal offline single-model multi-turn conversation (`Conversation` + bounded `ChatMemory`).
367
345
  - `forklab` — deterministic branch & merge: two strategies on their own forks, three-way merge.
368
- - `ledger` — offline proof of reactive recompute: edit one fact, only its real `Consume`rs re-run.
369
- - `outbox` — one intent, one send: `effects.act(...)` + `Runtime(dispatcher=...)`, safe across replays, retries and merged branches (§42).
370
- - `llm_ladder` — the workflow from one LLM call to state-changing patches (3 levels).
371
- - `adaptive` — hybrid scheduler: rule filters + deterministic rank + LLM tie-break + `rank_limit`.
372
- - `{reflection,map_reduce,supervisor,summarize,time_travel,plan_execute}` — canonical ports (see [port-matrix](docs/en/port-matrix.md)).
346
+ - `fintech_audit` — auditable, reproducible CSV answer with content hashes and provenance.
373
347
 
374
348
  ## Documentation
375
349
 
@@ -380,9 +354,8 @@ Prefer a notebook? [![Open in Colab](https://colab.research.google.com/assets/co
380
354
  [Colab notebook](examples/quickstart.ipynb).
381
355
  - [Migrating](docs/en/migrating.md) — from LangGraph / CrewAI / LlamaIndex /
382
356
  plain Python: concept map, port-one-node, interop, checklist.
383
- - [Why reactifact](docs/en/why-reactifact.md) — the *design argument*: why effects, why no graph, why determinism.
357
+ - [Why reactifact](docs/en/why-reactifact.md) — the *design argument*: why effects, why the graph is derived rather than drawn, why determinism.
384
358
  - [Comparison](docs/en/comparison.md) — reactifact vs LangGraph/CrewAI, feature by feature, and when *not* to use reactifact.
385
- - [Tutorial · llm-ladder](docs/en/examples.md#tutorial-ladder) — learn the workflow.
386
359
  - [docs/constitution.md](docs/constitution.md) — the full design rationale and invariants.
387
360
  - [Roadmap](docs/roadmap.md) — what's next, and what's deliberately out of scope.
388
361
 
@@ -397,7 +370,7 @@ uv sync --extra dev --extra web
397
370
 
398
371
  ## Status & contributing
399
372
 
400
- Active, `0.15.x`, pre-1.0 — the API is stabilizing and `1.0` will freeze it
373
+ Active, `0.20.0`, pre-1.0 — the API is stabilizing and `1.0` will freeze it
401
374
  (see the [roadmap](docs/roadmap.md)); releases follow
402
375
  [Keep a Changelog](CHANGELOG.md). Questions and design discussion live in
403
376
  [GitHub Discussions](https://github.com/bzdvdn/reactifact/discussions); a star,
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <img src="docs/img/reactifact-hero.png" alt="reactifact — Agents that react to artifacts, not graphs" width="800">
2
+ <img src="docs/img/reactifact-hero.png" alt="reactifact — typed artifacts, reactive steps, auditable state" width="800">
3
3
  </p>
4
4
 
5
5
  **Auditable agents for Python.** Build **knowledge assistants** over docs, spreadsheets and the web — where the path per question isn't a graph you can draw. Every answer is computed, versioned and reproducible — not a string you have to trust.
@@ -15,7 +15,7 @@
15
15
  > **Is:** a Python library (3 core deps) · single-process · typed, versioned artifacts with provenance · deterministic replay · runs offline, no API key
16
16
  > **Isn't:** a managed platform · a distributed task queue · a pre-built agent/tool marketplace
17
17
 
18
- A question like *"why did infra costs jump in Q2?"* needs a spreadsheet, a policy doc and a page off the web — and the *next* question needs a different subset. That is not one graph you can draw up front. You declare what artifacts exist and what agents can do with them; the runtime derives the order from state.
18
+ A question like *"why did infra costs jump in Q2?"* needs a spreadsheet, a policy doc and a page off the web — and the *next* question needs a different subset. That is not one graph you can draw up front. You declare what artifacts exist and what agents can do with them; the runtime derives the order — and the dependency graph — from state. You don't draw the graph.
19
19
 
20
20
  Every derived artifact then links to what produced it
21
21
  (`Answer —supported_by→ Evidence —extracted_from→ Doc`), so *"why did it say
@@ -51,11 +51,11 @@ a queryable graph (`context.related(answer.id, "supported_by")`), not a log line
51
51
 
52
52
  The number is computed, and its provenance recorded, in plain Python — the model
53
53
  is never the source of truth (trimmed from
54
- [`examples/fintech_audit/produce.py`](examples/fintech_audit/produce.py)):
54
+ [`examples/fintech_audit/steps.py`](examples/fintech_audit/steps.py)):
55
55
 
56
56
  ```python
57
- @produce(Variance, reacts_to=Spend) # wakes when a Spend artifact exists
58
- async def compute_variance(call: ProduceCall) -> None:
57
+ @step(produces=Variance, consumes=Spend) # wakes when a Spend artifact exists
58
+ async def compute_variance(call: StepCall) -> None:
59
59
  spend = call.trigger # the artifact that triggered this run
60
60
  budget = cloud_budget(call.context) # read from budget.csv
61
61
  pct = (spend.data.total - budget) / budget # deterministic — never the model
@@ -98,10 +98,10 @@ derives what runs next from state.
98
98
 
99
99
  | Celery | reactifact |
100
100
  | --- | --- |
101
- | a task | `@produce(Model)` — a unit of work that writes an artifact |
101
+ | a task | `Step` / `@step(produces=Model, consumes=Input)` — a unit of work that writes an artifact |
102
102
  | `delay()` / `apply_async()` | you don't call it: creating the input artifact **is** the trigger |
103
103
  | routing key / queue | `Consume(Type)` — which artifact type wakes the task |
104
- | chain / group / chord | several `consumes` / `produces`; the runtime derives the order |
104
+ | chain / group / chord | several step `Consume`s / `produces`; the runtime derives the order |
105
105
  | result backend | the `Context` — typed, versioned artifacts |
106
106
  | worker | `Runtime` |
107
107
 
@@ -124,7 +124,7 @@ from:
124
124
  ```python
125
125
  from pydantic import BaseModel
126
126
 
127
- from reactifact import Budget, Consume, Context, Runtime, RuntimeResources, create_agent, produce
127
+ from reactifact import Budget, Context, Runtime, RuntimeResources, create_agent, step
128
128
 
129
129
 
130
130
  class Question(BaseModel):
@@ -145,26 +145,22 @@ DOCS = {
145
145
  }
146
146
 
147
147
 
148
- @produce(Evidence)
148
+ @step(produces=Evidence, consumes=Question)
149
149
  async def find_evidence(call):
150
- question = next((a for a in call.inputs if isinstance(a.data, Question)), None)
151
- if question is None:
152
- return None
150
+ question = call.trigger
153
151
  hit = next((v for k, v in DOCS.items() if k in question.data.text.lower()), None)
154
152
  if hit is not None:
155
153
  call.effects.create(Evidence(text=hit))
156
154
 
157
155
 
158
- @produce(Answer)
156
+ @step(produces=Answer, consumes=Evidence)
159
157
  async def answer_from_evidence(call):
160
- evidence = next((a for a in call.inputs if isinstance(a.data, Evidence)), None)
161
- if evidence is None:
162
- return None
158
+ evidence = call.trigger
163
159
  call.effects.create(Answer(text=evidence.data.text)).link("supported_by", evidence)
164
160
 
165
161
 
166
- search_agent = create_agent("search", consumes=[Consume(Question)], produces=[find_evidence])
167
- answer_agent = create_agent("answer", consumes=[Consume(Evidence)], produces=[answer_from_evidence])
162
+ search_agent = create_agent("search", steps=[find_evidence])
163
+ answer_agent = create_agent("answer", steps=[answer_from_evidence])
168
164
 
169
165
  ctx = Context(resources=RuntimeResources())
170
166
  runtime = Runtime(ctx, agents=[search_agent, answer_agent], budget=Budget(max_runs=10))
@@ -184,13 +180,13 @@ print("supported_by:", evidence.data.text) # provenance you can trace, not just
184
180
  ARTIFACT CREATED / UPDATED
185
181
  │
186
182
  ▼
187
- AGENTS REACT ──self.effects──► Effects ──compile──► Patch
183
+ AGENTS REACT ──effects──► Effects ──compile──► Patch
188
184
  ▲ │
189
185
  └──────────────────────────────────────────────────────┘
190
186
  Context v+1
191
187
  ```
192
188
 
193
- A produce writes what should change (`self.effects.create/update/link/ask`) and
189
+ A step writes what should change (`effects.create/update/link/ask`) and
194
190
  returns `None`; the runtime compiles the effect set into one **atomic** `Patch`
195
191
  and moves the context to the next version. The `event` that wakes an agent is
196
192
  *derived* from that same change — the causal chain can never drift from the
@@ -216,31 +212,14 @@ Reactive. Deterministic. Accountable.
216
212
  Full breakdown, including where reactifact is *not* the right choice:
217
213
  [docs/en/comparison.md](docs/en/comparison.md).
218
214
 
219
- **Proof, not a claim** — [`examples/ledger`](examples/ledger) is a 4-artifact
220
- billing calc (`LaborCost`, `Tax`, `Discount`, `Total`) with no LLM, fully
221
- offline. Edit *one* fact and see what actually reruns:
222
-
223
- ```text
224
- >>> editing ONLY TaxRate (0.08 -> 0.12) — a fact nothing about
225
- >>> LaborCost or Discount ever consumed.
226
-
227
- LaborCost value=500.0 version=0 # untouched
228
- Tax value=60.0 version=1 # recomputed
229
- Discount value=25.0 version=0 # untouched
230
- Total value=535.0 version=1 # recomputed
231
- ```
232
-
233
- 2 of 4 artifacts recompute — the 2 that actually depend on `TaxRate` —
234
- because `Artifact.version` tracks real consumption, not a graph edge you drew
235
- by hand. Run it yourself: `uv run python -m examples.ledger.main`.
236
-
237
215
  ## Core primitives
238
216
 
239
217
  - **Context** — versioned working state, git-like commits, `diff`/`rollback`/`merge`.
240
218
  - **Artifact** — a first-class typed object (`Claim`, `Evidence`, `Answer`), not a string blob.
241
- - **Effects** — an agent states its change via `self.effects.create/update/link/ask`; the runtime compiles it.
219
+ - **Effects** — an agent states its change via `effects.create/update/link/ask`; the runtime compiles it.
242
220
  - **Patch** — the compiled, validated change-set applied as one atomic commit.
243
- - **Agent** — a thin container declaring `consumes`/`produces`; logic lives in a `Produce`.
221
+ - **Step** — the unit of work: declares `consumes`/`produces`, returns its output or writes effects.
222
+ - **Agent** — a thin container of `steps`; the runtime derives triggers from their `consume` contracts.
244
223
  - **Source** — retrieval is a capability: vector search is *one* strategy, not the only one; filesystem, CSV, and the web are equally first-class today (direct API, keyword, and SQL sources are on the [roadmap](docs/roadmap.md#next), not yet shipped).
245
224
  - **Provenance** — every derived artifact links to what produced it
246
225
  (`Answer —supported_by→ Claim —derived_from→ Evidence —extracted_from→ Doc`).
@@ -299,31 +278,25 @@ Skills: `reactifact` (mental model), `reactifact-agents`, `reactifact-llm`,
299
278
  Offline-capable, no API keys required (deterministic fallbacks):
300
279
 
301
280
  ```bash
302
- uv run python ./examples/llm_ladder/level1.py # the simplest LLM turn (offline too)
281
+ uv run python ./examples/knowledge/web.py # multi-source RAG + evidence + CSV calc
303
282
  uv run python ./examples/repair/web.py # room renovation: plan, estimate, CSV export
304
283
  uv run python ./examples/devops/web.py # HITL ops assistant + trace dashboard
284
+ uv run python -m examples.starter_app.app # copy-pasteable FastAPI app
305
285
  ```
306
286
 
307
- Classic-pattern ports run as one-liners too:
308
- `python -m examples.{reflection,map_reduce,supervisor,summarize,time_travel,plan_execute,adaptive,ledger,outbox}.main`.
309
-
310
287
  Prefer a notebook? [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/bzdvdn/reactifact/blob/master/examples/quickstart.ipynb)
311
288
  — `examples/quickstart.ipynb` covers the four `quick` cases (`agent`/`rag`/`tools_agent`/`chat_agent`), offline by default.
312
289
 
313
290
  ## Examples (in-repo, not shipped)
314
291
 
292
+ - `starter_app` — copy-pasteable FastAPI app: structured call, RAG, tools, session chat.
315
293
  - `knowledge` — multi-source chat: search → evidence → claim verification → answer, with CSV calculation.
316
- - `research` — goes to the web (`WebSource`): lazy page fetch → evidence → verified claims → answer with URL provenance.
317
- - `medic-lab` — hypothesis laboratory: competing hypotheses scored, HITL steering, honest report.
294
+ - `medic_lab` — hypothesis laboratory: competing hypotheses scored, HITL steering, honest report.
318
295
  - `devops` — HITL tool agents + LLM tool router + trace dashboard.
319
296
  - `repair` — budget-aware replanning (chat/data in Russian by design).
320
297
  - `chat` — minimal offline single-model multi-turn conversation (`Conversation` + bounded `ChatMemory`).
321
298
  - `forklab` — deterministic branch & merge: two strategies on their own forks, three-way merge.
322
- - `ledger` — offline proof of reactive recompute: edit one fact, only its real `Consume`rs re-run.
323
- - `outbox` — one intent, one send: `effects.act(...)` + `Runtime(dispatcher=...)`, safe across replays, retries and merged branches (§42).
324
- - `llm_ladder` — the workflow from one LLM call to state-changing patches (3 levels).
325
- - `adaptive` — hybrid scheduler: rule filters + deterministic rank + LLM tie-break + `rank_limit`.
326
- - `{reflection,map_reduce,supervisor,summarize,time_travel,plan_execute}` — canonical ports (see [port-matrix](docs/en/port-matrix.md)).
299
+ - `fintech_audit` — auditable, reproducible CSV answer with content hashes and provenance.
327
300
 
328
301
  ## Documentation
329
302
 
@@ -334,9 +307,8 @@ Prefer a notebook? [![Open in Colab](https://colab.research.google.com/assets/co
334
307
  [Colab notebook](examples/quickstart.ipynb).
335
308
  - [Migrating](docs/en/migrating.md) — from LangGraph / CrewAI / LlamaIndex /
336
309
  plain Python: concept map, port-one-node, interop, checklist.
337
- - [Why reactifact](docs/en/why-reactifact.md) — the *design argument*: why effects, why no graph, why determinism.
310
+ - [Why reactifact](docs/en/why-reactifact.md) — the *design argument*: why effects, why the graph is derived rather than drawn, why determinism.
338
311
  - [Comparison](docs/en/comparison.md) — reactifact vs LangGraph/CrewAI, feature by feature, and when *not* to use reactifact.
339
- - [Tutorial · llm-ladder](docs/en/examples.md#tutorial-ladder) — learn the workflow.
340
312
  - [docs/constitution.md](docs/constitution.md) — the full design rationale and invariants.
341
313
  - [Roadmap](docs/roadmap.md) — what's next, and what's deliberately out of scope.
342
314
 
@@ -351,7 +323,7 @@ uv sync --extra dev --extra web
351
323
 
352
324
  ## Status & contributing
353
325
 
354
- Active, `0.15.x`, pre-1.0 — the API is stabilizing and `1.0` will freeze it
326
+ Active, `0.20.0`, pre-1.0 — the API is stabilizing and `1.0` will freeze it
355
327
  (see the [roadmap](docs/roadmap.md)); releases follow
356
328
  [Keep a Changelog](CHANGELOG.md). Questions and design discussion live in
357
329
  [GitHub Discussions](https://github.com/bzdvdn/reactifact/discussions); a star,
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "reactifact"
7
- version = "0.17.1"
7
+ version = "0.20.0"
8
8
  description = "Reactive, artifact-driven agent runtime: agents transform versioned, typed, provenance-aware artifacts inside an evolving context"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -41,6 +41,7 @@ dev = [
41
41
  "mypy>=1.11",
42
42
  "pytest>=9.1.1",
43
43
  "pytest-cov>=7.1.0",
44
+ "import-linter>=2.0",
44
45
  ]
45
46
  web = [
46
47
  "fastapi>=0.115",
@@ -73,6 +74,7 @@ dev = [
73
74
  "mypy>=1.11",
74
75
  "pytest>=9.1.1",
75
76
  "pytest-cov>=7.1.0",
77
+ "import-linter>=2.0",
76
78
  ]
77
79
  web = [
78
80
  "fastapi>=0.115",
@@ -164,3 +166,89 @@ warn_unused_ignores = true
164
166
  # "unknown import symbol" and cascading into false positives on `RunOutcome`.
165
167
  [tool.pyright]
166
168
  pythonVersion = "3.11"
169
+ include = ["reactifact", "examples"]
170
+ venvPath = "."
171
+ venv = ".venv"
172
+ exclude = ["build", "dist", ".venv", ".scratch", "**/__pycache__"]
173
+
174
+
175
+ [tool.importlinter]
176
+ root_packages = ["reactifact"]
177
+
178
+ [[tool.importlinter.contracts]]
179
+ name = "Core primitives do not import the runtime or adapters"
180
+ type = "forbidden"
181
+ allow_indirect_imports = true
182
+ source_modules = [
183
+ "reactifact.artifacts",
184
+ "reactifact.step",
185
+ "reactifact.agents",
186
+ "reactifact.consume",
187
+ "reactifact.effects",
188
+ "reactifact.patches",
189
+ "reactifact.commit",
190
+ "reactifact.commit_log",
191
+ "reactifact.relations",
192
+ "reactifact.triggers",
193
+ ]
194
+ forbidden_modules = [
195
+ "reactifact.runtime",
196
+ "reactifact.providers",
197
+ "reactifact.tracing",
198
+ "reactifact.chat",
199
+ "reactifact.web",
200
+ "reactifact.quick",
201
+ "reactifact.recipes",
202
+ "reactifact.mcp",
203
+ "reactifact.a2a",
204
+ "reactifact.testing",
205
+ ]
206
+
207
+ [[tool.importlinter.contracts]]
208
+ name = "Context does not import the runtime or higher-level adapters"
209
+ type = "forbidden"
210
+ allow_indirect_imports = true
211
+ source_modules = ["reactifact.context"]
212
+ forbidden_modules = [
213
+ "reactifact.runtime",
214
+ "reactifact.chat",
215
+ "reactifact.web",
216
+ "reactifact.quick",
217
+ "reactifact.recipes",
218
+ "reactifact.mcp",
219
+ "reactifact.a2a",
220
+ "reactifact.testing",
221
+ "reactifact.tracing",
222
+ ]
223
+
224
+ [[tool.importlinter.contracts]]
225
+ name = "Providers stay independent of agent/runtime layers"
226
+ type = "forbidden"
227
+ allow_indirect_imports = true
228
+ source_modules = ["reactifact.providers"]
229
+ forbidden_modules = [
230
+ "reactifact.runtime",
231
+ "reactifact.chat",
232
+ "reactifact.web",
233
+ "reactifact.quick",
234
+ "reactifact.recipes",
235
+ "reactifact.testing",
236
+ "reactifact.tracing",
237
+ "reactifact.mcp",
238
+ "reactifact.a2a",
239
+ ]
240
+
241
+ [[tool.importlinter.contracts]]
242
+ name = "Recipes stay independent of app/transport layers"
243
+ type = "forbidden"
244
+ allow_indirect_imports = true
245
+ source_modules = ["reactifact.recipes"]
246
+ forbidden_modules = [
247
+ "reactifact.chat",
248
+ "reactifact.web",
249
+ "reactifact.quick",
250
+ "reactifact.tracing",
251
+ "reactifact.mcp",
252
+ "reactifact.a2a",
253
+ "reactifact.testing",
254
+ ]
@@ -21,6 +21,9 @@ of the names you see by default even though they were always cheap to import
21
21
  `reactifact._extras`).
22
22
  """
23
23
 
24
+ from importlib.metadata import PackageNotFoundError as _PackageNotFoundError
25
+ from importlib.metadata import version as _distribution_version
26
+
24
27
  from .agents import Agent, create_agent
25
28
  from .artifacts import Artifact
26
29
  from .branching import MergeConflict
@@ -47,11 +50,15 @@ from .request import current_request
47
50
  from .resources import ResourceKey, ResourceScope, RuntimeResources
48
51
  from .runtime import Runtime
49
52
  from .session import Session, SessionStore
53
+ from .step import Latest, Scope, Step, StepCall, Wakes, When, step
50
54
  from .tools import FunctionTool, Tool, ToolError, ToolOutput, tool
51
55
  from .triggers import Trigger
52
56
  from .types import register as register_type
53
57
 
54
- __version__ = "0.17.1"
58
+ try:
59
+ __version__ = _distribution_version("reactifact")
60
+ except _PackageNotFoundError: # source checkout without an installed distribution
61
+ __version__ = "0.0.0"
55
62
 
56
63
  __all__ = [
57
64
  "Agent",
@@ -70,6 +77,7 @@ __all__ = [
70
77
  "FakeLLM",
71
78
  "FunctionTool",
72
79
  "Handle",
80
+ "Latest",
73
81
  "Link",
74
82
  "Message",
75
83
  "MergeConflict",
@@ -78,11 +86,14 @@ __all__ = [
78
86
  "PendingQuestion",
79
87
  "Produce",
80
88
  "ProduceCall",
89
+ "Step",
90
+ "StepCall",
81
91
  "Relation",
82
92
  "ResourceKey",
83
93
  "ResourceScope",
84
94
  "RunOutcome",
85
95
  "RunStats",
96
+ "Scope",
86
97
  "Runtime",
87
98
  "RuntimeResources",
88
99
  "LLMProvider",
@@ -98,6 +109,8 @@ __all__ = [
98
109
  "Unlink",
99
110
  "Update",
100
111
  "View",
112
+ "Wakes",
113
+ "When",
101
114
  "bind",
102
115
  "configure_logging",
103
116
  "consume",
@@ -106,5 +119,6 @@ __all__ = [
106
119
  "get_logger",
107
120
  "produce",
108
121
  "register_type",
122
+ "step",
109
123
  "tool",
110
124
  ]