agentbyte 0.32.0__tar.gz → 0.32.1__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.
- {agentbyte-0.32.0 → agentbyte-0.32.1}/CHANGELOG.md +7 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/PKG-INFO +2 -2
- {agentbyte-0.32.0 → agentbyte-0.32.1}/README.md +1 -1
- {agentbyte-0.32.0 → agentbyte-0.32.1}/pyproject.toml +2 -0
- agentbyte-0.32.1/src/agentbyte/__about__.py +2 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/history/recorder.py +4 -24
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/history/sql.py +21 -14
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/history/sqlite.py +18 -12
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/history/store.py +21 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/eval/test_eval_history.py +35 -0
- agentbyte-0.32.0/src/agentbyte/__about__.py +0 -2
- {agentbyte-0.32.0 → agentbyte-0.32.1}/.gitignore +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/LICENSE +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/agents/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/agents/agent.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/agents/agent_as_tool.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/agents/base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/agents/embedding_agent.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/agents/types.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/cancellation_token.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/catalog.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/cli/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/cli/main.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/compaction/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/compaction/counters.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/compaction/errors.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/compaction/grouping.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/compaction/strategies.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/component.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/context.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/context_providers/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/context_providers/base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/context_providers/skill_tools.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/context_providers/skills.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/dataset/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/dataset/base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/dataset/config.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/dataset/importer.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/dataset/json.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/dataset/loader.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/dataset/publish.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/dataset/publish_config.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/dataset/publishers.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/dataset/sources.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/dataset/sqlite.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/dataset/sqlite_db.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/dataset/write_config.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/dataset/writers.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/entity.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/checks/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/checks/decorator.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/checks/keyword.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/checks/local.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/checks/process.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/checks/tool.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/checks/types.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/comparison.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/eval_dataset.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/history/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/history/conformance.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/history/errors.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/history/models.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/history/transitions.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/judges/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/judges/base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/judges/composite.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/judges/llm.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/judges/pairwise.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/judges/reference.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/judges/trajectory.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/judges/validation.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/pairwise.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/report.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/runner.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/splitting.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/targets/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/targets/agent.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/targets/model.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/targets/multi_turn.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/targets/orchestrator.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/targets/runtime.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/targets/workflow.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/eval/types.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/execution_trace/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/execution_trace/collector.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/execution_trace/models.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/llm/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/llm/_retry_observability.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/llm/auth.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/llm/azure/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/llm/azure/auth.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/llm/azure/chat.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/llm/azure/embedding.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/llm/azure/settings.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/llm/azure_openai.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/llm/azure_openai_embedding.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/llm/base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/llm/embeddings_base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/llm/openai/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/llm/openai/chat.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/llm/openai/embedding.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/llm/openai/settings.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/llm/openai_embedding.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/llm/pricing.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/llm/retry_policy.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/llm/settings.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/llm/types.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/logger.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/memory/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/memory/base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/messages.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/middleware/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/middleware/base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/middleware/otel.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/middleware/retry.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/middleware/sql_usage.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/middleware/usage_logger.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/notebook.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/optim/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/optim/base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/optim/config.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/optim/gepa.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/optim/mipro.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/optim/pareto.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/optim/reflective.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/optim/spec.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/optim/trace.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/orchestration/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/orchestration/ai.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/orchestration/base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/orchestration/handoff.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/orchestration/plan.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/orchestration/policies.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/orchestration/round_robin.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/presets/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/presets/agents.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/presets/clients.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/presets/instruction_registry.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/presets/instructions/orchestrator.yaml +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/presets/instructions/query_rewriter.yaml +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/presets/instructions/researcher.yaml +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/presets/instructions/reviewer.yaml +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/presets/instructions/writer.yaml +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/presets/orchestration.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/presets/skills/contracts-analyst/SKILL.md +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/presets/skills/hr-analyst/SKILL.md +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/presets/skills/hr-analyst/resources/departments.md +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/presets/skills/hr-analyst/resources/employees.md +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/presets/skills/hr-analyst/resources/payroll.md +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/presets/streaming.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/presets/workflow.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/session_store.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/skills/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/skills/base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/skills/resources.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/skills/scripts.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/skills/sources.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/skills/validation.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/termination/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/termination/base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/termination/cancellation.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/termination/composite.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/termination/consecutive_agent.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/termination/external.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/termination/function_call.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/termination/handoff.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/termination/max_message.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/termination/predicate.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/termination/source.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/termination/text_mention.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/termination/timeout.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/termination/token_usage.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/tools/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/tools/base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/tools/coding_tools.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/tools/core_tools.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/tools/decorator.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/tools/memory_tool.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/tools/research_tools.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/types.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/webui/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/webui/discovery.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/webui/execution.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/webui/models.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/webui/registry.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/webui/server.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/webui/session_store.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/webui/sessions.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/webui/ui/assets/index-BF3DwXaF.js +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/webui/ui/assets/index-ar5tOeqt.css +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/webui/ui/index.html +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/webui/ui/vite.svg +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/workflow/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/workflow/agent.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/workflow/core/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/workflow/core/_structure_hash.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/workflow/core/checkpoint.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/workflow/core/models.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/workflow/core/runner.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/workflow/core/workflow.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/workflow/defaults.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/workflow/errors.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/workflow/loader.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/workflow/schema.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/workflow/schema_utils.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/workflow/sqlite_checkpoint.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/workflow/steps/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/workflow/steps/agent.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/workflow/steps/echo.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/workflow/steps/function.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/workflow/steps/http.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/workflow/steps/step.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/workflow/steps/subworkflow.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/workflow/steps/transform.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/src/agentbyte/workflow/visualizer.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/agents/test_agent_as_tool.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/agents/test_agent_basic.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/agents/test_agent_context_providers.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/agents/test_agent_error_response.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/agents/test_agent_event_types.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/agents/test_agent_memory_integration.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/agents/test_agent_middleware_integration.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/agents/test_agent_response_accessors.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/agents/test_agent_retry_middleware.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/agents/test_agent_stream_events.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/agents/test_embedding_agent.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/agents/test_tool_approval.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/agents/test_tool_batch_resolution.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/agents/test_tool_metadata.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/cli/test_registry_check.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/compaction/test_compaction.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/context_providers/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/context_providers/test_skill_tools.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/context_providers/test_skills_provider.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/dataset/test_loader.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/dataset/test_multi_table.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/dataset/test_publish.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/dataset/test_sqlite_db.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/eval/test_eval_dataset.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/eval/test_eval_history_backends.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/eval/test_execution_trajectories.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/eval/test_multi_turn.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/eval/test_pairwise.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/eval/test_phase1_runner_and_targets.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/eval/test_phase2_checks_and_reports.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/eval/test_score_integrity.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/eval/test_splitting.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/eval/test_types_and_judges.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/examples/test_compaction_webapp.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/llm/test_azure_client.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/llm/test_azure_embedding_client.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/llm/test_llm_types.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/llm/test_openai_client.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/llm/test_openai_embedding_client.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/llm/test_pricing.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/llm/test_retry_observability.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/llm/test_retry_policy_api.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/llm/test_retryable_error_substrings.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/memory/test_memory.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/middleware/test_context_compaction.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/middleware/test_deduplicate_tool_result.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/middleware/test_middleware_chain.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/middleware/test_otel.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/middleware/test_retry_middleware.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/middleware/test_sql_usage.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/middleware/test_usage_logger.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/optim/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/optim/test_base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/optim/test_base_integration.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/optim/test_config.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/optim/test_gepa.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/optim/test_mipro.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/optim/test_pareto.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/optim/test_reflective.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/optim/test_score_integrity.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/optim/test_spec.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/optim/test_trace.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/orchestration/test_ai_orchestrator.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/orchestration/test_base_orchestrator.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/orchestration/test_handoff_orchestrator.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/orchestration/test_orchestrator_finalization.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/orchestration/test_plan_orchestrator.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/orchestration/test_round_robin.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/presets/test_agents.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/presets/test_clients.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/presets/test_instruction_registry.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/presets/test_orchestration.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/presets/test_streaming.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/presets/test_workflow.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/skills/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/skills/test_base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/skills/test_resources.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/skills/test_scripts.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/skills/test_sources.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/termination/test_base.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/termination/test_cancellation.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/termination/test_composite.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/termination/test_consecutive_agent.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/termination/test_external.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/termination/test_function_call.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/termination/test_handoff.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/termination/test_max_message.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/termination/test_predicate.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/termination/test_source.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/termination/test_text_mention.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/termination/test_timeout.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/termination/test_token_usage.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/test_cancellation_token.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/test_context.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/test_logger.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/test_messages.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/test_package_api.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/test_session_store.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/test_types.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/test_vanilla_chunker.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/tools/test_coding_tools.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/tools/test_memory_tool.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/tools/test_research_tools.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/tools/test_tools.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/webui/__init__.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/webui/helpers.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/webui/test_execution.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/webui/test_package_api.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/webui/test_registry.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/webui/test_server.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/webui/test_sessions.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/webui/test_workflow_streaming.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/workflow/recovery_worker.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/workflow/test_agent_step_imports.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/workflow/test_checkpoint.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/workflow/test_subworkflow_step.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/workflow/test_workflow_agent.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/workflow/test_workflow_class.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/workflow/test_workflow_models.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/workflow/test_workflow_reliability.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/workflow/test_workflow_runner.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/workflow/test_workflow_schema.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/workflow/test_workflow_steps.py +0 -0
- {agentbyte-0.32.0 → agentbyte-0.32.1}/tests/workflow/test_workflow_visualizer.py +0 -0
|
@@ -6,6 +6,13 @@ The format follows Keep a Changelog principles and semantic versioning.
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.32.1] - 2026-09-30
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- Evaluation history stores (`SQLiteEvalRunStore`, `SqlEvalRunStore`): a write that has started now commits or rolls back before a cancellation is delivered. Previously, cancelling a worker mid-write (for example by closing `evaluate_stream()` early) could leave the store lock held and hang `finish_run` on slow machines.
|
|
14
|
+
- CI: pytest dumps thread stacks after 60 s without progress (`faulthandler_timeout`), and the test job times out after 20 minutes instead of 1 hour.
|
|
15
|
+
|
|
9
16
|
## [0.32.0] - 2026-09-30
|
|
10
17
|
|
|
11
18
|
Upgrade notes (breaking):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: agentbyte
|
|
3
|
-
Version: 0.32.
|
|
3
|
+
Version: 0.32.1
|
|
4
4
|
Summary: A toolkit for designing multiagent systems
|
|
5
5
|
Author-email: MrDataPsycho <mr.data.psycho@gmail.com>
|
|
6
6
|
License-Expression: LicenseRef-Proprietary
|
|
@@ -90,7 +90,7 @@ Description-Content-Type: text/markdown
|
|
|
90
90
|
|
|
91
91
|
Agentbyte is an observability-first agentic AI framework for building and studying multiagent systems with a learning-first, implementation-oriented workflow.
|
|
92
92
|
|
|
93
|
-
Current release: **0.32.
|
|
93
|
+
Current release: **0.32.1**
|
|
94
94
|
|
|
95
95
|
## Building an Agent
|
|
96
96
|
|
|
@@ -4,8 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import asyncio
|
|
6
6
|
import contextlib
|
|
7
|
-
from collections.abc import AsyncIterator,
|
|
8
|
-
from typing import TypeVar
|
|
7
|
+
from collections.abc import AsyncIterator, Sequence
|
|
9
8
|
|
|
10
9
|
from agentbyte.cancellation_token import CancellationToken
|
|
11
10
|
from agentbyte.eval.base import BaseEvalTarget
|
|
@@ -28,30 +27,11 @@ from .models import (
|
|
|
28
27
|
task_type,
|
|
29
28
|
utc_now,
|
|
30
29
|
)
|
|
31
|
-
from .store import EvalRunStore
|
|
32
|
-
|
|
33
|
-
T = TypeVar("T")
|
|
30
|
+
from .store import EvalRunStore, _uninterrupted
|
|
34
31
|
|
|
35
32
|
_DONE = object()
|
|
36
33
|
|
|
37
34
|
|
|
38
|
-
async def _settle(awaitable: Awaitable[T]) -> T:
|
|
39
|
-
"""Finish a cleanup write even if the caller is cancelled meanwhile."""
|
|
40
|
-
task = asyncio.ensure_future(awaitable)
|
|
41
|
-
cancelled = False
|
|
42
|
-
while not task.done():
|
|
43
|
-
try:
|
|
44
|
-
await asyncio.shield(task)
|
|
45
|
-
except asyncio.CancelledError:
|
|
46
|
-
if task.done():
|
|
47
|
-
break
|
|
48
|
-
cancelled = True
|
|
49
|
-
if cancelled:
|
|
50
|
-
task.result()
|
|
51
|
-
raise asyncio.CancelledError()
|
|
52
|
-
return task.result()
|
|
53
|
-
|
|
54
|
-
|
|
55
35
|
def _error_code(exc: BaseException) -> str:
|
|
56
36
|
if isinstance(exc, EvalRedactionError):
|
|
57
37
|
return "redaction_error"
|
|
@@ -258,10 +238,10 @@ class EvalRunRecorder:
|
|
|
258
238
|
finally:
|
|
259
239
|
if not driver.done():
|
|
260
240
|
driver.cancel()
|
|
261
|
-
await
|
|
241
|
+
await _uninterrupted(asyncio.wait([driver]))
|
|
262
242
|
code = _error_code(error) if error is not None else None
|
|
263
243
|
try:
|
|
264
|
-
await
|
|
244
|
+
await _uninterrupted(self.store.finish_run(run.id, status, error=code))
|
|
265
245
|
except Exception as finish_error:
|
|
266
246
|
if error is None:
|
|
267
247
|
raise
|
|
@@ -50,7 +50,7 @@ from .models import (
|
|
|
50
50
|
deserialize_evidence,
|
|
51
51
|
serialize_evidence,
|
|
52
52
|
)
|
|
53
|
-
from .store import EvalRunStore
|
|
53
|
+
from .store import EvalRunStore, _uninterrupted
|
|
54
54
|
from .transitions import (
|
|
55
55
|
admit,
|
|
56
56
|
admitted_duplicate,
|
|
@@ -300,19 +300,26 @@ class SqlEvalRunStore(EvalRunStore):
|
|
|
300
300
|
raise EvalHistoryError("History store was opened read-only")
|
|
301
301
|
async with self._lock:
|
|
302
302
|
self._check_open()
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
303
|
+
# A started transaction commits or rolls back before cancellation is
|
|
304
|
+
# delivered, so a cancelled caller never leaves the lock held mid-write.
|
|
305
|
+
return await _uninterrupted(self._transaction(run_id, action, body))
|
|
306
|
+
|
|
307
|
+
async def _transaction(
|
|
308
|
+
self, run_id: str | None, action: str, body: Callable[[AsyncSession], Awaitable[T]]
|
|
309
|
+
) -> T:
|
|
310
|
+
try:
|
|
311
|
+
async with self._session() as session:
|
|
312
|
+
try:
|
|
313
|
+
result = await body(session)
|
|
314
|
+
await session.commit()
|
|
315
|
+
return result
|
|
316
|
+
except BaseException:
|
|
317
|
+
await _settle(session.rollback())
|
|
318
|
+
raise
|
|
319
|
+
except (EvalHistoryError, ValueError):
|
|
320
|
+
raise
|
|
321
|
+
except Exception as exc:
|
|
322
|
+
raise EvalPersistenceError(f"Could not {action}", run_id=run_id) from exc
|
|
316
323
|
|
|
317
324
|
async def _read(self, run_id: str | None, statement: Any) -> list[Any]:
|
|
318
325
|
self._check_open()
|
|
@@ -28,7 +28,7 @@ from .models import (
|
|
|
28
28
|
deserialize_evidence,
|
|
29
29
|
serialize_evidence,
|
|
30
30
|
)
|
|
31
|
-
from .store import EvalRunStore
|
|
31
|
+
from .store import EvalRunStore, _uninterrupted
|
|
32
32
|
from .transitions import (
|
|
33
33
|
admit,
|
|
34
34
|
admitted_duplicate,
|
|
@@ -209,17 +209,23 @@ class SQLiteEvalRunStore(EvalRunStore):
|
|
|
209
209
|
if not self.writer:
|
|
210
210
|
raise EvalHistoryError("History store was opened read-only")
|
|
211
211
|
async with self._lock:
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
212
|
+
# A started transaction commits or rolls back before cancellation is
|
|
213
|
+
# delivered, so a cancelled caller never leaves the lock held mid-write.
|
|
214
|
+
return await _uninterrupted(self._transaction(self._db(), run_id, action, body))
|
|
215
|
+
|
|
216
|
+
async def _transaction(
|
|
217
|
+
self, connection: Any, run_id: str | None, action: str, body: Callable[[Any], Awaitable[T]]
|
|
218
|
+
) -> T:
|
|
219
|
+
try:
|
|
220
|
+
await connection.execute("BEGIN IMMEDIATE")
|
|
221
|
+
result = await body(connection)
|
|
222
|
+
await connection.commit()
|
|
223
|
+
return result
|
|
224
|
+
except BaseException as exc:
|
|
225
|
+
await self._rollback(connection)
|
|
226
|
+
if isinstance(exc, (EvalHistoryError, ValueError)) or not isinstance(exc, Exception):
|
|
227
|
+
raise
|
|
228
|
+
raise EvalPersistenceError(f"Could not {action}", run_id=run_id) from exc
|
|
223
229
|
|
|
224
230
|
async def _read(self, run_id: str | None, sql: str, params: tuple = ()) -> list:
|
|
225
231
|
async with self._lock:
|
|
@@ -4,6 +4,8 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import asyncio
|
|
6
6
|
from abc import ABC, abstractmethod
|
|
7
|
+
from collections.abc import Awaitable
|
|
8
|
+
from typing import TypeVar
|
|
7
9
|
|
|
8
10
|
from .errors import EvalHistoryConflictError, EvalRunNotFoundError
|
|
9
11
|
from .models import (
|
|
@@ -26,6 +28,25 @@ from .transitions import (
|
|
|
26
28
|
start,
|
|
27
29
|
)
|
|
28
30
|
|
|
31
|
+
T = TypeVar("T")
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
async def _uninterrupted(awaitable: Awaitable[T]) -> T:
|
|
35
|
+
"""Run ``awaitable`` to completion, then deliver any cancellation received meanwhile."""
|
|
36
|
+
task = asyncio.ensure_future(awaitable)
|
|
37
|
+
cancelled = False
|
|
38
|
+
while not task.done():
|
|
39
|
+
try:
|
|
40
|
+
await asyncio.shield(task)
|
|
41
|
+
except asyncio.CancelledError:
|
|
42
|
+
if task.done():
|
|
43
|
+
break
|
|
44
|
+
cancelled = True
|
|
45
|
+
if cancelled:
|
|
46
|
+
task.result()
|
|
47
|
+
raise asyncio.CancelledError()
|
|
48
|
+
return task.result()
|
|
49
|
+
|
|
29
50
|
|
|
30
51
|
class EvalRunStore(ABC):
|
|
31
52
|
"""Durable ledger of evaluation runs and their planned items.
|
|
@@ -233,6 +233,41 @@ async def test_closing_stream_cancels_active_work_and_closes_run(kind, tmp_path)
|
|
|
233
233
|
assert run.finished_count + run.cancelled_count + run.not_started_count == run.planned_count
|
|
234
234
|
|
|
235
235
|
|
|
236
|
+
@pytest.mark.parametrize("kind", ["sqlite", "sql"])
|
|
237
|
+
@pytest.mark.asyncio
|
|
238
|
+
async def test_cancelled_write_commits_before_cancellation_is_delivered(kind, tmp_path) -> None:
|
|
239
|
+
async with open_store(kind, tmp_path) as store:
|
|
240
|
+
run = EvalRunRecord(dataset_id="d", target_id="t", judge_name="j", judge_type="J")
|
|
241
|
+
items = [EvalItemRecord(run_id=run.id, item_index=i, task_name="x", task_type="task") for i in range(2)]
|
|
242
|
+
await store.create_run(run, items)
|
|
243
|
+
await store.start_run(run.id)
|
|
244
|
+
|
|
245
|
+
entered, release = asyncio.Event(), asyncio.Event()
|
|
246
|
+
put_item = store._put_item
|
|
247
|
+
|
|
248
|
+
async def slow_put_item(*args, **kwargs):
|
|
249
|
+
entered.set()
|
|
250
|
+
await release.wait()
|
|
251
|
+
await put_item(*args, **kwargs)
|
|
252
|
+
|
|
253
|
+
store._put_item = slow_put_item
|
|
254
|
+
write = asyncio.create_task(store.mark_item_running(run.id, 0))
|
|
255
|
+
await entered.wait()
|
|
256
|
+
write.cancel()
|
|
257
|
+
await asyncio.sleep(0.05)
|
|
258
|
+
assert not write.done() # the transaction is not abandoned while holding the store lock
|
|
259
|
+
|
|
260
|
+
release.set()
|
|
261
|
+
with pytest.raises(asyncio.CancelledError):
|
|
262
|
+
await write
|
|
263
|
+
del store._put_item
|
|
264
|
+
|
|
265
|
+
assert (await store.get_item(run.id, 0)).state == "running"
|
|
266
|
+
final = await asyncio.wait_for(store.finish_run(run.id, "cancelled"), 5)
|
|
267
|
+
assert final.status == "cancelled"
|
|
268
|
+
assert final.cancelled_count == 1 and final.not_started_count == 1
|
|
269
|
+
|
|
270
|
+
|
|
236
271
|
@pytest.mark.asyncio
|
|
237
272
|
async def test_task_cancellation_closes_run_as_cancelled(tmp_path) -> None:
|
|
238
273
|
gate = asyncio.Event()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|