mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-11-22 05:27:07 +08:00
Unified Workspace and execution APIs for LangBot (#2639). - Versioned Application API shared by HTTP, MCP, the Workspace assistant and plugins, with one authorization and error contract. - Execution API facade for every plugin and Runner action. - Plugin installation permissions: manifest declarations, member confirmation, capability ceilings, compatibility mode, revocation and audit. Typed Workspace API in the plugin SDK. - Processor tool configuration: workspace operations, event and bot tools, default tool sets for new Agents and Pipelines, and sensitive-tool warnings. - Plugin permission picker in the WebUI; LocalAgent declares every plugin-callable permission. - Documentation for plugin permissions and the Workspace API in English, Chinese and Japanese. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
30 lines
1.0 KiB
Python
30 lines
1.0 KiB
Python
import pytest
|
|
|
|
from langbot.pkg.entity.persistence.plugin import PluginSetting
|
|
|
|
|
|
@pytest.fixture
|
|
def installed_legacy_plugin(monkeypatch):
|
|
async def load_installation(application, workspace_uuid, installation_uuid):
|
|
setting = application.test_plugin_installation
|
|
assert setting.workspace_uuid == workspace_uuid
|
|
assert setting.installation_uuid == installation_uuid
|
|
return setting
|
|
|
|
monkeypatch.setattr('langbot.pkg.api.application.plugin_permissions.load_installation', load_installation)
|
|
|
|
|
|
def install_legacy_plugin(application, binding, plugin_author, plugin_name):
|
|
application.test_plugin_installation = PluginSetting(
|
|
workspace_uuid=binding.workspace_uuid,
|
|
installation_uuid=binding.installation_uuid,
|
|
runtime_revision=binding.runtime_revision,
|
|
artifact_digest=binding.artifact_digest,
|
|
plugin_author=plugin_author,
|
|
plugin_name=plugin_name,
|
|
enabled=True,
|
|
permission_declaration=None,
|
|
permission_grants=None,
|
|
permission_snapshot=None,
|
|
)
|