Merge remote-tracking branch 'origin/master' into dev/4.11.x

# Conflicts:
#	src/langbot/pkg/pipeline/preproc/preproc.py
#	src/langbot/pkg/pipeline/process/handlers/chat.py
#	src/langbot/pkg/provider/runners/localagent.py
#	src/langbot/pkg/provider/tools/toolmgr.py
#	src/langbot/templates/metadata/pipeline/ai.yaml
#	tests/unit_tests/test_preproc.py
#	web/src/app/home/components/dynamic-form/DynamicFormComponent.tsx
#	web/src/app/home/pipelines/components/pipeline-form/PipelineFormComponent.tsx
This commit is contained in:
Junyan Qin
2026-06-30 21:07:13 +08:00
167 changed files with 16186 additions and 1722 deletions
+34 -3
View File
@@ -159,7 +159,11 @@ async def test_preproc_loads_host_tools_for_runner():
result = await stage.process(_make_query(), 'PreProcessor')
assert result.result_type == entities_module.ResultType.CONTINUE
app.tool_mgr.get_all_tools.assert_awaited_once_with(None, None)
app.tool_mgr.get_all_tools.assert_awaited_once_with(
None,
None,
include_mcp_resource_tools=True,
)
@pytest.mark.asyncio
@@ -180,7 +184,11 @@ async def test_preproc_puts_host_skill_tools_into_query_scope():
result = await stage.process(query, 'PreProcessor')
assert result.result_type == entities_module.ResultType.CONTINUE
app.tool_mgr.get_all_tools.assert_awaited_once_with(None, None)
app.tool_mgr.get_all_tools.assert_awaited_once_with(
None,
None,
include_mcp_resource_tools=True,
)
assert [tool.name for tool in query.use_funcs] == ['activate', 'register_skill']
@@ -195,7 +203,30 @@ async def test_preproc_loads_host_tools_regardless_of_skill_service():
result = await stage.process(_make_query(), 'PreProcessor')
assert result.result_type == entities_module.ResultType.CONTINUE
app.tool_mgr.get_all_tools.assert_awaited_once_with(None, None)
app.tool_mgr.get_all_tools.assert_awaited_once_with(
None,
None,
include_mcp_resource_tools=True,
)
@pytest.mark.asyncio
async def test_preproc_disables_mcp_resource_tools_when_agent_reading_is_disabled():
preproc_module, entities_module = _import_preproc_modules()
app = _make_app(skill_service=SimpleNamespace())
stage = preproc_module.PreProcessor(app)
query = _make_query()
query.variables['_pipeline_mcp_resource_agent_read_enabled'] = False
result = await stage.process(query, 'PreProcessor')
assert result.result_type == entities_module.ResultType.CONTINUE
app.tool_mgr.get_all_tools.assert_awaited_once_with(
None,
None,
include_mcp_resource_tools=False,
)
@pytest.mark.asyncio