selectools 0.24.0__tar.gz → 0.25.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 (309) hide show
  1. {selectools-0.24.0/src/selectools.egg-info → selectools-0.25.0}/PKG-INFO +28 -10
  2. {selectools-0.24.0 → selectools-0.25.0}/README.md +27 -9
  3. {selectools-0.24.0 → selectools-0.25.0}/pyproject.toml +1 -1
  4. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/__init__.py +29 -3
  5. selectools-0.25.0/src/selectools/_json_utils.py +37 -0
  6. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/a2a/__init__.py +2 -0
  7. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/a2a/client.py +2 -0
  8. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/a2a/server.py +5 -4
  9. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/a2a/types.py +2 -0
  10. selectools-0.25.0/src/selectools/agent/__init__.py +10 -0
  11. selectools-0.25.0/src/selectools/agent/_planning.py +405 -0
  12. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/agent/_tool_executor.py +676 -100
  13. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/agent/config.py +117 -33
  14. selectools-0.25.0/src/selectools/agent/config_groups.py +253 -0
  15. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/agent/core.py +105 -32
  16. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/analytics.py +3 -0
  17. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/audit.py +2 -0
  18. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/cache.py +8 -2
  19. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/cache_redis.py +4 -0
  20. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/cache_semantic.py +4 -0
  21. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/cancellation.py +2 -0
  22. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/checkpoint_postgres.py +4 -0
  23. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/coherence.py +6 -0
  24. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/compose.py +2 -0
  25. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/embeddings/__init__.py +2 -0
  26. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/embeddings/anthropic.py +4 -0
  27. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/embeddings/cohere.py +4 -0
  28. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/embeddings/gemini.py +4 -0
  29. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/embeddings/openai.py +4 -0
  30. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/embeddings/provider.py +5 -0
  31. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/entity_memory.py +2 -0
  32. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/env.py +6 -0
  33. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/evals/__init__.py +2 -0
  34. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/evals/badge.py +4 -0
  35. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/evals/dataset.py +2 -0
  36. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/evals/evaluators.py +36 -0
  37. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/evals/generator.py +2 -0
  38. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/evals/history.py +5 -0
  39. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/evals/llm_evaluators.py +22 -0
  40. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/evals/pairwise.py +4 -0
  41. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/evals/regression.py +3 -0
  42. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/evals/serve.py +2 -0
  43. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/evals/snapshot.py +5 -0
  44. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/evals/suite.py +2 -2
  45. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/evals/templates.py +5 -0
  46. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/evals/types.py +2 -0
  47. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/exceptions.py +15 -0
  48. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/guardrails/__init__.py +2 -0
  49. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/guardrails/base.py +3 -0
  50. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/guardrails/format.py +2 -0
  51. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/guardrails/length.py +2 -0
  52. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/guardrails/pii.py +3 -0
  53. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/guardrails/pipeline.py +2 -0
  54. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/guardrails/topic.py +2 -0
  55. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/guardrails/toxicity.py +2 -0
  56. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/knowledge.py +94 -5
  57. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/knowledge_backends.py +2 -0
  58. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/knowledge_graph.py +11 -1
  59. selectools-0.25.0/src/selectools/knowledge_sanitizers.py +215 -0
  60. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/knowledge_store_redis.py +4 -0
  61. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/knowledge_store_supabase.py +4 -0
  62. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/loop_detection.py +1 -0
  63. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/mcp/__init__.py +4 -0
  64. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/mcp/client.py +2 -0
  65. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/mcp/config.py +3 -0
  66. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/mcp/multi.py +2 -0
  67. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/mcp/server.py +2 -0
  68. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/memory.py +2 -0
  69. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/models.py +14 -0
  70. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/observe/__init__.py +2 -0
  71. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/observe/langfuse.py +2 -0
  72. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/observe/otel.py +2 -0
  73. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/observe/trace_store.py +13 -0
  74. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/observer.py +4 -91
  75. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/orchestration/__init__.py +2 -0
  76. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/orchestration/checkpoint.py +12 -5
  77. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/orchestration/graph.py +6 -2
  78. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/orchestration/node.py +9 -0
  79. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/orchestration/state.py +14 -6
  80. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/orchestration/supervisor.py +12 -25
  81. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/parser.py +5 -0
  82. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/patterns/__init__.py +2 -0
  83. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/patterns/debate.py +6 -2
  84. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/patterns/plan_and_execute.py +6 -3
  85. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/patterns/reflective.py +6 -2
  86. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/patterns/team_lead.py +7 -3
  87. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/pending.py +385 -7
  88. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/pipeline.py +2 -0
  89. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/policy.py +23 -2
  90. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/pricing.py +7 -0
  91. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/prompt.py +7 -0
  92. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/providers/__init__.py +2 -0
  93. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/providers/anthropic_provider.py +2 -0
  94. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/providers/azure_openai_provider.py +4 -2
  95. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/providers/base.py +9 -0
  96. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/providers/fallback.py +2 -0
  97. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/providers/gemini_provider.py +2 -0
  98. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/providers/litellm_provider.py +2 -0
  99. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/providers/ollama_provider.py +2 -0
  100. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/providers/openai_provider.py +2 -0
  101. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/providers/router.py +9 -1
  102. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/providers/stubs.py +2 -0
  103. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/rag/__init__.py +4 -0
  104. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/rag/bm25.py +4 -0
  105. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/rag/chunking.py +7 -0
  106. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/rag/hybrid.py +5 -0
  107. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/rag/loaders.py +4 -0
  108. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/rag/reranker.py +6 -0
  109. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/rag/stores/__init__.py +2 -0
  110. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/rag/stores/chroma.py +5 -0
  111. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/rag/stores/faiss.py +2 -0
  112. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/rag/stores/memory.py +5 -0
  113. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/rag/stores/pgvector.py +2 -0
  114. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/rag/stores/pinecone.py +5 -0
  115. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/rag/stores/qdrant.py +2 -0
  116. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/rag/stores/sqlite.py +5 -0
  117. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/rag/tools.py +6 -0
  118. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/rag/vector_store.py +7 -0
  119. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/results.py +2 -0
  120. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/security.py +6 -0
  121. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/serve/__init__.py +2 -0
  122. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/serve/api.py +5 -4
  123. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/serve/app.py +4 -0
  124. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/sessions.py +4 -1
  125. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/stability.py +88 -10
  126. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/structured.py +10 -0
  127. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/templates/__init__.py +8 -0
  128. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/token_estimation.py +2 -0
  129. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/toolbox/__init__.py +5 -0
  130. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/toolbox/calculator_tools.py +8 -0
  131. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/toolbox/code_tools.py +8 -0
  132. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/toolbox/data_tools.py +12 -0
  133. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/toolbox/datetime_tools.py +10 -0
  134. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/toolbox/db_tools.py +8 -0
  135. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/toolbox/email_tools.py +8 -0
  136. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/toolbox/file_tools.py +11 -0
  137. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/toolbox/github_tools.py +9 -0
  138. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/toolbox/linear_tools.py +9 -0
  139. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/toolbox/memory_tools.py +4 -0
  140. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/toolbox/notion_tools.py +9 -0
  141. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/toolbox/pdf_tools.py +8 -0
  142. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/toolbox/search_tools.py +8 -0
  143. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/toolbox/slack_tools.py +9 -0
  144. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/toolbox/text_tools.py +13 -0
  145. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/toolbox/web_tools.py +8 -0
  146. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/tools/__init__.py +2 -0
  147. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/tools/base.py +2 -1
  148. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/tools/loader.py +4 -0
  149. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/trace.py +4 -1
  150. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/types.py +8 -0
  151. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/unified_memory.py +6 -1
  152. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/usage.py +2 -0
  153. {selectools-0.24.0 → selectools-0.25.0/src/selectools.egg-info}/PKG-INFO +28 -10
  154. {selectools-0.24.0 → selectools-0.25.0}/src/selectools.egg-info/SOURCES.txt +7 -0
  155. selectools-0.25.0/tests/test_agent_hitl.py +688 -0
  156. selectools-0.25.0/tests/test_architecture.py +742 -0
  157. {selectools-0.24.0 → selectools-0.25.0}/tests/test_evals.py +2 -2
  158. {selectools-0.24.0 → selectools-0.25.0}/tests/test_evals_advanced.py +1 -1
  159. {selectools-0.24.0 → selectools-0.25.0}/tests/test_evals_v017_features.py +2 -2
  160. {selectools-0.24.0 → selectools-0.25.0}/tests/test_final_coverage_b.py +1 -1
  161. selectools-0.25.0/tests/test_knowledge_sanitizers.py +425 -0
  162. {selectools-0.24.0 → selectools-0.25.0}/tests/test_pending.py +546 -0
  163. selectools-0.25.0/tests/test_pending_redis_smoke.py +296 -0
  164. {selectools-0.24.0 → selectools-0.25.0}/tests/test_remaining_coverage.py +0 -67
  165. selectools-0.25.0/tests/test_tool_result_compression.py +757 -0
  166. selectools-0.24.0/src/selectools/agent/__init__.py +0 -8
  167. selectools-0.24.0/src/selectools/agent/config_groups.py +0 -149
  168. selectools-0.24.0/tests/test_architecture.py +0 -242
  169. {selectools-0.24.0 → selectools-0.25.0}/LICENSE +0 -0
  170. {selectools-0.24.0 → selectools-0.25.0}/setup.cfg +0 -0
  171. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/_async_utils.py +0 -0
  172. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/agent/_lifecycle.py +0 -0
  173. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/agent/_memory_manager.py +0 -0
  174. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/agent/_provider_caller.py +0 -0
  175. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/evals/__main__.py +0 -0
  176. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/evals/html.py +0 -0
  177. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/evals/junit.py +0 -0
  178. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/evals/report.py +0 -0
  179. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/mcp/_loop.py +0 -0
  180. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/mcp/bridge.py +0 -0
  181. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/providers/_openai_compat.py +0 -0
  182. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/serve/_starlette_app.py +0 -0
  183. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/serve/_static/builder.css +0 -0
  184. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/serve/_static/builder.html +0 -0
  185. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/serve/_static/builder.js +0 -0
  186. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/serve/builder.py +0 -0
  187. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/serve/cli.py +0 -0
  188. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/serve/models.py +0 -0
  189. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/serve/playground.py +0 -0
  190. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/templates/code_reviewer.py +0 -0
  191. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/templates/customer_support.py +0 -0
  192. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/templates/data_analyst.py +0 -0
  193. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/templates/rag_chatbot.py +0 -0
  194. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/templates/research_assistant.py +0 -0
  195. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/tools/decorators.py +0 -0
  196. {selectools-0.24.0 → selectools-0.25.0}/src/selectools/tools/registry.py +0 -0
  197. {selectools-0.24.0 → selectools-0.25.0}/src/selectools.egg-info/dependency_links.txt +0 -0
  198. {selectools-0.24.0 → selectools-0.25.0}/src/selectools.egg-info/entry_points.txt +0 -0
  199. {selectools-0.24.0 → selectools-0.25.0}/src/selectools.egg-info/requires.txt +0 -0
  200. {selectools-0.24.0 → selectools-0.25.0}/src/selectools.egg-info/top_level.txt +0 -0
  201. {selectools-0.24.0 → selectools-0.25.0}/tests/test_a2a.py +0 -0
  202. {selectools-0.24.0 → selectools-0.25.0}/tests/test_agent_api.py +0 -0
  203. {selectools-0.24.0 → selectools-0.25.0}/tests/test_approval_gate.py +0 -0
  204. {selectools-0.24.0 → selectools-0.25.0}/tests/test_async_observers.py +0 -0
  205. {selectools-0.24.0 → selectools-0.25.0}/tests/test_audit.py +0 -0
  206. {selectools-0.24.0 → selectools-0.25.0}/tests/test_budget.py +0 -0
  207. {selectools-0.24.0 → selectools-0.25.0}/tests/test_bug_hunt_batch1_core.py +0 -0
  208. {selectools-0.24.0 → selectools-0.25.0}/tests/test_bug_hunt_batch1_security.py +0 -0
  209. {selectools-0.24.0 → selectools-0.25.0}/tests/test_bug_hunt_batch1_tools.py +0 -0
  210. {selectools-0.24.0 → selectools-0.25.0}/tests/test_bug_hunt_regression.py +0 -0
  211. {selectools-0.24.0 → selectools-0.25.0}/tests/test_cache.py +0 -0
  212. {selectools-0.24.0 → selectools-0.25.0}/tests/test_cache_redis.py +0 -0
  213. {selectools-0.24.0 → selectools-0.25.0}/tests/test_cancellation.py +0 -0
  214. {selectools-0.24.0 → selectools-0.25.0}/tests/test_checkpoint_postgres.py +0 -0
  215. {selectools-0.24.0 → selectools-0.25.0}/tests/test_coherence.py +0 -0
  216. {selectools-0.24.0 → selectools-0.25.0}/tests/test_concurrency_smoke.py +0 -0
  217. {selectools-0.24.0 → selectools-0.25.0}/tests/test_consolidation_regression.py +0 -0
  218. {selectools-0.24.0 → selectools-0.25.0}/tests/test_conversation_branching.py +0 -0
  219. {selectools-0.24.0 → selectools-0.25.0}/tests/test_coverage_orchestration.py +0 -0
  220. {selectools-0.24.0 → selectools-0.25.0}/tests/test_document_loaders_extended.py +0 -0
  221. {selectools-0.24.0 → selectools-0.25.0}/tests/test_e2e_langfuse_observer.py +0 -0
  222. {selectools-0.24.0 → selectools-0.25.0}/tests/test_e2e_multimodal.py +0 -0
  223. {selectools-0.24.0 → selectools-0.25.0}/tests/test_e2e_otel_observer.py +0 -0
  224. {selectools-0.24.0 → selectools-0.25.0}/tests/test_e2e_v0_21_0_apps.py +0 -0
  225. {selectools-0.24.0 → selectools-0.25.0}/tests/test_e2e_v0_21_0_simulations.py +0 -0
  226. {selectools-0.24.0 → selectools-0.25.0}/tests/test_entity_memory.py +0 -0
  227. {selectools-0.24.0 → selectools-0.25.0}/tests/test_env.py +0 -0
  228. {selectools-0.24.0 → selectools-0.25.0}/tests/test_evals_cli.py +0 -0
  229. {selectools-0.24.0 → selectools-0.25.0}/tests/test_evals_e2e.py +0 -0
  230. {selectools-0.24.0 → selectools-0.25.0}/tests/test_evals_final.py +0 -0
  231. {selectools-0.24.0 → selectools-0.25.0}/tests/test_evals_hardening.py +0 -0
  232. {selectools-0.24.0 → selectools-0.25.0}/tests/test_evals_html_report.py +0 -0
  233. {selectools-0.24.0 → selectools-0.25.0}/tests/test_evals_new_evaluators.py +0 -0
  234. {selectools-0.24.0 → selectools-0.25.0}/tests/test_evals_ralph_bugs.py +0 -0
  235. {selectools-0.24.0 → selectools-0.25.0}/tests/test_evals_release.py +0 -0
  236. {selectools-0.24.0 → selectools-0.25.0}/tests/test_evals_serve.py +0 -0
  237. {selectools-0.24.0 → selectools-0.25.0}/tests/test_evals_v0191.py +0 -0
  238. {selectools-0.24.0 → selectools-0.25.0}/tests/test_features_in_graph.py +0 -0
  239. {selectools-0.24.0 → selectools-0.25.0}/tests/test_final_coverage_a.py +0 -0
  240. {selectools-0.24.0 → selectools-0.25.0}/tests/test_guardrails.py +0 -0
  241. {selectools-0.24.0 → selectools-0.25.0}/tests/test_hardening.py +0 -0
  242. {selectools-0.24.0 → selectools-0.25.0}/tests/test_knowledge.py +0 -0
  243. {selectools-0.24.0 → selectools-0.25.0}/tests/test_knowledge_backend.py +0 -0
  244. {selectools-0.24.0 → selectools-0.25.0}/tests/test_knowledge_backend_redis.py +0 -0
  245. {selectools-0.24.0 → selectools-0.25.0}/tests/test_knowledge_backend_supabase.py +0 -0
  246. {selectools-0.24.0 → selectools-0.25.0}/tests/test_knowledge_graph.py +0 -0
  247. {selectools-0.24.0 → selectools-0.25.0}/tests/test_knowledge_store_redis.py +0 -0
  248. {selectools-0.24.0 → selectools-0.25.0}/tests/test_knowledge_store_supabase.py +0 -0
  249. {selectools-0.24.0 → selectools-0.25.0}/tests/test_knowledge_stores.py +0 -0
  250. {selectools-0.24.0 → selectools-0.25.0}/tests/test_knowledge_stores_error_handling.py +0 -0
  251. {selectools-0.24.0 → selectools-0.25.0}/tests/test_langfuse_observer.py +0 -0
  252. {selectools-0.24.0 → selectools-0.25.0}/tests/test_loop_detection.py +0 -0
  253. {selectools-0.24.0 → selectools-0.25.0}/tests/test_mcp.py +0 -0
  254. {selectools-0.24.0 → selectools-0.25.0}/tests/test_mcp_coverage.py +0 -0
  255. {selectools-0.24.0 → selectools-0.25.0}/tests/test_memory.py +0 -0
  256. {selectools-0.24.0 → selectools-0.25.0}/tests/test_memory_async.py +0 -0
  257. {selectools-0.24.0 → selectools-0.25.0}/tests/test_memory_boundary.py +0 -0
  258. {selectools-0.24.0 → selectools-0.25.0}/tests/test_memory_integration.py +0 -0
  259. {selectools-0.24.0 → selectools-0.25.0}/tests/test_model_switching.py +0 -0
  260. {selectools-0.24.0 → selectools-0.25.0}/tests/test_multi_agent_edge_cases.py +0 -0
  261. {selectools-0.24.0 → selectools-0.25.0}/tests/test_multimodal.py +0 -0
  262. {selectools-0.24.0 → selectools-0.25.0}/tests/test_orchestration_checkpoint.py +0 -0
  263. {selectools-0.24.0 → selectools-0.25.0}/tests/test_orchestration_e2e.py +0 -0
  264. {selectools-0.24.0 → selectools-0.25.0}/tests/test_orchestration_evals.py +0 -0
  265. {selectools-0.24.0 → selectools-0.25.0}/tests/test_orchestration_graph.py +0 -0
  266. {selectools-0.24.0 → selectools-0.25.0}/tests/test_orchestration_integration.py +0 -0
  267. {selectools-0.24.0 → selectools-0.25.0}/tests/test_orchestration_primitives.py +0 -0
  268. {selectools-0.24.0 → selectools-0.25.0}/tests/test_orchestration_supervisor.py +0 -0
  269. {selectools-0.24.0 → selectools-0.25.0}/tests/test_otel_observer.py +0 -0
  270. {selectools-0.24.0 → selectools-0.25.0}/tests/test_parser.py +0 -0
  271. {selectools-0.24.0 → selectools-0.25.0}/tests/test_patterns.py +0 -0
  272. {selectools-0.24.0 → selectools-0.25.0}/tests/test_phase1_design_patterns.py +0 -0
  273. {selectools-0.24.0 → selectools-0.25.0}/tests/test_pipeline.py +0 -0
  274. {selectools-0.24.0 → selectools-0.25.0}/tests/test_pipeline_coverage.py +0 -0
  275. {selectools-0.24.0 → selectools-0.25.0}/tests/test_policy.py +0 -0
  276. {selectools-0.24.0 → selectools-0.25.0}/tests/test_prompt.py +0 -0
  277. {selectools-0.24.0 → selectools-0.25.0}/tests/test_prompt_compression.py +0 -0
  278. {selectools-0.24.0 → selectools-0.25.0}/tests/test_property_based.py +0 -0
  279. {selectools-0.24.0 → selectools-0.25.0}/tests/test_reasoning_strategy.py +0 -0
  280. {selectools-0.24.0 → selectools-0.25.0}/tests/test_results.py +0 -0
  281. {selectools-0.24.0 → selectools-0.25.0}/tests/test_routing_mode.py +0 -0
  282. {selectools-0.24.0 → selectools-0.25.0}/tests/test_security.py +0 -0
  283. {selectools-0.24.0 → selectools-0.25.0}/tests/test_semantic_cache.py +0 -0
  284. {selectools-0.24.0 → selectools-0.25.0}/tests/test_serve_app_coverage.py +0 -0
  285. {selectools-0.24.0 → selectools-0.25.0}/tests/test_serve_cli.py +0 -0
  286. {selectools-0.24.0 → selectools-0.25.0}/tests/test_sessions.py +0 -0
  287. {selectools-0.24.0 → selectools-0.25.0}/tests/test_sessions_edge_cases.py +0 -0
  288. {selectools-0.24.0 → selectools-0.25.0}/tests/test_sessions_redis.py +0 -0
  289. {selectools-0.24.0 → selectools-0.25.0}/tests/test_sessions_supabase.py +0 -0
  290. {selectools-0.24.0 → selectools-0.25.0}/tests/test_simple_observer.py +0 -0
  291. {selectools-0.24.0 → selectools-0.25.0}/tests/test_simulation_evals.py +0 -0
  292. {selectools-0.24.0 → selectools-0.25.0}/tests/test_stability.py +0 -0
  293. {selectools-0.24.0 → selectools-0.25.0}/tests/test_starlette_app.py +0 -0
  294. {selectools-0.24.0 → selectools-0.25.0}/tests/test_structured.py +0 -0
  295. {selectools-0.24.0 → selectools-0.25.0}/tests/test_structured_config.py +0 -0
  296. {selectools-0.24.0 → selectools-0.25.0}/tests/test_structured_tool_results.py +0 -0
  297. {selectools-0.24.0 → selectools-0.25.0}/tests/test_summarize_on_trim.py +0 -0
  298. {selectools-0.24.0 → selectools-0.25.0}/tests/test_templates_coverage.py +0 -0
  299. {selectools-0.24.0 → selectools-0.25.0}/tests/test_terminal_actions.py +0 -0
  300. {selectools-0.24.0 → selectools-0.25.0}/tests/test_token_estimation.py +0 -0
  301. {selectools-0.24.0 → selectools-0.25.0}/tests/test_tool_caching.py +0 -0
  302. {selectools-0.24.0 → selectools-0.25.0}/tests/test_trace.py +0 -0
  303. {selectools-0.24.0 → selectools-0.25.0}/tests/test_trace_html.py +0 -0
  304. {selectools-0.24.0 → selectools-0.25.0}/tests/test_trace_store.py +0 -0
  305. {selectools-0.24.0 → selectools-0.25.0}/tests/test_unified_memory.py +0 -0
  306. {selectools-0.24.0 → selectools-0.25.0}/tests/test_v016_regression.py +0 -0
  307. {selectools-0.24.0 → selectools-0.25.0}/tests/test_v019_features.py +0 -0
  308. {selectools-0.24.0 → selectools-0.25.0}/tests/test_visual_builder.py +0 -0
  309. {selectools-0.24.0 → selectools-0.25.0}/tests/test_yaml_config.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: selectools
