react-agent-harness 0.3.0__tar.gz → 0.3.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.
- {react_agent_harness-0.3.0/react_agent_harness.egg-info → react_agent_harness-0.3.1}/PKG-INFO +1 -1
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/harness/runtime.py +3 -2
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/pyproject.toml +1 -1
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1/react_agent_harness.egg-info}/PKG-INFO +1 -1
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/tests/test_steering.py +67 -1
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/LICENSE +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/README.md +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/agents/__init__.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/agents/base.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/harness/__init__.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/harness/annotation.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/harness/checkpoint.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/harness/cli.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/harness/events.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/harness/executor_bridge.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/harness/hitl.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/harness/llm/__init__.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/harness/llm/_streaming.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/harness/llm/auth.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/harness/llm/claude_code.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/harness/llm/openai.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/harness/llm/openai_codex.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/harness/otel.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/harness/steering.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/harness/utils.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/memory/__init__.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/memory/episodic_lance.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/memory/manager.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/memory/redis_store.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/memory/stores.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/memory/working.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/orchestrator/__init__.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/orchestrator/planner.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/react_agent_harness.egg-info/SOURCES.txt +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/react_agent_harness.egg-info/dependency_links.txt +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/react_agent_harness.egg-info/entry_points.txt +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/react_agent_harness.egg-info/requires.txt +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/react_agent_harness.egg-info/top_level.txt +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/setup.cfg +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/tests/test_agents_base.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/tests/test_annotation.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/tests/test_checkpoint_resume.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/tests/test_claude_code_llm.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/tests/test_cli.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/tests/test_executor_bridge.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/tests/test_http_fetch.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/tests/test_llm_auth.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/tests/test_mcp_adapter.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/tests/test_memory.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/tests/test_openai_codex_llm.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/tests/test_openai_llm.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/tests/test_orchestrator.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/tests/test_otel.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/tests/test_parse_action_json.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/tests/test_redis_store.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/tests/test_streaming.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/tests/test_utils.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/tests/test_vision.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/tests/test_working_memory.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/tools/__init__.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/tools/builtin/__init__.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/tools/builtin/fetch_image.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/tools/builtin/http_fetch.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/tools/mcp/__init__.py +0 -0
- {react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/tools/mcp/adapter.py +0 -0
|
@@ -781,8 +781,9 @@ class AgentRuntime:
|
|
|
781
781
|
run_id = str(uuid.uuid4())
|
|
782
782
|
tracer.start_run(run_id, task)
|
|
783
783
|
try:
|
|
784
|
-
async
|
|
785
|
-
|
|
784
|
+
async with self._steering_lifecycle():
|
|
785
|
+
async for event in self._run_agent_with_tracer(agent_id, task, tracer, run_id):
|
|
786
|
+
yield event
|
|
786
787
|
finally:
|
|
787
788
|
tracer.end_run()
|
|
788
789
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "react-agent-harness"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.1"
|
|
8
8
|
description = "Multi-agent LLM orchestration: hybrid DAG planning, two-tier memory, streaming"
|
|
9
9
|
requires-python = ">=3.10"
|
|
10
10
|
dependencies = [
|
|
@@ -18,7 +18,14 @@ from prompt_toolkit.output import DummyOutput
|
|
|
18
18
|
|
|
19
19
|
from agents.base import AgentConfig, BaseAgent
|
|
20
20
|
from harness.events import EventType
|
|
21
|
-
from harness.runtime import
|
|
21
|
+
from harness.runtime import (
|
|
22
|
+
AgentRegistry,
|
|
23
|
+
AgentRuntime,
|
|
24
|
+
BudgetGuard,
|
|
25
|
+
GuardrailConfig,
|
|
26
|
+
ToolRegistry,
|
|
27
|
+
Tracer,
|
|
28
|
+
)
|
|
22
29
|
from harness.steering import (
|
|
23
30
|
FileSteer,
|
|
24
31
|
StdinAgentSource,
|
|
@@ -661,3 +668,62 @@ async def test_stdin_steering_factory_subscribes_each_agent():
|
|
|
661
668
|
# Verify it actually subscribed.
|
|
662
669
|
assert "a" in router.active_prefixes()
|
|
663
670
|
assert "a" not in router.active_prefixes()
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
# ── AgentRuntime.run_agent_stream steering lifecycle ─────────────────────────
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
@pytest.mark.asyncio
|
|
677
|
+
async def test_run_agent_stream_starts_steering_lifecycle(llm, memory):
|
|
678
|
+
"""run_agent_stream must enter the steering lifecycle so the factory's
|
|
679
|
+
__aenter__/__aexit__ are called — regression test for the single-agent
|
|
680
|
+
steering bug where the lifecycle wrapper was missing."""
|
|
681
|
+
llm.routes = {
|
|
682
|
+
"react": lambda *_: {
|
|
683
|
+
"thought": "done",
|
|
684
|
+
"action": "finish",
|
|
685
|
+
"answer": "ok",
|
|
686
|
+
"confidence": 1.0,
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
entered = False
|
|
691
|
+
exited = False
|
|
692
|
+
|
|
693
|
+
class _LifecycleFactory:
|
|
694
|
+
"""Looks like a stdin_steering_factory — has both lifecycle and per-agent call."""
|
|
695
|
+
|
|
696
|
+
async def __aenter__(self):
|
|
697
|
+
nonlocal entered
|
|
698
|
+
entered = True
|
|
699
|
+
return self
|
|
700
|
+
|
|
701
|
+
async def __aexit__(self, *exc):
|
|
702
|
+
nonlocal exited
|
|
703
|
+
exited = True
|
|
704
|
+
|
|
705
|
+
def __call__(self, agent: BaseAgent):
|
|
706
|
+
import contextlib
|
|
707
|
+
|
|
708
|
+
@contextlib.asynccontextmanager
|
|
709
|
+
async def _noop():
|
|
710
|
+
yield
|
|
711
|
+
|
|
712
|
+
return _noop()
|
|
713
|
+
|
|
714
|
+
config = AgentConfig(agent_id="solo", role="r", system_prompt="react", allowed_tools=[])
|
|
715
|
+
agent_reg = AgentRegistry()
|
|
716
|
+
agent_reg.register(config)
|
|
717
|
+
|
|
718
|
+
runtime = AgentRuntime(
|
|
719
|
+
agent_registry=agent_reg,
|
|
720
|
+
tool_registry=ToolRegistry(),
|
|
721
|
+
memory=memory,
|
|
722
|
+
llm=llm,
|
|
723
|
+
steering_source_factory=_LifecycleFactory(),
|
|
724
|
+
)
|
|
725
|
+
|
|
726
|
+
events = [ev async for ev in runtime.run_agent_stream("solo", "test task")]
|
|
727
|
+
assert any(ev.type == EventType.TASK_DONE for ev in events)
|
|
728
|
+
assert entered, "steering lifecycle __aenter__ was never called"
|
|
729
|
+
assert exited, "steering lifecycle __aexit__ was never called"
|
|
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
|
{react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/react_agent_harness.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/react_agent_harness.egg-info/requires.txt
RENAMED
|
File without changes
|
{react_agent_harness-0.3.0 → react_agent_harness-0.3.1}/react_agent_harness.egg-info/top_level.txt
RENAMED
|
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
|