Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 3, 2025

Plugins can now be installed directly from GitHub releases. Users input a repository URL, select a release, choose an asset file, and install.

Backend Changes

New endpoints:

  • POST /api/v1/plugins/github/releases - Parse repo URL, fetch releases via GitHub API
  • POST /api/v1/plugins/github/release-assets - Fetch assets for selected release
  • POST /api/v1/plugins/install/github - Install from asset URL with metadata tracking

All requests use configured proxy. Release metadata (owner, repo, tag, URL) stored in install_info.

Frontend Changes

Multi-step dialog flow:

  1. Repository URL input with validation (github.com/owner/repo regex)
  2. Release selection (displays tag, name, date, pre-release badge)
  3. Asset selection (displays filename, size with auto-formatting)
  4. Confirmation with full install details

UI integration:

  • "GitHub安装" option in install dropdown
  • Back navigation between steps
  • Existing "From GitHub" badge displays for installed plugins with repo link
  • i18n support: zh-Hans, en-US, zh-Hant, ja-JP

SDK Dependency

Requires adding GITHUB = 'github' to PluginInstallSource enum in langbot-plugin-sdk. Installation handler must download from install_info['asset_url'] and store GitHub metadata.

# langbot_plugin/runtime/plugin/mgr.py
class PluginInstallSource(Enum):
    LOCAL = 'local'
    MARKETPLACE = 'marketplace'
    GITHUB = 'github'  # Required addition

Limitations

  • Public repositories only (no authentication)
  • GitHub API rate limits apply (60 req/hour unauthenticated)
  • Draft releases filtered out

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • registry.npmmirror.com
    • Triggering command: npm install (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

目前插件安装只支持 本地上传 和 插件市场 安装,有时候有些插件作者会仅发布到github,我们需要支持从github安装;

安装步骤如下:

  1. 用户在插件管理页面选择 “GitHub安装”
  2. 弹出对话框要求输入仓库地址
  3. 后端根据仓库地址获取仓库releases中的各个release,用户选择release,在同一对话框中展示该release中的各个文件,选中并确认后可以安装

注意:需要添加一种新的安装标记:来自GitHub
注意:你可能需要同时修改 langbot-app/langbot-plugin-sdk 仓库的代码


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

❌ Patch coverage is 7.46269% with 62 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/api/http/controller/groups/plugins.py 3.92% 49 Missing ⚠️
pkg/plugin/connector.py 18.75% 13 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copilot AI changed the title 目前插件安装只支持 本地上传 和 插件市场 安装,有时候有些插件作者会仅发布到github,我们需要支持从github安装; 安装步骤如下: 1. 用户在插件管理页面选择 “GitHub安装” 2. 弹出对话框要求输入仓库地址 3. 后端根据仓库地址获取仓库releases中的各个release,用户选择release,在同一对话框中展示该release中的各个文件,选中并确认后可以安装 注意:需要添加一种新的安装标记:来自GitHub 注意:你可能需要同时修改 langbot-app/lan... Add GitHub release installation for plugins Nov 3, 2025
Copilot AI requested a review from RockChinQ November 3, 2025 14:05
Copilot finished work on behalf of RockChinQ November 3, 2025 14:05
@RockChinQ RockChinQ marked this pull request as ready for review November 4, 2025 10:57
@RockChinQ RockChinQ force-pushed the copilot/fix-189527454-575321313-4c39a75f-f0d5-4107-8523-a2bfaa6a6068 branch from f82d593 to 950019d Compare November 4, 2025 11:42
@RockChinQ RockChinQ linked an issue Nov 4, 2025 that may be closed by this pull request
@RockChinQ RockChinQ merged commit 7699ba3 into master Nov 4, 2025
4 checks passed
@RockChinQ RockChinQ deleted the copilot/fix-189527454-575321313-4c39a75f-f0d5-4107-8523-a2bfaa6a6068 branch November 4, 2025 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Install plugin from GitHub release

2 participants