3
- Version: 0.24.0
3
+ Version: 0.25.0
4
4
  Summary: Production-ready Python framework for AI agents with multi-agent graphs, hybrid RAG, guardrails, audit logging, 50 evaluators, and a visual builder. Supports OpenAI, Anthropic, Gemini, Ollama. By NichevLabs.
5
5
  Author-email: John Nichev <johnnichev@gmail.com>
6
6
  Maintainer-email: NichevLabs <support@nichevlabs.com>
@@ -108,6 +108,24 @@ result = AgentGraph.chain(planner, writer, reviewer).run("Write a blog post")
108
108
  # selectools serve agent.yaml
109
109
  ```
110
110
 
111
+ ## What's New in v0.25
112
+
113
+ ### v0.25.0 — Hardening & v1.0 Prep
114
+
115
+ Five new features plus the final v1.0 groundwork: the entire 433-symbol public surface is now stability-marked (205 stable, 228 beta) with a CI gate, the long-deprecated `AgentConfig.hooks` is removed, and the security audit is published.
116
+
117
+ - **Planning-as-config** — `AgentConfig(planning=PlanningConfig(...))` adds plan→execute→synthesize to any agent via isolated clones, with a complexity gate, cross-clone budget caps, and a plan approval handler.
118
+ - **Agent-level HITL** — `ToolConfig(require_approval=[...], approval_handler=...)` gates tool execution behind a sync or async approval callback (fail-closed, denials memoized per run).
119
+ - **Tool result compression** — `ToolConfig(compress_results=True)` summarizes oversized tool results via a one-shot LLM call before they enter context, with raw-text retention for stop conditions and loop detection.
120
+ - **Knowledge pre-save sanitization** — `pre_save` hook on `KnowledgeMemory` plus built-in sanitizers: `defang_delimiters` (prompt-injection markers), `strip_surrogates`, `dedupe_against`.
121
+ - **Pending intent hooks** — `pop_if_intent` (structured confirm/cancel from chat buttons, bypasses the text parser) and `tighten_ttl` (id-pinned atomic Lua rewrite on Redis).
122
+ - **Stability marking sweep** — 100% of the public surface marked; 19 beta→stable promotions (AgentGraph + orchestration core, all 5 pattern agents, checkpoint stores, `RedisSessionStore`, `AzureOpenAIProvider`, ...); module-level `__stability__` on all 123 public modules; CI gate enforces markers forever.
123
+ - **Wart removal** — `Agent.clone_for_isolation()` is public (`@beta`); `__all__` reconciled (11 documented symbols now exported, incl. the Pipeline family and `RouterProvider`); **BREAKING**: `AgentConfig(hooks=...)` now raises `TypeError` (deprecated since v0.16) — migrate to `AgentObserver` via `docs/MIGRATION_1.0.md`.
124
+ - **Security audit published** — `docs/SECURITY_AUDIT.md`: bandit clean at medium/high, all 73 `nosec` suppressions justified, pip-audit pass, SBOM regenerated.
125
+ - **Protocol isinstance fix** — stability markers no longer break third-party `isinstance` checks against `Cache`/`KnowledgeStore`/`CheckpointStore` on Python 3.9–3.11.
126
+
127
+ See `CHANGELOG.md` for the full entry (7,268 tests, 111 examples).
128
+
111
129
  ## What's New in v0.24
112
130
 
113
131
  ### v0.24.0 — Production Interop
@@ -133,7 +151,7 @@ from selectools.serve import AgentAPI
133
151
  api = AgentAPI(agent, auth_key="secret") # ASGI app: uvicorn main:api
134
152
  ```
