reactifact 0.20.2__tar.gz → 0.21.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 (371) hide show
  1. {reactifact-0.20.2/reactifact.egg-info → reactifact-0.21.0}/PKG-INFO +81 -4
  2. {reactifact-0.20.2 → reactifact-0.21.0}/README.md +77 -3
  3. {reactifact-0.20.2 → reactifact-0.21.0}/pyproject.toml +34 -1
  4. reactifact-0.21.0/reactifact/knowledge/__init__.py +143 -0
  5. reactifact-0.21.0/reactifact/knowledge/_closers.py +25 -0
  6. reactifact-0.21.0/reactifact/knowledge/bridge.py +169 -0
  7. reactifact-0.21.0/reactifact/knowledge/chunk.py +212 -0
  8. reactifact-0.21.0/reactifact/knowledge/connectors.py +137 -0
  9. reactifact-0.21.0/reactifact/knowledge/docstore.py +228 -0
  10. reactifact-0.21.0/reactifact/knowledge/embed.py +253 -0
  11. reactifact-0.21.0/reactifact/knowledge/errors.py +31 -0
  12. reactifact-0.21.0/reactifact/knowledge/extract.py +124 -0
  13. reactifact-0.21.0/reactifact/knowledge/http.py +189 -0
  14. reactifact-0.21.0/reactifact/knowledge/indexes/__init__.py +25 -0
  15. reactifact-0.21.0/reactifact/knowledge/indexes/acl.py +24 -0
  16. reactifact-0.21.0/reactifact/knowledge/indexes/base.py +69 -0
  17. reactifact-0.21.0/reactifact/knowledge/indexes/chroma.py +266 -0
  18. reactifact-0.21.0/reactifact/knowledge/indexes/fusion.py +36 -0
  19. reactifact-0.21.0/reactifact/knowledge/indexes/keyword.py +57 -0
  20. reactifact-0.21.0/reactifact/knowledge/indexes/math.py +21 -0
  21. reactifact-0.21.0/reactifact/knowledge/indexes/memory.py +137 -0
  22. reactifact-0.21.0/reactifact/knowledge/indexes/pgvector.py +331 -0
  23. reactifact-0.21.0/reactifact/knowledge/indexes/qdrant.py +359 -0
  24. reactifact-0.21.0/reactifact/knowledge/indexes/sqlite.py +218 -0
  25. reactifact-0.21.0/reactifact/knowledge/models.py +132 -0
  26. reactifact-0.21.0/reactifact/knowledge/pipeline.py +523 -0
  27. reactifact-0.21.0/reactifact/knowledge/rerank.py +212 -0
  28. reactifact-0.21.0/reactifact/knowledge/templates/knowledge.html +125 -0
  29. reactifact-0.21.0/reactifact/knowledge/web.py +95 -0
  30. {reactifact-0.20.2 → reactifact-0.21.0/reactifact.egg-info}/PKG-INFO +81 -4
  31. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact.egg-info/SOURCES.txt +26 -0
  32. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact.egg-info/requires.txt +5 -0
  33. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_knowledge_web.py +25 -1
  34. {reactifact-0.20.2 → reactifact-0.21.0}/LICENSE +0 -0
  35. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/__init__.py +0 -0
  36. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/__main__.py +0 -0
  37. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/_extras.py +0 -0
  38. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/_httpx.py +0 -0
  39. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/_persistence.py +0 -0
  40. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/a2a/__init__.py +0 -0
  41. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/a2a/client.py +0 -0
  42. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/a2a/models.py +0 -0
  43. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/a2a/remote.py +0 -0
  44. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/a2a/server.py +0 -0
  45. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/agent_tool.py +0 -0
  46. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/agents.py +0 -0
  47. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/artifacts.py +0 -0
  48. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/audit.py +0 -0
  49. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/authz.py +0 -0
  50. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/branching/__init__.py +0 -0
  51. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/branching/ops.py +0 -0
  52. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/branching/store.py +0 -0
  53. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/budget.py +0 -0
  54. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/cache.py +0 -0
  55. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/chat.py +0 -0
  56. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/checkpoints.py +0 -0
  57. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/cli/__init__.py +0 -0
  58. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/cli/branch.py +0 -0
  59. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/cli/common.py +0 -0
  60. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/cli/context.py +0 -0
  61. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/cli/eval.py +0 -0
  62. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/cli/graph.py +0 -0
  63. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/cli/replay.py +0 -0
  64. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/cli/scenario.py +0 -0
  65. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/cli/skills.py +0 -0
  66. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/cli/trace.py +0 -0
  67. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/commit.py +0 -0
  68. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/commit_log.py +0 -0
  69. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/consume.py +0 -0
  70. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/context/__init__.py +0 -0
  71. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/context/context.py +0 -0
  72. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/context/index.py +0 -0
  73. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/context/pending.py +0 -0
  74. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/context/serialization.py +0 -0
  75. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/context_builder.py +0 -0
  76. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/effects.py +0 -0
  77. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/eval/__init__.py +0 -0
  78. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/eval/dataset.py +0 -0
  79. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/eval/evaluators.py +0 -0
  80. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/eval/judge.py +0 -0
  81. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/eval/online.py +0 -0
  82. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/eval/runner.py +0 -0
  83. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/eval/scoring.py +0 -0
  84. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/events.py +0 -0
  85. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/guardrails.py +0 -0
  86. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/interrupt.py +0 -0
  87. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/llm_agent.py +0 -0
  88. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/logging.py +0 -0
  89. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/mcp/__init__.py +0 -0
  90. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/mcp/client.py +0 -0
  91. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/mcp/oauth.py +0 -0
  92. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/mcp/server.py +0 -0
  93. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/metrics.py +0 -0
  94. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/native_tool_use.py +0 -0
  95. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/operations.py +0 -0
  96. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/patches.py +0 -0
  97. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/pricing.py +0 -0
  98. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/produce.py +0 -0
  99. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/prompts.py +0 -0
  100. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/providers/__init__.py +0 -0
  101. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/providers/_retry.py +0 -0
  102. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/providers/anthropic.py +0 -0
  103. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/providers/azure.py +0 -0
  104. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/providers/cerebras.py +0 -0
  105. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/providers/chat.py +0 -0
  106. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/providers/contracts.py +0 -0
  107. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/providers/deepseek.py +0 -0
  108. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/providers/fake.py +0 -0
  109. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/providers/fireworks.py +0 -0
  110. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/providers/gemini.py +0 -0
  111. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/providers/github_models.py +0 -0
  112. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/providers/groq.py +0 -0
  113. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/providers/image.py +0 -0
  114. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/providers/mistral.py +0 -0
  115. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/providers/nvidia.py +0 -0
  116. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/providers/ollama.py +0 -0
  117. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/providers/openai.py +0 -0
  118. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/providers/openrouter.py +0 -0
  119. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/providers/perplexity.py +0 -0
  120. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/providers/qwen.py +0 -0
  121. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/providers/speech.py +0 -0
  122. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/providers/together.py +0 -0
  123. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/providers/video.py +0 -0
  124. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/providers/xai.py +0 -0
  125. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/providers/zai.py +0 -0
  126. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/py.typed +0 -0
  127. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/quick/__init__.py +0 -0
  128. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/quick/_shared.py +0 -0
  129. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/quick/agent.py +0 -0
  130. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/quick/chat.py +0 -0
  131. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/quick/models.py +0 -0
  132. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/quick/rag.py +0 -0
  133. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/quick/tools_agent.py +0 -0
  134. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/quota.py +0 -0
  135. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/recipes/__init__.py +0 -0
  136. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/recipes/cleanup.py +0 -0
  137. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/recipes/conversation.py +0 -0
  138. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/recipes/identity.py +0 -0
  139. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/recipes/inputs.py +0 -0
  140. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/recipes/memory.py +0 -0
  141. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/recipes/plan_execute.py +0 -0
  142. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/recipes/reflection.py +0 -0
  143. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/recipes/resolve.py +0 -0
  144. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/recipes/rollback.py +0 -0
  145. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/recipes/search.py +0 -0
  146. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/recipes/skills.py +0 -0
  147. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/recipes/status.py +0 -0
  148. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/recipes/supervisor.py +0 -0
  149. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/recipes/text.py +0 -0
  150. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/recipes/tool_loop.py +0 -0
  151. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/redaction.py +0 -0
  152. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/relations.py +0 -0
  153. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/replay.py +0 -0
  154. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/request.py +0 -0
  155. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/resources.py +0 -0
  156. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/routing.py +0 -0
  157. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/runtime/__init__.py +0 -0
  158. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/runtime/budget.py +0 -0
  159. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/runtime/loop.py +0 -0
  160. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/runtime/outbox.py +0 -0
  161. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/runtime/patch.py +0 -0
  162. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/runtime/runtime.py +0 -0
  163. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/scheduler.py +0 -0
  164. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/session.py +0 -0
  165. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/skills/reactifact/SKILL.md +0 -0
  166. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/skills/reactifact/references/effects-and-state.md +0 -0
  167. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/skills/reactifact/references/trust-and-safety.md +0 -0
  168. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/skills/reactifact-agents/SKILL.md +0 -0
  169. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/skills/reactifact-agents/references/consume.md +0 -0
  170. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/skills/reactifact-agents/references/effects.md +0 -0
  171. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/skills/reactifact-eval/SKILL.md +0 -0
  172. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/skills/reactifact-eval/references/online.md +0 -0
  173. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/skills/reactifact-from-langchain/SKILL.md +0 -0
  174. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/skills/reactifact-llm/SKILL.md +0 -0
  175. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/skills/reactifact-llm/references/providers.md +0 -0
  176. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/skills/reactifact-llm/references/tools.md +0 -0
  177. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/skills/reactifact-observability/SKILL.md +0 -0
  178. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/skills/reactifact-rag/SKILL.md +0 -0
  179. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/skills/reactifact-rag/references/sources.md +0 -0
  180. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/skills/reactifact-testing/SKILL.md +0 -0
  181. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/sources.py +0 -0
  182. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/step/__init__.py +0 -0
  183. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/step/annotations.py +0 -0
  184. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/step/call.py +0 -0
  185. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/step/core.py +0 -0
  186. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/step/decorator.py +0 -0
  187. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/step/resolve.py +0 -0
  188. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/streaming.py +0 -0
  189. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/structured.py +0 -0
  190. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/testing/__init__.py +0 -0
  191. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/testing/assertions.py +0 -0
  192. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/testing/exceptions.py +0 -0
  193. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/testing/fault.py +0 -0
  194. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/testing/golden.py +0 -0
  195. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/testing/lab.py +0 -0
  196. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/testing/mock.py +0 -0
  197. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/testing/pytest_plugin.py +0 -0
  198. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/testing/record.py +0 -0
  199. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/testing/registry.py +0 -0
  200. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/tool_use.py +0 -0
  201. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/tools/__init__.py +0 -0
  202. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/tools/agent.py +0 -0
  203. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/tools/base.py +0 -0
  204. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/tools/native.py +0 -0
  205. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/tools/use/__init__.py +0 -0
  206. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/tools/use/base.py +0 -0
  207. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/tools/use/blocking.py +0 -0
  208. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/tools/use/hitl.py +0 -0
  209. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/tracing/__init__.py +0 -0
  210. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/tracing/_otlp.py +0 -0
  211. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/tracing/_shared.py +0 -0
  212. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/tracing/columns.py +0 -0
  213. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/tracing/langfuse.py +0 -0
  214. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/tracing/models.py +0 -0
  215. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/tracing/otlp.py +0 -0
  216. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/tracing/postgres.py +0 -0
  217. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/tracing/store.py +0 -0
  218. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/tracing/templates/app.css +0 -0
  219. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/tracing/templates/sessions.html +0 -0
  220. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/tracing/templates/ui.html +0 -0
  221. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/tracing/templates/ui_run.html +0 -0
  222. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/tracing/tracer.py +0 -0
  223. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/tracing/web.py +0 -0
  224. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/triggers.py +0 -0
  225. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/types.py +0 -0
  226. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/verify.py +0 -0
  227. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/viz.py +0 -0
  228. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact/web.py +0 -0
  229. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact.egg-info/dependency_links.txt +0 -0
  230. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact.egg-info/entry_points.txt +0 -0
  231. {reactifact-0.20.2 → reactifact-0.21.0}/reactifact.egg-info/top_level.txt +0 -0
  232. {reactifact-0.20.2 → reactifact-0.21.0}/setup.cfg +0 -0
  233. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_a2a.py +0 -0
  234. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_a2a_interop.py +0 -0
  235. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_absent_consume.py +0 -0
  236. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_agent_tool.py +0 -0
  237. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_anthropic_provider.py +0 -0
  238. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_artifact_store.py +0 -0
  239. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_artifacts.py +0 -0
  240. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_audit.py +0 -0
  241. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_authz.py +0 -0
  242. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_backbone.py +0 -0
  243. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_branching.py +0 -0
  244. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_budget.py +0 -0
  245. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_cache.py +0 -0
  246. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_chat_example.py +0 -0
  247. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_chat_memory.py +0 -0
  248. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_chat_outbox.py +0 -0
  249. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_chat_web.py +0 -0
  250. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_checkpoint.py +0 -0
  251. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_checkpoints_concurrency.py +0 -0
  252. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_cli.py +0 -0
  253. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_cli_scenario.py +0 -0
  254. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_commit_dag.py +0 -0
  255. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_commit_log.py +0 -0
  256. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_compaction.py +0 -0
  257. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_concurrency.py +0 -0
  258. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_consumes_produces.py +0 -0
  259. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_context_at.py +0 -0
  260. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_context_builder.py +0 -0
  261. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_correlated_consume.py +0 -0
  262. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_debounce.py +0 -0
  263. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_determinism.py +0 -0
  264. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_devops.py +0 -0
  265. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_devops_online.py +0 -0
  266. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_devops_web.py +0 -0
  267. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_effects.py +0 -0
  268. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_eval.py +0 -0
  269. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_eval_dataset.py +0 -0
  270. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_eval_judge.py +0 -0
  271. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_eval_online.py +0 -0
  272. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_eval_trajectory.py +0 -0
  273. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_fintech_audit.py +0 -0
  274. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_forklab.py +0 -0
  275. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_forklab_web.py +0 -0
  276. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_friendly_api.py +0 -0
  277. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_gemini_provider.py +0 -0
  278. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_golden.py +0 -0
  279. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_guardrails.py +0 -0
  280. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_hitl.py +0 -0
  281. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_image_provider.py +0 -0
  282. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_invalidation.py +0 -0
  283. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_join_consume.py +0 -0
  284. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_knowledge.py +0 -0
  285. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_lazy_providers.py +0 -0
  286. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_logging.py +0 -0
  287. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_loop_bound_client.py +0 -0
  288. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_mcp.py +0 -0
  289. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_medic_lab.py +0 -0
  290. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_medic_lab_web.py +0 -0
  291. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_metrics.py +0 -0
  292. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_multisource.py +0 -0
  293. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_native_tool_use.py +0 -0
  294. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_openai_provider.py +0 -0
  295. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_outbox.py +0 -0
  296. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_patches.py +0 -0
  297. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_pending_actions.py +0 -0
  298. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_produce_styles.py +0 -0
  299. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_produce_trigger.py +0 -0
  300. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_prompts.py +0 -0
  301. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_provider_auth.py +0 -0
  302. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_provider_retry.py +0 -0
  303. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_providers_integration.py +0 -0
  304. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_public_api.py +0 -0
  305. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_quick.py +0 -0
  306. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_quota.py +0 -0
  307. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_reacts_to.py +0 -0
  308. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_recipe_conversation.py +0 -0
  309. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_recipe_plan_execute.py +0 -0
  310. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_recipe_reflection.py +0 -0
  311. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_recipe_supervisor.py +0 -0
  312. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_recipe_tool_loop.py +0 -0
  313. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_recipes.py +0 -0
  314. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_recipes_inputs.py +0 -0
  315. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_recipes_memory.py +0 -0
  316. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_recipes_skills.py +0 -0
  317. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_redaction.py +0 -0
  318. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_relation_graph.py +0 -0
  319. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_relations.py +0 -0
  320. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_repair.py +0 -0
  321. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_repair_web.py +0 -0
  322. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_replay.py +0 -0
  323. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_repo_agent.py +0 -0
  324. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_request.py +0 -0
  325. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_resources.py +0 -0
  326. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_retry.py +0 -0
  327. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_routing.py +0 -0
  328. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_runtime.py +0 -0
  329. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_runtime_errors.py +0 -0
  330. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_scheduler_semantics.py +0 -0
  331. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_session_append.py +0 -0
  332. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_sessions.py +0 -0
  333. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_shutdown.py +0 -0
  334. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_skills.py +0 -0
  335. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_sources.py +0 -0
  336. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_sources_search.py +0 -0
  337. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_sources_vector.py +0 -0
  338. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_speech_provider.py +0 -0
  339. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_starter_app.py +0 -0
  340. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_step_annotated.py +0 -0
  341. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_step_scope.py +0 -0
  342. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_step_watermark.py +0 -0
  343. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_streaming.py +0 -0
  344. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_structured.py +0 -0
  345. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_testing_assertions.py +0 -0
  346. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_testing_golden.py +0 -0
  347. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_testing_lab.py +0 -0
  348. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_testing_mock.py +0 -0
  349. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_testing_provenance.py +0 -0
  350. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_testing_pytest_plugin.py +0 -0
  351. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_testing_registry.py +0 -0
  352. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_token_budget.py +0 -0
  353. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_tools.py +0 -0
  354. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_tour.py +0 -0
  355. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_trace_columns.py +0 -0
  356. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_trace_limits.py +0 -0
  357. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_trace_tags.py +0 -0
  358. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_trace_ui.py +0 -0
  359. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_tracing.py +0 -0
  360. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_type_registry.py +0 -0
  361. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_vendor_factories.py +0 -0
  362. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_vendor_multimodal_factories.py +0 -0
  363. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_verify.py +0 -0
  364. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_version.py +0 -0
  365. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_video_provider.py +0 -0
  366. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_view.py +0 -0
  367. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_viz.py +0 -0
  368. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_web_source.py +0 -0
  369. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_workspace.py +0 -0
  370. {reactifact-0.20.2 → reactifact-0.21.0}/tests/test_workspace_with_sources.py +0 -0
  371. {reactifact-0.20.2 → reactifact-0.21.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.20.2
3
+ Version: 0.21.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
@@ -30,6 +30,9 @@ 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
32
  Requires-Dist: import-linter>=2.0; extra == "dev"
33
+ Provides-Extra: knowledge
34
+ Provides-Extra: knowledge-chroma
35
+ Requires-Dist: chromadb>=0.5; extra == "knowledge-chroma"
33
36
  Provides-Extra: web
34
37
  Requires-Dist: fastapi>=0.115; extra == "web"
35
38
  Requires-Dist: uvicorn[standard]>=0.30; extra == "web"
@@ -59,7 +62,7 @@ Dynamic: license-file
59
62
  [![Ask DeepWiki](docs/img/deepwiki.svg)](https://deepwiki.com/bzdvdn/reactifact)
60
63
  [![Docs](https://img.shields.io/badge/docs-bzdvdn.github.io%2Freactifact-blue)](https://bzdvdn.github.io/reactifact/)
61
64
 
62
- > **Is:** a Python library (3 core deps) · single-process · typed, versioned artifacts with provenance · deterministic replay · runs offline, no API key
65
+ > **Is:** a Python library (3 core deps) · single-process · typed, versioned artifacts with provenance · deterministic replay · optional code-first knowledge base (SQLite/Qdrant) · runs offline, no API key
63
66
  > **Isn't:** a managed platform · a distributed task queue · a pre-built agent/tool marketplace
64
67
 
65
68
  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.
@@ -134,6 +137,70 @@ Two agents explore independently on their own forks and merge back automatically
134
137
 
135
138
  ![forklab demo: two strategies (depth/breadth) investigate on separate forks and merge cleanly; a second run edits the same artifact on both forks and reactifact raises MergeConflict instead of guessing, then re-merges under an explicit policy.](docs/img/forklab-demo.gif)
136
139
 
140
+ ## Knowledge base: code-first ingestion
141
+
142
+ Agents need a corpus before they can reason over one. The optional
143
+ **`reactifact.knowledge`** layer turns documents into an index — as ordinary
144
+ Python objects, not YAML pipelines, a CLI or a plugin registry:
145
+
146
+ ```python
147
+ from reactifact import RuntimeResources
148
+ from reactifact.knowledge import (
149
+ KnowledgePipeline, ProviderEmbedder, SectionsChunker, SqliteIndex,
150
+ llm_reranker,
151
+ )
152
+ from reactifact.providers import embedder_from_env, llm_from_env
153
+
154
+ resources = RuntimeResources(
155
+ llm=llm_from_env(), # chat: rerank (and answers)
156
+ embedder=embedder_from_env(), # embeddings: index and query
157
+ )
158
+
159
+ pipeline = KnowledgePipeline(
160
+ connector, # source_id + async fetch()
161
+ chunker=SectionsChunker(max_tokens=400, overlap=60),
162
+ embedder=ProviderEmbedder(resources.embedder), # reuse the core provider
163
+ index=SqliteIndex(".reactifact/knowledge.db"), # or QdrantIndex(...)
164
+ )
165
+
166
+ await pipeline.run(incremental=True) # skips unchanged documents
167
+ hits = await pipeline.query(
168
+ "how do I install it?",
169
+ top_k=5,
170
+ hybrid=True,
171
+ rerank=llm_reranker( # optional: reorder/filter
172
+ resources.llm,
173
+ instructions="Prefer runbooks; ignore deprecated docs.",
174
+ ),
175
+ )
176
+ ```
177
+
178
+ It keeps the same boundaries as the rest of reactifact: `reactifact` never
179
+ imports it, it reuses the `EmbeddingProvider` on `RuntimeResources`, and
180
+ `IndexSource` / `IngestStep` are the only explicit bridges into `Source` /
181
+ `Step`. The layer ships `MemoryIndex`, `SqliteIndex`, `QdrantIndex`,
182
+ `PgVectorIndex` (`reactifact[pg]`) and an optional `ChromaIndex`
183
+ (`reactifact[knowledge-chroma]`), incremental `DocStore`
184
+ state, ACL-aware reconciliation, and BM25 + RRF hybrid
185
+ retrieval. No extra runtime dependencies; `FilesystemConnector` is the built-in
186
+ local-docs connector. `rerank=` is a query-time hook for
187
+ domain relevance policy (sync or async); `llm_reranker(resources.llm)` is an
188
+ optional helper that runs on the core chat provider and accepts custom
189
+ `system_prompt` / `instructions` / `user_prompt`.
190
+
191
+ ```bash
192
+ # fully offline: SQLite index + deterministic embedder
193
+ uv run python examples/knowledge_base/build.py --docs docs/en --query "sources"
194
+ # switch to Qdrant with the same pipeline
195
+ uv run python examples/knowledge_base/build.py --docs docs/en --qdrant-url http://localhost:6333
196
+ ```
197
+
198
+ See [Knowledge base](docs/en/knowledge.md) (or [по-русски](docs/ru/knowledge.md))
199
+ for connectors, indexes, incremental state and the bridge APIs. For ops, an
200
+ optional `reactifact.knowledge.web.create_knowledge_router` serves a read-only
201
+ `/knowledge` status page from the `DocStore` ledger — mounted separately from
202
+ the traces dashboard.
203
+
137
204
  <details>
138
205
  <summary><strong>If you know Celery…</strong> — the programming model, not its distributed runtime</summary>
139
206
 
@@ -267,7 +334,7 @@ Full breakdown, including where reactifact is *not* the right choice:
267
334
  - **Patch** — the compiled, validated change-set applied as one atomic commit.
268
335
  - **Step** — the unit of work: declares `consumes`/`produces`, returns its output or writes effects.
269
336
  - **Agent** — a thin container of `steps`; the runtime derives triggers from their `consume` contracts.
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).
337
+ - **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). For corpus ingestion, the optional `knowledge` layer adds connectors, chunking, embeddings and SQLite/Qdrant indexes.
271
338
  - **Provenance** — every derived artifact links to what produced it
272
339
  (`Answer —supported_by→ Claim —derived_from→ Evidence —extracted_from→ Doc`).
273
340
  - **HITL** — humans as `effects.ask(...)` → `PendingQuestion`, answered via `effects.resume(...)` like any agent.
@@ -302,6 +369,13 @@ Full breakdown, including where reactifact is *not* the right choice:
302
369
  — pure and LLM-free, except the summarizer, which takes your callback.
303
370
  - **Viz & CLI** — Mermaid `blueprint`/`context_to_mermaid`/`trace_to_mermaid`;
304
371
  `reactifact` with `graph`/`context`/`trace`/`replay`/`branch`.
372
+ - **Knowledge base (optional)** — code-first
373
+ `Connector -> RawDocument -> Document -> Chunk -> Index`: incremental
374
+ `DocStore`, ACL-aware reconcile, BM25 + RRF hybrid retrieval,
375
+ `MemoryIndex`/`SqliteIndex`/`QdrantIndex`/`PgVectorIndex`, optional
376
+ `ChromaIndex`; reuses core `EmbeddingProvider`s
377
+ and exposes `IndexSource`/`IngestStep` bridges. No YAML, CLI or plugin
378
+ registry (`pip install "reactifact[knowledge]"`).
305
379
 
306
380
  ## Agent Skills
307
381
 
@@ -338,6 +412,7 @@ Prefer a notebook? [![Open in Colab](https://colab.research.google.com/assets/co
338
412
 
339
413
  - `starter_app` — copy-pasteable FastAPI app: structured call, RAG, tools, session chat.
340
414
  - `knowledge` — multi-source chat: search → evidence → claim verification → answer, with CSV calculation.
415
+ - `knowledge_base` — real ingestion: connector → chunks → SQLite/Qdrant, incremental state, hybrid query.
341
416
  - `medic_lab` — hypothesis laboratory: competing hypotheses scored, HITL steering, honest report.
342
417
  - `devops` — HITL tool agents + LLM tool router + trace dashboard.
343
418
  - `repair` — budget-aware replanning (chat/data in Russian by design).
@@ -355,6 +430,7 @@ Prefer a notebook? [![Open in Colab](https://colab.research.google.com/assets/co
355
430
  - [Migrating](docs/en/migrating.md) — from LangGraph / CrewAI / LlamaIndex /
356
431
  plain Python: concept map, port-one-node, interop, checklist.
357
432
  - [Why reactifact](docs/en/why-reactifact.md) — the *design argument*: why effects, why the graph is derived rather than drawn, why determinism.
433
+ - [Knowledge base](docs/en/knowledge.md) — code-first ingestion/retrieval: connectors, incremental state, SQLite/Qdrant, hybrid search ([RU](docs/ru/knowledge.md)).
358
434
  - [Comparison](docs/en/comparison.md) — reactifact vs LangGraph/CrewAI, feature by feature, and when *not* to use reactifact.
359
435
  - [docs/constitution.md](docs/constitution.md) — the full design rationale and invariants.
360
436
  - [Roadmap](docs/roadmap.md) — what's next, and what's deliberately out of scope.
@@ -366,11 +442,12 @@ uv sync --extra dev --extra web
366
442
  .venv/bin/python -m pytest
367
443
  .venv/bin/mypy
368
444
  .venv/bin/ruff check
445
+ npx --yes pyright # static check with the repo's pyproject config
369
446
  ```
370
447
 
371
448
  ## Status & contributing
372
449
 
373
- Active, `0.20.2`, pre-1.0 — the API is stabilizing and `1.0` will freeze it
450
+ Active, `0.21.0`, pre-1.0 — the API is stabilizing and `1.0` will freeze it
374
451
  (see the [roadmap](docs/roadmap.md)); releases follow
375
452
  [Keep a Changelog](CHANGELOG.md). Questions and design discussion live in
376
453
  [GitHub Discussions](https://github.com/bzdvdn/reactifact/discussions); a star,
@@ -12,7 +12,7 @@
12
12
  [![Ask DeepWiki](docs/img/deepwiki.svg)](https://deepwiki.com/bzdvdn/reactifact)
13
13
  [![Docs](https://img.shields.io/badge/docs-bzdvdn.github.io%2Freactifact-blue)](https://bzdvdn.github.io/reactifact/)
14
14
 
15
- > **Is:** a Python library (3 core deps) · single-process · typed, versioned artifacts with provenance · deterministic replay · runs offline, no API key
15
+ > **Is:** a Python library (3 core deps) · single-process · typed, versioned artifacts with provenance · deterministic replay · optional code-first knowledge base (SQLite/Qdrant) · 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
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.
@@ -87,6 +87,70 @@ Two agents explore independently on their own forks and merge back automatically
87
87
 
88
88
  ![forklab demo: two strategies (depth/breadth) investigate on separate forks and merge cleanly; a second run edits the same artifact on both forks and reactifact raises MergeConflict instead of guessing, then re-merges under an explicit policy.](docs/img/forklab-demo.gif)
89
89
 
90
+ ## Knowledge base: code-first ingestion
91
+
92
+ Agents need a corpus before they can reason over one. The optional
93
+ **`reactifact.knowledge`** layer turns documents into an index — as ordinary
94
+ Python objects, not YAML pipelines, a CLI or a plugin registry:
95
+
96
+ ```python
97
+ from reactifact import RuntimeResources
98
+ from reactifact.knowledge import (
99
+ KnowledgePipeline, ProviderEmbedder, SectionsChunker, SqliteIndex,
100
+ llm_reranker,
101
+ )
102
+ from reactifact.providers import embedder_from_env, llm_from_env
103
+
104
+ resources = RuntimeResources(
105
+ llm=llm_from_env(), # chat: rerank (and answers)
106
+ embedder=embedder_from_env(), # embeddings: index and query
107
+ )
108
+
109
+ pipeline = KnowledgePipeline(
110
+ connector, # source_id + async fetch()
111
+ chunker=SectionsChunker(max_tokens=400, overlap=60),
112
+ embedder=ProviderEmbedder(resources.embedder), # reuse the core provider
113
+ index=SqliteIndex(".reactifact/knowledge.db"), # or QdrantIndex(...)
114
+ )
115
+
116
+ await pipeline.run(incremental=True) # skips unchanged documents
117
+ hits = await pipeline.query(
118
+ "how do I install it?",
119
+ top_k=5,
120
+ hybrid=True,
121
+ rerank=llm_reranker( # optional: reorder/filter
122
+ resources.llm,
123
+ instructions="Prefer runbooks; ignore deprecated docs.",
124
+ ),
125
+ )
126
+ ```
127
+
128
+ It keeps the same boundaries as the rest of reactifact: `reactifact` never
129
+ imports it, it reuses the `EmbeddingProvider` on `RuntimeResources`, and
130
+ `IndexSource` / `IngestStep` are the only explicit bridges into `Source` /
131
+ `Step`. The layer ships `MemoryIndex`, `SqliteIndex`, `QdrantIndex`,
132
+ `PgVectorIndex` (`reactifact[pg]`) and an optional `ChromaIndex`
133
+ (`reactifact[knowledge-chroma]`), incremental `DocStore`
134
+ state, ACL-aware reconciliation, and BM25 + RRF hybrid
135
+ retrieval. No extra runtime dependencies; `FilesystemConnector` is the built-in
136
+ local-docs connector. `rerank=` is a query-time hook for
137
+ domain relevance policy (sync or async); `llm_reranker(resources.llm)` is an
138
+ optional helper that runs on the core chat provider and accepts custom
139
+ `system_prompt` / `instructions` / `user_prompt`.
140
+
141
+ ```bash
142
+ # fully offline: SQLite index + deterministic embedder
143
+ uv run python examples/knowledge_base/build.py --docs docs/en --query "sources"
144
+ # switch to Qdrant with the same pipeline
145
+ uv run python examples/knowledge_base/build.py --docs docs/en --qdrant-url http://localhost:6333
146
+ ```
147
+
148
+ See [Knowledge base](docs/en/knowledge.md) (or [по-русски](docs/ru/knowledge.md))
149
+ for connectors, indexes, incremental state and the bridge APIs. For ops, an
150
+ optional `reactifact.knowledge.web.create_knowledge_router` serves a read-only
151
+ `/knowledge` status page from the `DocStore` ledger — mounted separately from
152
+ the traces dashboard.
153
+
90
154
  <details>
91
155
  <summary><strong>If you know Celery…</strong> — the programming model, not its distributed runtime</summary>
92
156
 
@@ -220,7 +284,7 @@ Full breakdown, including where reactifact is *not* the right choice:
220
284
  - **Patch** — the compiled, validated change-set applied as one atomic commit.
221
285
  - **Step** — the unit of work: declares `consumes`/`produces`, returns its output or writes effects.
222
286
  - **Agent** — a thin container of `steps`; the runtime derives triggers from their `consume` contracts.
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).
287
+ - **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). For corpus ingestion, the optional `knowledge` layer adds connectors, chunking, embeddings and SQLite/Qdrant indexes.
224
288
  - **Provenance** — every derived artifact links to what produced it
225
289
  (`Answer —supported_by→ Claim —derived_from→ Evidence —extracted_from→ Doc`).
226
290
  - **HITL** — humans as `effects.ask(...)` → `PendingQuestion`, answered via `effects.resume(...)` like any agent.
@@ -255,6 +319,13 @@ Full breakdown, including where reactifact is *not* the right choice:
255
319
  — pure and LLM-free, except the summarizer, which takes your callback.
256
320
  - **Viz & CLI** — Mermaid `blueprint`/`context_to_mermaid`/`trace_to_mermaid`;
257
321
  `reactifact` with `graph`/`context`/`trace`/`replay`/`branch`.
322
+ - **Knowledge base (optional)** — code-first
323
+ `Connector -> RawDocument -> Document -> Chunk -> Index`: incremental
324
+ `DocStore`, ACL-aware reconcile, BM25 + RRF hybrid retrieval,
325
+ `MemoryIndex`/`SqliteIndex`/`QdrantIndex`/`PgVectorIndex`, optional
326
+ `ChromaIndex`; reuses core `EmbeddingProvider`s
327
+ and exposes `IndexSource`/`IngestStep` bridges. No YAML, CLI or plugin
328
+ registry (`pip install "reactifact[knowledge]"`).
258
329
 
259
330
  ## Agent Skills
260
331
 
@@ -291,6 +362,7 @@ Prefer a notebook? [![Open in Colab](https://colab.research.google.com/assets/co
291
362
 
292
363
  - `starter_app` — copy-pasteable FastAPI app: structured call, RAG, tools, session chat.
293
364
  - `knowledge` — multi-source chat: search → evidence → claim verification → answer, with CSV calculation.
365
+ - `knowledge_base` — real ingestion: connector → chunks → SQLite/Qdrant, incremental state, hybrid query.
294
366
  - `medic_lab` — hypothesis laboratory: competing hypotheses scored, HITL steering, honest report.
295
367
  - `devops` — HITL tool agents + LLM tool router + trace dashboard.
296
368
  - `repair` — budget-aware replanning (chat/data in Russian by design).
@@ -308,6 +380,7 @@ Prefer a notebook? [![Open in Colab](https://colab.research.google.com/assets/co
308
380
  - [Migrating](docs/en/migrating.md) — from LangGraph / CrewAI / LlamaIndex /
309
381
  plain Python: concept map, port-one-node, interop, checklist.
310
382
  - [Why reactifact](docs/en/why-reactifact.md) — the *design argument*: why effects, why the graph is derived rather than drawn, why determinism.
383
+ - [Knowledge base](docs/en/knowledge.md) — code-first ingestion/retrieval: connectors, incremental state, SQLite/Qdrant, hybrid search ([RU](docs/ru/knowledge.md)).
311
384
  - [Comparison](docs/en/comparison.md) — reactifact vs LangGraph/CrewAI, feature by feature, and when *not* to use reactifact.
312
385
  - [docs/constitution.md](docs/constitution.md) — the full design rationale and invariants.
313
386
  - [Roadmap](docs/roadmap.md) — what's next, and what's deliberately out of scope.
@@ -319,11 +392,12 @@ uv sync --extra dev --extra web
319
392
  .venv/bin/python -m pytest
320
393
  .venv/bin/mypy
321
394
  .venv/bin/ruff check
395
+ npx --yes pyright # static check with the repo's pyproject config
322
396
  ```
323
397
 
324
398
  ## Status & contributing
325
399
 
326
- Active, `0.20.2`, pre-1.0 — the API is stabilizing and `1.0` will freeze it
400
+ Active, `0.21.0`, pre-1.0 — the API is stabilizing and `1.0` will freeze it
327
401
  (see the [roadmap](docs/roadmap.md)); releases follow
328
402
  [Keep a Changelog](CHANGELOG.md). Questions and design discussion live in
329
403
  [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.20.2"
7
+ version = "0.21.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"
@@ -43,6 +43,8 @@ dev = [
43
43
  "pytest-cov>=7.1.0",
44
44
  "import-linter>=2.0",
45
45
  ]
46
+ knowledge = [] # code-first knowledge layer; no extra runtime deps
47
+ knowledge-chroma = ["chromadb>=0.5"]
46
48
  web = [
47
49
  "fastapi>=0.115",
48
50
  "uvicorn[standard]>=0.30",
@@ -76,6 +78,7 @@ dev = [
76
78
  "pytest-cov>=7.1.0",
77
79
  "import-linter>=2.0",
78
80
  ]
81
+ knowledge-chroma = ["chromadb>=0.5"]
79
82
  web = [
80
83
  "fastapi>=0.115",
81
84
  "uvicorn[standard]>=0.30",
@@ -109,6 +112,7 @@ packages = { find = { where = ["."], include = ["reactifact*"], exclude = ["exam
109
112
  [tool.setuptools.package-data]
110
113
  reactifact = ["py.typed", "skills/*/SKILL.md", "skills/*/references/*.md"]
111
114
  "reactifact.tracing" = ["templates/*.html", "templates/*.css"]
115
+ "reactifact.knowledge" = ["templates/*.html"]
112
116
 
113
117
  [tool.pytest.ini_options]
114
118
  testpaths = ["tests"]
@@ -238,6 +242,35 @@ forbidden_modules = [
238
242
  "reactifact.a2a",
239
243
  ]
240
244
 
245
+ [[tool.importlinter.contracts]]
246
+ name = "Core stays independent of the optional knowledge layer"
247
+ type = "forbidden"
248
+ allow_indirect_imports = true
249
+ source_modules = [
250
+ "reactifact.artifacts",
251
+ "reactifact.step",
252
+ "reactifact.agents",
253
+ "reactifact.consume",
254
+ "reactifact.effects",
255
+ "reactifact.patches",
256
+ "reactifact.context",
257
+ "reactifact.runtime",
258
+ "reactifact.providers",
259
+ "reactifact.quick",
260
+ "reactifact.recipes",
261
+ "reactifact.chat",
262
+ "reactifact.web",
263
+ "reactifact.cli",
264
+ "reactifact.sources",
265
+ "reactifact.mcp",
266
+ "reactifact.a2a",
267
+ "reactifact.tracing",
268
+ "reactifact.eval",
269
+ "reactifact.testing",
270
+ "reactifact.tools",
271
+ ]
272
+ forbidden_modules = ["reactifact.knowledge"]
273
+
241
274
  [[tool.importlinter.contracts]]
242
275
  name = "Recipes stay independent of app/transport layers"
243
276
  type = "forbidden"
@@ -0,0 +1,143 @@
1
+ """Code-first knowledge ingestion and retrieval for reactifact.
2
+
3
+ This subpackage is an optional capability layer: it never gets imported by
4
+ `reactifact` core. Build a pipeline from explicit collaborators and reuse the
5
+ core embedder already wired into `RuntimeResources`::
6
+
7
+ from reactifact import RuntimeResources
8
+ from reactifact.providers import embedder_from_env
9
+ from reactifact.knowledge import (
10
+ KnowledgePipeline, ProviderEmbedder, SectionsChunker, SqliteIndex,
11
+ )
12
+
13
+ resources = RuntimeResources(embedder=embedder_from_env())
14
+ pipeline = KnowledgePipeline(
15
+ connector,
16
+ chunker=SectionsChunker(max_tokens=400, overlap=60),
17
+ embedder=ProviderEmbedder(resources.embedder),
18
+ index=SqliteIndex("knowledge.db"),
19
+ )
20
+ report = await pipeline.run(incremental=True)
21
+
22
+ There is no YAML loader, CLI, plugin registry or type-string factory: a
23
+ connector is an object, and configuration is ordinary Python.
24
+ """
25
+
26
+ from __future__ import annotations
27
+
28
+ from .bridge import (
29
+ IndexSource,
30
+ IngestReportArtifact,
31
+ IngestRequest,
32
+ IngestStep,
33
+ )
34
+ from .chunk import AutoChunker, Chunker, SectionsChunker, SizeChunker
35
+ from .connectors import Connector, FilesystemConnector, ListingConnector
36
+ from .docstore import DocEntry, DocStore, RunRecord
37
+ from .embed import (
38
+ CachingEmbedder,
39
+ Embedder,
40
+ EmbeddingCache,
41
+ FileEmbeddingCache,
42
+ HashEmbedder,
43
+ InMemoryEmbeddingCache,
44
+ ProviderEmbedder,
45
+ cache_key,
46
+ )
47
+ from .errors import ConfigError, KnowledgeError, PipelineError, SourceError
48
+ from .extract import AutoExtractor, Extractor, HtmlExtractor, MarkdownExtractor
49
+ from .indexes import (
50
+ BatchIndexer,
51
+ ChromaIndex,
52
+ Indexer,
53
+ KeywordIndexer,
54
+ MemoryIndex,
55
+ PgVectorIndex,
56
+ QdrantIndex,
57
+ SqliteIndex,
58
+ reciprocal_rank_fusion,
59
+ )
60
+ from .models import (
61
+ CCT_SCHEMA_VERSION,
62
+ Chunk,
63
+ Document,
64
+ DocumentMeta,
65
+ RawDocument,
66
+ SearchHit,
67
+ Section,
68
+ content_hash,
69
+ )
70
+ from .pipeline import IngestReport, KnowledgePipeline, PipelineResult, query, run
71
+ from .rerank import (
72
+ DEFAULT_RERANK_SYSTEM,
73
+ RERANK_OUTPUT_CONTRACT,
74
+ RerankFn,
75
+ RerankPrompt,
76
+ RerankResult,
77
+ apply_rerank,
78
+ llm_reranker,
79
+ render_rerank_prompt,
80
+ )
81
+
82
+ __all__ = [
83
+ "AutoChunker",
84
+ "AutoExtractor",
85
+ "BatchIndexer",
86
+ "CCT_SCHEMA_VERSION",
87
+ "CachingEmbedder",
88
+ "ChromaIndex",
89
+ "Chunk",
90
+ "Chunker",
91
+ "ConfigError",
92
+ "Connector",
93
+ "DEFAULT_RERANK_SYSTEM",
94
+ "DocEntry",
95
+ "DocStore",
96
+ "Document",
97
+ "DocumentMeta",
98
+ "Embedder",
99
+ "EmbeddingCache",
100
+ "Extractor",
101
+ "FilesystemConnector",
102
+ "FileEmbeddingCache",
103
+ "HashEmbedder",
104
+ "HtmlExtractor",
105
+ "InMemoryEmbeddingCache",
106
+ "IndexSource",
107
+ "Indexer",
108
+ "IngestReport",
109
+ "IngestReportArtifact",
110
+ "IngestRequest",
111
+ "IngestStep",
112
+ "KeywordIndexer",
113
+ "KnowledgeError",
114
+ "KnowledgePipeline",
115
+ "ListingConnector",
116
+ "MarkdownExtractor",
117
+ "MemoryIndex",
118
+ "PipelineError",
119
+ "PgVectorIndex",
120
+ "PipelineResult",
121
+ "ProviderEmbedder",
122
+ "RERANK_OUTPUT_CONTRACT",
123
+ "RerankFn",
124
+ "RerankPrompt",
125
+ "RerankResult",
126
+ "QdrantIndex",
127
+ "RawDocument",
128
+ "RunRecord",
129
+ "SearchHit",
130
+ "Section",
131
+ "SectionsChunker",
132
+ "SizeChunker",
133
+ "SourceError",
134
+ "SqliteIndex",
135
+ "apply_rerank",
136
+ "cache_key",
137
+ "llm_reranker",
138
+ "content_hash",
139
+ "query",
140
+ "reciprocal_rank_fusion",
141
+ "render_rerank_prompt",
142
+ "run",
143
+ ]
@@ -0,0 +1,25 @@
1
+ """Typed access to optional close hooks on collaborators."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from collections.abc import Awaitable, Callable
6
+ from typing import cast
7
+
8
+
9
+ def aclose_of(value: object) -> Callable[[], Awaitable[None]] | None:
10
+ """The object's async `aclose`, if it has one."""
11
+ closer = getattr(value, "aclose", None)
12
+ if not callable(closer):
13
+ return None
14
+ return cast(Callable[[], Awaitable[None]], closer)
15
+
16
+
17
+ def close_of(value: object) -> Callable[[], None] | None:
18
+ """The object's sync `close`, if it has one."""
19
+ closer = getattr(value, "close", None)
20
+ if not callable(closer):
21
+ return None
22
+ return cast(Callable[[], None], closer)
23
+
24
+
25
+ __all__ = ["aclose_of", "close_of"]