mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-09-17 07:17:18 +00:00
feat(runner): unify plugin execution across agents and event processors
This commit is contained in:
@@ -80,7 +80,7 @@ def configure_handler(connector, runtime_handler):
|
||||
async def _collect_agent_results(connector, context):
|
||||
return [
|
||||
result
|
||||
async for result in connector.run_agent(
|
||||
async for result in connector.run_runner(
|
||||
'qa',
|
||||
'agent-runner',
|
||||
'default',
|
||||
@@ -98,7 +98,7 @@ class TestRunAgent:
|
||||
class RuntimeHandler:
|
||||
installation_scope = Mock(side_effect=lambda _binding: nullcontext())
|
||||
|
||||
async def run_agent(self, *_args):
|
||||
async def run_runner(self, *_args):
|
||||
yield {'type': 'run.completed'}
|
||||
|
||||
configure_handler(connector, RuntimeHandler())
|
||||
|
||||
@@ -356,7 +356,7 @@ async def test_marketplace_upgrade_reports_multistep_progress():
|
||||
connector._persist_installation_package = AsyncMock(side_effect=persist)
|
||||
connector.handler.apply_plugin_installation = AsyncMock(side_effect=apply)
|
||||
connector._wait_for_installed_plugin_ready = AsyncMock(side_effect=wait_until_ready)
|
||||
connector._refresh_agent_runner_registry = AsyncMock(side_effect=refresh_registry)
|
||||
connector._refresh_runner_registry = AsyncMock(side_effect=refresh_registry)
|
||||
|
||||
await connector.upgrade_plugin('author', 'plugin', task_context=task_context)
|
||||
|
||||
|
||||
@@ -816,7 +816,7 @@ class TestHandlerQueryLookup:
|
||||
|
||||
|
||||
class TestAgentRunProxyActions:
|
||||
"""Tests for AgentRunner proxy actions that need host Query semantics."""
|
||||
"""Tests for Runner proxy actions that need host Query semantics."""
|
||||
|
||||
@pytest.fixture
|
||||
def app(self):
|
||||
@@ -1556,8 +1556,8 @@ class TestAgentRunProxyActions:
|
||||
from langbot.pkg.agent.runner.session_registry import get_session_registry
|
||||
from langbot.pkg.provider.tools.loaders.native import NativeToolLoader
|
||||
from langbot.pkg.provider.tools.toolmgr import ToolManager
|
||||
from langbot_plugin.api.entities.builtin.agent_runner.delivery import DeliveryContext
|
||||
from langbot_plugin.api.entities.builtin.agent_runner.input import AgentInput
|
||||
from langbot_plugin.api.entities.builtin.runner.delivery import DeliveryContext
|
||||
from langbot_plugin.api.entities.builtin.runner.input import AgentInput
|
||||
|
||||
event = AgentEventEnvelope(
|
||||
event_id='event-native-exec',
|
||||
|
||||
Reference in New Issue
Block a user