135
153
 
136
- See `CHANGELOG.md` for the full entry (5,968 tests, 106 examples).
154
+ See `CHANGELOG.md` for the full entry (6,187 tests, 111 examples).
137
155
 
138
156
  ## What's New in v0.23
139
157
 
@@ -620,7 +638,7 @@ report.to_html("report.html")
620
638
  | **Eval Framework** | 50 built-in evaluators (30 deterministic + 21 LLM-as-judge). A/B testing, regression detection, snapshot testing, HTML reports, JUnit XML, CI integration. |
621
639
  | **Multi-Agent Orchestration** | `AgentGraph` for directed agent graphs, `SupervisorAgent` with 4 strategies, HITL via generator nodes, parallel execution, checkpointing, subgraph composition. |
622
640
  | **Composable Pipelines** | `Pipeline` + `@step` + `|` operator + `parallel()` + `branch()` — chain agents, tools, and transforms with plain Python. |
623
- | **AgentObserver Protocol** | 45-event lifecycle observer with `run_id`/`call_id` correlation. Built-in `LoggingObserver` + `SimpleStepObserver`. |
641
+ | **AgentObserver Protocol** | 46-event lifecycle observer with `run_id`/`call_id` correlation. Built-in `LoggingObserver` + `SimpleStepObserver`. |
624
642
  | **Runtime Controls** | Token/cost budget limits, cooperative cancellation, per-tool approval gates, model switching per iteration. |
