Files
LangBot/scripts/export_execution_catalog.py
huanghuoguoguoandClaude Opus 5.5 97ef5b457d feat(api): provide Workspace and execution API foundations (#2648)
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>
2026-11-05 16:36:22 +08:00

26 lines
762 B
Python

"""Export ExecutionAPI catalog snapshot as JSON."""
from __future__ import annotations
import json
import sys
from pathlib import Path
from langbot.pkg.api.application.execution import ExecutionAPI
def export_catalog(output_path: Path) -> list[dict]:
api = ExecutionAPI(None)
catalog = api.catalog()
output_path.parent.mkdir(parents=True, exist_ok=True)
with open(output_path, 'w', encoding='utf-8') as f:
json.dump(catalog, f, indent=2, ensure_ascii=False)
f.write('\n')
return catalog
if __name__ == '__main__':
destination = Path(sys.argv[1]) if len(sys.argv) > 1 else Path('execution_api_catalog.json')
catalog = export_catalog(destination)
print(f'Exported {len(catalog)} operations to {destination}')