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
+27
View File
@@ -273,6 +273,31 @@ class TestSharesFilesystemWithBox:
assert service.shares_filesystem_with_box is False
def test_separated_box_runtime_does_not_create_default_workspace_in_langbot(tmp_path):
logger = Mock()
runtime = BoxRuntime(logger=logger, backends=[FakeBackend(logger)], session_ttl_sec=300)
host_root = tmp_path / 'box'
service = BoxService(make_app(logger, host_root=str(host_root)), client=_InProcessBoxRuntimeClient(logger, runtime))
service._shares_filesystem_with_box_override = False
service._ensure_default_workspace()
assert not (host_root / 'default').exists()
def test_separated_box_runtime_allows_box_owned_missing_host_path(tmp_path):
logger = Mock()
runtime = BoxRuntime(logger=logger, backends=[FakeBackend(logger)], session_ttl_sec=300)
host_root = tmp_path / 'box'
service = BoxService(make_app(logger, host_root=str(host_root)), client=_InProcessBoxRuntimeClient(logger, runtime))
service._shares_filesystem_with_box_override = False
spec = service.build_spec({'cmd': 'echo hi', 'session_id': 'missing-host-path'})
assert spec.host_path == str(host_root / 'default')
assert not (host_root / 'default').exists()
@pytest.mark.asyncio
async def test_box_service_get_sessions_delegates_to_client():
client = Mock()
@@ -517,6 +542,7 @@ async def test_box_service_creates_default_workspace_on_initialize(tmp_path):
app = make_app(logger, [str(allowed_root)])
app.instance_config.data['box']['local']['default_workspace'] = str(default_workspace)
service = BoxService(app, client=_InProcessBoxRuntimeClient(logger, runtime))
service._shares_filesystem_with_box_override = True
await service.initialize()
@@ -531,6 +557,7 @@ async def test_box_service_derives_workspace_and_allowed_root_from_host_root(tmp
shared_root = tmp_path / 'shared-box-root'
app = make_app(logger, host_root=str(shared_root))
service = BoxService(app, client=_InProcessBoxRuntimeClient(logger, runtime))
service._shares_filesystem_with_box_override = True
await service.initialize()