625
643
  | **Production Hardened** | Retries with backoff, per-tool timeouts, iteration caps, cost warnings, observability hooks + observers. |
626
644
  | **Library-First** | Not a framework. No magic globals, no hidden state. Use as much or as little as you need. |
@@ -660,10 +678,10 @@ report.to_html("report.html")
660
678
  - **Conversation Branching**: `ConversationMemory.branch()` and `SessionStore.branch()` for A/B exploration and checkpointing
661
679
  - **Multi-Agent Orchestration**: `AgentGraph` with routing, parallel execution, HITL, checkpointing; `SupervisorAgent` with 4 strategies (plan_and_execute, round_robin, dynamic, magentic)
662
680
  - **Composable Pipelines**: `Pipeline` + `@step` + `|` operator + `parallel()` + `branch()` — chain agents, tools, and transforms
663
- - **106 Examples**: Multi-agent graphs, RAG, hybrid search, streaming, structured output, traces, batch, policy, observer, guardrails, audit, sessions (incl. Supabase), entity memory, knowledge graph, eval framework, advanced agent patterns, stability markers, HTML trace viewer, agent-as-API, A2A, routing, unified memory, and more
681
+ - **111 Examples**: Multi-agent graphs, RAG, hybrid search, streaming, structured output, traces, batch, policy, observer, guardrails, audit, sessions (incl. Supabase), entity memory, knowledge graph, eval framework, advanced agent patterns, stability markers, HTML trace viewer, agent-as-API, A2A, routing, unified memory, and more
664
682
  - **Built-in Eval Framework**: 50 evaluators (30 deterministic + 21 LLM-as-judge), A/B testing, regression detection, HTML reports, JUnit XML, snapshot testing
