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