665
- - **AgentObserver Protocol**: 45 lifecycle events with `run_id` correlation, `LoggingObserver`, `SimpleStepObserver`, OTel export
666
- - **5968 Tests**: Unit, integration, regression, and E2E with real API calls
683
+ - **AgentObserver Protocol**: 46 lifecycle events with `run_id` correlation, `LoggingObserver`, `SimpleStepObserver`, OTel export
684
+ - **7268 Tests**: Unit, integration, regression, and E2E with real API calls
667
685
 
668
686
  ## Install
669
687
 
@@ -989,7 +1007,7 @@ agent = Agent(
989
1007
  )
990
1008
  ```
991
1009
 
992
- 45 lifecycle events: run, LLM, tool, iteration, batch, policy, structured output, fallback, retry, memory trim, guardrail, coherence, screening, session, entity, KG, budget exceeded, cancelled, prompt compressed, plus 13 graph events (graph start/end, node start/end, routing, interrupt, resume, parallel, stall, loop, supervisor replan). See `observer.py` for full reference.
1010
+ 46 lifecycle events: run, LLM, tool, iteration, batch, policy, structured output, fallback, retry, memory trim, guardrail, coherence, screening, session, entity, KG, budget exceeded, cancelled, prompt compressed, plus 13 graph events (graph start/end, node start/end, routing, interrupt, resume, parallel, stall, loop, supervisor replan). See `observer.py` for full reference.
993
1011
 
994
1012
  ### E2E Streaming & Parallel Execution
995
1013
 
@@ -1165,7 +1183,7 @@ Examples are numbered by difficulty. Start from 01 and work your way up.
1165
1183
  |---|---|---|---|
1166
1184
  | 01 | `01_hello_world.py` | First agent, `@tool`, `ask()` | No |
1167
1185
  | 02 | `02_search_weather.py` | ToolRegistry, multiple tools | No |
1168
- | 03 | `03_toolbox.py` | 24 pre-built tools (file, data, text, datetime, web) | No |
1186
+ | 03 | `03_toolbox.py` | 48 pre-built tools (file, data, text, datetime, web, code, search, and more) | No |
1169
1187
  | 04 | `04_conversation_memory.py` | Multi-turn memory | Yes |
1170
1188
  | 05 | `05_cost_tracking.py` | Token counting, cost warnings | Yes |
1171
1189
  | 06 | `06_async_agent.py` | `arun()`, concurrent agents, FastAPI | Yes |
@@ -1174,7 +1192,7 @@ Examples are numbered by difficulty. Start from 01 and work your way up.
1174
1192
  | 09 | `09_caching.py` | InMemoryCache, RedisCache, cache stats | Yes |
1175
1193
  | 10 | `10_routing_mode.py` | Routing mode, intent classification | Yes |
1176
1194
  | 11 | `11_tool_analytics.py` | Call counts, success rates, timing | Yes |
1177
- | 12 | `12_observability_hooks.py` | Lifecycle hooks, tool validation | Yes |
1195
+ | 12 | `12_observability_hooks.py` | Lifecycle observers, tool validation | Yes |
1178
1196
  | 13 | `13_dynamic_tools.py` | ToolLoader, plugins, hot-reload | Yes |
1179
1197
  | 14 | `14_rag_basic.py` | RAG pipeline, document loading, vector search | Yes + `[rag]` |
1180
1198
  | 15 | `15_semantic_search.py` | Pure semantic search, metadata filtering | Yes + `[rag]` |
@@ -1289,7 +1307,7 @@ pytest tests/ -x -q # All tests
1289
1307
  pytest tests/ -k "not e2e" # Skip E2E (no API keys needed)
1290
1308
  ```
1291
1309
 
1292
- 5968 tests covering parsing, agent loop, providers, RAG pipeline, hybrid search, advanced chunking, dynamic tools, caching, streaming, guardrails, sessions, memory, eval framework, budget/cancellation, knowledge stores, orchestration, pipelines, agent patterns, stability markers, trace viewer, serve API, A2A, routing, and E2E integration with real API calls.
1310
+ 7268 tests covering parsing, agent loop, providers, RAG pipeline, hybrid search, advanced chunking, dynamic tools, caching, streaming, guardrails, sessions, memory, eval framework, budget/cancellation, knowledge stores, orchestration, pipelines, agent patterns, stability markers, trace viewer, serve API, A2A, routing, and E2E integration with real API calls.
1293
1311
 
1294
1312
  ## License
1295
1313
 
@@ -30,6 +30,24 @@ result = AgentGraph.chain(planner, writer, reviewer).run("Write a blog post")
30
30
  # selectools serve agent.yaml
31
31
  ```
32
32
 
33
+ ## What's New in v0.25
34
+
35
+ ### v0.25.0 — Hardening & v1.0 Prep
36
+
37
+ Five new features plus the final v1.0 groundwork: the entire 433-symbol public surface is now stability-marked (205 stable, 228 beta) with a CI gate, the long-deprecated `AgentConfig.hooks` is removed, and the security audit is published.
38
+
39
+ - **Planning-as-config** — `AgentConfig(planning=PlanningConfig(...))` adds plan→execute→synthesize to any agent via isolated clones, with a complexity gate, cross-clone budget caps, and a plan approval handler.
40
+ - **Agent-level HITL** — `ToolConfig(require_approval=[...], approval_handler=...)` gates tool execution behind a sync or async approval callback (fail-closed, denials memoized per run).
41
+ - **Tool result compression** — `ToolConfig(compress_results=True)` summarizes oversized tool results via a one-shot LLM call before they enter context, with raw-text retention for stop conditions and loop detection.
42
+ - **Knowledge pre-save sanitization** — `pre_save` hook on `KnowledgeMemory` plus built-in sanitizers: `defang_delimiters` (prompt-injection markers), `strip_surrogates`, `dedupe_against`.
43
+ - **Pending intent hooks** — `pop_if_intent` (structured confirm/cancel from chat buttons, bypasses the text parser) and `tighten_ttl` (id-pinned atomic Lua rewrite on Redis).
44
+ - **Stability marking sweep** — 100% of the public surface marked; 19 beta→stable promotions (AgentGraph + orchestration core, all 5 pattern agents, checkpoint stores, `RedisSessionStore`, `AzureOpenAIProvider`, ...); module-level `__stability__` on all 123 public modules; CI gate enforces markers forever.
45
+ - **Wart removal** — `Agent.clone_for_isolation()` is public (`@beta`); `__all__` reconciled (11 documented symbols now exported, incl. the Pipeline family and `RouterProvider`); **BREAKING**: `AgentConfig(hooks=...)` now raises `TypeError` (deprecated since v0.16) — migrate to `AgentObserver` via `docs/MIGRATION_1.0.md`.
46
+ - **Security audit published** — `docs/SECURITY_AUDIT.md`: bandit clean at medium/high, all 73 `nosec` suppressions justified, pip-audit pass, SBOM regenerated.
47
+ - **Protocol isinstance fix** — stability markers no longer break third-party `isinstance` checks against `Cache`/`KnowledgeStore`/`CheckpointStore` on Python 3.9–3.11.
48
+
49
+ See `CHANGELOG.md` for the full entry (7,268 tests, 111 examples).
50
+
33
51
  ## What's New in v0.24
34
52
 
35
53
  ### v0.24.0 — Production Interop
@@ -55,7 +73,7 @@ from selectools.serve import AgentAPI
55
73
  api = AgentAPI(agent, auth_key="secret") # ASGI app: uvicorn main:api
56
74
  ```
57
75
 
58
- See `CHANGELOG.md` for the full entry (5,968 tests, 106 examples).
76
+ See `CHANGELOG.md` for the full entry (6,187 tests, 111 examples).
59
77
 
60
78
  ## What's New in v0.23
61
79
 
@@ -542,7 +560,7 @@ report.to_html("report.html")
542
560
  | **Eval Framework** | 50 built-in evaluators (30 deterministic + 21 LLM-as-judge). A/B testing, regression detection, snapshot testing, HTML reports, JUnit XML, CI integration. |
543
561
  | **Multi-Agent Orchestration** | `AgentGraph` for directed agent graphs, `SupervisorAgent` with 4 strategies, HITL via generator nodes, parallel execution, checkpointing, subgraph composition. |
544
562
  | **Composable Pipelines** | `Pipeline` + `@step` + `|` operator + `parallel()` + `branch()` — chain agents, tools, and transforms with plain Python. |
545
- | **AgentObserver Protocol** | 45-event lifecycle observer with `run_id`/`call_id` correlation. Built-in `LoggingObserver` + `SimpleStepObserver`. |
563
+ | **AgentObserver Protocol** | 46-event lifecycle observer with `run_id`/`call_id` correlation. Built-in `LoggingObserver` + `SimpleStepObserver`. |
546
564
  | **Runtime Controls** | Token/cost budget limits, cooperative cancellation, per-tool approval gates, model switching per iteration. |
547
565
  | **Production Hardened** | Retries with backoff, per-tool timeouts, iteration caps, cost warnings, observability hooks + observers. |
548
566
  | **Library-First** | Not a framework. No magic globals, no hidden state. Use as much or as little as you need. |
@@ -582,10 +600,10 @@ report.to_html("report.html")
582
600
  - **Conversation Branching**: `ConversationMemory.branch()` and `SessionStore.branch()` for A/B exploration and checkpointing
583
601
  - **Multi-Agent Orchestration**: `AgentGraph` with routing, parallel execution, HITL, checkpointing; `SupervisorAgent` with 4 strategies (plan_and_execute, round_robin, dynamic, magentic)
584
602
  - **Composable Pipelines**: `Pipeline` + `@step` + `|` operator + `parallel()` + `branch()` — chain agents, tools, and transforms
585
- - **106 Examples**: Multi-agent graphs, RAG, hybrid search, streaming, structured output, traces, batch, policy, observer, guardrails, audit, sessions (incl. Supabase), entity memory, knowledge graph, eval framework, advanced agent patterns, stability markers, HTML trace viewer, agent-as-API, A2A, routing, unified memory, and more
603
+ - **111 Examples**: Multi-agent graphs, RAG, hybrid search, streaming, structured output, traces, batch, policy, observer, guardrails, audit, sessions (incl. Supabase), entity memory, knowledge graph, eval framework, advanced agent patterns, stability markers, HTML trace viewer, agent-as-API, A2A, routing, unified memory, and more
586
604
  - **Built-in Eval Framework**: 50 evaluators (30 deterministic + 21 LLM-as-judge), A/B testing, regression detection, HTML reports, JUnit XML, snapshot testing
587
- - **AgentObserver Protocol**: 45 lifecycle events with `run_id` correlation, `LoggingObserver`, `SimpleStepObserver`, OTel export
588
- - **5968 Tests**: Unit, integration, regression, and E2E with real API calls
605
+ - **AgentObserver Protocol**: 46 lifecycle events with `run_id` correlation, `LoggingObserver`, `SimpleStepObserver`, OTel export
606
+ - **7268 Tests**: Unit, integration, regression, and E2E with real API calls
589
607
 
590
608
  ## Install
591
609
 
@@ -911,7 +929,7 @@ agent = Agent(
911
929
  )
912
930
  ```
913
931
 
914
- 45 lifecycle events: run, LLM, tool, iteration, batch, policy, structured output, fallback, retry, memory trim, guardrail, coherence, screening, session, entity, KG, budget exceeded, cancelled, prompt compressed, plus 13 graph events (graph start/end, node start/end, routing, interrupt, resume, parallel, stall, loop, supervisor replan). See `observer.py` for full reference.
932
+ 46 lifecycle events: run, LLM, tool, iteration, batch, policy, structured output, fallback, retry, memory trim, guardrail, coherence, screening, session, entity, KG, budget exceeded, cancelled, prompt compressed, plus 13 graph events (graph start/end, node start/end, routing, interrupt, resume, parallel, stall, loop, supervisor replan). See `observer.py` for full reference.
915
933
 
916
934
  ### E2E Streaming & Parallel Execution
917
935
 
@@ -1087,7 +1105,7 @@ Examples are numbered by difficulty. Start from 01 and work your way up.
1087
1105
  |---|---|---|---|
1088
1106
  | 01 | `01_hello_world.py` | First agent, `@tool`, `ask()` | No |
1089
1107
  | 02 | `02_search_weather.py` | ToolRegistry, multiple tools | No |
1090
- | 03 | `03_toolbox.py` | 24 pre-built tools (file, data, text, datetime, web) | No |
1108
+ | 03 | `03_toolbox.py` | 48 pre-built tools (file, data, text, datetime, web, code, search, and more) | No |
1091
1109
  | 04 | `04_conversation_memory.py` | Multi-turn memory | Yes |
1092
1110
  | 05 | `05_cost_tracking.py` | Token counting, cost warnings | Yes |
1093
1111
  | 06 | `06_async_agent.py` | `arun()`, concurrent agents, FastAPI | Yes |
@@ -1096,7 +1114,7 @@ Examples are numbered by difficulty. Start from 01 and work your way up.
1096
1114
  | 09 | `09_caching.py` | InMemoryCache, RedisCache, cache stats | Yes |
1097
1115
  | 10 | `10_routing_mode.py` | Routing mode, intent classification | Yes |
1098
1116
  | 11 | `11_tool_analytics.py` | Call counts, success rates, timing | Yes |
1099
- | 12 | `12_observability_hooks.py` | Lifecycle hooks, tool validation | Yes |
1117
+ | 12 | `12_observability_hooks.py` | Lifecycle observers, tool validation | Yes |
1100
1118
  | 13 | `13_dynamic_tools.py` | ToolLoader, plugins, hot-reload | Yes |
1101
1119
  | 14 | `14_rag_basic.py` | RAG pipeline, document loading, vector search | Yes + `[rag]` |
1102
1120
  | 15 | `15_semantic_search.py` | Pure semantic search, metadata filtering | Yes + `[rag]` |
@@ -1211,7 +1229,7 @@ pytest tests/ -x -q # All tests
1211
1229
  pytest tests/ -k "not e2e" # Skip E2E (no API keys needed)
1212
1230
  ```
1213
1231
 
1214
- 5968 tests covering parsing, agent loop, providers, RAG pipeline, hybrid search, advanced chunking, dynamic tools, caching, streaming, guardrails, sessions, memory, eval framework, budget/cancellation, knowledge stores, orchestration, pipelines, agent patterns, stability markers, trace viewer, serve API, A2A, routing, and E2E integration with real API calls.
1232
+ 7268 tests covering parsing, agent loop, providers, RAG pipeline, hybrid search, advanced chunking, dynamic tools, caching, streaming, guardrails, sessions, memory, eval framework, budget/cancellation, knowledge stores, orchestration, pipelines, agent patterns, stability markers, trace viewer, serve API, A2A, routing, and E2E integration with real API calls.
1215
1233
 
1216
1234
  ## License
1217
1235
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "selectools"
7
- version = "0.24.0"
7
+ version = "0.25.0"
8
8
  description = "Production-ready Python framework for AI agents with multi-agent graphs, hybrid RAG, guardrails, audit logging, 50 evaluators, and a visual builder. Supports OpenAI, Anthropic, Gemini, Ollama. By NichevLabs."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -1,10 +1,10 @@
1
1
  """Public exports for the selectools package."""
2
2
 
3
- __version__ = "0.24.0"
3
+ __version__ = "0.25.0"
4
4
 
5
5
  # Import submodules (lazy loading for optional dependencies)
6
6
  from . import embeddings, evals, guardrails, models, observe, patterns, rag, toolbox
7
- from .agent import Agent, AgentConfig
7
+ from .agent import Agent, AgentConfig, PlanningConfig
8
8
  from .agent.config_groups import (
9
9
  BudgetConfig,
10
10
  CoherenceConfig,
@@ -54,6 +54,7 @@ from .knowledge import (
54
54
  KnowledgeEntry,
55
55
  KnowledgeMemory,
56
56
  KnowledgeStore,
57
+ PreSaveHook,
57
58
  SQLiteKnowledgeStore,
58
59
  )
59
60
  from .knowledge_backends import (
@@ -67,6 +68,11 @@ from .knowledge_graph import (
67
68
  Triple,
68
69
  TripleStore,
69
70
  )
71
+ from .knowledge_sanitizers import (
72
+ dedupe_against,
73
+ defang_delimiters,
74
+ strip_surrogates,
75
+ )
70
76
  from .loop_detection import (
71
77
  BaseDetector,
72
78
  LoopDetectedError,
@@ -142,7 +148,7 @@ from .pending import (
142
148
  stash_pending,
143
149
  )
144
150
  from .pipeline import Pipeline, Step, StepResult, branch, cache_step, parallel, retry, step
145
- from .policy import PolicyDecision, PolicyResult, ToolPolicy
151
+ from .policy import ApprovalRequest, PolicyDecision, PolicyResult, ToolPolicy
146
152
  from .pricing import PRICING, calculate_cost, calculate_embedding_cost, get_model_pricing
147
153
  from .prompt import REASONING_STRATEGIES, PromptBuilder
148
154
  from .providers.anthropic_provider import AnthropicProvider
@@ -152,6 +158,7 @@ from .providers.gemini_provider import GeminiProvider
152
158
  from .providers.litellm_provider import LiteLLMProvider
153
159
  from .providers.ollama_provider import OllamaProvider
154
160
  from .providers.openai_provider import OpenAIProvider
161
+ from .providers.router import RouterConfig, RouterProvider
155
162
  from .providers.stubs import LocalProvider
156
163
  from .results import Ambiguous, Artifact, NotFound, ToolResult, emit_artifact
157
164
  from .sessions import (
@@ -184,6 +191,7 @@ from .usage import AgentUsage, UsageStats
184
191
  __all__ = [
185
192
  "Agent",
186
193
  "AgentConfig",
194
+ "PlanningConfig",
187
195
  "AgentResult",
188
196
  "AgentAnalytics",
189
197
  "ToolMetrics",
@@ -205,10 +213,22 @@ __all__ = [
205
213
  "GeminiProvider",
206
214
  "OllamaProvider",
207
215
  "LiteLLMProvider",
216
+ "RouterProvider",
217
+ "RouterConfig",
208
218
  "LocalProvider",
209
219
  "FallbackProvider",
210
220
  "ToolRegistry",
211
221
  "tool",
222
+ # Pipeline composition (public since 0.19.3, @beta)
223
+ "Pipeline",
224
+ "Step",
225
+ "StepResult",
226
+ "compose",
227
+ "step",
228
+ "parallel",
229
+ "branch",
230
+ "retry",
231
+ "cache_step",
212
232
  # Cancellation
213
233
  "CancellationToken",
214
234
  # Exceptions
@@ -247,6 +267,7 @@ __all__ = [
247
267
  "SemanticCache",
248
268
  # Tool policy
249
269
  "ToolPolicy",
270
+ "ApprovalRequest",
250
271
  "PolicyDecision",
251
272
  "PolicyResult",
252
273
  # Structured output
@@ -334,6 +355,11 @@ __all__ = [
334
355
  "KnowledgeBackend",
335
356
  "SupabaseKnowledgeBackend",
336
357
  "RedisKnowledgeBackend",
358
+ # Knowledge pre-save sanitizers (beta)
359
+ "PreSaveHook",
360
+ "defang_delimiters",
361
+ "strip_surrogates",
362
+ "dedupe_against",
337
363
  # Token estimation
338
364
  "TokenEstimate",
339
365
  "estimate_tokens",
@@ -0,0 +1,37 @@
1
+ """Internal JSON helpers shared across modules.
2
+
3
+ Home for JSON-parsing utilities that multiple subsystems need (orchestration
4
+ supervisor, team-lead and plan-and-execute patterns). Internal — not part of
5
+ the public API.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ import json
11
+ import re
12
+ from typing import Any
13
+
14
+ _JSON_BLOCK_RE = re.compile(r"(\[.*\]|\{.*\})", re.DOTALL)
15
+
16
+
17
+ def safe_json_parse(text: str, default: Any = None) -> Any:
18
+ """Try to extract and parse JSON from an LLM response.
19
+
20
+ Strips markdown code fences, then attempts a direct parse; falls back to
21
+ extracting the first JSON array or object embedded in surrounding prose.
22
+ Returns *default* when nothing parses.
23
+ """
24
+ text = text.strip()
25
+ if text.startswith("```"):
26
+ lines = text.splitlines()
27
+ text = "\n".join(lines[1:-1] if lines[-1].strip() == "```" else lines[1:])
28
+ try:
29
+ return json.loads(text)
30
+ except json.JSONDecodeError:
31
+ m = _JSON_BLOCK_RE.search(text)
32
+ if m:
33
+ try:
34
+ return json.loads(m.group(1))
35
+ except json.JSONDecodeError:
36
+ pass
37
+ return default
@@ -25,6 +25,8 @@ from typing import Any
25
25
 
26
26
  from .types import A2AError, A2ATask, AgentCard, AgentSkill, TaskState
27
27
 
28
+ __stability__ = "beta"
29
+
28
30
  __all__ = [
29
31
  "A2AClient",
30
32
  "A2AError",
@@ -26,6 +26,8 @@ from .._async_utils import run_sync
26
26
  from ..stability import beta
27
27
  from .types import A2AError, A2ATask, AgentCard
28
28
 
29
+ __stability__ = "beta"
30
+
29
31
  __all__ = ["A2AClient"]
30
32
 
31
33
 
@@ -58,6 +58,8 @@ from .types import (
58
58
  if TYPE_CHECKING:
59
59
  from ..agent.core import Agent
60
60
 
61
+ __stability__ = "beta"
62
+
61
63
  __all__ = ["A2AServer"]
62
64
 
63
65
  logger = logging.getLogger(__name__)
@@ -328,12 +330,11 @@ class A2AServer:
328
330
  try:
329
331
  # Run on an isolated clone: Agent.run mutates shared _history (and
330
332
  # memory), which would leak caller A's conversation into caller B's
331
- # provider context and race under concurrency. _clone_for_isolation
333
+ # provider context and race under concurrency. clone_for_isolation
332
334
  # (same mechanism run_batch uses) shares tools/provider/config but
333
335
  # gives fresh history/usage and drops memory — correct for A2A v1,
334
- # which has no session model. It is underscore-private today;
335
- # promoting it to a public API is a follow-up.
336
- clone = self._agent._clone_for_isolation()
336
+ # which has no session model.
337
+ clone = self._agent.clone_for_isolation()
337
338
  result = await run_in_threadpool(clone.run, [Message(role=Role.USER, content=prompt)])
338
339
  except Exception as exc:
339
340
  # Agent failure is a task-level outcome, not a transport error.
@@ -13,6 +13,8 @@ from typing import Any, Dict, List, Optional
13
13
 
14
14
  from ..stability import beta
15
15
 
16
+ __stability__ = "beta"
17
+
16
18
  __all__ = ["A2AError", "AgentCard", "AgentSkill", "A2ATask", "TaskState"]
17
19
 
18
20
  # A2A JSON-RPC protocol version advertised in the Agent Card.
@@ -0,0 +1,10 @@
1
+ """
2
+ Public exports for the agent package.
3
+ """
4
+
5
+ from .config import AgentConfig, PlanningConfig
6
+ from .core import Agent
7
+
8
+ __stability__ = "stable"
9
+
10
+ __all__ = ["Agent", "AgentConfig", "PlanningConfig"]